WO2020037578A1 - Method, device, and storage medium for controlling use of blockchain resource - Google Patents

Method, device, and storage medium for controlling use of blockchain resource Download PDF

Info

Publication number
WO2020037578A1
WO2020037578A1 PCT/CN2018/101827 CN2018101827W WO2020037578A1 WO 2020037578 A1 WO2020037578 A1 WO 2020037578A1 CN 2018101827 W CN2018101827 W CN 2018101827W WO 2020037578 A1 WO2020037578 A1 WO 2020037578A1
Authority
WO
WIPO (PCT)
Prior art keywords
blockchain
user
warrants
application
technology platform
Prior art date
Application number
PCT/CN2018/101827
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2018/101827 priority Critical patent/WO2020037578A1/en
Priority to CN201880002221.9A priority patent/CN109690600B/en
Publication of WO2020037578A1 publication Critical patent/WO2020037578A1/en

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/386Payment protocols; Details thereof using messaging services or messaging apps
    • 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]
    • 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
    • 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
    • G06Q2220/00Business processing using cryptography
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of blockchain technology, and in particular, this application relates to a method, device, and storage medium for controlling the use of blockchain resources.
  • Blockchain technology is a new application mode technology that combines computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, and encryption algorithms. Based on the blockchain platform, multiple blockchain applications can be developed. Blockchain applications can run on the IOS operating system and the Android operating system. For users of blockchain applications, the blockchain platform is approximately a "common land”. If users of blockchain applications use blockchain platform resources normally, the underlying blockchain resources can fully meet user needs. However, if the blockchain platform encounters a malicious attack, it is easy to cause the abuse of blockchain resources and produce the so-called “tragedy of the commons.”
  • each transaction initiated by the user needs to spend Gas (fuel cost), preventing the abuse of resources at the user's own cost.
  • Gas fuel cost
  • This also leads to a higher threshold for users, which directly increases the cost of use, which is not conducive to the large-scale application of projects in blockchain applications.
  • the EOS (Enterprise Operation System) project proposes a mechanism similar to "margin", that is, a certain amount of frozen funds need to be deposited in each user account, and the blockchain resources that the account can use are directly proportional to its frozen funds. This method solves the problem that every transaction needs to consume, but it will lead to the problem of centralization. At the same time, it does not solve the threshold problem of using blockchain applications.
  • This application proposes a method, device, and storage medium for controlling the use of blockchain resources to prevent the abuse of blockchain resources in a blockchain platform and to rationalize the use of blockchain resources.
  • the blockchain system includes a blockchain technology platform and a blockchain application.
  • the blockchain technology platform includes a number of blockchain nodes for Provide basic functions for the blockchain application; develop the blockchain application based on the basic functions provided by the blockchain technology platform; use the blocks of the blockchain technology platform when the blockchain application is running Chain resources; the method includes:
  • the warrants are virtual fees paid to the blockchain node when the user uses non-transaction service resources provided by the blockchain technology platform;
  • a user of the blockchain application is determined to use the non-transaction service resource provided by the blockchain technology platform, a corresponding number of warrants of the user are deducted according to the usage situation;
  • a warrant owned by a user of the blockchain application is detected When it is zero, the user's identity is verified; if the user's identity passes the authenticity verification, a second preset number of warrants are issued to the user; if the user's identity fails the authenticity verification, the user is prohibited Use the non-transaction service resources provided by the blockchain technology platform.
  • the method further includes: controlling an initial value of the warrant of the user of the blockchain application within a first preset time period to the first preset number.
  • the method further includes: transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform.
  • the transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform includes: allocating the corresponding number of warrants according to the workload of the blockchain node To each blockchain node of the blockchain technology platform.
  • the method further includes: The number of tokens of a blockchain node, and a corresponding number of tokens are issued to each of the blockchain nodes.
  • the second preset number is smaller than the first preset number.
  • the method further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than the preset number of times.
  • the blockchain application is an instant messaging application; when the user of the blockchain application is determined to use a non-transaction service provided by the blockchain technology platform, the user is deducted according to the usage situation
  • the corresponding number of warrants includes: confirming that when a user of the instant messaging application uses the blockchain technology platform for instant messaging, the corresponding amount of the warrant is deducted according to the amount of data generated by the instant messaging.
  • a device for controlling the use of blockchain resources based on a blockchain system includes a blockchain technology platform and a blockchain application.
  • the blockchain technology platform includes a number of blockchain nodes for Provide basic functions for the blockchain application; develop the blockchain application based on the basic functions provided by the blockchain technology platform; use the blocks of the blockchain technology platform when the blockchain application is running Chain resources; the device includes:
  • a first issuing module that issues a first preset number of warrants to users of the blockchain application; the warrants are paid to the blockchain when the user uses non-transaction service resources provided by the blockchain technology platform Node's virtual fee; deduction module, used to determine when the user of the blockchain application uses the non-transaction service resources provided by the blockchain technology platform, deduct a corresponding number of warrants of the user according to the usage situation; verification module Is used to verify the authenticity of the user's identity when it is detected that the user of the blockchain application has zero warrants; the second issuing module is used to issue the user's identity to the user if the identity verification is passed A second preset number of warrants; a prohibition module for prohibiting the user from using the non-transaction service resource provided by the blockchain technology platform if the user's identity has not passed the authenticity verification.
  • a storage medium stores a computer program thereon; the computer program is adapted to be loaded by a processor and execute the method for controlling the use of a blockchain resource according to any of the above embodiments.
  • Blockchain systems include blockchain technology platforms and blockchain applications. This method issues warrants to users of blockchain applications for payment to blockchain nodes when using non-transaction service resources provided by the blockchain platform.
  • a user of a blockchain application uses the non-transaction service resources provided by the blockchain technology platform, the user's corresponding number of warrants is deducted according to the usage.
  • the warrants of users of blockchain applications gradually decrease with usage. If the user maliciously attacks the blockchain platform and abuses the underlying blockchain resources of the platform, the user's warrants are consumed quickly. When the user has zero warrants, the system verifies the authenticity of the user's identity.
  • the user is a malicious attack platform and abuses the blockchain resources
  • the user's identity has not passed the authenticity verification of the system.
  • the system will prohibit the user from using the non-transaction service resources provided by the blockchain technology platform, so the block can be avoided.
  • the system can continue to issue a corresponding number of warrants to the user to ensure that the authenticity of the platform users use the platform normally.
  • FIG. 1 is a schematic diagram of a hardware environment composed of a terminal and a blockchain system according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a blockchain system according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for controlling use of a blockchain resource based on a blockchain system according to an embodiment of the present application
  • FIG. 4 is a schematic flow chart of a method for controlling the use of a blockchain resource based on a blockchain system according to another embodiment of the present application;
  • FIG. 5 is a schematic flowchart of a method for controlling use of a blockchain resource based on a blockchain system according to another embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a blockchain resource use control device based on a blockchain system according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
  • the method for controlling the use of blockchain resources based on the blockchain system provided in the embodiment of the present application can be applied to the hardware environment composed of the terminal 100 and the blockchain system 200 as shown in FIG. 1. As shown in FIG. 1, the terminal 100 and the blockchain system 200 are connected through a network.
  • the method for controlling the use of blockchain resources based on the blockchain system provided in the embodiment of the present application may be in a server included in the blockchain system 200 carried out.
  • the terminal 100 sends a transaction activity service application or a non-transaction activity service application to the blockchain system 200.
  • the server included in the blockchain system 200 is used to respond to a transaction activity service application or a non-transaction activity service application sent by the terminal 100.
  • the terminal 100 may include terminal devices such as a notebook computer, a desktop computer, a tablet computer, and a mobile phone.
  • the blockchain system 200 includes a plurality of blockchain nodes.
  • a blockchain node can be a node that becomes a blockchain after successful server mining.
  • This application provides a method for controlling the use of blockchain resources based on the blockchain system, which is used to control the users of the terminal 100 to use the blockchain resources in the blockchain system 200.
  • the blockchain system 200 includes a blockchain technology platform 10 and a blockchain application 20.
  • the blockchain technology platform 10 includes several blockchain nodes for providing blockchain resources and various basic functions to the blockchain application 20.
  • the blockchain technology platform 10 provides a development environment and development resources for various applications developed based on the technology platform, and provides technical support for the use of the various applications.
  • the blockchain application 20 is an application developed based on the basic functions provided by the blockchain technology platform 10, and the blockchain application 20 uses the blockchain resources of the blockchain technology platform 10 at runtime.
  • the blockchain resources provided by the blockchain technology platform 10 to the blockchain application 20 include non-transaction service resources required by the blockchain application 20 to implement non-transaction activities and transaction service resources required to implement transaction activities.
  • This application is mainly aimed at controlling the use of blockchain resources when blockchain applications implement non-transactional activities.
  • the system issues a certain number of warrants to users of the blockchain application 20, which are used to pay users of the blockchain nodes in the blockchain technology platform 10 as non-transaction service resources provided by the blockchain technology platform 10. Virtual expenses.
  • the system When users of blockchain applications use the non-transaction type services provided by the blockchain technology platform, the system does not need to collect user tokens. However, it is precisely because the system provides users with non-transaction-type services for free, which has led to some malicious users abusing non-transaction services and wasting blockchain resources. For example, malicious users frequently use the non-transaction type services provided by the blockchain technology platform, which leads to the abuse of the blockchain resources of the underlying technology platform.
  • the method for controlling the use of blockchain resources based on the blockchain system described in this application prevents malicious users from abusing the blockchain resources provided by the blockchain technology platform.
  • the method for controlling the use of blockchain resources based on the blockchain system described in this application includes the following steps:
  • Warrants are consumption proofs that users consume non-transaction service resources provided by the blockchain technology platform and need to pay to the system.
  • the system also transfers the warrants consumed by users to the corresponding blockchain in the blockchain technology platform that provides non-transaction service resources node.
  • the system issues a first preset number of warrants to users of the blockchain application, so that the user pays each of the services provided in the blockchain technology platform when using non-transaction service resources in the blockchain resources.
  • the first preset number of warrants may be determined according to the number of user-consumption warrants preset in a preset preset period of time.
  • the blockchain application is an instant messaging application.
  • the non-transaction service resources provided by users using the blockchain technology platform include users sending text messages, voice messages, and video messages through the instant messaging application.
  • the first preset number of warrants can be determined according to the following methods:
  • the amount of data used by the user to send messages using the instant messaging application within a preset period of time is obtained, and the number of warrants issued to the user by the system within the preset period of time is determined based on the amount of data.
  • the method for controlling the use of a blockchain resource based on a blockchain system further includes: controlling an initial value of a warrant of a user of the blockchain application within a first preset time period to the first Preset number.
  • the system periodically issues a first preset number of warrants to users of the blockchain application.
  • an initial value of a user's warrant for controlling a blockchain application within each of the first preset times is the first preset number.
  • the system first issues a first preset number of warrants to users of a blockchain application. After the first preset time period, it is detected that a certain number of warrants remain in the user's account. At this time, the system sets the number of warrants of the user to the first preset number within the next first preset time. For example, the system issues a first preset number of warrants to users of a blockchain application at 1:00 of the day. Regardless of whether the user has used the first preset number of warrants within the current day, the system resets the number of warrants of the user to the first preset number at 00:00 of the next day to ensure users of blockchain applications The initial value of the warrant in each day is the first preset number.
  • the system when the system detects that a user of a blockchain application uses a non-transaction service resource provided by a blockchain technology platform, the user will be deducted a corresponding number of warrants.
  • the blockchain application is an instant messaging application
  • the non-transaction service resource is an amount of data generated by a user sending a message through the instant messaging application.
  • the number of blockchain resources consumed by the blockchain technology platform here is the number of the non-transaction service resources, so as to calculate the user sent through the instant messaging application
  • the relationship between the amount of data generated by the message and the number of non-transaction service resources are determined quantity.
  • Step S200 includes:
  • the instant messaging application is an application developed based on the blockchain technology platform.
  • the instant messaging application performs functional operations through the blockchain resources provided by the blockchain technology platform.
  • the non-transaction service resources provided by the blockchain technology platform are consumed, and the system deducts the corresponding number of warrants of the user according to the amount of data generated by the instant communication.
  • the amount of data generated by instant messaging includes the amount of data generated by sending text messages, voice messages, and video messages.
  • the non-transaction service resources provided by the blockchain technology platform are indirectly used. Each use consumes a corresponding number of warrants.
  • the system issues the number of warrants to users of the blockchain application within a preset period of time to meet the normal use of the users of each blockchain application within the preset period of time.
  • the blockchain resources are abused by using the blockchain application, the user's warrants will be quickly consumed within the preset time period. Finish.
  • the system detects that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity.
  • the system can automatically detect whether the user's warrant for each blockchain application is zero. When it is detected that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Alternatively, when the user's warrant of the blockchain application is zero, the user actively applies for identity authenticity verification to the system. After the system responds to the application of the user of the blockchain application, the identity of the user is verified.
  • the users of the blockchain application may be maliciously attacking the users of the blockchain technology platform.
  • the “mining” successful server becomes a blockchain node in the blockchain technology platform.
  • a “mining” unsuccessful server cannot become a blockchain node, it is likely to maliciously attack the blockchain technology platform, causing abuse and waste of blockchain resources in the platform.
  • the identity of the user of the blockchain application passes the authenticity verification, it means that the user is not a user who maliciously attacks the blockchain technology platform, and the user belongs to the blockchain resources provided by the blockchain technology platform within the normal scope. At this time, the system will issue a warrant to the user again so that the user can continue to use the non-transaction service resources of the blockchain technology platform.
  • the second preset number of warrants issued to the user is less than the first preset number of warrants. Specifically, each time a user's identity passes the authenticity verification, the number of warrants issued to the user by the system is less than the number of warrants issued last time. It can be that the number of warrants issued to the user by the system is half of the number of warrants issued last time.
  • the method for controlling the use of blockchain resources based on the blockchain system further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than a preset number of times.
  • the second preset time may be the same as or different from the first preset time.
  • the system controls that the number of times a warrant is issued to the same user is less than a preset number of times in a day. After the preset number of times, even if the user's identity passes the authenticity verification again, the system will not issue a warrant to the user.
  • the identity of the user of the blockchain application fails to verify the authenticity of the system, it means that the user is a user who maliciously attacks the blockchain technology platform, and the system will prohibit the user from subsequently using all the blockchain technology platform provided.
  • the prohibition may be to temporarily freeze the user. For example, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform within a preset period of time. It may also be that the user is permanently prohibited from using the non-transaction service resources provided by the blockchain technology platform. The prohibited manner may be determined according to the user's use of the non-transaction service resource.
  • Blockchain systems include blockchain technology platforms and blockchain applications. This method issues warrants to users of blockchain applications for payment to blockchain nodes when using non-transaction service resources provided by the blockchain platform.
  • a user of a blockchain application uses the non-transaction service resources provided by the blockchain technology platform, the user's corresponding number of warrants is deducted according to the usage.
  • the warrants of users of blockchain applications gradually decrease with usage. If the user maliciously attacks the blockchain platform and abuses the underlying blockchain resources of the platform, the user's warrants are consumed quickly. When the user has zero warrants, the system verifies the authenticity of the user's identity.
  • the user is a malicious attack platform and abuses the blockchain resources
  • the user's identity has not passed the authenticity verification of the system.
  • the system will prohibit the user from using the non-transaction service resources provided by the blockchain technology platform.
  • the system can continue to issue a corresponding number of warrants to the user to ensure that the authenticity of the platform users use the platform normally.
  • step S200 the method further includes:
  • the system deducts the corresponding number of warrants of the user of the blockchain application
  • the part of the warrants is transferred to a blockchain node in a blockchain technology platform that provides blockchain resources for the user.
  • step S210 includes:
  • step S211 the method further includes:
  • S213 Issue a corresponding number of tokens to each blockchain node according to the number of warrants of each blockchain node.
  • the system transfers the warrants to the blockchain technology platform, and calculates each blockchain node's response based on the workload provided by each blockchain node to the users of the blockchain application in the blockchain technology platform.
  • the number of obtained warrants, and according to the number of warrants that each blockchain node should obtain, the corresponding number of warrants are allocated to each blockchain node of the blockchain technology platform.
  • the system issues a corresponding number of tokens to each blockchain node according to the number of warrants of each blockchain node.
  • BCM Blockchain Message, instant messaging application.
  • BCM warrants are chat warrants issued by the system for BCM users. BCM users need to own and spend BCM warrants to send messages using BCM. In addition, BCM warrants cannot be transferred between user accounts, nor can they be converted into tokens. They can only be transferred to the underlying blockchain nodes of the blockchain technology platform as proof of workload of the blockchain nodes.
  • BCM warrants The principle of issuing BCM warrants is based on ensuring the normal use of ordinary users and preventing malicious users from attacking the blockchain technology platform.
  • a typical type 4 typist can enter 50 words per minute. Based on an average of 5 English half-width letters per word, a total of about 250 bytes. Assuming that the user is using BCM for text chat 24 hours a day, then a total of about 360,000 bytes are sent.
  • Bt round (BQ / 1024)
  • Bt represents the number of warrants
  • BQ represents bytes
  • the round function represents rounding and deciding.
  • the maximum limit of BCM warrants in user accounts is 1000; the maximum number of BCM warrants transferred from a single user account per day is also 1,000. If the system detects that the user has transferred more than 1,000 BCM warrants, the user is deemed to be cheating.
  • a BCM user sending a message using BCM is a transaction. Among them, sending a message requires a BCM ticket, and receiving a message does not require a BCM ticket.
  • all messages sent by BCM users within 2 hours from the first message sent by the BCM user are packaged as one transaction.
  • the number of BCM warrants required for this transaction is directly proportional to the amount of data sent by the message. Calculate the BCM warrants spent by users based on the following formula:
  • Bt is the number of BCM warrants to be spent
  • BQ Bit Quantity
  • BCM user A sends a message to BCM user B at 10 o'clock, and then user A sends a total of 20 messages to BCM user C and BCM user D. As of 12 o'clock, BCM user A has sent a total of 51,224 bytes of messages to other users.
  • BCM user A needs to deduct 50 BCM warrants.
  • the system will use the CAPTCHA verification code to authenticate the user's authenticity. If the user passes the authenticity verification, the system will issue 1/2 * 1000 BCM warrants. A user can perform authenticity verification up to 4 times in a day, and the number of BCM warrants issued to the BCM user by the system after each verification is 1/2 of the number of warrants obtained last time. That is, each BCM user can obtain up to about 1938 BCM warrants per day. If the BCM user ’s CAPTCHA verification code fails the authenticity verification, the user is considered to be a malicious user of the blockchain technology platform. The user maliciously used the blockchain resources of the blockchain technology platform, resulting in blockchain resources. Waste. At this time, according to the user's malicious attack on the blockchain technology platform, the user is temporarily frozen to use the blockchain technology platform, or the user is permanently banned, and the user is no longer provided with the blockchain technology platform area. Blockchain resources.
  • BCM warrants spent by BCM users using BCM non-transaction service resources will be transferred to the blockchain nodes that provide services.
  • the system measures the workload according to the BCM warrants received by each blockchain node, so as to issue a corresponding number of token rewards. This part of the reward is the transaction fee income of the blockchain nodes.
  • the BCM warrant obtained is the proof of workload of the blockchain node.
  • the system issues transaction fees for blockchain nodes based on workload. Assume that in a packaging cycle, a total of Qtotal BCM warrants flow from BCM users to the underlying blockchain, and a worker ring node Wnode receives Qwnode BCM warrants.
  • the total transaction fee issued by the system is T tokens. Then, the transaction fee that the worker ring node Wnode can get is determined by the following formula:
  • Tx (Qwnode / Qtotal) * T
  • Tx is the transaction fee obtained by the blockchain node.
  • the above-mentioned method for controlling the use of blockchain resources based on the blockchain system can not only effectively prevent the abuse of blockchain resources, but also can provide a measure for the workload of blockchain nodes for a specific application service, reducing the system.
  • the application also provides a block chain resource use control device based on a block chain system.
  • the blockchain system includes a blockchain technology platform and a blockchain application.
  • the blockchain technology platform includes several blockchain nodes for providing basic functions to the blockchain application; the blockchain application is developed based on the basic functions provided by the blockchain technology platform; the area When a blockchain application runs, the blockchain resources of the blockchain technology platform are used.
  • the device for controlling the use of blockchain resources includes a first issuing module 11, a deduction module 22, a verification module 33, a second issuing module 44 and a prohibition module 55.
  • the first issuing module 11 issues a first preset number of warrants to users of the blockchain application; the warrants are paid to the blockchain when the user uses non-transaction service resources provided by the blockchain technology platform The virtual cost of the node. Warrants are consumption proofs that users consume non-transaction service resources provided by the blockchain technology platform and need to pay to the system. At the same time, the system also transfers the warrants consumed by users to the corresponding blockchain in the blockchain technology platform that provides non-transaction service resources node.
  • the system issues a first preset number of warrants to users of the blockchain application so that the user pays each of the services provided in the blockchain technology platform when using non-transaction service resources in the blockchain resources Blockchain nodes.
  • the first preset number of warrants may be determined according to the number of user-consumption warrants preset in a preset preset period of time.
  • the blockchain application is an instant messaging application.
  • the non-transaction service resources provided by users using the blockchain technology platform include users sending text messages, voice messages, and video messages through the instant messaging application.
  • the first preset number of warrants can be determined according to the following methods:
  • the amount of data used by the user to send messages using the instant messaging application within a preset period of time is obtained, and the number of warrants issued to the user by the system within the preset period of time is determined based on the amount of data.
  • the method for controlling the use of a blockchain resource based on a blockchain system further includes: controlling an initial value of a warrant of a user of the blockchain application within a first preset time period to the first Preset number.
  • the system periodically issues a first preset number of warrants to users of the blockchain application.
  • an initial value of a user's warrant for controlling a blockchain application within each of the first preset times is the first preset number.
  • the system first issues a first preset number of warrants to users of a blockchain application. After the first preset time period, it is detected that a certain number of warrants remain in the user's account. At this time, the system sets the number of warrants of the user to the first preset number within the next first preset time. For example, the system issues a first preset number of warrants to users of a blockchain application at 1:00 of the day. Regardless of whether the user has used the first preset number of warrants within the current day, the system resets the number of warrants of the user to the first preset number at 00:00 of the next day to ensure users of blockchain applications The initial value of the warrant in each day is the first preset number.
  • the deduction module 22 is used to determine that when a user of the blockchain application uses the non-transaction service resources provided by the blockchain technology platform, a corresponding amount of the user's warrants is deducted according to the usage situation.
  • a corresponding amount of the user's warrants is deducted according to the usage situation.
  • the system detects that a user of a blockchain application uses a non-transaction service resource provided by a blockchain technology platform, the user will be deducted a corresponding number of warrants.
  • the number of deducted warrants is directly proportional to the size of the non-transaction service resource used by the user.
  • Deducting the corresponding number of warrants of the user according to the use situation may be: determining the number of users using the non-transaction service resource according to a preset calculation method, and then determining the deduction according to the relationship between the number of non-transaction service resources and the number of warrants The number of warrants.
  • the blockchain application is an instant messaging application
  • the non-transaction service resource is the amount of data generated by a user sending a message through the instant messaging application.
  • the number of blockchain resources consumed by the blockchain technology platform here is the number of the non-transaction service resources, so as to calculate the user sent through the instant messaging application
  • the relationship between the amount of data generated by the message and the number of non-transaction service resources are determined quantity.
  • the verification module 33 is configured to verify the authenticity of the identity of the user when it is detected that the user's possession of the blockchain application is zero.
  • the non-transaction service resources provided by the blockchain technology platform are indirectly used. Each use consumes a corresponding number of warrants.
  • the system issues the number of warrants to users of the blockchain application within a preset period of time to meet the normal use of the users of each blockchain application within the preset period of time.
  • the blockchain resources are abused by using the blockchain application, the user's warrants will be quickly consumed within the preset time period. Finish.
  • the system detects that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity.
  • the system can automatically detect whether the user's warrant for each blockchain application is zero. When it is detected that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Alternatively, when the user's warrant of the blockchain application is zero, the user actively applies for identity authenticity verification to the system. After the system responds to the application of the user of the blockchain application, the identity of the user is verified.
  • the second issuing module 44 is configured to issue a second preset number of warrants to the user if the identity of the user passes the authenticity verification.
  • the users of the blockchain application may be maliciously attacking the users of the blockchain technology platform.
  • the “mining" successful server becomes a blockchain node in the blockchain technology platform.
  • a "mining" unsuccessful server cannot become a blockchain node, it is likely to maliciously attack the blockchain technology platform, causing abuse and waste of blockchain resources in the platform.
  • the identity of the user of the blockchain application passes the authenticity verification, it means that the user is not a user who maliciously attacks the blockchain technology platform, and the user belongs to the blockchain resources provided by the blockchain technology platform within the normal scope. At this time, the system will issue a warrant to the user again so that the user can continue to use the non-transaction service resources of the blockchain technology platform.
  • the second preset number of warrants issued to the user is less than the first preset number of warrants. Specifically, each time a user's identity passes the authenticity verification, the number of warrants issued to the user by the system is less than the number of warrants issued last time. It can be that the number of warrants issued to the user by the system is half of the number of warrants issued last time.
  • the method for controlling the use of blockchain resources based on the blockchain system further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than a preset number of times.
  • the second preset time may be the same as or different from the first preset time.
  • the system controls that the number of times a warrant is issued to the same user is less than a preset number of times in a day. After the preset number of times, even if the user's identity passes the authenticity verification again, the system will not issue a warrant to the user.
  • the prohibition module 55 is used to prohibit the user from using the non-transaction service resource provided by the blockchain technology platform if the identity of the user has not passed the authenticity verification. If the identity of the user of the blockchain application fails to verify the authenticity of the system, it means that the user is a user who maliciously attacks the blockchain technology platform, and the system will prohibit the user from subsequently using all the blockchain technology platform Describe non-transaction service resources.
  • the prohibition may be to temporarily freeze the user. For example, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform within a preset period of time. It may also be that the user is permanently prohibited from using the non-transaction service resources provided by the blockchain technology platform. The prohibited manner may be determined according to the user's use of the non-transaction service resource.
  • each module in the blockchain resource use control device provided in this application is also used to perform operations corresponding to each step in the blockchain resource use control method described in this application, and will not be repeated here. Give detailed instructions.
  • the application also provides a storage medium.
  • a computer program is stored on the storage medium; when the computer program is executed by a processor, the method for controlling the use of blockchain resources according to any one of the foregoing embodiments is implemented.
  • the storage medium may be a memory.
  • the internal memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory.
  • External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on.
  • the storage media disclosed in this application include, but are not limited to, these types of memory.
  • the memory disclosed in this application is only an example and not a limitation.
  • Each blockchain node in the blockchain system 200 in FIG. 1 is equivalent to a server.
  • FIG. 7 it is a schematic structural diagram of a server according to an embodiment of the present application, including a processor 72 and a storage device 73.
  • the storage device 73 may be used to store an application program 71 and various functional modules.
  • the processor 72 runs the application program 71 stored in the storage device 73 to execute various functional applications and data processing of the device.
  • the storage device 73 may be an internal memory or an external memory, or include both an internal memory and an external memory.
  • the internal memory may include a read-only memory, a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory.
  • External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on.
  • the storage devices disclosed in this application include, but are not limited to, these types of storage devices.
  • the storage device 73 disclosed in the present application is only an example and not a limitation.
  • the processor 72 is a control center of the server, and uses various interfaces and lines to connect various parts of the entire computer. By running or executing software programs and / or modules stored in the storage device 73, and calling data stored in the storage device, Perform various functions and process data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A method, a device, and a storage medium for controlling the use of a blockchain resource. The method comprises: sending a first preset number of warrants to a user of a blockchain application, wherein the warrants are virtual fees paid to a blockchain node when the user uses a non-trading service resource provided by a blockchain technical platform (S100); if it is determined that the user of the blockchain application uses the non-trading service resource provided by the blockchain technical platform, deducting a corresponding number of warrants for the user according to a use situation (S200); if it is detected that the number of the warrants owned by the user of the blockchain application is zero, performing authenticity verification on the identity of the user (S300); if the identity of the user passes the authenticity verification, sending a second preset number of warrants to the user (S400); and if the identity of the user does not pass the authenticity verification, banning the user from using the non-trading service resource provided by the blockchain technical platform (S500). The above method can prevent a user from abusing a blockchain resource in a blockchain technical platform, and at the same time ensure that an authentic platform user can use the platform normally.

Description

区块链资源使用控制方法、装置及存储介质Method, device and storage medium for controlling use of blockchain resources 技术领域Technical field
本申请涉及区块链技术领域,具体而言,本申请涉及一种区块链资源使用控制方法、装置及存储介质。This application relates to the field of blockchain technology, and in particular, this application relates to a method, device, and storage medium for controlling the use of blockchain resources.
背景技术Background technique
区块链技术为结合了分布式数据存储、点对点传输、共识机制以及加密算法等计算机技术的新型应用模式技术。基于区块链平台可开发多个区块链应用。区块链应用可以在IOS操作系统和Android操作系统上运行。对于区块链应用的用户而言,区块链平台近似一块“公地”。如果区块链应用的用户正常使用区块链平台资源,其底层区块链资源完全可以满足用户需求。但是如果区块链平台遭遇恶意攻击,容易造成区块链资源滥用,产生所谓的“公地悲剧”。Blockchain technology is a new application mode technology that combines computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, and encryption algorithms. Based on the blockchain platform, multiple blockchain applications can be developed. Blockchain applications can run on the IOS operating system and the Android operating system. For users of blockchain applications, the blockchain platform is approximately a "common land". If users of blockchain applications use blockchain platform resources normally, the underlying blockchain resources can fully meet user needs. However, if the blockchain platform encounters a malicious attack, it is easy to cause the abuse of blockchain resources and produce the so-called "tragedy of the commons."
为了防止底层区块链资源被滥用,在以太坊项目中,用户发起的每一条交易均需要花费Gas(燃料费),以用户自身的代价防止了资源的滥用。但是这也导致了用户的使用门槛较高,直接增加了使用成本,不利于区块链应用中项目的大规模应用。EOS(Enterprise Operation System)项目提出了一种类似“保证金”的机制,即每个用户账户内需要沉淀一定的冻结资金,该账户可以使用的区块链资源与其冻结资金成正比。这一方法解决了每笔交易均需消费的问题,但是会导致中心化的问题,同时并没有解决使用区块链应用的门槛问题。In order to prevent the underlying blockchain resources from being abused, in the Ethereum project, each transaction initiated by the user needs to spend Gas (fuel cost), preventing the abuse of resources at the user's own cost. However, this also leads to a higher threshold for users, which directly increases the cost of use, which is not conducive to the large-scale application of projects in blockchain applications. The EOS (Enterprise Operation System) project proposes a mechanism similar to "margin", that is, a certain amount of frozen funds need to be deposited in each user account, and the blockchain resources that the account can use are directly proportional to its frozen funds. This method solves the problem that every transaction needs to consume, but it will lead to the problem of centralization. At the same time, it does not solve the threshold problem of using blockchain applications.
发明内容Summary of the Invention
本申请提出一种区块链资源使用控制方法、装置及存储介质,以防止区块链平台中区块链资源的滥用,使得区块链资源的使用合理化。This application proposes a method, device, and storage medium for controlling the use of blockchain resources to prevent the abuse of blockchain resources in a blockchain platform and to rationalize the use of blockchain resources.
本申请提供以下方案:This application provides the following solutions:
一种基于区块链系统的区块链资源使用控制方法,所述区块链系统包括区块链技术平台以及区块链应用;所述区块链技术平台包括若干区块链节点,用于给所述区块链应用提供基础功能;所述区块链应用基于所述区块链技术平台提供的基础功能开发;所述区块链应用运行时使用所述区块链技术平台的区块链资源;所述方法包括:A method for controlling the use of blockchain resources based on a blockchain system. The blockchain system includes a blockchain technology platform and a blockchain application. The blockchain technology platform includes a number of blockchain nodes for Provide basic functions for the blockchain application; develop the blockchain application based on the basic functions provided by the blockchain technology platform; use the blocks of the blockchain technology platform when the blockchain application is running Chain resources; the method includes:
向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点的虚拟费用;确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证;当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证;若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证;若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。Issuing a first preset number of warrants to users of the blockchain application; the warrants are virtual fees paid to the blockchain node when the user uses non-transaction service resources provided by the blockchain technology platform; When a user of the blockchain application is determined to use the non-transaction service resource provided by the blockchain technology platform, a corresponding number of warrants of the user are deducted according to the usage situation; when a warrant owned by a user of the blockchain application is detected When it is zero, the user's identity is verified; if the user's identity passes the authenticity verification, a second preset number of warrants are issued to the user; if the user's identity fails the authenticity verification, the user is prohibited Use the non-transaction service resources provided by the blockchain technology platform.
在其中一个实施例中,所述方法还包括:控制所述区块链应用的用户在第一预设时间段内权证的初始值为所述第一预设数量。In one of the embodiments, the method further includes: controlling an initial value of the warrant of the user of the blockchain application within a first preset time period to the first preset number.
在其中一个实施例中,所述根据使用情况扣除该用户相应数量的权证之后,还包括:将所述相应数量的权证转移到所述区块链技术平台中的区块链节点。In one embodiment, after deducting the user's corresponding number of warrants according to usage, the method further includes: transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform.
在其中一个实施例中,所述将所述相应数量的权证转移到所述区块链技术平台中的区块链节点,包括:按照区块链节点的工作量将所述相应数量的权证分配给所述区块链技术平台的各个区块链节点。In one embodiment, the transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform includes: allocating the corresponding number of warrants according to the workload of the blockchain node To each blockchain node of the blockchain technology platform.
在其中一个实施例中,所述按照区块链节点的工作量将所述相应数量的权证分配给所述区块链技术平台的每个区块链节点之后,还包括:根据所述每个区块链节点的权证的数量,向所述每个区块链节点发放相应数量的代币。In one embodiment, after allocating the corresponding number of warrants to each blockchain node of the blockchain technology platform according to the workload of the blockchain node, the method further includes: The number of tokens of a blockchain node, and a corresponding number of tokens are issued to each of the blockchain nodes.
在其中一个实施例中,所述第二预设数量小于所述第一预设数量。In one embodiment, the second preset number is smaller than the first preset number.
在其中一个实施例中,所述方法还包括:控制第二预设时间段内向同一用户发放权证的次数小于预设次数。In one embodiment, the method further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than the preset number of times.
在其中一个实施例中,所述区块链应用为即时通讯应用;所述确定所述区块链应用的用户使用所述区块链技术平台提供的非交易服务时,根据使用情况扣除该用户相应数量的权证,包括:确认所述即时通讯应用的用户使用所述区块链技术平台进行即时通讯时,根据即时通讯产生的数据量扣除该用户相应数量的权证。In one embodiment, the blockchain application is an instant messaging application; when the user of the blockchain application is determined to use a non-transaction service provided by the blockchain technology platform, the user is deducted according to the usage situation The corresponding number of warrants includes: confirming that when a user of the instant messaging application uses the blockchain technology platform for instant messaging, the corresponding amount of the warrant is deducted according to the amount of data generated by the instant messaging.
一种基于区块链系统的区块链资源使用控制装置,所述区块链系统包括区块链技术平台以及区块链应用;所述区块链技术平台包括若干区块链节点,用于给所述区块链应用提供基础功能;所述区块链应用基于所述区块链技术平台提供的基础功能开发;所述区块链应用运行时使用所述区块链技术平台的区块链资源;所述装置包括:A device for controlling the use of blockchain resources based on a blockchain system. The blockchain system includes a blockchain technology platform and a blockchain application. The blockchain technology platform includes a number of blockchain nodes for Provide basic functions for the blockchain application; develop the blockchain application based on the basic functions provided by the blockchain technology platform; use the blocks of the blockchain technology platform when the blockchain application is running Chain resources; the device includes:
第一发放模块,向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点 的虚拟费用;扣除模块,用于确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证;验证模块,用于当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证;第二发放模块,用于若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证;禁止模块,用于若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。A first issuing module that issues a first preset number of warrants to users of the blockchain application; the warrants are paid to the blockchain when the user uses non-transaction service resources provided by the blockchain technology platform Node's virtual fee; deduction module, used to determine when the user of the blockchain application uses the non-transaction service resources provided by the blockchain technology platform, deduct a corresponding number of warrants of the user according to the usage situation; verification module Is used to verify the authenticity of the user's identity when it is detected that the user of the blockchain application has zero warrants; the second issuing module is used to issue the user's identity to the user if the identity verification is passed A second preset number of warrants; a prohibition module for prohibiting the user from using the non-transaction service resource provided by the blockchain technology platform if the user's identity has not passed the authenticity verification.
一种存储介质,其上存储有计算机程序;所述计算机程序适于由处理器加载并执行上述任意实施例所述的区块链资源使用控制方法。A storage medium stores a computer program thereon; the computer program is adapted to be loaded by a processor and execute the method for controlling the use of a blockchain resource according to any of the above embodiments.
上述实施例提供的区块链资源使用控制方法,用于区块链系统中,以控制区块链系统中的区块链资源的使用。区块链系统包括区块链技术平台以及区块链应用。该方法向区块链应用的用户发放权证,以用于在使用区块链平台提供的非交易服务资源时支付给区块链节点。当区块链应用的用户使用区块链技术平台提供的非交易服务资源时,根据使用情况扣除该用户相应数量的权证。区块链应用的用户的权证随着使用情况逐渐减少。若用户恶意攻击区块链平台,滥用平台的底层区块链资源,用户权证消耗很快。当用户拥有的权证为零时,系统对该用户的身份进行真实性验证。若用户为恶意攻击平台,滥用区块链资源,该用户的身份未通过系统的真实性验证,此时系统将禁止该用户使用区块链技术平台提供的非交易服务资源,因此可避免区块链技术平台中用户对区块链资源的滥用。同时,若用户的身份通过了系统的真实性验证,系统也可继续给该用户发放相应数量的权证,以保证平台真实性用户正常使用该平台。The method for controlling the use of blockchain resources provided in the above embodiments is used in a blockchain system to control the use of blockchain resources in the blockchain system. Blockchain systems include blockchain technology platforms and blockchain applications. This method issues warrants to users of blockchain applications for payment to blockchain nodes when using non-transaction service resources provided by the blockchain platform. When a user of a blockchain application uses the non-transaction service resources provided by the blockchain technology platform, the user's corresponding number of warrants is deducted according to the usage. The warrants of users of blockchain applications gradually decrease with usage. If the user maliciously attacks the blockchain platform and abuses the underlying blockchain resources of the platform, the user's warrants are consumed quickly. When the user has zero warrants, the system verifies the authenticity of the user's identity. If the user is a malicious attack platform and abuses the blockchain resources, the user's identity has not passed the authenticity verification of the system. At this time, the system will prohibit the user from using the non-transaction service resources provided by the blockchain technology platform, so the block can be avoided. Abuse of blockchain resources by users in the chain technology platform. At the same time, if the user's identity has passed the system's authenticity verification, the system can continue to issue a corresponding number of warrants to the user to ensure that the authenticity of the platform users use the platform normally.
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be given in the following description, which will become apparent from the following description or be learned through the practice of the present application.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and / or additional aspects and advantages of this application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
图1为本申请一个实施例的由终端和区块链系统所构成的硬件环境示意图;FIG. 1 is a schematic diagram of a hardware environment composed of a terminal and a blockchain system according to an embodiment of the present application; FIG.
图2为本申请一个实施例的区块链系统的结构示意图;2 is a schematic structural diagram of a blockchain system according to an embodiment of the present application;
图3为本申请一个实施例的基于区块链系统的区块链资源使用控制方法流程示意图;FIG. 3 is a schematic flowchart of a method for controlling use of a blockchain resource based on a blockchain system according to an embodiment of the present application; FIG.
图4为本申请另一个实施例的基于区块链系统的区块链资源使用控制方法流程 示意图;4 is a schematic flow chart of a method for controlling the use of a blockchain resource based on a blockchain system according to another embodiment of the present application;
图5为本申请又一个实施例的基于区块链系统的区块链资源使用控制方法流程示意图;FIG. 5 is a schematic flowchart of a method for controlling use of a blockchain resource based on a blockchain system according to another embodiment of the present application; FIG.
图6为本申请一个实施例的基于区块链系统的区块链资源使用控制装置的结构示意图;6 is a schematic structural diagram of a blockchain resource use control device based on a blockchain system according to an embodiment of the present application;
图7为本申请一个实施例的服务器的结构示意图。FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
具体实施方式detailed description
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本申请的限制。Hereinafter, embodiments of the present application will be described in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, and cannot be construed as limiting the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式,这里使用的“第一”、“第二”仅用于区别同一技术特征,并不对该技术特征的顺序和数量等加以限定。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "the" and "the" may include plural forms, and the "first" and "second" used herein "It is only used to distinguish the same technical feature, and does not limit the order and number of such technical features. It should be further understood that the word "comprising" used in the specification of this application refers to the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and / or groups thereof.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本申请所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It should also be understood that terms such as those defined in the general dictionary should be understood to have meanings consistent with the meanings in the context of the prior art, and unless specifically defined like this, they would not be idealized or overly Formal meaning to explain.
本申请实施例提供的基于区块链系统的区块链资源使用控制方法可以应用于如图1所示的由终端100和区块链系统200所构成的硬件环境中。如图1所示,终端100和区块链系统200通过网络进行连接,本申请实施例提供的基于区块链系统的区块链资源使用控制方法可以在区块链系统200所包含的服务器中执行。终端100向区块链系统200发送交易活动服务的申请或非交易活动服务的申请,区块链系统200中包含的服务器用于响应终端100发送的交易活动服务的申请或非交易活动服务的申请,对该交易活动服务的申请或非交易活动服务的申请进行处理,并将产生的交易信息打包成区块并记录在区块链中。终端100可以包括笔记本电脑、台 式电脑、平板电脑以及移动手机等终端设备。区块链系统200包括多个区块链节点。区块链节点可以是服务器挖矿成功后成为区块链的一个节点。The method for controlling the use of blockchain resources based on the blockchain system provided in the embodiment of the present application can be applied to the hardware environment composed of the terminal 100 and the blockchain system 200 as shown in FIG. 1. As shown in FIG. 1, the terminal 100 and the blockchain system 200 are connected through a network. The method for controlling the use of blockchain resources based on the blockchain system provided in the embodiment of the present application may be in a server included in the blockchain system 200 carried out. The terminal 100 sends a transaction activity service application or a non-transaction activity service application to the blockchain system 200. The server included in the blockchain system 200 is used to respond to a transaction activity service application or a non-transaction activity service application sent by the terminal 100. , Processing the application for the transaction activity service or the application for the non-transaction activity service, and packaging the generated transaction information into a block and recording it in the blockchain. The terminal 100 may include terminal devices such as a notebook computer, a desktop computer, a tablet computer, and a mobile phone. The blockchain system 200 includes a plurality of blockchain nodes. A blockchain node can be a node that becomes a blockchain after successful server mining.
本申请提供的一种基于区块链系统的区块链资源使用控制方法,用于控制终端100的用户对区块链系统200中区块链资源的使用。以下先对本申请所述的区块链系统200进行解释说明:This application provides a method for controlling the use of blockchain resources based on the blockchain system, which is used to control the users of the terminal 100 to use the blockchain resources in the blockchain system 200. The following first explains the blockchain system 200 described in this application:
如图2所示,区块链系统200包括区块链技术平台10以及区块链应用20。区块链技术平台10包括若干区块链节点,用于给区块链应用20提供区块链资源以及各种基础功能。区块链技术平台10为基于该技术平台开发的各种应用提供开发环境和开发资源,并且为所述各种应用的使用提供技术支撑。As shown in FIG. 2, the blockchain system 200 includes a blockchain technology platform 10 and a blockchain application 20. The blockchain technology platform 10 includes several blockchain nodes for providing blockchain resources and various basic functions to the blockchain application 20. The blockchain technology platform 10 provides a development environment and development resources for various applications developed based on the technology platform, and provides technical support for the use of the various applications.
区块链应用20为基于区块链技术平台10提供的基础功能而开发的应用,并且区块链应用20运行时使用区块链技术平台10的区块链资源。区块链技术平台10给区块链应用20提供的区块链资源包括区块链应用20实现非交易活动所需的非交易服务资源和实现交易活动所需的交易服务资源。本申请主要针对区块链应用实现非交易活动时对区块链资源的使用控制。具体地,系统为区块链应用20的用户发放一定数量的权证,用于作为用户使用区块链技术平台10提供的非交易服务资源时支付给区块链技术平台10中区块链节点的虚拟费用。The blockchain application 20 is an application developed based on the basic functions provided by the blockchain technology platform 10, and the blockchain application 20 uses the blockchain resources of the blockchain technology platform 10 at runtime. The blockchain resources provided by the blockchain technology platform 10 to the blockchain application 20 include non-transaction service resources required by the blockchain application 20 to implement non-transaction activities and transaction service resources required to implement transaction activities. This application is mainly aimed at controlling the use of blockchain resources when blockchain applications implement non-transactional activities. Specifically, the system issues a certain number of warrants to users of the blockchain application 20, which are used to pay users of the blockchain nodes in the blockchain technology platform 10 as non-transaction service resources provided by the blockchain technology platform 10. Virtual expenses.
区块链应用的用户在使用区块链技术平台提供的非交易类型服务时,系统无需收取用户的代币。然而,正是因为系统免费给用户提供非交易类型服务,导致有些恶意用户滥用非交易服务造成区块链资源的浪费。如,恶意用户非正常频繁使用区块链技术平台提供的非交易类型服务,导致底层技术平台的区块链资源滥用。本申请所述的基于区块链系统的区块链资源使用控制方法,防止恶意用户对区块链技术平台提供的区块链资源的滥用。When users of blockchain applications use the non-transaction type services provided by the blockchain technology platform, the system does not need to collect user tokens. However, it is precisely because the system provides users with non-transaction-type services for free, which has led to some malicious users abusing non-transaction services and wasting blockchain resources. For example, malicious users frequently use the non-transaction type services provided by the blockchain technology platform, which leads to the abuse of the blockchain resources of the underlying technology platform. The method for controlling the use of blockchain resources based on the blockchain system described in this application prevents malicious users from abusing the blockchain resources provided by the blockchain technology platform.
如图3所示,在一实施例中,本申请所述的基于区块链系统的区块链资源使用控制方法包括如下步骤:As shown in FIG. 3, in one embodiment, the method for controlling the use of blockchain resources based on the blockchain system described in this application includes the following steps:
S100,向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点的虚拟费用。S100. Issue a first preset number of warrants to users of the blockchain application; the warrants are virtual payments to the blockchain node when the user uses non-transaction service resources provided by the blockchain technology platform cost.
权证是用户消耗区块链技术平台提供的非交易服务资源需要向系统支付的消费证明,同时系统也将用户消耗的权证转移到提供非交易服务资源的区块链技术平台中相应的区块链节点。Warrants are consumption proofs that users consume non-transaction service resources provided by the blockchain technology platform and need to pay to the system. At the same time, the system also transfers the warrants consumed by users to the corresponding blockchain in the blockchain technology platform that provides non-transaction service resources node.
在本实施例中,系统向区块链应用的用户发放第一预设数量的权证,以便用户 在使用区块链资源中的非交易服务资源时支付给区块链技术平台中提供服务的各个区块链节点。第一预设数量的权证可根据统计预设周期时间内预设数量的用户消耗权证的数量确定。In this embodiment, the system issues a first preset number of warrants to users of the blockchain application, so that the user pays each of the services provided in the blockchain technology platform when using non-transaction service resources in the blockchain resources. Blockchain nodes. The first preset number of warrants may be determined according to the number of user-consumption warrants preset in a preset preset period of time.
在一实施方式中,区块链应用为即时通讯应用,用户使用区块链技术平台提供的非交易服务资源包括用户通过即时通信应用发送文字消息、语音消息以及视频消息等。为了保证普通用户的正常使用,同时防止恶意攻击。第一预设数量的权证可以根据以下方式确定:In one embodiment, the blockchain application is an instant messaging application. The non-transaction service resources provided by users using the blockchain technology platform include users sending text messages, voice messages, and video messages through the instant messaging application. In order to ensure the normal use of ordinary users and prevent malicious attacks. The first preset number of warrants can be determined according to the following methods:
获取预设时间段内用户使用所述即时通讯应用发送消息使用的数据量,根据该数据量确定在该段预设时间内系统发放给该用户的权证的数量。The amount of data used by the user to send messages using the instant messaging application within a preset period of time is obtained, and the number of warrants issued to the user by the system within the preset period of time is determined based on the amount of data.
在一实施例中,所述基于区块链系统的区块链资源使用控制方法还包括:控制所述区块链应用的用户在第一预设时间段内权证的初始值为所述第一预设数量。In one embodiment, the method for controlling the use of a blockchain resource based on a blockchain system further includes: controlling an initial value of a warrant of a user of the blockchain application within a first preset time period to the first Preset number.
在该实施例中,系统周期性向所述区块链应用的用户发放第一预设数量的权证。其中,所述周期性为每个所述第一预设时间内发放所述第一预设数量的权证。同时,控制每个所述第一预设时间内区块链应用的用户的权证的初始值为所述第一预设数量。In this embodiment, the system periodically issues a first preset number of warrants to users of the blockchain application. The periodic issue of the first preset number of warrants for each of the first preset times. At the same time, an initial value of a user's warrant for controlling a blockchain application within each of the first preset times is the first preset number.
例如,系统首次向区块链应用的用户发放第一预设数量的权证。第一预设时间段之后,检测到该用户的账号内还剩余一定数量的权证。此时,系统在下一个第一预设时间内,设置该用户的权证数量为第一预设数量。如,系统在一天的零点时分,给区块链应用的用户发放第一预设数量的权证。不管当天时间内该用户是否使用完所述第一预设数量的权证,在下一天的零点时分,系统重置该用户的权证数量仍然为所述第一预设数量,保证区块链应用的用户在每天时间内权证的初始值为所述第一预设数量。For example, the system first issues a first preset number of warrants to users of a blockchain application. After the first preset time period, it is detected that a certain number of warrants remain in the user's account. At this time, the system sets the number of warrants of the user to the first preset number within the next first preset time. For example, the system issues a first preset number of warrants to users of a blockchain application at 1:00 of the day. Regardless of whether the user has used the first preset number of warrants within the current day, the system resets the number of warrants of the user to the first preset number at 00:00 of the next day to ensure users of blockchain applications The initial value of the warrant in each day is the first preset number.
S200,确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证。S200. When determining that a user of the blockchain application uses the non-transaction service resource provided by the blockchain technology platform, a corresponding number of warrants of the user are deducted according to the use situation.
在本实施例中,当系统检测到区块链应用的用户使用区块链技术平台提供的非交易服务资源时,将扣除该用户相应数量的权证。扣除的权证的数量与用户使用所述非交易服务资源的大小成正比。根据使用情况扣除该用户相应数量的权证可以是:根据预设的计算方式确定用户使用所述非交易服务资源的数量,再根据所述非交易服务资源的数量与权证数量的关系式确定扣除的权证的数量。In this embodiment, when the system detects that a user of a blockchain application uses a non-transaction service resource provided by a blockchain technology platform, the user will be deducted a corresponding number of warrants. The number of deducted warrants is directly proportional to the size of the non-transaction service resource used by the user. Deducting the corresponding number of warrants of the user according to the use situation may be: determining the number of users using the non-transaction service resource according to a preset calculation method, and then determining the deduction according to the relationship between the number of non-transaction service resources and the number of warrants The number of warrants.
例如,在一实施方式中,区块链应用为即时通讯应用,所述非交易服务资源为用户通过即时通信应用发送消息产生的数据量。当用户发送预设数量的消息产生相 应的数据量时,区块链技术平台消耗的区块链资源的数量,此处为所述非交易服务资源的数量,从而计算出用户通过即时通信应用发送消息产生的数据量与所述非交易服务资源的数量的关系式。进一步地,根据用户通过即时通信应用发送消息产生的数据量与消耗的权证的数量的关系式,确定出用户使用所述区块链技术平台提供的所述非交易服务资源时,扣除的该权证的数量。For example, in one embodiment, the blockchain application is an instant messaging application, and the non-transaction service resource is an amount of data generated by a user sending a message through the instant messaging application. When the user sends a preset number of messages to generate a corresponding amount of data, the number of blockchain resources consumed by the blockchain technology platform, here is the number of the non-transaction service resources, so as to calculate the user sent through the instant messaging application The relationship between the amount of data generated by the message and the number of non-transaction service resources. Further, according to the relationship between the amount of data generated by the user sending the message through the instant messaging application and the number of consumed warrants, the warrants deducted when the user uses the non-transaction service resources provided by the blockchain technology platform are determined quantity.
在一实施例中,所述区块链应用为即时通讯应用。步骤S200,包括:In one embodiment, the blockchain application is an instant messaging application. Step S200 includes:
确认所述即时通讯应用的用户使用所述区块链技术平台进行即时通讯时,根据即时通讯产生的数据量扣除该用户相应数量的权证。It is confirmed that when a user of the instant messaging application uses the blockchain technology platform for instant messaging, the user generates a corresponding amount of warrants based on the amount of data generated by the instant messaging.
在该实施例中,即时通讯应用为基于所述区块链技术平台开发的应用。即时通讯应用通过所述区块链技术平台提供的区块链资源进行功能性运行。即时通讯应用的用户使用区块链技术平台进行即时通讯时,消耗区块链技术平台提供的非交易服务资源,系统根据即时通讯产生的数据量扣除该用户相应数量的权证。此处,即时通讯产生的数据量包括发送文字消息、语音消息以及视频消息等产生的数据量。In this embodiment, the instant messaging application is an application developed based on the blockchain technology platform. The instant messaging application performs functional operations through the blockchain resources provided by the blockchain technology platform. When a user of an instant messaging application uses the blockchain technology platform for instant communication, the non-transaction service resources provided by the blockchain technology platform are consumed, and the system deducts the corresponding number of warrants of the user according to the amount of data generated by the instant communication. Here, the amount of data generated by instant messaging includes the amount of data generated by sending text messages, voice messages, and video messages.
S300,当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证。S300. When it is detected that the user of the blockchain application has zero warrants, authenticity verification of the user's identity is performed.
在本实施例中,区块链应用的用户在使用区块链应用时,间接使用到区块链技术平台提供的非交易服务资源。每次使用均消耗相应数量的权证。正常情况下,系统在预设时间段内向区块链应用的用户发放权证的数量满足每个区块链应用的用户在该预设时间段内的正常使用。然而,若区块链应用的用户中存在恶意攻击该区块链技术平台的用户,通过使用区块链应用滥用区块链资源时,该用户的权证在该预设时间段内很快就消耗完。In this embodiment, when a user of a blockchain application uses the blockchain application, the non-transaction service resources provided by the blockchain technology platform are indirectly used. Each use consumes a corresponding number of warrants. Under normal circumstances, the system issues the number of warrants to users of the blockchain application within a preset period of time to meet the normal use of the users of each blockchain application within the preset period of time. However, if there is a malicious attack on the blockchain technology platform among the users of the blockchain application, if the blockchain resources are abused by using the blockchain application, the user's warrants will be quickly consumed within the preset time period. Finish.
此时,系统检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证。其中,可以是系统自动检测每个区块链应用的用户的权证是否为零。当检测到区块链应用的用户的权证为零时,对该用户的身份进行真实性验证。也可以是,区块链应用的用户的权证为零时,该用户主动向系统申请身份真实性验证。系统响应区块链应用的用户的申请后,对该用户的身份进行真实性验证。At this time, when the system detects that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Among them, the system can automatically detect whether the user's warrant for each blockchain application is zero. When it is detected that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Alternatively, when the user's warrant of the blockchain application is zero, the user actively applies for identity authenticity verification to the system. After the system responds to the application of the user of the blockchain application, the identity of the user is verified.
S400,若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证。S400. If the identity of the user passes the authenticity verification, issue a second preset number of warrants to the user.
区块链应用的用户的权证为零时,有可能是恶意攻击区块链技术平台的用户。例如,在服务器通过“挖矿”形成区块链节点的过程中,“挖矿”成功的服务器成为区块链技术平台中的区块链节点。然而,“挖矿”不成功的服务器,不能成为区块链节点时,很可能恶意攻击区块链技术平台,造成平台中区块链资源的滥用和浪 费。同时,也不排除区块链应用的某些用户根据需求导致权证的使用过多,导致权证在预设时间内为零。因此,需要对权证为零的用户进行身份真实性验证。When the users of the blockchain application have zero warrants, they may be maliciously attacking the users of the blockchain technology platform. For example, in the process of the server forming a blockchain node through "mining", the "mining" successful server becomes a blockchain node in the blockchain technology platform. However, when a "mining" unsuccessful server cannot become a blockchain node, it is likely to maliciously attack the blockchain technology platform, causing abuse and waste of blockchain resources in the platform. At the same time, it is not ruled out that some users of blockchain applications cause excessive use of warrants according to demand, resulting in warrants being zero for a preset time. Therefore, it is necessary to verify the authenticity of the user with zero warrants.
若区块链应用的用户的身份通过真实性验证,则说明该用户不属于恶意攻击区块链技术平台的用户,该用户属于正常范围内使用区块链技术平台提供的区块链资源。此时,系统将再次向该用户发放权证,以便该用户继续使用区块链技术平台的所述非交易服务资源。If the identity of the user of the blockchain application passes the authenticity verification, it means that the user is not a user who maliciously attacks the blockchain technology platform, and the user belongs to the blockchain resources provided by the blockchain technology platform within the normal scope. At this time, the system will issue a warrant to the user again so that the user can continue to use the non-transaction service resources of the blockchain technology platform.
在一实施例中,系统核实用户的身份之后,向该用户发放的第二预设数量的权证比第一预设数量的权证少。具体地,每次用户的身份通过真实性验证之后,系统向该用户发放权证的数量均比上一次发放的权证的数量少。可以是,系统向用户发放权证的数量为上一次发放的权证的数量的一半。In an embodiment, after the system verifies the identity of the user, the second preset number of warrants issued to the user is less than the first preset number of warrants. Specifically, each time a user's identity passes the authenticity verification, the number of warrants issued to the user by the system is less than the number of warrants issued last time. It can be that the number of warrants issued to the user by the system is half of the number of warrants issued last time.
在一实施例中,所述基于区块链系统的区块链资源使用控制方法还包括:控制第二预设时间段内向同一用户发放权证的次数小于预设次数。其中,第二预设时间可以与第一预设时间相同或者不相同。例如,系统控制一天时间内,向同一用户发放权证的次数小于预设次数。超过预设次数后,即使用户的身份再次通过真实性验证,系统将不会向该用户发放权证。In an embodiment, the method for controlling the use of blockchain resources based on the blockchain system further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than a preset number of times. The second preset time may be the same as or different from the first preset time. For example, the system controls that the number of times a warrant is issued to the same user is less than a preset number of times in a day. After the preset number of times, even if the user's identity passes the authenticity verification again, the system will not issue a warrant to the user.
S500,若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。S500. If the identity of the user does not pass the authenticity verification, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform.
若区块链应用的用户的身份未能通过系统的真实性验证,则说明该用户属于恶意攻击区块链技术平台的用户,系统将禁止该用户后续使用所述区块链技术平台提供的所述非交易服务资源。禁止的方式可以是,对该用户进行暂时性冻结。如,禁止该用户在预设时间段内使用所述区块链技术平台提供的所述非交易服务资源。也可以是,永久性禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。禁止的方式可以根据该用户使用所述非交易服务资源的情况确定。If the identity of the user of the blockchain application fails to verify the authenticity of the system, it means that the user is a user who maliciously attacks the blockchain technology platform, and the system will prohibit the user from subsequently using all the blockchain technology platform provided. Describe non-transaction service resources. The prohibition may be to temporarily freeze the user. For example, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform within a preset period of time. It may also be that the user is permanently prohibited from using the non-transaction service resources provided by the blockchain technology platform. The prohibited manner may be determined according to the user's use of the non-transaction service resource.
上述实施例提供的区块链资源使用控制方法,用于区块链系统中,以控制区块链系统中的区块链资源的使用。区块链系统包括区块链技术平台以及区块链应用。该方法向区块链应用的用户发放权证,以用于在使用区块链平台提供的非交易服务资源时支付给区块链节点。当区块链应用的用户使用区块链技术平台提供的非交易服务资源时,根据使用情况扣除该用户相应数量的权证。区块链应用的用户的权证随着使用情况逐渐减少。若用户恶意攻击区块链平台,滥用平台的底层区块链资源,用户权证消耗很快。当用户拥有的权证为零时,系统对该用户的身份进行真实性验证。若用户为恶意攻击平台,滥用区块链资源,该用户的身份未通过系统的真实性 验证,此时系统将禁止该用户使用区块链技术平台提供的非交易服务资源,因此可避免区块链技术平台中用户对区块链资源的滥用。同时,若用户的身份通过了系统的真实性验证,系统也可继续给该用户发放相应数量的权证,以保证平台真实性用户正常使用该平台。The method for controlling the use of blockchain resources provided in the above embodiments is used in a blockchain system to control the use of blockchain resources in the blockchain system. Blockchain systems include blockchain technology platforms and blockchain applications. This method issues warrants to users of blockchain applications for payment to blockchain nodes when using non-transaction service resources provided by the blockchain platform. When a user of a blockchain application uses the non-transaction service resources provided by the blockchain technology platform, the user's corresponding number of warrants is deducted according to the usage. The warrants of users of blockchain applications gradually decrease with usage. If the user maliciously attacks the blockchain platform and abuses the underlying blockchain resources of the platform, the user's warrants are consumed quickly. When the user has zero warrants, the system verifies the authenticity of the user's identity. If the user is a malicious attack platform and abuses the blockchain resources, the user's identity has not passed the authenticity verification of the system. At this time, the system will prohibit the user from using the non-transaction service resources provided by the blockchain technology platform. Abuse of blockchain resources by users in the chain technology platform. At the same time, if the user's identity has passed the system's authenticity verification, the system can continue to issue a corresponding number of warrants to the user to ensure that the authenticity of the platform users use the platform normally.
在一实施例中,步骤S200之后,还包括:In an embodiment, after step S200, the method further includes:
S210,将所述相应数量的权证转移到所述区块链技术平台中的区块链节点。S210. Transfer the corresponding number of warrants to a blockchain node in the blockchain technology platform.
在该实施例中,系统扣除区块链应用的用户相应数量的权证之后,将该部分的权证转移到为该用户提供区块链资源的区块链技术平台中的区块链节点。In this embodiment, after the system deducts the corresponding number of warrants of the user of the blockchain application, the part of the warrants is transferred to a blockchain node in a blockchain technology platform that provides blockchain resources for the user.
在一实施方式中,步骤S210包括:In an embodiment, step S210 includes:
S211,按照区块链节点的工作量将所述相应数量的权证分配给所述区块链技术平台的各个区块链节点。S211. Allocate the corresponding number of warrants to each blockchain node of the blockchain technology platform according to the workload of the blockchain node.
步骤S211之后,还包括:After step S211, the method further includes:
S213,根据所述每个区块链节点的权证的数量,向所述每个区块链节点发放相应数量的代币。S213: Issue a corresponding number of tokens to each blockchain node according to the number of warrants of each blockchain node.
在该实施方式中,系统转移到区块链技术平台的权证,根据区块链技术平台中每个区块链节点为区块链应用的用户提供的工作量,计算每个区块链节点应获得的权证的数量,并根据每个区块链节点应获得的权证的数量,将所述相应数量的权证分配给区块链技术平台的各个区块链节点。进一步地,系统根据每个区块链节点的权证的数量,向每个区块链节点发放相应数量的代币。In this embodiment, the system transfers the warrants to the blockchain technology platform, and calculates each blockchain node's response based on the workload provided by each blockchain node to the users of the blockchain application in the blockchain technology platform. The number of obtained warrants, and according to the number of warrants that each blockchain node should obtain, the corresponding number of warrants are allocated to each blockchain node of the blockchain technology platform. Further, the system issues a corresponding number of tokens to each blockchain node according to the number of warrants of each blockchain node.
以下提供一具体实施场景,以详细描述基于区块链系统的区块链资源使用控制方法的实现过程:The following provides a specific implementation scenario to describe in detail the implementation process of a blockchain resource usage control method based on a blockchain system:
BCM:Blockchain Message,即时通讯应用。BCM: Blockchain Message, instant messaging application.
BCM权证为系统针对BCM用户发行的聊天权证。BCM用户需拥有且花费BCM权证才能使用BCM发送消息。并且,BCM权证不可在用户账户间转移,也不能兑换成代币,只能转移至区块链技术平台的底层区块链节点,作为区块链节点的工作量证明。BCM warrants are chat warrants issued by the system for BCM users. BCM users need to own and spend BCM warrants to send messages using BCM. In addition, BCM warrants cannot be transferred between user accounts, nor can they be converted into tokens. They can only be transferred to the underlying blockchain nodes of the blockchain technology platform as proof of workload of the blockchain nodes.
以下将从BCM权证的发放、花费和交易费三个方面对进行阐述。The following will explain the three aspects of the issuance, cost and transaction fee of BCM warrants.
BCM权证的发放:Issuance of BCM warrants:
BCM权证发放的原则基于保证普通用户的正常使用,同时防止恶意用户对区块链技术平台的攻击。首先,按照国际通用的打字速度标准,普通4级的打字员每分钟可以输入50个单词。按照平均每个单词5个英文半角字母计算,共约250个 字节。假设用户全天24小时在使用BCM进行文字聊天,那么总共发送约360000个字节。根据公式Bt=round(BQ/1024)计算,则用户需要花费约352个BCM权证。其中,Bt表示权证数,BQ表示字节,round函数表示四舍五入取偶。The principle of issuing BCM warrants is based on ensuring the normal use of ordinary users and preventing malicious users from attacking the blockchain technology platform. First of all, according to the international standard for typing speed, a typical type 4 typist can enter 50 words per minute. Based on an average of 5 English half-width letters per word, a total of about 250 bytes. Assuming that the user is using BCM for text chat 24 hours a day, then a total of about 360,000 bytes are sent. According to the formula Bt = round (BQ / 1024), the user needs to spend about 352 BCM warrants. Among them, Bt represents the number of warrants, BQ represents bytes, and the round function represents rounding and deciding.
根据用户使用语音聊天和视频聊天的通讯数据情况的统计计算,每日1000个BCM权证可以满足正常用户的使用需求。具体的发放规则如下:According to the statistical calculation of the communication data of users using voice chat and video chat, 1000 BCM warrants per day can meet the usage needs of normal users. The specific distribution rules are as follows:
1)BCM用户在注册账户时,系统自动给用户发放1000个BCM权证。1) When a BCM user registers an account, the system automatically issues 1,000 BCM warrants to the user.
2)每日0点系统自动检查用户账户中的BCM权证余额,并自动将每个用户账号的BCM权证数量重置为1000。2) Every day at 0 o'clock, the system automatically checks the balance of BCM warrants in the user account, and automatically resets the number of BCM warrants for each user account to 1,000.
3)用户账户中BCM权证上限为1000;每日由单一用户账户转出的BCM权证最多也为1000。如系统检测到用户转出的BCM权证多于1000,则认定该用户作弊。3) The maximum limit of BCM warrants in user accounts is 1000; the maximum number of BCM warrants transferred from a single user account per day is also 1,000. If the system detects that the user has transferred more than 1,000 BCM warrants, the user is deemed to be cheating.
BCM权证的花费:Cost of BCM warrants:
BCM用户使用BCM发送消息即为1笔交易。其中,发送消息需要花费BCM权证,而接收消息不需要花费BCM权证。为了降低服务器处理压力,减少交易笔数的频繁运算,将BCM用户从第一次发送消息开始2个小时内,其BCM用户发送的所有消息,打包作为1笔交易。该笔交易所需花费的BCM权证数量与其所发送消息的数据量大小成正比关系。根据以下公式计算用户花费的BCM权证:A BCM user sending a message using BCM is a transaction. Among them, sending a message requires a BCM ticket, and receiving a message does not require a BCM ticket. In order to reduce the processing pressure on the server and reduce the frequent calculation of the number of transactions, all messages sent by BCM users within 2 hours from the first message sent by the BCM user are packaged as one transaction. The number of BCM warrants required for this transaction is directly proportional to the amount of data sent by the message. Calculate the BCM warrants spent by users based on the following formula:
Bt=round(BQ/1024)Bt = round (BQ / 1024)
其中,Bt为需要花费的BCM权证数,BQ(Byte Quantity)为该笔交易所包含的消息总字节数,round函数表示四舍五入取偶。Among them, Bt is the number of BCM warrants to be spent, BQ (Byte Quantity) is the total number of bytes of the message contained in the transaction, and the round function represents rounding and deciding.
举例说明:BCM用户A在10点整向BCM用户B发送了1条消息,之后用户A分别又向BCM用户C和BCM用户D发送了共20条消息。截止至12点,BCM用户A累计向其他用户发送了51224字节的消息,则系统在12点计算BCM用户A花费的BCM权证时,需扣除BCM用户A 50个BCM权证。For example, BCM user A sends a message to BCM user B at 10 o'clock, and then user A sends a total of 20 messages to BCM user C and BCM user D. As of 12 o'clock, BCM user A has sent a total of 51,224 bytes of messages to other users. When the system calculates the BCM warrants spent by BCM user A at 12 o'clock, BCM user A needs to deduct 50 BCM warrants.
如果BCM用户在一天内耗尽1000个BCM权证,那么系统会使用CAPTCHA验证码的方式对该用户进行真实性身份验证。如果用户通过了真实性验证,系统则会发放1/2*1000数量的BCM权证。用户一天之内最多可进行4次真实性身份验证,每次验证通过后的系统向该BCM用户发放的BCM权证数为上次获得的权证数的1/2。也即是,每天每个BCM用户最多可获取约1938个BCM权证。如果BCM用户的CAPTCHA验证码进行真实性身份验证不通过,则认为该用户为恶意攻击区块 链技术平台的用户,该用户恶意使用区块链技术平台的区块链资源,导致区块链资源的浪费。此时,根据该用户恶意攻击区块链技术平台的情况对该用户进行暂时性冻结使用区块链技术平台,或者对该用户进行永久封禁,不再给该用户提供区块链技术平台的区块链资源。If a BCM user runs out of 1,000 BCM warrants in a day, the system will use the CAPTCHA verification code to authenticate the user's authenticity. If the user passes the authenticity verification, the system will issue 1/2 * 1000 BCM warrants. A user can perform authenticity verification up to 4 times in a day, and the number of BCM warrants issued to the BCM user by the system after each verification is 1/2 of the number of warrants obtained last time. That is, each BCM user can obtain up to about 1938 BCM warrants per day. If the BCM user ’s CAPTCHA verification code fails the authenticity verification, the user is considered to be a malicious user of the blockchain technology platform. The user maliciously used the blockchain resources of the blockchain technology platform, resulting in blockchain resources. Waste. At this time, according to the user's malicious attack on the blockchain technology platform, the user is temporarily frozen to use the blockchain technology platform, or the user is permanently banned, and the user is no longer provided with the blockchain technology platform area. Blockchain resources.
BCM权证转换为交易费:Conversion of BCM warrants into transaction fees:
BCM用户使用BCM非交易服务资源所花费的BCM权证,将会转移至提供服务的区块链节点。每一个区块周期,系统根据各区块链节点收到的BCM权证衡量其工作量大小,从而发放相应数量的代币奖励,此部分的奖励即为区块链节点的交易费收益。BCM warrants spent by BCM users using BCM non-transaction service resources will be transferred to the blockchain nodes that provide services. Each block cycle, the system measures the workload according to the BCM warrants received by each blockchain node, so as to issue a corresponding number of token rewards. This part of the reward is the transaction fee income of the blockchain nodes.
区块链节点在为BCM提供非交易服务资源过程中,获取的BCM权证即为该区块链节点的工作量证明。系统根据工作量为区块链节点发放交易费。假设在一打包周期内,一共有Qtotal个BCM权证从BCM用户流向底层区块链,某一工人环节点Wnode收到了Qwnode个BCM权证。系统总共发放的交易费为T个代币。那么,该工人环节点Wnode可以得到的交易费,由如下公式决定:When a blockchain node provides non-transaction service resources for BCM, the BCM warrant obtained is the proof of workload of the blockchain node. The system issues transaction fees for blockchain nodes based on workload. Assume that in a packaging cycle, a total of Qtotal BCM warrants flow from BCM users to the underlying blockchain, and a worker ring node Wnode receives Qwnode BCM warrants. The total transaction fee issued by the system is T tokens. Then, the transaction fee that the worker ring node Wnode can get is determined by the following formula:
Tx=(Qwnode/Qtotal)*TTx = (Qwnode / Qtotal) * T
其中,Tx为区块链节点获得的交易费。Among them, Tx is the transaction fee obtained by the blockchain node.
上述基于区块链系统的区块链资源使用控制方法,不仅可以有效地防止区块链资源的滥用,并且可以为区块链节点为某一特定应用服务的工作量提供衡量方式,减轻了系统在防用户作弊和区块链节点的工作量衡量层面的技术压力。The above-mentioned method for controlling the use of blockchain resources based on the blockchain system can not only effectively prevent the abuse of blockchain resources, but also can provide a measure for the workload of blockchain nodes for a specific application service, reducing the system. Technical pressure in terms of preventing user cheating and measuring workload of blockchain nodes.
本申请还提供一种基于区块链系统的区块链资源使用控制装置。所述区块链系统包括区块链技术平台以及区块链应用。所述区块链技术平台包括若干区块链节点,用于给所述区块链应用提供基础功能;所述区块链应用基于所述区块链技术平台提供的基础功能开发;所述区块链应用运行时使用所述区块链技术平台的区块链资源。所述区块链系统参见图2,以及上述图2的相关说明。The application also provides a block chain resource use control device based on a block chain system. The blockchain system includes a blockchain technology platform and a blockchain application. The blockchain technology platform includes several blockchain nodes for providing basic functions to the blockchain application; the blockchain application is developed based on the basic functions provided by the blockchain technology platform; the area When a blockchain application runs, the blockchain resources of the blockchain technology platform are used. For the blockchain system, see FIG. 2 and the related description of FIG. 2 described above.
如图6所示,在一实施例中,所述区块链资源使用控制装置包括第一发放模块11、扣除模块22、验证模块33、第二发放模块44以及禁止模块55。As shown in FIG. 6, in an embodiment, the device for controlling the use of blockchain resources includes a first issuing module 11, a deduction module 22, a verification module 33, a second issuing module 44 and a prohibition module 55.
第一发放模块11向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点的虚拟费用。权证是用户消耗区块链技术平台提供的非交易服务资源需要向系统支付的消费证明,同时系统也将用户消耗的权证转移到提供非交易服务资源的区块链技术平台中相应的区块链节点。The first issuing module 11 issues a first preset number of warrants to users of the blockchain application; the warrants are paid to the blockchain when the user uses non-transaction service resources provided by the blockchain technology platform The virtual cost of the node. Warrants are consumption proofs that users consume non-transaction service resources provided by the blockchain technology platform and need to pay to the system. At the same time, the system also transfers the warrants consumed by users to the corresponding blockchain in the blockchain technology platform that provides non-transaction service resources node.
在本实施例中,系统向区块链应用的用户发放第一预设数量的权证,以便用户在使用区块链资源中的非交易服务资源时支付给区块链技术平台中提供服务的各个区块链节点。第一预设数量的权证可根据统计预设周期时间内预设数量的用户消耗权证的数量确定。In this embodiment, the system issues a first preset number of warrants to users of the blockchain application so that the user pays each of the services provided in the blockchain technology platform when using non-transaction service resources in the blockchain resources Blockchain nodes. The first preset number of warrants may be determined according to the number of user-consumption warrants preset in a preset preset period of time.
在一实施方式中,区块链应用为即时通讯应用,用户使用区块链技术平台提供的非交易服务资源包括用户通过即时通信应用发送文字消息、语音消息以及视频消息等。为了保证普通用户的正常使用,同时防止恶意攻击。第一预设数量的权证可以根据以下方式确定:In one embodiment, the blockchain application is an instant messaging application. The non-transaction service resources provided by users using the blockchain technology platform include users sending text messages, voice messages, and video messages through the instant messaging application. In order to ensure the normal use of ordinary users and prevent malicious attacks. The first preset number of warrants can be determined according to the following methods:
获取预设时间段内用户使用所述即时通讯应用发送消息使用的数据量,根据该数据量确定在该段预设时间内系统发放给该用户的权证的数量。The amount of data used by the user to send messages using the instant messaging application within a preset period of time is obtained, and the number of warrants issued to the user by the system within the preset period of time is determined based on the amount of data.
在一实施例中,所述基于区块链系统的区块链资源使用控制方法还包括:控制所述区块链应用的用户在第一预设时间段内权证的初始值为所述第一预设数量。In one embodiment, the method for controlling the use of a blockchain resource based on a blockchain system further includes: controlling an initial value of a warrant of a user of the blockchain application within a first preset time period to the first Preset number.
在该实施例中,系统周期性向所述区块链应用的用户发放第一预设数量的权证。其中,所述周期性为每个所述第一预设时间内发放所述第一预设数量的权证。同时,控制每个所述第一预设时间内区块链应用的用户的权证的初始值为所述第一预设数量。In this embodiment, the system periodically issues a first preset number of warrants to users of the blockchain application. The periodic issue of the first preset number of warrants for each of the first preset times. At the same time, an initial value of a user's warrant for controlling a blockchain application within each of the first preset times is the first preset number.
例如,系统首次向区块链应用的用户发放第一预设数量的权证。第一预设时间段之后,检测到该用户的账号内还剩余一定数量的权证。此时,系统在下一个第一预设时间内,设置该用户的权证数量为第一预设数量。如,系统在一天的零点时分,给区块链应用的用户发放第一预设数量的权证。不管当天时间内该用户是否使用完所述第一预设数量的权证,在下一天的零点时分,系统重置该用户的权证数量仍然为所述第一预设数量,保证区块链应用的用户在每天时间内权证的初始值为所述第一预设数量。For example, the system first issues a first preset number of warrants to users of a blockchain application. After the first preset time period, it is detected that a certain number of warrants remain in the user's account. At this time, the system sets the number of warrants of the user to the first preset number within the next first preset time. For example, the system issues a first preset number of warrants to users of a blockchain application at 1:00 of the day. Regardless of whether the user has used the first preset number of warrants within the current day, the system resets the number of warrants of the user to the first preset number at 00:00 of the next day to ensure users of blockchain applications The initial value of the warrant in each day is the first preset number.
扣除模块22用于确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证。在本实施例中,当系统检测到区块链应用的用户使用区块链技术平台提供的非交易服务资源时,将扣除该用户相应数量的权证。扣除的权证的数量与用户使用所述非交易服务资源的大小成正比。根据使用情况扣除该用户相应数量的权证可以是:根据预设的计算方式确定用户使用所述非交易服务资源的数量,再根据所述非交易服务资源的数量与权证数量的关系式确定扣除的权证的数量。The deduction module 22 is used to determine that when a user of the blockchain application uses the non-transaction service resources provided by the blockchain technology platform, a corresponding amount of the user's warrants is deducted according to the usage situation. In this embodiment, when the system detects that a user of a blockchain application uses a non-transaction service resource provided by a blockchain technology platform, the user will be deducted a corresponding number of warrants. The number of deducted warrants is directly proportional to the size of the non-transaction service resource used by the user. Deducting the corresponding number of warrants of the user according to the use situation may be: determining the number of users using the non-transaction service resource according to a preset calculation method, and then determining the deduction according to the relationship between the number of non-transaction service resources and the number of warrants The number of warrants.
例如,在一实施方式中,区块链应用为即时通讯应用,所述非交易服务资源为 用户通过即时通信应用发送消息产生的数据量。当用户发送预设数量的消息产生相应的数据量时,区块链技术平台消耗的区块链资源的数量,此处为所述非交易服务资源的数量,从而计算出用户通过即时通信应用发送消息产生的数据量与所述非交易服务资源的数量的关系式。进一步地,根据用户通过即时通信应用发送消息产生的数据量与消耗的权证的数量的关系式,确定出用户使用所述区块链技术平台提供的所述非交易服务资源时,扣除的该权证的数量。For example, in one embodiment, the blockchain application is an instant messaging application, and the non-transaction service resource is the amount of data generated by a user sending a message through the instant messaging application. When the user sends a preset number of messages to generate a corresponding amount of data, the number of blockchain resources consumed by the blockchain technology platform, here is the number of the non-transaction service resources, so as to calculate the user sent through the instant messaging application The relationship between the amount of data generated by the message and the number of non-transaction service resources. Further, according to the relationship between the amount of data generated by the user sending the message through the instant messaging application and the number of consumed warrants, the warrants deducted when the user uses the non-transaction service resources provided by the blockchain technology platform are determined quantity.
验证模块33用于当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证。在本实施例中,区块链应用的用户在使用区块链应用时,间接使用到区块链技术平台提供的非交易服务资源。每次使用均消耗相应数量的权证。正常情况下,系统在预设时间段内向区块链应用的用户发放权证的数量满足每个区块链应用的用户在该预设时间段内的正常使用。然而,若区块链应用的用户中存在恶意攻击该区块链技术平台的用户,通过使用区块链应用滥用区块链资源时,该用户的权证在该预设时间段内很快就消耗完。The verification module 33 is configured to verify the authenticity of the identity of the user when it is detected that the user's possession of the blockchain application is zero. In this embodiment, when a user of a blockchain application uses the blockchain application, the non-transaction service resources provided by the blockchain technology platform are indirectly used. Each use consumes a corresponding number of warrants. Under normal circumstances, the system issues the number of warrants to users of the blockchain application within a preset period of time to meet the normal use of the users of each blockchain application within the preset period of time. However, if there is a malicious attack on the blockchain technology platform among the users of the blockchain application, if the blockchain resources are abused by using the blockchain application, the user's warrants will be quickly consumed within the preset time period. Finish.
此时,系统检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证。其中,可以是系统自动检测每个区块链应用的用户的权证是否为零。当检测到区块链应用的用户的权证为零时,对该用户的身份进行真实性验证。也可以是,区块链应用的用户的权证为零时,该用户主动向系统申请身份真实性验证。系统响应区块链应用的用户的申请后,对该用户的身份进行真实性验证。At this time, when the system detects that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Among them, the system can automatically detect whether the user's warrant for each blockchain application is zero. When it is detected that the user of the blockchain application has zero warrants, the user's identity is verified for authenticity. Alternatively, when the user's warrant of the blockchain application is zero, the user actively applies for identity authenticity verification to the system. After the system responds to the application of the user of the blockchain application, the identity of the user is verified.
第二发放模块44用于若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证。区块链应用的用户的权证为零时,有可能是恶意攻击区块链技术平台的用户。例如,在服务器通过“挖矿”形成区块链节点的过程中,“挖矿”成功的服务器成为区块链技术平台中的区块链节点。然而,“挖矿”不成功的服务器,不能成为区块链节点时,很可能恶意攻击区块链技术平台,造成平台中区块链资源的滥用和浪费。同时,也不排除区块链应用的某些用户根据需求导致权证的使用过多,导致权证在预设时间内为零。因此,需要对权证为零的用户进行身份真实性验证。The second issuing module 44 is configured to issue a second preset number of warrants to the user if the identity of the user passes the authenticity verification. When the users of the blockchain application have zero warrants, they may be maliciously attacking the users of the blockchain technology platform. For example, in the process of the server forming a blockchain node through "mining", the "mining" successful server becomes a blockchain node in the blockchain technology platform. However, when a "mining" unsuccessful server cannot become a blockchain node, it is likely to maliciously attack the blockchain technology platform, causing abuse and waste of blockchain resources in the platform. At the same time, it is not ruled out that some users of blockchain applications cause excessive use of warrants according to demand, resulting in warrants being zero for a preset time. Therefore, it is necessary to verify the authenticity of the user with zero warrants.
若区块链应用的用户的身份通过真实性验证,则说明该用户不属于恶意攻击区块链技术平台的用户,该用户属于正常范围内使用区块链技术平台提供的区块链资源。此时,系统将再次向该用户发放权证,以便该用户继续使用区块链技术平台的所述非交易服务资源。If the identity of the user of the blockchain application passes the authenticity verification, it means that the user is not a user who maliciously attacks the blockchain technology platform, and the user belongs to the blockchain resources provided by the blockchain technology platform within the normal scope. At this time, the system will issue a warrant to the user again so that the user can continue to use the non-transaction service resources of the blockchain technology platform.
在一实施例中,系统核实用户的身份之后,向该用户发放的第二预设数量的权证比第一预设数量的权证少。具体地,每次用户的身份通过真实性验证之后,系统向该用户发放权证的数量均比上一次发放的权证的数量少。可以是,系统向用户发放权证的数量为上一次发放的权证的数量的一半。In an embodiment, after the system verifies the identity of the user, the second preset number of warrants issued to the user is less than the first preset number of warrants. Specifically, each time a user's identity passes the authenticity verification, the number of warrants issued to the user by the system is less than the number of warrants issued last time. It can be that the number of warrants issued to the user by the system is half of the number of warrants issued last time.
在一实施例中,所述基于区块链系统的区块链资源使用控制方法还包括:控制第二预设时间段内向同一用户发放权证的次数小于预设次数。其中,第二预设时间可以与第一预设时间相同或者不相同。例如,系统控制一天时间内,向同一用户发放权证的次数小于预设次数。超过预设次数后,即使用户的身份再次通过真实性验证,系统将不会向该用户发放权证。In an embodiment, the method for controlling the use of blockchain resources based on the blockchain system further includes controlling the number of times that the warrant is issued to the same user within a second preset time period is less than a preset number of times. The second preset time may be the same as or different from the first preset time. For example, the system controls that the number of times a warrant is issued to the same user is less than a preset number of times in a day. After the preset number of times, even if the user's identity passes the authenticity verification again, the system will not issue a warrant to the user.
禁止模块55用于若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。若区块链应用的用户的身份未能通过系统的真实性验证,则说明该用户属于恶意攻击区块链技术平台的用户,系统将禁止该用户后续使用所述区块链技术平台提供的所述非交易服务资源。禁止的方式可以是,对该用户进行暂时性冻结。如,禁止该用户在预设时间段内使用所述区块链技术平台提供的所述非交易服务资源。也可以是,永久性禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。禁止的方式可以根据该用户使用所述非交易服务资源的情况确定。The prohibition module 55 is used to prohibit the user from using the non-transaction service resource provided by the blockchain technology platform if the identity of the user has not passed the authenticity verification. If the identity of the user of the blockchain application fails to verify the authenticity of the system, it means that the user is a user who maliciously attacks the blockchain technology platform, and the system will prohibit the user from subsequently using all the blockchain technology platform Describe non-transaction service resources. The prohibition may be to temporarily freeze the user. For example, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform within a preset period of time. It may also be that the user is permanently prohibited from using the non-transaction service resources provided by the blockchain technology platform. The prohibited manner may be determined according to the user's use of the non-transaction service resource.
在其他实施例中,本申请提供的区块链资源使用控制装置中的各个模块还用于执行本申请所述的区块链资源使用控制方法中,对应各个步骤执行的操作,在此不再做详细的说明。In other embodiments, each module in the blockchain resource use control device provided in this application is also used to perform operations corresponding to each step in the blockchain resource use control method described in this application, and will not be repeated here. Give detailed instructions.
本申请还提供一种存储介质。该存储介质上存储有计算机程序;所述计算机程序被处理器执行时,实现上述任一实施例所述的区块链资源使用控制方法。该存储介质可以是存储器。例如,内存储器或外存储器,或者包括内存储器和外存储器两者。内存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)、快闪存储器、或者随机存储器。外存储器可以包括硬盘、软盘、ZIP盘、U盘、磁带等。本申请所公开的存储介质包括但不限于这些类型的存储器。本申请所公开的存储器只作为例子而非作为限定。The application also provides a storage medium. A computer program is stored on the storage medium; when the computer program is executed by a processor, the method for controlling the use of blockchain resources according to any one of the foregoing embodiments is implemented. The storage medium may be a memory. For example, internal memory or external memory, or both internal and external memory. The internal memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on. The storage media disclosed in this application include, but are not limited to, these types of memory. The memory disclosed in this application is only an example and not a limitation.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括存储器、磁盘或光盘等。Those of ordinary skill in the art may understand that all or part of the steps for implementing the foregoing embodiments may be completed by hardware, or may be instructed by a program to complete related hardware. The program may be stored in a computer-readable storage medium, and the storage medium may include Memory, disk or disc, etc.
图1中的区块链系统200中每一个区块链节点相当于一个服务器。如图7所示, 为本申请一实施例提供的服务器的结构示意图,包括处理器72、存储装置73等器件。本领域技术人员可以理解,图7示出的结构器件并不构成对所有服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件。存储装置73可用于存储应用程序71以及各功能模块,处理器72运行存储在存储装置73的应用程序71,从而执行设备的各种功能应用以及数据处理。存储装置73可以是内存储器或外存储器,或者包括内存储器和外存储器两者。内存储器可以包括只读存储器、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)、快闪存储器、或者随机存储器。外存储器可以包括硬盘、软盘、ZIP盘、U盘、磁带等。本申请所公开的存储装置包括但不限于这些类型的存储装置。本申请所公开的存储装置73只作为例子而非作为限定。Each blockchain node in the blockchain system 200 in FIG. 1 is equivalent to a server. As shown in FIG. 7, it is a schematic structural diagram of a server according to an embodiment of the present application, including a processor 72 and a storage device 73. Those skilled in the art can understand that the structural device shown in FIG. 7 does not constitute a limitation on all servers, and may include more or fewer components than shown in the figure, or combine some components. The storage device 73 may be used to store an application program 71 and various functional modules. The processor 72 runs the application program 71 stored in the storage device 73 to execute various functional applications and data processing of the device. The storage device 73 may be an internal memory or an external memory, or include both an internal memory and an external memory. The internal memory may include a read-only memory, a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on. The storage devices disclosed in this application include, but are not limited to, these types of storage devices. The storage device 73 disclosed in the present application is only an example and not a limitation.
处理器72是服务器的控制中心,利用各种接口和线路连接整个电脑的各个部分,通过运行或执行存储在存储装置73内的软件程序和/或模块,以及调用存储在存储装置内的数据,执行各种功能和处理数据。The processor 72 is a control center of the server, and uses various interfaces and lines to connect various parts of the entire computer. By running or executing software programs and / or modules stored in the storage device 73, and calling data stored in the storage device, Perform various functions and process data.
以上所述仅是本申请的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only part of the implementation of the present application. It should be noted that, for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and retouches can be made. These improvements and retouches also It should be regarded as the protection scope of this application.
应该理解的是,在本申请各实施例中的各功能单元可集成在一个处理模块中,也可以各个单元单独物理存在,也可以两个或两个以上单元集成于一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It should be understood that the functional units in the embodiments of the present application may be integrated into one processing module, or each of the units may exist separately physically, or two or more units may be integrated into one module. The above integrated modules may be implemented in the form of hardware or software functional modules.
以上所述仅是本申请的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only part of the implementation of the present application. It should be noted that, for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and retouches can be made. These improvements and retouches also It should be regarded as the protection scope of this application.

Claims (10)

  1. 一种基于区块链系统的区块链资源使用控制方法,其特征在于,所述区块链系统包括区块链技术平台以及区块链应用;A method for controlling the use of blockchain resources based on a blockchain system, characterized in that the blockchain system includes a blockchain technology platform and a blockchain application;
    所述区块链技术平台包括若干区块链节点,用于给所述区块链应用提供基础功能;The blockchain technology platform includes several blockchain nodes for providing basic functions to the blockchain application;
    所述区块链应用基于所述区块链技术平台提供的基础功能开发;所述区块链应用运行时使用所述区块链技术平台的区块链资源;The blockchain application is developed based on the basic functions provided by the blockchain technology platform; the blockchain application uses the blockchain resources of the blockchain technology platform when it is running;
    所述方法包括:The method includes:
    向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点的虚拟费用;Issuing a first preset number of warrants to users of the blockchain application; the warrants are virtual fees paid to the blockchain node when the user uses non-transaction service resources provided by the blockchain technology platform;
    确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证;Determining that when a user of the blockchain application uses the non-transaction service resource provided by the blockchain technology platform, a corresponding amount of the user's warrants are deducted according to the use situation;
    当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证;When it is detected that the user of the blockchain application has zero warrants, authenticity verification of the user's identity is performed;
    若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证;If the identity of the user passes the authenticity verification, issue a second preset number of warrants to the user;
    若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。If the user's identity does not pass the authenticity verification, the user is prohibited from using the non-transaction service resource provided by the blockchain technology platform.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    控制所述区块链应用的用户在第一预设时间段内权证的初始值为所述第一预设数量。An initial value of a warrant for a user controlling the blockchain application within a first preset period of time is the first preset number.
  3. 根据权利要求1所述的方法,其特征在于,所述根据使用情况扣除该用户相应数量的权证之后,还包括:The method according to claim 1, wherein after deducting a corresponding number of warrants of the user according to the usage situation, further comprising:
    将所述相应数量的权证转移到所述区块链技术平台中的区块链节点。Transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform.
  4. 根据权利要求3所述的方法,其特征在于,所述将所述相应数量的权证转移到所述区块链技术平台中的区块链节点,包括:The method according to claim 3, wherein the transferring the corresponding number of warrants to a blockchain node in the blockchain technology platform comprises:
    按照区块链节点的工作量将所述相应数量的权证分配给所述区块链技术平台的各个区块链节点。Allocating the corresponding number of warrants to each blockchain node of the blockchain technology platform according to the workload of the blockchain node.
  5. 根据权利要求4所述的方法,其特征在于,所述按照区块链节点的工作量将所述相应数量的权证分配给所述区块链技术平台的每个区块链节点之后,还包括:The method according to claim 4, characterized in that after allocating the corresponding number of warrants to each blockchain node of the blockchain technology platform according to the workload of the blockchain node, further comprising :
    根据所述每个区块链节点的权证的数量,向所述每个区块链节点发放相应数量的代币。According to the number of warrants of each blockchain node, a corresponding number of tokens are issued to each blockchain node.
  6. 根据权利要求1所述的方法,其特征在于,所述第二预设数量小于所述第一预设数量。The method according to claim 1, wherein the second preset number is smaller than the first preset number.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    控制第二预设时间段内向同一用户发放权证的次数小于预设次数。Control the number of times the warrant is issued to the same user within the second preset time period is less than the preset number.
  8. 根据权利要求1所述的方法,其特征在于,所述区块链应用为即时通讯应用;所述确定所述区块链应用的用户使用所述区块链技术平台提供的非交易服务时,根据使用情况扣除该用户相应数量的权证,包括:The method of claim 1, wherein the blockchain application is an instant messaging application; and when the user of the blockchain application is determined to use a non-transaction service provided by the blockchain technology platform, Deduct a corresponding number of warrants for the user based on usage, including:
    确认所述即时通讯应用的用户使用所述区块链技术平台进行即时通讯时,根据即时通讯产生的数据量扣除该用户相应数量的权证。It is confirmed that when a user of the instant messaging application uses the blockchain technology platform for instant messaging, the user generates a corresponding amount of warrants based on the amount of data generated by the instant messaging.
  9. 一种基于区块链系统的区块链资源使用控制装置,其特征在于,所述区块链系统包括区块链技术平台以及区块链应用;A device for controlling the use of a blockchain resource based on a blockchain system, characterized in that the blockchain system includes a blockchain technology platform and a blockchain application;
    所述区块链技术平台包括若干区块链节点,用于给所述区块链应用提供基础功能;The blockchain technology platform includes several blockchain nodes for providing basic functions to the blockchain application;
    所述区块链应用基于所述区块链技术平台提供的基础功能开发;所述区块链应用运行时使用所述区块链技术平台的区块链资源;The blockchain application is developed based on the basic functions provided by the blockchain technology platform; the blockchain application uses the blockchain resources of the blockchain technology platform when it is running;
    所述装置包括:The device includes:
    第一发放模块,向所述区块链应用的用户发放第一预设数量的权证;所述权证为用户使用所述区块链技术平台提供的非交易服务资源时支付给所述区块链节点的虚拟费用;A first issuing module that issues a first preset number of warrants to users of the blockchain application; the warrants are paid to the blockchain when the user uses non-transaction service resources provided by the blockchain technology platform Virtual fees for nodes;
    扣除模块,用于确定所述区块链应用的用户使用所述区块链技术平台提供的所述非交易服务资源时,根据使用情况扣除该用户相应数量的权证;A deduction module, configured to determine that when a user of the blockchain application uses the non-transaction service resource provided by the blockchain technology platform, a corresponding amount of the user's warrants are deducted according to the usage situation;
    验证模块,用于当检测到区块链应用的用户拥有的权证为零时,对该用户的身份进行真实性验证;A verification module, configured to verify the authenticity of the user's identity when it is detected that the user's possession of the blockchain application is zero;
    第二发放模块,用于若该用户的身份通过真实性验证,向该用户发放第二预设数量的权证;A second issuing module, configured to issue a second preset number of warrants to the user if the user ’s identity passes the authenticity verification;
    禁止模块,用于若该用户的身份未通过真实性验证,禁止该用户使用所述区块链技术平台提供的所述非交易服务资源。The prohibition module is configured to prohibit the user from using the non-transaction service resource provided by the blockchain technology platform if the identity of the user has not passed the authenticity verification.
  10. 一种存储介质,其特征在于,其上存储有计算机程序;所述计算机程序适于由处理器加载并执行上述权利要求1至8中任一项所述的区块链资源使用控制方法。A storage medium, characterized in that a computer program is stored thereon; the computer program is adapted to be loaded by a processor and execute the method for controlling the use of a blockchain resource according to any one of claims 1 to 8.
PCT/CN2018/101827 2018-08-22 2018-08-22 Method, device, and storage medium for controlling use of blockchain resource WO2020037578A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/101827 WO2020037578A1 (en) 2018-08-22 2018-08-22 Method, device, and storage medium for controlling use of blockchain resource
CN201880002221.9A CN109690600B (en) 2018-08-22 2018-08-22 Block chain resource use control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/101827 WO2020037578A1 (en) 2018-08-22 2018-08-22 Method, device, and storage medium for controlling use of blockchain resource

Publications (1)

Publication Number Publication Date
WO2020037578A1 true WO2020037578A1 (en) 2020-02-27

Family

ID=66191835

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101827 WO2020037578A1 (en) 2018-08-22 2018-08-22 Method, device, and storage medium for controlling use of blockchain resource

Country Status (2)

Country Link
CN (1) CN109690600B (en)
WO (1) WO2020037578A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325555A (en) * 2020-02-17 2020-06-23 北京艾鸥科技有限公司 Block chain resource transaction sending method and device, storage medium and electronic equipment
CN111401866A (en) * 2020-03-13 2020-07-10 杭州复杂美科技有限公司 Method, apparatus and storage medium for pre-storing and deducting commission fee

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172085A (en) * 2017-06-30 2017-09-15 江苏华信区块链产业研究院有限公司 Active defense method and node based on the intelligent contract of block chain
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN107943580A (en) * 2017-11-13 2018-04-20 上海点融信息科技有限责任公司 For managing the method and equipment of user's intelligence contract at block chain link point
CN108306819A (en) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 Instant communicating system implementation method, medium and computing device based on block chain
CN108347350A (en) * 2018-01-25 2018-07-31 中国银联股份有限公司 A kind of communication means and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778109B (en) * 2016-11-24 2020-05-05 江苏通付盾科技有限公司 Authentication authority evaluation method and device based on intelligent contract
CN106897150B (en) * 2017-03-29 2020-04-10 杭州溪塔科技有限公司 Resource quota management method based on permission chain
CN107993066A (en) * 2017-12-20 2018-05-04 国民认证科技(北京)有限公司 A kind of resource transaction method and electronic purse system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172085A (en) * 2017-06-30 2017-09-15 江苏华信区块链产业研究院有限公司 Active defense method and node based on the intelligent contract of block chain
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN107943580A (en) * 2017-11-13 2018-04-20 上海点融信息科技有限责任公司 For managing the method and equipment of user's intelligence contract at block chain link point
CN108347350A (en) * 2018-01-25 2018-07-31 中国银联股份有限公司 A kind of communication means and device
CN108306819A (en) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 Instant communicating system implementation method, medium and computing device based on block chain

Also Published As

Publication number Publication date
CN109690600A (en) 2019-04-26
CN109690600B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN108829350B (en) Data migration method and device based on block chain
US20060106845A1 (en) System and method for computer-based local generic commerce and management of stored value
JP2006190254A (en) Metered computer and method for dynamically determining discriminatory price
US20230283473A1 (en) Computer-implemented systems and methods relating to a binary blockchain comprising a pair of coupled blockchains
EP1984878B1 (en) Disaggregated secure execution environment
US20070192824A1 (en) Computer hosting multiple secure execution environments
JP2009508259A (en) Processing unit enclosed operating system
US20200090096A1 (en) Resource management system, management device, method, and program
KR20200132518A (en) System for supporting transaction interoperation between blockchain networks and method thereof
WO2020037578A1 (en) Method, device, and storage medium for controlling use of blockchain resource
CN111966538B (en) Block chain data recovery method and device
RU2463658C2 (en) Prepaid access to data processing using portable data storage devices
CN111144889A (en) Block chain-based integral settlement method and block chain accounting system
KR20210063730A (en) Digital Content Distribution and Used Trading System
CN108694588B (en) Virtual resource request method and terminal equipment
CN109829815B (en) Method, apparatus and storage medium for collecting agent
CN109685506B (en) Multi-signature account generation method and multi-signature account signature confirmation method
TWM589327U (en) Device for calculating the available limited amount to choose the usability of the amount
KR101735287B1 (en) The method, server and system for providing application funding service
JP6896813B2 (en) Transaction execution method and system
KR102610011B1 (en) Method for reducing smart contract fee of dapp, recording medium and compute server for performing the method
KR102657620B1 (en) Independently driven, always-on detection in-app control method and system to prevent financial fraud
KR102625864B1 (en) Voice phishing prevention method and system using an independent, always-on detection in-app
KR102076929B1 (en) Foreign currency remittance apparatus and method thereof
KR20180133051A (en) Foreign currency remittance apparatus and method thereof

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: 18930885

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18930885

Country of ref document: EP

Kind code of ref document: A1