Resource transfer method and device based on smart contract and computer equipment

By using smart contracts on the blockchain to achieve fine-grained exchange of media resources, the problem of inflexible payment methods in the existing technology is solved, users' willingness to pay and the revenue of resource parties is improved, and personalized recommendations and precise pricing are achieved.

CN120258975APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410014162.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing methods of purchasing media resources are mainly cyclical payments or one-time buyouts, which are difficult to meet the personalized needs in various scenarios, resulting in inflexible user payments and unreasonable resource pricing.

Method used

The fine-grained exchange of media resources is realized on the blockchain network through smart contracts, and the transfer of assets and resources is automatically triggered based on the amount of resources actually obtained by users, supporting on-demand micropayment.

Benefits of technology

It enriches the exchange methods of media resources, increases users' willingness to pay, increases the revenue of resource parties, and realizes personalized recommendations and precise pricing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258975A_ABST
    Figure CN120258975A_ABST
Patent Text Reader

Abstract

The invention relates to a resource transfer method and device based on a smart contract, computer equipment, a storage medium and a computer program product. The method comprises the steps that when a user account obtains media resources through a media resource platform, the resource obtaining amount of the media resources obtained by the user account is determined according to a resource statistics unit for the media resources; when the resource exchange triggering condition is met, determining a resource exchange amount according to the resource acquisition amount based on an intelligent contract deployed in the block chain network; the resource exchange quantity represents a resource quantity corresponding to asset resources required to be exchanged for acquiring the media resources of the resource acquisition quantity when the media resources are exchanged through the asset resources; and carrying out asset resource transfer to the media resource platform according to the resource exchange amount from an asset resource account associated with the user account based on the intelligent contract. By adopting the method, resource exchange modes for media resources such as images, texts, audios and videos can be enriched, so that the actual exchange requirements of the media resources in various scenes can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technologies, and in particular, to a resource transfer method, apparatus, computer device, storage medium, and computer program product based on a smart contract. Background Art

[0002] With the development of computer technologies, more and more users choose to perform resource exchange operations on various types of resources through computer devices, such as terminal devices, so as to obtain goods or services through fund transfers. For example, users can purchase paid audio and video and other media resources on an audio and video platform through electronic payment, and thus can listen to music, watch movies and TV dramas, etc.

[0003] Currently, for the purchase and payment of various media resources, it is generally achieved through periodic payment or one-time buyout. The types of resource exchange methods for media resources are limited, and it is difficult to meet the actual needs of various media resource exchange scenarios. Summary of the Invention

[0004] Based on this, it is necessary to provide a resource transfer method, apparatus, computer device, computer-readable storage medium, and computer program product based on a smart contract that can enrich the resource exchange methods of media resources to meet the actual exchange needs of media resources in various scenarios for the above technical problems.

[0005] In a first aspect, the present application provides a resource transfer method based on a smart contract. The method includes:

[0006] During the process of a user account obtaining media resources through a media resource platform, determining the resource acquisition amount of the media resources obtained by the user account according to the resource statistical unit for the media resources;

[0007] When the resource exchange trigger condition corresponding to the media resources is satisfied, based on the smart contract deployed in the blockchain network, determining the resource exchange amount according to the resource acquisition amount; wherein, the resource exchange amount is used to represent the resource quantity corresponding to the asset resources required to obtain the media resources with the resource acquisition amount when exchanging media resources through asset resources;

[0008] Based on the smart contract, transferring asset resources from the asset resource account associated with the user account to the media resource platform according to the resource exchange amount.

[0009] In a second aspect, the present application further provides a resource transfer apparatus based on a smart contract. The apparatus includes:

[0010] A resource acquisition amount determination module, configured to determine the resource acquisition amount of the media resources obtained by the user account according to the resource statistical unit for the media resources during the process of the user account obtaining media resources through the media resource platform;

[0011] A resource exchange quantity determination module, configured to determine a resource exchange quantity based on a smart contract deployed in a blockchain network according to a resource acquisition quantity when a resource exchange trigger condition corresponding to media resources is satisfied; wherein, the resource exchange quantity is used to represent the resource quantity corresponding to the asset resources to be exchanged for obtaining the media resources with the resource acquisition quantity when exchanging media resources through asset resources.

[0012] An asset resource transfer module, configured to transfer asset resources to a media resource platform from an asset resource account associated with a user account according to the resource exchange quantity based on the smart contract.

[0013] Thirdly, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above resource transfer method based on a smart contract are implemented.

[0014] Fourthly, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the above resource transfer method based on a smart contract are implemented.

[0015] Fifthly, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the above resource transfer method based on a smart contract are implemented.

[0016] In the process of a user account obtaining media resources through a media resource platform, the above resource transfer method, device, computer device, storage medium, and computer program product based on a smart contract determine the resource acquisition quantity of the media resources obtained by the user account according to the resource statistical unit for the media resources. When the resource exchange trigger condition corresponding to the media resources is satisfied, the resource exchange quantity is determined based on the deployed smart contract according to the resource acquisition quantity, and based on this smart contract, asset resources are transferred from the asset resource account associated with the user account to the media resource platform according to the determined resource exchange quantity, so as to implement resource exchange processing for the media resources. By determining the resource acquisition quantity of the user account according to the resource statistical unit for the media resources, when the resource exchange trigger condition is satisfied, the resource exchange quantity is determined based on the smart contract according to the resource acquisition quantity, and asset resources are exchanged for the media resources through the asset resource account associated with the user account according to the resource exchange quantity, so as to perform resource exchange processing according to the media resources actually obtained by the user account from the media resource platform, enriching the resource exchange methods of the media resources and meeting the actual exchange needs of the media resources in various scenarios. Description of the Drawings

[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings required for the description of the embodiments or the related art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is an application environment diagram of a resource transfer method based on a smart contract in an embodiment;

[0019] Figure 2 It is a schematic flowchart of a resource transfer method based on a smart contract in an embodiment;

[0020] Figure 3 It is a schematic diagram of splitting media resources according to resource statistical units in an embodiment;

[0021] Figure 4 It is a schematic diagram of determining the amount of resources obtained according to resource statistical units in an embodiment;

[0022] Figure 5 It is a schematic diagram of determining the amount of resource exchange in an embodiment;

[0023] Figure 6 It is a schematic diagram of obtaining media resources through asset resource exchange in an embodiment;

[0024] Figure 7 It is a schematic flowchart of determining the amount of resource exchange in an embodiment;

[0025] Figure 8 It is a schematic diagram of audio-video monthly subscription payment in an embodiment;

[0026] Figure 9 It is a schematic diagram of audio-video one-time purchase payment in an embodiment;

[0027] Figure 10 It is a schematic diagram of audio-video micropayment in an embodiment;

[0028] Figure 11 It is a schematic diagram of graphic and text monthly subscription payment in an embodiment;

[0029] Figure 12 It is a schematic diagram of graphic and text one-time purchase payment in an embodiment;

[0030] Figure 13 It is a schematic diagram of graphic and text micropayment in an embodiment;

[0031] Figure 14 It is a structural block diagram of a resource transfer device based on a smart contract in an embodiment;

[0032] Figure 15 is the internal structure diagram of a computer device in an embodiment;

[0033] Figure 16 is the internal structure diagram of a computer device in another embodiment. Detailed implementation manners

[0034] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] The resource transfer method based on a smart contract provided by an embodiment of the present application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set separately, integrated on the server 104, placed in the cloud or on other servers. The server 104 can be used as a media resource platform to support sending media resources to the terminal corresponding to the user account for display or playback on the terminal.

[0036] Specifically, a user can request to obtain media resources from the server 104 through the held terminal 102. For example, the user can obtain audio and video resources from the server 104 through the registered user account on the terminal 102 for playback. During the process of the user account obtaining media resources from the server 104, the terminal 102 can play or display the obtained media resources. The server 104 can determine the resource acquisition amount of the media resources obtained by the user account according to the resource statistical unit for the media resources. When the resource exchange trigger condition corresponding to the media resources is met, the server 104 determines the resource exchange amount based on the deployed smart contract according to the resource acquisition amount. The server 104 transfers asset resources to the media resource platform from the asset resource account associated with the user account according to the determined resource exchange amount to obtain a resource transfer result, thereby realizing the resource exchange process for the media resources. The server 104 can also feedback the obtained resource transfer result to the terminal 102. In addition, the resource transfer method based on the smart contract can also be executed independently by the terminal 102, that is, the terminal 102 can directly determine the resource acquisition amount of the user account according to the resource statistical unit for the media resources. When the resource exchange trigger condition is met, the resource exchange amount is determined based on the smart contract according to the resource acquisition amount, and asset resource transfer processing is performed for the media resources through the asset resource account associated with the user account according to the resource exchange amount to obtain a resource transfer result.

[0037] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, aircraft, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0038] Specifically, blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0039] The blockchain underlying platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the real identity of the user and the blockchain address (permission management). And under the authorization, it supervises and audits the transaction situations of certain real identities, and provides the rule configuration for risk control (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and after consensus on the valid requests, record them on the storage. For a new business request, the basic service first performs interface adaptation parsing and authentication processing (interface adaptation), then encrypts the business information through the consensus algorithm (consensus management), and after encryption, transmits it to the shared ledger completely and consistently (network communication), and records and stores it; the smart contract module is responsible for the registration and issuance of contracts, contract triggering, and contract execution. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), and according to the logic of the contract terms, call keys or other events to trigger the execution, complete the contract logic, and at the same time also provide the functions of contract upgrade and cancellation; the operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation during the product release process, and the visual output of the real-time status during the product operation, such as: alarming, monitoring the network situation, monitoring the health status of node devices, etc.

[0040] The platform product service layer provides the basic capabilities and implementation frameworks of typical applications. Developers can, based on these basic capabilities, superimpose the characteristics of the business to complete the blockchain implementation of the business logic. The application service layer provides application services based on the blockchain solution for business participants to use.

[0041] In an exemplary embodiment, as Figure 2 shown, a resource transfer method based on a smart contract is provided. This method is executed by a computer device, specifically, it can be executed alone by a computer device such as a terminal or a server, or jointly executed by a terminal and a server. In the embodiments of the present application, taking the application of this method to Figure 1 the server in [the specific context] as an example for illustration, it includes the following steps 202 to 206. Among them:

[0042] Step 202, during the process that a user account obtains media resources through a media resource platform, determine the resource acquisition amount of the media resources obtained by the user account according to the resource statistical unit for the media resources.

[0043] Among them, a smart contract is a contract written in the form of code, which can be automatically executed on a blockchain; it can implement various functions, such as transferring funds, verifying identities, creating digital identities, etc. A smart contract is a contract that runs in cyberspace relying on a computer. It is propagated, verified, or executed in an information-based manner, read and executed by a computer, and has the characteristics of self-service. A smart contract is a computer protocol designed to propagate, verify, or execute a contract in an information-based manner, which allows for trusted transactions without a third party. These transactions are monitorable and irreversible. That is, a smart contract is a set computer program that can automatically execute the content of a trusted contract without the participation of a third-party intermediary, and all operations are publicly available and irreversible. The decentralization of the blockchain and the anti-tampering of data determine that smart contracts are more suitable to be implemented on the blockchain.

[0044] Resources are assets that can be exchanged for subject matters, which can specifically be any one of digital resources, physical resources, or virtual resources. Digital resources are resources obtained by digitizing physical resources and can be stored in digital resource accounts. Virtual resources can specifically include, but are not limited to, at least one of various virtual assets, funds, stocks, bonds, virtual image products, virtual recharge cards, game equipment, etc. Physical resources can be items with actual forms that can be owned by users, which can specifically include, but are not limited to, houses, vehicles, electronic products, toys, handicrafts, or signed photos, etc. Resource processing can include transfer processing for resources. Resource transfer refers to the exchange of resources, including the resource transfer-in party and the resource transfer-out party. Resources are transferred from the resource transfer-out party to the resource transfer-in party. For example, during the payment process of shopping, funds are transferred as resources. Resources can be divided into different types according to actual scenarios. For example, they can be divided into media resources, asset resources, etc. Media resources can include, but are not limited to, digital resources in various forms such as images, texts, audio-visuals, etc.; Asset resources can be general resources that can be used to exchange other types of resources. For example, the funds in a bank account can be used as asset resources, and users can exchange other types of resources with the asset resources they hold, such as exchanging media resources like audio-visuals.

[0045] A user account refers to the account held by a user, which can specifically be the account held by the user after registering on a media resource platform. Users can purchase media resources on the media resource platform for browsing through the user accounts they hold. A media resource platform is a platform that provides media resources. Different media resource platforms can provide different types of media resources. For example, a music platform can provide music resources, a video platform can provide video resources such as movies and TV series, a novel platform can provide various text resources, and a Q&A platform can provide Q&A data in various modalities such as texts, images, audio-visuals, etc. Among the various media resources provided by the media resource platform, there can be media resources that support free acquisition, and there can also be media resources that need to be purchased with payment to obtain.

[0046] A resource statistical unit is a unit for counting the quantity of media resources obtained for a user account, and can be specifically set according to various media resources. For example, when the media resource is an audio-visual resource, the resource statistical unit can include segments of a preset duration, such as segments of 1 minute. That is, the quantity of media resources obtained by the user is counted according to the segments per minute. Specifically, if the user account obtains 5 segments, it can be determined that the user account has obtained audio-visual resources with a duration of 5 minutes. Through the resource statistical unit, the media resource can be divided into multiple fine-grained segments, and the length of each segment can be flexibly adjusted by adjusting the size of the resource statistical unit. When the user account obtains media resources, the segments actually obtained by the user account can be determined, and resource exchange processing can be performed on the segments actually obtained by the user account. The resource acquisition quantity is the quantity of media resources actually obtained by the user account counted according to the resource statistical unit. The resource acquisition quantity can be counted based on the resource statistical unit, and specifically can include the quantity of resource statistical units covered in the media resources obtained by the user account.

[0047] Specifically, the user can obtain media resources from the media resource platform through the user account held on the terminal. For example, the user can listen to songs from a music platform, play movies and TV shows from a video platform, browse pictures from an image library platform, etc. During the process of the user account obtaining media resources from the media resource platform, the server can count the media resources obtained by the user account, and specifically can determine the resource acquisition quantity obtained by the user account according to the resource statistical unit. The server can query the resource statistical unit preset for the media resource, and count the quantity of media resources obtained by the user account based on this resource statistical unit to obtain the resource acquisition quantity of the media resources obtained by the user account. The resource acquisition quantity can be expressed based on the resource statistical unit, and specifically can be expressed using the resource statistical unit as the measurement unit. For example, the resource acquisition quantity can include N quantities of resource statistical units.

[0048] In a specific application, as Figure 3 shown, for the complete media resources in the media resource platform, corresponding resource statistical units can be set, so that the complete media resources can be divided into 16 resource segments through the resource statistical unit. When the user obtains media resources from the media resource platform based on the user account held, the server can detect the resource acquisition quantity of the media resources obtained by the user account. For example, if the user account obtains the 1st - 8th resource segments in the media resource, the quantity of resources obtained by the user account can be measured according to the resource statistical unit, and it can be determined that the resource acquisition quantity of the media resources obtained by the user account is 8, that is, the user account has obtained resource segments with a size of 8 resource statistical units in the media resource.

[0049] In addition, when the user jumps to obtain media resources, the server can directly count the number of resources obtained for the user account based on the resource statistical unit to determine the resource acquisition volume of the media resources obtained by the user account. In an application, such as Figure 4 shown, according to the resource statistical unit, the media resources can be divided into 16 resource segments in sequence from the beginning to the end, and the user can obtain the media resources in a jump manner. The server can directly start from the position where the user account triggers the acquisition of media resources and calculate according to the resource statistical unit to determine the number of resources of the media resources obtained by the user account. Specifically, the user account can obtain 1-4 resource segments of the size of the resource statistical unit from the media resources, that is, it can be determined that the resource acquisition volume of the media resources obtained by the user account is 4.

[0050] Step 204, when the resource exchange trigger condition corresponding to the media resources is met, based on the smart contract deployed in the blockchain network, determine the resource exchange volume according to the resource acquisition volume; wherein, the resource exchange volume is used to represent the resource quantity corresponding to the asset resources required to be exchanged to obtain the media resources with the resource acquisition volume when exchanging media resources with asset resources.

[0051] Among them, the resource exchange trigger condition is used to determine whether to trigger resource exchange processing for the user account, specifically to determine whether to trigger resource exchange processing for the obtained media resources by using the asset resources owned by the user account. The resource exchange trigger condition can be set according to actual needs. For example, when the resource exchange trigger period is reached or the user ends the acquisition of media resources, it is considered that the resource exchange trigger condition is met to perform resource exchange processing for the user account. A smart contract for triggering resource exchange processing for the user account can be deployed in the blockchain network. The resource exchange volume represents the resource quantity corresponding to the asset resources required to be exchanged to obtain the media resources with the resource acquisition volume when exchanging media resources with asset resources, that is, the resource exchange volume is the quantity of asset resources that the user account needs to pay for exchange for the media resources obtained by the user account.

[0052] Optionally, the server may obtain the resource exchange trigger condition corresponding to the media resource and make a determination based on the resource exchange trigger condition. When it is determined that the resource exchange trigger condition corresponding to the media resource is met, such as when the current time reaches the resource exchange trigger period, it is considered that the resource exchange trigger condition is met. The server may determine the resource exchange amount according to the amount of resources obtained based on the smart contract pre-deployed in the blockchain network. The media resources and asset resources obtained by the user account from the media resource platform may belong to different types of resources. For media resources, the user account may exchange them with the asset resources held. The resource exchange amount is the amount of asset resources that the user account needs to pay. In specific applications, the exchange relationships between different types of resources may be different, that is, for the same amount of media resources, different amounts of asset resources may be exchanged for different asset resources; for different amounts of media resources, different amounts of asset resources are also required for the same asset resource.

[0053] In a specific implementation, as Figure 5 shown, for media resources, by detecting the media resources obtained by the user account, the server can determine that the user account has obtained resource segments of 11 resource statistical units, that is, the amount of resources obtained is 11. The exchange relationship between the resource segments in the media resources and the asset resources is that 2 units of asset resources are exchanged for 1 resource segment. Then the server can determine the resource exchange amount of the asset resources to be 22 units according to the amount of resources obtained, that is, the user account needs to pay 22 units of asset resources to exchange the resource segments in the 11 media resources obtained.

[0054] Step 206: Transfer asset resources to the media resource platform from the asset resource account associated with the user account according to the resource exchange amount based on the smart contract.

[0055] Among them, the asset resource account may be the resource account held by the user corresponding to the user account. The asset resource account may be an account through which the user account can exchange media resources by paying asset resources. Transferring asset resources to the media resource platform through the asset resource account can implement the resource exchange process for media resources.

[0056] Exemplarily, the server can transfer asset resources from the asset resource account associated with the user account through the deployed smart contract. Specifically, it can transfer the asset resources in the asset resource account to the media resource platform according to the resource exchange volume, so as to achieve the exchange processing for media resources. In specific implementation, the server can query the asset resource account associated with the user account based on the smart contract. For example, it can query the asset resource account associated with the user account from the asset resource platform. The server can determine the asset resources to be transferred out from the asset resource account according to the resource exchange volume, and transfer the asset resources to be transferred out to the media resource platform through the asset resource account. Specifically, it can be transferred to the asset resource account associated with the media resource platform. During the process of the user account obtaining media resources from the media resource platform, the server transfers the asset resources in the asset resource account associated with the user account to the media resource platform based on the smart contract, so as to achieve the processing of the user account exchanging media resources through asset resources. Moreover, the exchange for media resources can be processed in a fine-grained manner based on resource statistical units. It can accurately perform asset resource exchange according to the actual resource acquisition volume of the user account, realizing the fine-grained exchange of media resources by the user, which can meet the actual exchange needs of media resources in various scenarios, is conducive to improving the user's resource exchange willingness, and thus enhances the communication between different resources.

[0057] In a specific application, such as Figure 6 shown, for the media resources in the media resource platform, by detecting the media resources obtained by the user account, the server can determine that the user account has obtained resource segments of 11 resource statistical units through the corresponding login terminal, that is, the resource acquisition volume is 11. And the exchange relationship between the resource segments in the media resources and the asset resources is that 2 units of asset resources are exchanged for 1 resource segment. Then the server can determine the resource exchange volume of the asset resources to be 22 units according to the resource acquisition volume, that is, the user account needs to pay 22 units of asset resources to exchange the resource segments in the 11 media resources obtained. The server can transfer 22 units of asset resources from the asset resource account A associated with the user account to the asset resource account B bound to the media resource platform based on the smart contract, thus achieving the resource exchange processing. That is, the user account has obtained media resources with 11 resource segments from the media resource platform through the login terminal, and the user account has transferred 22 units of asset resources to the media resource platform through the associated asset resource account, that is, 22 units of asset resources are exchanged for media resources with 11 resource segments.

[0058] In the above resource transfer method based on smart contracts, during the process of a user account obtaining media resources through a media resource platform, the resource acquisition amount of the media resources obtained by the user account is determined according to the resource statistical unit for the media resources. When the resource exchange trigger condition corresponding to the media resources is met, based on the deployed smart contract, the resource exchange amount is determined according to the resource acquisition amount, and based on this smart contract, asset resources are transferred from the asset resource account associated with the user account to the media resource platform according to the determined resource exchange amount, so as to realize the resource exchange process for the media resources. Determining the resource acquisition amount of the user account according to the resource statistical unit for the media resources, when the resource exchange trigger condition is met, determining the resource exchange amount based on the smart contract according to the resource acquisition amount, and performing asset resource exchange for the media resources according to the resource exchange amount through the asset resource account associated with the user account, so as to perform resource exchange processing according to the media resources actually obtained by the user account from the media resource platform, enriching the resource exchange methods of the media resources and meeting the actual exchange needs of the media resources in various scenarios.

[0059] In an exemplary embodiment, as Figure 7 shown, the process of determining the resource exchange amount, that is, when the resource exchange trigger condition corresponding to the media resources is met, based on the smart contract deployed in the blockchain network, the resource exchange amount is determined according to the resource acquisition amount, including:

[0060] Step 702, determine the smart contract deployed in the blockchain network for resource transfer processing.

[0061] Among them, the smart contract can be deployed in the blockchain network according to actual needs, and the smart contract is used to trigger resource transfer processing. Optionally, the server can query the smart contract deployed in the blockchain network for resource transfer processing. The smart contract can be pre-deployed based on the media resources in the media resource platform. Specifically, for different media resource platforms and different media resources, different smart contracts can be deployed.

[0062] Step 704, when the resource exchange trigger condition corresponding to the media resources is met, determine the resource exchange mapping relationship between the asset resources and the media resources based on the smart contract.

[0063] Among them, the resource exchange mapping relationship is used to represent the exchange conversion relationship between the two resources of asset resources and media resources, that is, according to the resource exchange mapping relationship, the resource quantity of the media resources that can be exchanged for each unit of asset resources can be determined, or the resource quantity of the asset resources required for exchanging each unit of media resources can be determined. The resource exchange mapping relationship can be set in advance according to actual needs. For example, it can be set that 2 units of asset resources are required to exchange for each resource statistical unit quantity of media resources.

[0064] Exemplarily, the server may query the resource exchange trigger conditions preset for the media resource. The server makes a determination based on the resource exchange trigger conditions. When it is determined that the resource exchange trigger conditions are met, the server may determine the resource exchange mapping relationship based on the pre-deployed smart contract. Specifically, the server may query the preset mapping relationship table and obtain the resource exchange mapping relationship according to the types of the asset resource and the media resource. In a specific application, the server may set the resource exchange mapping relationship between the asset resource and the media resource according to the resource type of the media resource and the historical interaction data for the media resource. The historical interaction data is the interaction data triggered by each user based on their respective user accounts for the media resources in the media resource platform.

[0065] Step 706, determine the resource exchange volume based on the resource exchange mapping relationship and the resource acquisition volume.

[0066] Specifically, the server calculates the resource exchange volume of the asset resource based on the resource acquisition volume according to the resource exchange mapping relationship. For example, the resource exchange mapping relationship may specifically be that the media resource and the asset resource are in a ratio of 3:1, that is, each unit of the asset resource can exchange 3 resource statistical units of the media resource. If the resource acquisition volume is N, then the resource exchange volume can be calculated as N / 3, that is, the user account needs to pay N / 3 units of the asset resource to obtain N resource statistical units of the media resource.

[0067] In this embodiment, when the resource exchange trigger conditions corresponding to the media resource are met, the server determines the resource exchange volume by calling the pre-deployed smart contract according to the resource acquisition volume and the resource exchange mapping relationship, so that the resource quantity of the asset resource that needs to be exchanged can be accurately determined based on the smart contract, which is beneficial to ensuring the timeliness and accuracy of the resource exchange.

[0068] In an exemplary embodiment, the resource exchange mapping relationship includes the resource exchange ratio between each resource segment of the asset resource and the media resource; determining the resource exchange volume based on the resource exchange mapping relationship and the resource acquisition volume includes: according to the resource acquisition volume, determining the number of segments of the resource segments in the media resource obtained by the user account; based on the number of segments and the resource exchange ratio, determining the resource exchange volume of the asset resource.

[0069] Among them, the resource exchange mapping relationship includes a resource exchange ratio. The resource exchange ratio refers to the quantitative correspondence relationship between the asset resources and each resource segment in the media resources, that is, the resource exchange ratio represents the resource quantity of the asset resources required for each resource segment in the media resources during the exchange. In specific applications, the media resources can be divided into multiple resource segments according to the resource statistical unit, and each resource segment supports the user account to perform exchanges separately through the asset resources. The resource exchange ratio can be uniformly set for each resource segment in the media resources. When the resource exchange ratios of each resource segment are the same, it indicates that each resource segment requires the same quantity of asset resources for exchange. Different resource exchange ratios can also be set for each resource segment in the media resources, that is, each resource segment in the media resources can have different resource exchange ratios, so that each resource segment can be exchanged through different quantities of asset resources. Specifically, the server can, based on the historical interaction data for the media resources, divide the media resources into popular resource segments and non-popular resource segments. For example, the resource segments frequently triggered by each user for interaction operations can be determined as popular segments. Specifically, the resource segments for which the frequency of interaction operations triggered by each user exceeds the frequency threshold can be determined as popular segments, and the resource segments for which the frequency of interaction operations triggered by each user does not exceed the frequency threshold can be determined as non-popular segments. Different resource exchange ratios can be set for the popular resource segments and non-popular resource segments respectively.

[0070] Optionally, the server can determine the number of segments of the resource segments obtained by the user account from the media resources according to the resource acquisition quantity. For example, each resource statistical unit can correspond to a resource segment. The server can use the resource statistical unit as the measurement unit and obtain the number of segments of the resource segments obtained by the user account according to the resource acquisition quantity. The server calculates the resource exchange quantity of the asset resources based on the number of segments and the resource exchange ratio. The specific resource exchange ratio can represent the asset resources required for each media resource during the exchange. Then, the server can calculate the resource exchange quantity of the asset resources based on the product of the number of segments and the resource exchange ratio. In specific applications, different resource exchange ratios can be set for each resource segment in the media resources. Then, the server can further determine the respective resource segments obtained by the user account from the media resources and calculate the respective exchange quantities for each resource segment. Specifically, the server can respectively determine the resource exchange ratios of each resource segment from the resource exchange mapping relationship. For each resource segment obtained by the user account, the server can calculate the exchange quantity for each resource segment according to the corresponding resource exchange ratio of the segment. The server can obtain the resource exchange quantity of the asset resources by summing up the exchange quantities of each resource segment.

[0071] In this embodiment, the server calculates the resource exchange amount of the asset resources based on the number of resource segments obtained for the user account and the resource exchange ratio, and can accurately determine the resource exchange amount according to the resource exchange ratio, thereby ensuring the accuracy of resource exchange.

[0072] In an exemplary embodiment, when the resource exchange trigger condition corresponding to the media resource is satisfied, based on the smart contract deployed in the blockchain network, the resource exchange amount is determined according to the resource acquisition amount, including: when the user account finishes acquiring the media resource, based on the smart contract deployed in the blockchain network, the resource exchange amount is determined according to the resource acquisition amount.

[0073] Optionally, the user account finishing acquiring the media resource may specifically include that the user account has acquired all the media resources or has obtained the resource end position for the media resource. In addition, it may also be that when the user account interrupts the acquisition of the media resource, such as when the user account jumps to acquire other resources or exits the access to the media resource platform, it can be considered that the user account has finished acquiring the media resource. When the user account finishes acquiring the media resource, it can be considered that the resource exchange trigger condition corresponding to the media resource is satisfied, and the server can trigger the resource exchange process for the acquired media resource. Specifically, the server can determine the resource exchange amount for the asset resources by calling the smart contract deployed in the blockchain network.

[0074] In this embodiment, when the user account finishes acquiring the media resource, the server triggers the call of the smart contract to determine the resource exchange amount for the asset resources, so that the resource exchange process can be triggered in a timely manner when the user account finishes acquiring the media resource, and the timeliness of resource exchange can be ensured.

[0075] In an exemplary embodiment, when the resource exchange trigger condition corresponding to the media resource is satisfied, based on the smart contract deployed in the blockchain network, the resource exchange amount is determined according to the resource acquisition amount, including: when the resource acquisition amount reaches the resource exchange trigger threshold corresponding to the media resource, based on the smart contract deployed in the blockchain network, the resource exchange amount is determined according to the resource acquisition amount.

[0076] Among them, the resource exchange trigger threshold is a pre-set quantity threshold for determining whether to trigger the resource exchange process, and is specifically used to determine the resource acquisition amount obtained by the user account. Specifically, the server can query the pre-set resource exchange trigger threshold and compare the resource acquisition amount with the resource exchange trigger threshold. When it is determined that the resource acquisition amount reaches the resource exchange trigger threshold, it can be considered that the resource exchange trigger condition is satisfied, and the server can determine the resource exchange amount for the asset resources by calling the smart contract deployed in the blockchain network.

[0077] In this embodiment, when the resource acquisition volume of the user account reaches the resource exchange trigger threshold corresponding to the media resource, the server triggers the invocation of the smart contract to determine the resource exchange volume for the asset resource, so that the resource exchange process can be triggered in a timely manner when the resource acquisition volume reaches a certain amount, ensuring the timeliness of resource exchange.

[0078] In an exemplary embodiment, when the resource exchange trigger condition corresponding to the media resource is met, based on the smart contract deployed in the blockchain network, the resource exchange volume is determined according to the resource acquisition volume, including: when the resource exchange trigger period corresponding to the media resource is reached, based on the smart contract deployed in the blockchain network, the resource exchange volume is determined according to the resource acquisition volume.

[0079] Among them, the resource exchange trigger period is a pre-set period for determining whether to trigger the resource exchange process, specifically for determining time. Specifically, the server can query the pre-set resource exchange trigger period and make a determination for the current event according to the resource exchange trigger period. When it is determined that the current reaches the resource exchange trigger period, the server can determine the resource exchange volume for the asset resource by invoking the smart contract deployed in the blockchain network. In this embodiment, when the resource exchange trigger period corresponding to the media resource is reached, the server triggers the invocation of the smart contract to determine the resource exchange volume for the asset resource, so that the resource exchange process can be triggered periodically, ensuring the timeliness of resource exchange.

[0080] In an exemplary embodiment, during the process of the user account obtaining media resources through the media resource platform, according to the resource statistical unit for the media resource, the resource acquisition volume of the media resources obtained by the user account is determined, including: during the process of the user account obtaining media resources through the media resource platform, querying the resource statistical unit for the media resource; according to the resource statistical unit, counting the resource quantity of the media resources obtained by the user account to obtain the resource acquisition volume of the media resources obtained by the user account.

[0081] Among them, the resource statistical unit is a measurement unit for counting the resource quantity of the media resources obtained by the user account. Different resource statistical units can be set for different media resources to count the resource quantity of the corresponding media resources through the resource statistical unit.

[0082] Exemplarily, in the process of a user account obtaining media resources through a media resource platform, the server can query the resource statistical unit preset for the media resources and count the resource quantity of the media resources obtained by the user account according to the resource statistical unit. Specifically, it can count the resource quantity of the media resources obtained by the user account relative to the resource statistical unit, so as to obtain the resource acquisition volume of the media resources obtained by the user account. The resource acquisition volume can be the quantity of the media resources obtained by the user account counted according to the resource statistical unit, and its specific form can include the resource quantity of N resource statistical units.

[0083] In this embodiment, the server counts the media resources obtained by the user account according to the preset resource statistical unit, and counts the resource acquisition volume of the user account from the fine-grained level of the resource statistical unit, so as to support resource exchange processing based on the fine-grained level of the resource statistical unit, enrich the resource exchange methods of the media resources, and meet the actual exchange requirements of the media resources in various scenarios.

[0084] In an exemplary embodiment, the media resources include audio-visual resources; the resource statistical unit includes audio-visual unit segments; counting the resource quantity of the media resources obtained by the user account according to the resource statistical unit to obtain the resource acquisition volume of the media resources obtained by the user account includes: determining the audio-visual duration of the audio-visual resources obtained by the user account; based on the audio-visual duration and the segment duration of the audio-visual unit segment, determining the audio-visual segment settlement quantity; and obtaining the resource acquisition volume of the audio-visual resources obtained by the user account according to the audio-visual segment settlement quantity.

[0085] Among them, the media resources include audio-visual resources, and the audio-visual resources can include at least one of audio resources or video resources. For audio-visual resources, the resource statistical unit includes audio-visual unit segments, that is, the resource quantity of the audio-visual resources obtained by the user account is counted according to the audio-visual unit segments. The audio-visual unit segment can be a segment divided for the audio-visual, such as a segment with a duration of 1 minute, a segment with a duration of 10 seconds, etc. The audio-visual unit segment can be specifically set according to the corresponding audio-visual resources, such as by equally dividing the audio-visual resources to determine the audio-visual unit segment. The audio-visual duration refers to the duration of the audio-visual resources obtained by the user account, such as the user account listened to 2 minutes of music, or played and watched a 30-minute movie, etc. The segment duration of the audio-visual unit segment refers to the duration occupied by the audio-visual unit segment. The audio-visual segment settlement quantity refers to the number of segments that need to be settled for the audio-visual resources obtained by the user account determined with the audio-visual unit segment as the settlement measurement unit.

[0086] Specifically, for audio-visual resources, the server can obtain the set audio-visual unit segments. The audio-visual unit segments can be obtained by dividing the audio-visual resources at a fine granularity. For example, the audio-visual resources can be divided into 100 parts, thus obtaining 100 segments. Based on the duration of each segment, the audio-visual unit segments can be determined. For example, the durations of the 100 segments obtained by division can be used as the segment durations of the audio-visual unit segments, thereby determining the audio-visual unit segments. When determining the resource acquisition volume, the server can determine the audio-visual duration of the audio-visual resources obtained by the user account. Specifically, based on the start timestamp and end timestamp of the user's acquisition of the audio-visual resources, the audio-visual duration of the audio-visual resources obtained by the user account can be calculated. The server can determine the segment duration of the audio-visual unit segments and, in combination with the audio-visual duration of the obtained audio-visual resources, obtain the audio-visual segment settlement volume. The audio-visual segment settlement volume is the resource quantity counted in terms of the audio-visual unit segments. For example, the segment duration of the audio-visual unit segments can be A minutes, and the audio-visual duration of the audio-visual resources obtained by the user account is B minutes. Then the server can obtain the quantity of the audio-visual resources obtained by the user account counted in terms of the audio-visual unit segments according to the quotient between the audio-visual duration and the segment duration of the audio-visual unit segments. Specifically, the audio-visual segment settlement volume can be calculated as B / A, that is, when counted in terms of the audio-visual unit segments, the number of segments of the audio-visual resources obtained by the user account is B / A. The server obtains the resource acquisition volume of the audio-visual resources obtained by the user account based on the audio-visual segment settlement volume. Specifically, the server can directly determine the audio-visual segment settlement volume as the resource acquisition volume of the user account.

[0087] In this embodiment, for audio-visual resources, based on the audio-visual duration of the audio-visual resources obtained by the user account and the segment duration of the audio-visual unit segments, the audio-visual segment settlement volume is determined, and based on the audio-visual segment settlement volume, the resource acquisition volume of the audio-visual resources obtained by the user account is obtained, thereby supporting resource exchange processing based on the fine granularity of the audio-visual unit segments, enriching the resource exchange methods of audio-visual resources, and meeting the actual exchange requirements of audio-visual resources in various scenarios.

[0088] In an exemplary embodiment, the media resources include graphic and text resources; the resource statistical unit includes the quantity of graphic and text settlement units; according to the resource statistical unit, the resource quantity of the media resources obtained by the user account is statistically counted to obtain the resource acquisition volume of the media resources obtained by the user account, including: determining the quantity of graphic and text of the graphic and text resources obtained by the user account; determining the graphic and text settlement volume based on the quantity of graphic and text and the quantity of graphic and text settlement units; and obtaining the resource acquisition volume of the graphic and text resources obtained by the user account according to the graphic and text settlement volume.

[0089] Among them, the media resources include graphic and text resources, and the graphic and text resources can include at least one of image resources or text resources. For graphic and text resources, the resource statistical unit includes the number of graphic and text settlement units, that is, the resource quantity of the graphic and text resources obtained for the user account is statistically calculated according to the number of graphic and text settlement units. The number of graphic and text settlement units can be set for the corresponding graphic and text resources. For example, for image resources, the number of graphic and text settlement units can include the number of image units at each settlement, that is, according to the number of image units, the resource exchange settlement is carried out for the image resources obtained for the user account. Another example is for text resources, the number of text settlement units can include the number of text units at each settlement, specifically, it can include the quantity of text targeted at each resource exchange settlement, and specifically, it can include the word count of the text.

[0090] The quantity of graphic and text is the quantity of graphic and text resources obtained for the user account. For example, for image resources, it can specifically include the number of image frames obtained for the user account. For text resources, it can specifically include the quantity of text obtained for the user account, such as the number of words obtained for the user account. The quantity of graphic and text settlement refers to the quantity of graphic and text that needs to be settled for the graphic and text resources obtained for the user account determined with the number of graphic and text settlement units as the settlement measurement unit.

[0091] Optionally, for graphic and text resources, the server can obtain the corresponding set number of graphic and text settlement units. The number of graphic and text settlement units can be obtained by dividing the graphic and text resources into fine-grained parts. For example, the graphic and text resources can be divided into 100 parts, so that 100 sub-resources can be obtained. Based on the quantity of graphic and text included in each sub-resource, the number of graphic and text settlement units can be determined, so as to carry out resource exchange processing for the graphic and text resources obtained for the user account according to the number of graphic and text settlement units. When determining the quantity of resources obtained, the server can determine the quantity of graphic and text of the graphic and text resources obtained for the user account. The quantity of graphic and text can specifically include the number of frames of the image resources obtained for the user account or the word count of the text resources obtained. The server can determine the quantity of graphic and text settlement based on the quantity of graphic and text and the number of graphic and text settlement units. The quantity of graphic and text settlement is the quantity of graphic and text resources statistically calculated with the number of graphic and text settlement units as the measurement unit. The server obtains the quantity of resources obtained for the graphic and text resources obtained for the user account based on the quantity of graphic and text settlement. Specifically, the server can directly determine the quantity of graphic and text settlement as the quantity of resources obtained for the user account.

[0092] For example, the graphic and text resources may include image resources, and the number of graphic and text settlement units may be C frames, that is, resource exchange processing is performed for every C frames. If the number of images in the image resources obtained by the user account is D frames, the server may obtain the number of image resources obtained by the user account statistically measured in terms of the number of graphic and text settlement units according to the quotient between the number of images and the number of graphic and text settlement units. Specifically, the graphic and text settlement volume can be calculated as D / C, that is, when measured in terms of the number of graphic and text settlement units, the number of resource of the image resources obtained by the user account is D / C. For another example, the graphic and text resources may include text resources, and the number of graphic and text settlement units may be E characters, that is, resource exchange processing is performed for every E characters. If the number of characters in the text resources obtained by the user account is F, the server may obtain the number of text resources obtained by the user account statistically measured in terms of the number of graphic and text settlement units according to the quotient between the number of characters and the number of graphic and text settlement units. Specifically, the graphic and text settlement volume can be calculated as F / E, that is, when measured in terms of the number of graphic and text settlement units, the number of resource of the text resources obtained by the user account is F / E.

[0093] In this embodiment, for the graphic and text resources, according to the number of graphic and text in the graphic and text resources obtained by the user account and the number of audio-graphic and text settlement units, the graphic and text settlement volume is determined, and the resource acquisition volume of the graphic and text resources obtained by the user account is obtained according to the graphic and text settlement volume, so as to support resource exchange processing based on the fine granularity of the number of graphic and text settlement units, enrich the resource exchange method of the graphic and text resources, and meet the actual exchange requirements of the graphic and text resources in various scenarios.

[0094] In an exemplary embodiment, the media resources include text resources; the resource statistical unit includes text unit page numbers; according to the resource statistical unit, the resource acquisition volume of the media resources obtained by the user account is statistically obtained, including: determining the number of texts in the text resources obtained by the user account; determining the text settlement volume based on the number of texts and the number of page numbers of the text unit pages; and obtaining the resource acquisition volume of the text resources obtained by the user account according to the text settlement volume.

[0095] Among them, the media resources include text resources. For text resources, the resource statistical unit includes the text unit page number, that is, the resource quantity of the text resources obtained for the user account can be counted according to the page number quantity of the text unit page number. The text unit page number can be set for the corresponding text resource to represent the page number quantity targeted each time resource exchange processing is performed, that is, resource exchange settlement is performed for the text resources obtained by the user according to the page number quantity of the text unit page number. For example, when the text unit page number is 3, it means that each time resource exchange processing is performed according to 3-page text resources. The text quantity refers to the quantity of the text resources obtained for the user account, and specifically may include the text page number quantity obtained by the user account. The text settlement quantity refers to the text quantity that needs to be settled for the text resources obtained by the user account determined with the page number quantity of the text unit page number as the settlement measurement unit. For example, for text resources, the text unit page number can be G pages, that is, resource exchange processing is performed according to every G pages. If the text quantity of the text resources obtained by the user account is H pages, the server can obtain the resource quantity of the text resources obtained by the user account counted with the text unit page number as the measurement unit based on the quotient between the text quantity and the page number quantity of the text unit page number, and specifically can calculate that the text settlement quantity is H / G. That is, when the text unit page number is used as the measurement unit, the resource acquisition quantity of the text resources obtained by the user account is H / G.

[0096] Specifically, for text resources, the server can obtain the set text unit page number accordingly. The text unit page number can be obtained by dividing the text resource into fine-grained parts. For example, the text resource can be divided into 100 parts according to page numbers, so that 100 sub-resources can be obtained. Based on the text page numbers included in each sub-resource, the text unit page number can be determined to perform resource exchange processing for the text resources obtained by the user account according to the page number quantity of the text unit page number. When determining the resource acquisition quantity, the server can determine the text quantity of the text resources obtained by the user account, and the text quantity specifically may include the page number quantity of the text resources obtained by the user account. The server can determine the text settlement quantity based on the text quantity and the page number quantity of the text unit page number. The text settlement quantity is the text resource quantity counted with the text unit page number as the measurement unit. The server obtains the resource acquisition quantity of the text resources obtained by the user account based on the text settlement quantity. Specifically, the server can directly determine the text settlement quantity as the resource acquisition quantity of the user account.

[0097] In this embodiment, for text resources, the text settlement quantity is determined according to the text quantity of the text resources obtained by the user account and the page number quantity of the text unit page number, and the resource acquisition quantity of the text resources obtained by the user account is obtained according to the text settlement quantity, so as to support fine-grained resource exchange processing based on the text unit page number, enrich the resource exchange method of text resources, and meet the actual exchange requirements of text resources in various scenarios.

[0098] In an exemplary embodiment, the resource transfer method based on a smart contract further includes: obtaining historical interaction data for media resources in a media resource platform; and determining a resource statistical unit for the media resources based on the resource type of the media resources and the historical interaction data.

[0099] Among them, the historical interaction data is interaction data triggered by each user based on their respective user accounts for the media resources in the media resource platform, and specifically may include, but is not limited to, interaction data corresponding to various interaction operations such as browsing, playing, favoriting, commenting, forwarding, liking, downloading, and posting bullet screens for the media resources. The resource type can be used to distinguish the content form of the media resources, and specifically may include various types such as images, texts, audios, and videos.

[0100] Optionally, the server may obtain historical interaction data associated with the media resources. The historical interaction data is specifically interaction data generated by each user through their respective accounts for the interaction operations triggered by the media resources. The server determines the resource type corresponding to the media resources and determines the resource statistical unit for the media resources based on the resource type and the historical interaction data. In specific applications, different resource types may be correspondingly set with different resource statistical units. In addition, the resource statistical unit may also be set in combination with the corresponding historical interaction data. Specifically, the server may determine the preference degree of each user for the media resources based on the historical interaction data of the media resources, so as to determine the resource segments preferred by each user of the media resource platform from the media resources. The server may set corresponding resource statistical units for each resource segment. For example, for Movie A, according to the historical interaction data for Movie A, it can be determined that the resource segments of Movie A with timestamps from 59 minutes to 65 minutes and from 80 minutes to 90 minutes are resource segments where each user has frequent interactions, so it can be determined that these two resource segments belong to the popular resource segments in Movie A. The server may set a first resource statistical unit for this popular resource segment, and the server may set a second resource statistical unit for the non-popular resource segments. The first resource statistical unit and the second resource statistical unit may respectively correspond to different durations, so as to set resource statistical units with different granularities according to the historical interaction data, enrich the resource exchange methods of the media resources, and meet the actual exchange needs of the media resources in various scenarios.

[0101] In this embodiment, the server determines the resource statistical unit for the media resources according to the resource type of the media resources and the historical interaction data for the media resources, and can flexibly configure the resource statistical unit according to the actual needs of the media resources, so as to meet the actual exchange needs of the media resources in various scenarios.

[0102] In an exemplary embodiment, based on a smart contract, an asset resource transfer is made from an asset resource account associated with a user account to a media resource platform according to the resource exchange volume, including: respectively determining a first asset resource account associated with the user account and a second asset resource account associated with the media resource platform; determining, based on the smart contract, transfer-out asset resources matching the resource exchange volume from the first asset resource account; and transferring the transfer-out asset resources to the second asset resource account through the first asset resource account.

[0103] Among them, the first asset resource account is an asset resource account associated with the user account, and the asset resources in the first asset resource account are the asset resources owned by the user holding the user account; the second asset resource account is an asset resource account associated with the media resource platform. The transfer-out asset resources match the resource exchange volume, specifically, the resource quantity of the transfer-out asset resources is equal to the resource exchange volume.

[0104] Specifically, when performing asset resource transfer processing, the server can respectively query the asset resource accounts associated with the user account and the media resource platform. Among them, the asset resource account associated with the user account is the first asset resource account, and the asset resource account associated with the media resource platform is the second asset resource account. The server can determine the transfer-out asset resources from the first asset resource account based on the smart contract according to the resource exchange volume. The transfer-out asset resources match the resource exchange volume and are the asset resources to be transferred to the second asset resource account. The server transfers the transfer-out asset resources in the first asset resource account to the second asset resource account through the first asset resource account, thereby realizing the asset resource transfer processing.

[0105] In this embodiment, the server transfers the transfer-out asset resources from the first asset resource account associated with the user account to the second asset resource account associated with the media resource platform based on the smart contract according to the resource exchange volume, thereby enabling timely and accurate realization of the asset resource transfer processing.

[0106] In an exemplary embodiment, the resource transfer method based on a smart contract further includes: obtaining a resource transfer result of the asset resource transfer; and when a storage trigger condition is met, recording the resource transfer result into the blockchain network through a smart contract deployed in the blockchain network for recording the resource transfer result.

[0107] Among them, the resource transfer result is the processing result of transferring asset resources from the asset resource account associated with the user account to the media resource platform according to the resource exchange volume. The storage trigger condition is used to determine whether the resource transfer result of the asset resource transfer needs to be uploaded to the blockchain network for storage. The storage trigger condition can be flexibly set according to actual needs. For example, when the storage period is reached, the transfer result reaches the result quantity threshold, or a storage instruction is received, it can be considered that the storage trigger condition is met, and thus the storage process is performed for the resource transfer result.

[0108] Exemplarily, the server can obtain the resource transfer result of the asset resource transfer and make a determination according to the storage trigger condition. When it is determined that the storage trigger condition is met, for example, when it is determined that the storage period is reached, the server can store the obtained resource transfer result. Specifically, the resource transfer result can be stored in the blockchain network. In a specific implementation, the server can store the resource transfer result locally and then send the resource transfer result to each consensus node of the blockchain for consensus, so as to store the resource transfer result in the blockchain network to which the server belongs as a node.

[0109] In this embodiment, when the storage trigger condition is met, the resource transfer result of the asset resource transfer is stored in the blockchain network to store the resource transfer result through the blockchain network, which can ensure the security of the resource transfer result.

[0110] This application also provides an application scenario, which applies the above-mentioned resource transfer method based on a smart contract. Specifically, the application of the resource transfer method based on a smart contract in this application scenario is as follows:

[0111] On the one hand, the existing payment methods for audio and video streams are mainly periodic payment (monthly / yearly) or one-time buyout of resources. Specifically, through the membership system, users can make periodic membership right payments, such as yearly or monthly, or through the one-time buyout of individual audio and video resources, such as paying for the price of a single movie. Users need to pay the relevant fees in advance to obtain the audio and video resources; before entering the playback, the membership rights or resource purchase transaction forms will be controlled.

[0112] Among them, the monthly subscription system is a charging method based on months. Within the current month, users can play the corresponding audio and video, such as listening to music resources and watching film and television resources. For example, Figure 8 As shown, for the monthly subscription system, users can make a one-time payment for multiple audio and videos and play them flexibly at any time within the subscribed month, that is, users have completed the payment for the resources covered by the monthly subscription of the platform. For the buyout system users, they pay to buy out the required audio and video resources, and thus can play the bought-out audio and video resources, such as listening to the bought-out music and watching the bought-out movies. For example, Figure 9As shown in the figure, for the buyout system, users can pay for the buyout of selected individual audio and video resources, so that they can play the corresponding audio and video resources at any time during the buyout validity period. In addition, there are also charging methods such as free trial listening and free trial viewing in the prior art. For example, music can be listened to for dozens of seconds for free, and movies and TV shows can be watched for a few minutes for free. After the trial listening and trial viewing are over, users need to pay formally to continue listening or watching. The traditional audio and video charging method has a larger granularity. Users may not need to play the complete audio and video. For example, users only need to play the climax part of the music and only need to watch the characteristic part of the movie or TV drama. At this time, users need to make a trade-off, which will increase the user cost and affect the normal payment of users.

[0113] That is, in the traditional payment method, users need to pay a certain amount in advance to obtain audio and video resources. This payment method cannot meet the personalized needs of users, and it is not easy for resource providers to reasonably price the resources. Specifically, the existing audio and video payment methods cannot meet the personalized needs of users, and it is not easy for resource providers to reasonably price the resources. When users have not learned about some audio and video content, they can only learn about the audio and video content through publicity, resulting in the degree of liking for the resources after purchase not necessarily being so high, and the value paid in advance does not fully match the user's own wishes.

[0114] Based on this, the resource transfer method based on smart contract provided in this embodiment, in the resource exchange process for audio and video resources, cuts the audio and video resources into small segments. Users entrust the playback software to pay the corresponding fees for them through the smart contract, realizing the on-demand micro-payment of users for audio and video resources, improving the payment willingness of users, and increasing the income of audio and video resource providers. Among them, the audio and video stream refers to the audio and video data streams transmitted through the Internet; the smart contract is an agreement that automatically executes the contract terms and is implemented by blockchain technology; the micro-payment means that relying on the smart contract, users automatically and invisibly pay the fees for a small part of the resources they actually use.

[0115] In a distributed system where smart contracts confirm (or reject approval of) contract performance, multiple parties continuously check, recheck, and update block entries, while other contracting parties reject any performance that does not comply with the specified rules. And smart contracts follow the contract logic and then run the program simultaneously on all blockchain nodes, and all relevant parties can compare the results. Only after both parties agree to the contract terms do these relevant parties modify their block versions. Then the block is replicated across the network. In addition, any blockchain user can evaluate the contract logic and underlying mechanisms. Each of them can verify and run the same code, and users cannot access individual contracts. All details of the contract can only be seen by the two contracting parties. If other users accept the contract terms and contract logic, then simply put, any one of them can replicate, modify, and execute the contract again for their own purposes. Smart contracts are built and implemented in the blockchain, so they have blockchain properties, specifically including immutability and distributed properties. Among them,

[0116] Specifically, the server divides the audio-visual resources into small segments. For example, the audio-visual resources can be segmented by the playback software according to time, such as every few seconds or minutes, or by content, such as by theme, to form small segments. Users can sign a smart contract on the playback software to authorize the playback software to pay the corresponding fees on their behalf. The smart contract can contain information such as user identity authentication, payment amount, and payment method. The playback software can automatically control the playback of audio-visual segments according to the smart contract signed by the user, and monitor the number of segments watched by the user in real time, and automatically pay the corresponding fees to the resource provider through the smart contract. Users do not need to pay any fees when watching audio-visual segments, and their viewing behavior will automatically pay the corresponding fees through the smart contract. Further, for audio-visual resources such as movies, TV shows, and songs, based on the smart contract method, the payment for audio-visual resources is micro-differentiated. For the playback progress of the audio-visual stream, micro-billing can be performed based on the smart contract at the granularity of seconds or minutes. The fee can be charged based on the actual playback duration of the user according to the smart contract. Users can make micro-payments according to the actual playback duration, such as flexible payment according to the proportion of the playback duration. After the audio-visual stream playback is interrupted or ends, the escrowed smart contract immediately triggers micro-payment according to the proportion of the playback duration, which refines the granularity of audio-visual resource payment and enriches the payment methods for audio-visual resources.

[0117] Among them, the smart contract function of blockchain technology can be utilized to achieve the automatic execution of payment functions. The smart contract will start to execute after the user's authorization and automatically pay the corresponding fees to the resource provider according to the number of segments the user has watched. To ensure transaction security, the playback software / control can set up security mechanisms, such as preventing malicious attacks and preventing duplicate payments, which can be specifically implemented through encryption algorithms. Specifically, the smart contract can run in the client playback software / control / WEB (web) technology components, etc., or on the audio and video resource server side, and control between the client and the server. By controlling each playback, fast forward, dragging the user, etc., which involve fine-grained resource acquisition links, charging and deduction are carried out, and information such as compression, encryption, sending, charging, and reporting of relevant data streams forms a closed-loop security mechanism. Further, the operation data of the user's viewing can also be analyzed to accurately grasp the user's interests, and achieve accurate recommendation and pricing strategies for audio and video resources. In addition, the rights and interests and marketing functions can be built into the smart contract by combining the user operation data and the consumption system, so as to push media resources. Specifically, by analyzing the user's viewing history, behavior, and feedback, relevant audio and video content can be recommended according to the user's interests and preferences, so that users can more conveniently find the content they are interested in, and at the same time, it can also help the resource provider better understand the user's needs and increase revenue.

[0118] In a specific application, such as Figure 10 shown, for Video A, the proportion of the actual playback duration of the user can be determined according to the fine-grained video segments divided for Video A, so as to use the smart contract for micro-payment. For example, if it is determined according to the video segments that the user has watched 40% of the content of Video A and then ends the playback, the smart contract can be triggered to charge 40% of the full cost of Video A; another example is that if it is determined according to the video segments that the user has watched 60% of the content of Video A and then ends the playback, the smart contract can be triggered to charge 60% of the full cost of Video A; in addition, when the user skips to watch, the proportion of the total viewing duration of the user can still be determined according to the video segments for charging. For example, when the proportion of the duration of the 4 segments skipped by the user is 50%, the smart contract can be triggered to charge 50% of the full cost of Video A.

[0119] Specifically, when a user plays media resources such as audio and video, the playback progress is detected in real time, and a smart contract is triggered at a fine-grained unit such as minutes or seconds according to the playback progress for micro-charging. Thus, fine-grained payment can be made according to the playback progress of audio and video resources, which can enrich the charging methods and is conducive to stimulating users' consumption. The specific process may include: playing audio and video resources. The user can play music or videos through an audio and video resource platform, and the audio and video resources played by the resource platform can be paid resources; determining the resource playback progress. When triggering the charging process for audio and video, determine the resource playback progress that needs to be billed. The resource playback progress can be calculated based on the played duration and the complete duration of the audio and video resources; performing micro-charging based on the smart contract. Schedule the pre-set smart contract, determine the charging ratio according to the resource playback progress, and perform micro-charging for the played audio and video resources according to the charging ratio.

[0120] Among them, the audio and video resources can be resources transmitted in real time in the form of data streams, specifically, music listened to online, videos such as movies, TV dramas, and animations watched online. The user can access an audio and video website to play online, or play audio and video through a software application. For the paid resources played by the user, the resource platform can make a mark, such as marking through a payment prompt on the cover. The payment prompt can describe the specific charging rules for resource playback, such as charging at x units per second, or charging at y units per minute.

[0121] During the process of the user playing audio and video, the resource playback progress can be detected in real time, and the resource playback progress can be calculated in units such as hours / minutes / seconds. The system can set a charging trigger condition to determine whether to perform a charging process for resource playback. For example, the charging trigger condition can be playback pause or playback end. Specifically, when it is detected that the user triggers playback pause, or the audio and video playback ends, such as when the user closes the playback, it is considered that the charging trigger condition is met, and thus the user's resource playback progress is determined. In addition, the charging trigger condition can also be according to a preset duration. Every time the audio and video resources are played for a certain duration, it is considered that the charging trigger condition is met, and charging is performed by determining the user's resource playback progress. For example, charging can be performed every 60 seconds, that is, when the audio and video resources are played for 60 seconds each time, it is considered that the charging trigger condition is met, and charging is performed by determining the resource playback progress. At this time, it can be considered that the resource playback progress is the past 60 seconds, and thus micro-charging can be performed for the already played 60 seconds.

[0122] In other applications, the preset duration in the charging trigger condition can be flexibly set according to actual needs. For example, it can be fixedly set, such as 30 seconds or 60 seconds; it can also be divided according to the duration of the audio-visual resource itself. For example, the preset duration can be the duration after dividing the audio-visual into 100 parts. For a 120-minute movie, the preset duration can be 1.2 minutes, that is, 80 seconds. Thus, when the user plays this movie, the user is micro-charged once every 80 seconds of video watched, and the micro-charging process can be executed up to 100 times.

[0123] When performing micro-charging based on a smart contract, by pre-deploying the smart contract in the system, when triggering the micro-charging process, the pre-deployed smart contract is called to calculate the amount of this charge according to the determined resource playback progress, and then the transfer is made through the smart contract. The pre-deployed smart contract can be bound to the user's wallet, so that the smart contract can automatically transfer money to the resource platform. There are two modes for scheduling the smart contract for micro-payment, one is real-time trigger and the other is interruption trigger. For real-time trigger, according to the preset duration, every time the user plays the audio-visual resource up to the preset duration, the smart contract is triggered to perform micro-payment. At this time, to ensure the user's playback experience, password-free payment is supported, and the user only needs to pre-enable password-free payment. For interruption trigger, it can be for micro-charging when the playback is paused or ended. For example, when the user closes the playback interface after the playback ends, a pop-up window can be popped up to prompt the user to pay for the played audio-visual.

[0124] The resource transfer method based on smart contract provided in this embodiment refines the granularity of audio-visual resource payment, enriches the payment methods of audio-visual resources, and improves the user's willingness to pay because the user only needs to pay for the segments actually watched; it increases the income of the audio-visual resource party because the number of segments actually watched by the user will be more than the one-time buyout method; it realizes the personalized recommendation and precise pricing of audio-visual resources; through the automatic execution function of the smart contract, it reduces the cost and error rate of manual operations; through data analysis, it can better understand the user's viewing behavior and interest preferences, providing a basis for the optimization and improvement of audio-visual resources.

[0125] The resource transfer method based on smart contracts provided in this embodiment can also perform resource exchange processing on graphic and text resources. By slicing graphic and text resources into smaller granularities according to different dimensions such as the number of pages or sheets, and using smart contracts to control the micro-payment process, it can achieve the effect that users can view the required graphic and text content without paying fees, achieving a convenient and seamless paid viewing effect. Specifically, for graphic and text resources such as pictures and articles, the charging of graphic and text resources is micro-differentiated based on the smart contract method. For the viewing or reading progress of the graphic and text stream, micro-billing is performed based on the smart contract according to the number of pictures, the number of pages of the article, or the granularity of the number of words. After the graphic and text resources are browsed, the escrowed smart contract immediately triggers micro-payment according to the proportion of the browsed graphic and text resources, refining the granularity of the payment for graphic and text resources and enriching the payment methods for graphic and text resources.

[0126] For graphic and text resources, traditional resource exchange processing mainly adopts the methods of periodic membership payment or one-time buyout of resources. Users may not be interested in all the content, and it is not easy for resource providers to set too high a price. Specifically, through the membership system, users' periodic membership rights and interests are paid, such as annual or monthly subscriptions, or through the method of independently buying out individual graphic and text assets, such as paying the price of a single book. Users need to pay the relevant fees in advance to obtain the graphic and text resources; before viewing the resources, the membership rights and interests or the resource purchase transaction form will be controlled. For monthly charging, within the current month, users can view the corresponding graphic and text, such as viewing each picture in a picture collection, viewing each text page in an article or a book, etc. As Figure 11 shown, for the monthly subscription system, users can pay for multiple graphic and text at one time and browse them flexibly at any time within the monthly subscription period, that is, users have completed the payment for the resources covered by the platform's monthly subscription. Users of the buyout system pay to buy out the required graphic and text resources, so that they can view the bought-out graphic and text resources, such as viewing each picture in the bought-out picture collection, reading each page of the bought-out article or book, etc. As Figure 12 shown, for the buyout system, users can pay to buy out the selected single graphic and text resource, so that they can view the corresponding graphic and text resources at any time within the buyout validity period. The traditional graphic and text charging method has a relatively large granularity. Users may not need to view all the graphic and text. For example, users only need to view the table of contents of a book, only need to view the first page of an article, only need to view specific pictures in a picture collection, etc. At this time, users need to make a trade-off, which will increase the user's cost and affect the normal payment of users.

[0127] Based on this, the resource transfer method based on smart contract provided in this embodiment can charge fees based on the actual number of pictures viewed by the user or the text progress according to the smart contract. The user can make micro-payments according to the actual graphic and text content viewed, such as flexible payment according to the proportion of graphic and text views. Controlling the micro-payment of graphic and text assets through smart contracts can better meet the needs of users and bring higher revenues to resource providers. For example Figure 13 As shown, for the picture set A that includes 10 pictures, the user can select and view each picture in the picture set A as needed, and make micro-payments using the smart contract according to the actual graphic and text content viewed by the user. Specifically, if the user can view the first 4 pictures, the system can trigger the smart contract to charge fees according to the fee for each picture in the picture set A, that is, the fees for the first 4 pictures can be collected through the smart contract; if the user views the first 6 pictures, the system can trigger the smart contract to charge fees according to the fee for each picture in the picture set A, that is, the fees for the first 6 pictures can be collected through the smart contract; in addition, when the user jumps to view, the fees can still be charged according to the total graphic and text volume viewed by the user. For example, if the user jumps to view the 4th and 7th pictures, the viewing fees for the 4th and 7th pictures can be collected through the smart contract.

[0128] Specifically, when the user views media resources such as graphics and text, the viewing progress of the user's graphics and text is detected in real time, and the smart contract is triggered for micro-charging at a fine granularity according to the actual viewing volume of the graphics and text. For example, for pictures, micro-charging can be performed according to the number of pictures viewed, and for text, micro-charging can be performed according to the number of words in the viewed text or the number of pages of the text, so that fine-grained payment can be made according to the viewing progress of the graphic and text resources, which can enrich the charging methods and is conducive to stimulating user consumption.

[0129] The specific process of the resource transfer method based on smart contract provided in this embodiment may include: browsing graphic and text resources. The user can browse graphic and text through the graphic and text resource platform, specifically, can browse pictures / cartoons, read articles / books, etc. The graphic and text resources provided by the resource platform can be paid resources; determining the resource viewing progress. When triggering the charging process for the graphic and text, determine the resource viewing progress that needs to be billed. The resource viewing progress can be calculated according to the viewed graphic and text volume and the complete volume of the graphic and text resources; performing micro-charging based on the smart contract. By scheduling the pre-set smart contract, determine the charging ratio according to the resource viewing progress, and perform micro-charging for the graphic and text resources viewed by the user according to the charging ratio.

[0130] Among them, the graphic and text resources can be media resources displayed in the form of pictures, texts, etc., and specifically can include pictures for online viewing, articles, books for online reading, etc. Users can access graphic and text websites to browse online, or can also perform graphic and text browsing through software applications. For the paid resources browsed by users, the resource platform can make marks, such as making marks through a payment prompt on the cover, and the payment prompt can describe the specific payment rules for resource browsing. For example, it can be charged at x units per picture, or charged at x units per 1000 words, etc.

[0131] During the process of users browsing graphic and text, the resource browsing progress can be detected in real time. The resource browsing progress can be calculated in units such as picture frames, book pages, word count, etc. The system can set a payment trigger condition to determine whether to perform payment processing for resource browsing. For example, the payment trigger condition can be browsing pause or browsing end. Specifically, when it is detected that the user triggers browsing pause, or the graphic and text browsing ends, such as when the user closes the browsing, it is considered that the payment trigger condition is met, so as to determine the user's resource browsing progress. In addition, the payment trigger condition can also be based on a preset number of views. When the graphic and text resource is browsed to a certain number of views, it is considered that the payment trigger condition is met, and payment is made by determining the user's resource browsing progress. For example, a payment processing can be performed for every 1 picture or every 2 pictures. That is, when the user browses 1 picture or 2 pictures, it is considered that the payment trigger condition is met, and payment is made by determining the resource browsing progress. At this time, it can be considered that the resource browsing progress is the 1 picture or 2 pictures browsed by the user in the past, so that a micro-payment can be made for the 1 picture or 2 pictures that have been browsed.

[0132] In other applications, the preset number of views in the payment trigger condition can be flexibly set according to actual needs. For example, it can be fixedly set, such as 1 picture, or 1000 characters; it can also be divided according to the content volume of the graphic and text resource itself. For example, the preset number of views can be the quantity after dividing the graphic and text into 100 parts. Then for a book with 1.2 million words, the preset number of views can be 12,000 words. Thus, when the user reads this book, a micro-payment is made every time the user reads 12,000 words of content, and at most 100 times of micro-payment processing can be performed.

[0133] Further, after determining the resource browsing progress, a smart contract is invoked based on the resource browsing progress for micro - charging. Specifically, a smart contract can be pre - deployed in the system. When triggering the micro - charging process, the pre - deployed smart contract is invoked to calculate the current charging amount according to the determined resource browsing progress, and then the transfer is made through the smart contract. The pre - deployed smart contract can be bound to the user's wallet, so that the smart contract can automatically transfer money to the resource platform. Scheduling the smart contract for micro - payment can be based on a preset view count. When the user views graphic and text resources up to the preset view count, the smart contract is triggered for micro - payment. At this time, to ensure the user's browsing experience, password - free payment is supported, and the user only needs to enable password - free payment in advance. In addition, scheduling the smart contract for micro - payment can also be for micro - charging when browsing pauses or ends. For example, when the user closes the browsing interface after browsing ends, a pop - up window can be popped up to prompt the user to pay for the graphic and text that has been browsed.

[0134] It should be understood that although each step in the flowcharts involved in the above - described embodiments is shown in sequence according to the indication of the arrow, these steps do not necessarily have to be executed in the order indicated by the arrow. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily have to be completed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily have to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0135] Based on the same inventive concept, an embodiment of the present application also provides a smart - contract - based resource transfer device for implementing the above - described smart - contract - based resource transfer method. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the smart - contract - based resource transfer device provided below can refer to the limitations on the smart - contract - based resource transfer method in the above text, and will not be repeated here.

[0136] In an exemplary embodiment, as Figure 14 shown, a smart - contract - based resource transfer device 1400 is provided, including: a resource acquisition amount determination module 1402, a resource exchange amount determination module 1404, and an asset resource transfer module 1406, where:

[0137] A resource acquisition quantity determination module 1402, configured to determine the resource acquisition quantity of the media resources obtained by the user account according to the resource statistical unit for the media resources during the process of the user account obtaining media resources through the media resource platform;

[0138] A resource exchange quantity determination module 1404, configured to determine the resource exchange quantity based on the resource acquisition quantity according to the smart contract deployed in the blockchain network when the resource exchange trigger condition corresponding to the media resources is satisfied; wherein, the resource exchange quantity is used to represent the resource quantity corresponding to the asset resources to be exchanged for obtaining the media resources with the resource acquisition quantity when exchanging asset resources for media resources;

[0139] An asset resource transfer module 1406, configured to transfer asset resources to the media resource platform according to the resource exchange quantity from the asset resource account associated with the user account based on the smart contract.

[0140] In one embodiment, the resource exchange quantity determination module 1404 is further configured to determine the smart contract deployed in the blockchain network for resource transfer processing; when the resource exchange trigger condition corresponding to the media resources is satisfied, determine the resource exchange mapping relationship between the asset resources and the media resources based on the smart contract; and determine the resource exchange quantity based on the resource exchange mapping relationship and the resource acquisition quantity.

[0141] In one embodiment, the resource exchange mapping relationship includes the resource exchange ratio between each resource segment of the asset resources and the media resources; the resource exchange quantity determination module 1404 is further configured to determine the number of resource segments of the media resources obtained by the user account according to the resource acquisition quantity; and determine the resource exchange quantity of the asset resources based on the number of segments and the resource exchange ratio.

[0142] In one embodiment, the resource exchange quantity determination module 1404 is further configured to perform at least one of the following: when the user account finishes obtaining media resources, determine the resource exchange quantity based on the resource acquisition quantity according to the smart contract deployed in the blockchain network; when the resource acquisition quantity reaches the resource exchange trigger threshold corresponding to the media resources, determine the resource exchange quantity based on the resource acquisition quantity according to the smart contract deployed in the blockchain network; when the resource exchange trigger period corresponding to the media resources is reached, determine the resource exchange quantity based on the resource acquisition quantity according to the smart contract deployed in the blockchain network.

[0143] In one embodiment, the resource acquisition quantity determination module 1402 is further configured to query the resource statistical unit for the media resources during the process of the user account obtaining media resources through the media resource platform; and count the resource quantity of the media resources obtained by the user account according to the resource statistical unit to obtain the resource acquisition quantity of the media resources obtained by the user account.

[0144] In one embodiment, the media resources include audio-visual resources; the resource statistical unit includes audio-visual unit segments; the resource acquisition quantity determination module 1402 is further configured to determine the audio-visual duration of the audio-visual resources acquired by the user account; based on the audio-visual duration and the segment duration of the audio-visual unit segments, determine the audio-visual segment settlement quantity; and obtain the resource acquisition quantity of the audio-visual resources acquired by the user account according to the audio-visual segment settlement quantity.

[0145] In one embodiment, the media resources include graphic and text resources; the resource statistical unit includes the graphic and text settlement unit quantity; the resource acquisition quantity determination module 1402 is further configured to determine the graphic and text quantity of the graphic and text resources acquired by the user account; based on the graphic and text quantity and the graphic and text settlement unit quantity, determine the graphic and text settlement quantity; and obtain the resource acquisition quantity of the graphic and text resources acquired by the user account according to the graphic and text settlement quantity.

[0146] In one embodiment, the media resources include text resources; the resource statistical unit includes the text unit page numbers; the resource acquisition quantity determination module 1402 is further configured to determine the text quantity of the text resources acquired by the user account; based on the text quantity and the page number quantity of the text unit page numbers, determine the text settlement quantity; and obtain the resource acquisition quantity of the text resources acquired by the user account according to the text settlement quantity.

[0147] In one embodiment, a statistical unit determination module is further included, which is configured to obtain the historical interaction data for the media resources in the media resource platform; and determine the resource statistical unit for the media resources based on the resource type of the media resources and the historical interaction data.

[0148] In one embodiment, the asset resource transfer module 1406 is further configured to respectively determine a first asset resource account associated with the user account and a second asset resource account associated with the media resource platform; determine the transferred asset resources matching the resource exchange quantity from the first asset resource account based on the smart contract; and transfer the transferred asset resources to the second asset resource account through the first asset resource account.

[0149] In one embodiment, a transfer result storage module is further included, which is configured to obtain the resource transfer result of the asset resource transfer; and when the storage trigger condition is satisfied, record the resource transfer result into the blockchain network through the smart contract deployed in the blockchain network for recording the resource transfer result.

[0150] Each module in the above resource transfer device based on the smart contract can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.

[0151] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in Figure 15 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store smart contract data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a resource transfer method based on smart contracts.

[0152] In an embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in Figure 16 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a resource transfer method based on smart contracts. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the computer device housing, or an external keyboard, touchpad, or mouse, etc.

[0153] Those skilled in the art can understand that Figure 15 or Figure 16The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0154] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0155] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0156] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0157] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0158] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0159] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification. The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A resource transfer method based on smart contracts, characterized in that, The method includes: During the process of a user account obtaining media resources through a media resource platform, determining the resource acquisition volume of the media resources obtained by the user account according to the resource statistical unit for the media resources; When the resource exchange trigger condition corresponding to the media resources is satisfied, based on a smart contract deployed in a blockchain network, determining the resource exchange volume according to the resource acquisition volume; wherein the resource exchange volume is used to represent the resource quantity corresponding to the asset resources required to exchange the media resources when exchanging the media resources with the asset resources for obtaining the resource acquisition volume of the media resources; Based on the smart contract, transferring asset resources from the asset resource account associated with the user account to the media resource platform according to the resource exchange volume.

2. The method according to claim 1, wherein The step of when the resource exchange trigger condition corresponding to the media resources is satisfied, based on a smart contract deployed in a blockchain network, determining the resource exchange volume according to the resource acquisition volume includes: Determining a smart contract deployed in the blockchain network for resource transfer processing; When the resource exchange trigger condition corresponding to the media resources is satisfied, determining the resource exchange mapping relationship between the asset resources and the media resources based on the smart contract; Determining the resource exchange volume based on the resource exchange mapping relationship and the resource acquisition volume.

3. The method according to claim 2, characterized in that The resource exchange mapping relationship includes the resource exchange ratio between the asset resources and each resource segment of the media resources; The step of determining the resource exchange volume based on the resource exchange mapping relationship and the resource acquisition volume includes: According to the resource acquisition volume, determining the number of resource segments of the media resources obtained by the user account; Based on the number of segments and the resource exchange ratio, determining the resource exchange volume of the asset resources.

4. The method according to claim 1, wherein The step of when the resource exchange trigger condition corresponding to the media resources is satisfied, based on a smart contract deployed in a blockchain network, determining the resource exchange volume according to the resource acquisition volume includes at least one of the following: When the user account finishes obtaining the media resources, based on a smart contract deployed in the blockchain network, determining the resource exchange volume according to the resource acquisition volume; When the resource acquisition volume reaches the resource exchange trigger threshold corresponding to the media resources, based on a smart contract deployed in the blockchain network, determining the resource exchange volume according to the resource acquisition volume; When the resource exchange trigger period corresponding to the media resources is reached, based on a smart contract deployed in the blockchain network, determining the resource exchange volume according to the resource acquisition volume.

5. The method according to claim 1, wherein The step of during the process of a user account obtaining media resources through a media resource platform, determining the resource acquisition volume of the media resources obtained by the user account according to the resource statistical unit for the media resources includes: During the process of a user account obtaining media resources through a media resource platform, querying the resource statistical unit for the media resources; According to the resource statistical unit, counting the resource quantity of the media resources obtained by the user account to obtain the resource acquisition volume of the media resources obtained by the user account.

6. The method according to claim 5, wherein The media resources include audio-visual resources; the resource statistical unit includes audio-visual unit segments; Performing statistics on the quantity of the media resources obtained for the user account according to the resource statistics unit to obtain the resource acquisition volume of the media resources obtained for the user account, including: Determining the audio and video duration of the audio and video resources obtained for the user account; Determining the audio and video segment settlement quantity based on the audio and video duration and the segment duration of the audio and video unit segments; Obtaining the resource acquisition volume of the audio and video resources obtained for the user account according to the audio and video segment settlement quantity.

7. The method according to claim 5, wherein The media resources include graphic and text resources; the resource statistics unit includes the quantity of graphic and text settlement units; Performing statistics on the quantity of the media resources obtained for the user account according to the resource statistics unit to obtain the resource acquisition volume of the media resources obtained for the user account, including: Determining the quantity of graphic and text resources obtained for the user account; Determining the graphic and text settlement quantity based on the quantity of graphic and text and the quantity of graphic and text settlement units; Obtaining the resource acquisition volume of the graphic and text resources obtained for the user account according to the graphic and text settlement quantity.

8. The method according to claim 5, characterized in that The media resources include text resources; the resource statistics unit includes the number of text unit pages; Performing statistics on the quantity of the media resources obtained for the user account according to the resource statistics unit to obtain the resource acquisition volume of the media resources obtained for the user account, including: Determining the quantity of text resources obtained for the user account; Determining the text settlement quantity based on the quantity of text and the number of pages of the text unit pages; Obtaining the resource acquisition volume of the text resources obtained for the user account according to the text settlement quantity.

9. The method according to claim 1, wherein The method further includes: Obtaining the historical interaction data for the media resources in the media resource platform; Determining the resource statistics unit for the media resources based on the resource type of the media resources and the historical interaction data.

10. The method according to claim 1, wherein The transferring of the asset resources from the asset resource account associated with the user account to the media resource platform according to the resource exchange volume based on the smart contract includes: Respectively determining the first asset resource account associated with the user account and the second asset resource account associated with the media resource platform; Determining the transferred asset resources matching the resource exchange volume from the first asset resource account based on the smart contract; Transferring the transferred asset resources to the second asset resource account through the first asset resource account.

11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: Obtaining the resource transfer result of the asset resource transfer; When the storage trigger condition is satisfied, recording the resource transfer result into the blockchain network through the smart contract deployed in the blockchain network for recording the resource transfer result.

12. A resource transfer device based on a smart contract, characterized in that, The device includes: A resource acquisition volume determination module, configured to determine the resource acquisition volume of the media resources obtained for the user account according to the resource statistics unit for the media resources during the process of the user account obtaining the media resources through the media resource platform; A resource exchange quantity determination module, configured to, when the resource exchange trigger condition corresponding to the media resource is satisfied, determine the resource exchange quantity based on a smart contract deployed in a blockchain network according to the resource acquisition quantity; wherein, the resource exchange quantity is used to represent the quantity of the asset resources corresponding to the asset resources to be exchanged for obtaining the media resource with the resource acquisition quantity when exchanging the media resource through the asset resources. An asset resource transfer module, configured to transfer asset resources to the media resource platform according to the resource exchange quantity from the asset resource account associated with the user account based on the smart contract.

13. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.