CN112991069B - Resource processing method, device, equipment and storage medium - Google Patents
Resource processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112991069B CN112991069B CN202010238049.6A CN202010238049A CN112991069B CN 112991069 B CN112991069 B CN 112991069B CN 202010238049 A CN202010238049 A CN 202010238049A CN 112991069 B CN112991069 B CN 112991069B
- Authority
- CN
- China
- Prior art keywords
- user
- virtual resource
- target virtual
- assigned
- resource
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/06—Asset management; Financial planning or analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Technology Law (AREA)
- Databases & Information Systems (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Operations Research (AREA)
- Human Resources & Organizations (AREA)
- General Business, Economics & Management (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application discloses a resource processing method, a device, equipment and a storage medium, and belongs to the technical field of blockchain. The application obtains the user information of the user to be assigned and the resource information of the target virtual resource from the blockchain of the blockchain system in response to the ownership assigned request of the target virtual resource, verifies the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information to determine the feasibility and the legality of the assignment, performs virtual money transfer in the blockchain system in response to the passing of the assigned qualification of the user to be assigned and the verification of the target virtual resource, stores ownership assignment records of the target virtual resource on the blockchain, updates the ownership assignment of the target virtual resource from the original user to be assigned to the user to be assigned, and executes the assignment step based on the blockchain to improve the security of the assignment process of the target virtual resource.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing resources.
Background
The financial product is a product which is designed and issued by a financial institution such as a bank, etc., and the financial institution can collect funds by issuing the financial product, and the collected funds are put into a financial market to obtain investment benefits, and then part of the benefits are distributed to investment users. Among various financial products, regular financial products generally have higher profits, but the financial products have longer holding time and poorer fluidity. After the user purchases the periodic financial product, the user must hold the money due to the periodic financial product to take out the invested money and obtain higher benefits, and when the user needs to take out the money invested in the periodic financial product in advance, most of the benefits are lost. Therefore, how to improve the fluidity of the periodic financial products under the condition of ensuring the benefits is an important research direction.
Disclosure of Invention
The embodiment of the application provides a resource processing method, a device, equipment and a storage medium, which can transfer ownership of virtual resources and ensure the security of an ownership transfer process. The technical scheme is as follows:
in one aspect, a method for processing resources is provided, including:
receiving an ownership assigned request, wherein the ownership assigned request carries a user identifier of a user to be assigned, a resource identifier of a target virtual resource to be assigned and an intelligent contract identifier;
Responding to the target intelligent contract indicated by the contract identification, and acquiring user information of the user to be assigned and resource information of the target virtual resource from a blockchain of the blockchain system based on the user identification of the user to be assigned and the resource identification of the target virtual resource;
verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information to obtain a verification result;
and responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
In one aspect, there is provided a resource processing apparatus, the apparatus comprising:
the receiving module is used for receiving an ownership assigned request, wherein the ownership assigned request carries a user identifier of a user to be assigned, a resource identifier of a target virtual resource to be assigned and an intelligent contract identifier;
the acquisition module is used for responding to the target intelligent contract indicated by the contract identification, and acquiring the user information of the user to be assigned and the resource information of the target virtual resource from the blockchain of the blockchain system based on the user identification of the user to be assigned and the resource identification of the target virtual resource;
The verification module is used for verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information to obtain a verification result; and responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
In one possible implementation manner, the receiving module is configured to receive an ownership transfer request of the target virtual resource, where the ownership transfer request carries a user identifier of an original user to which the target virtual resource belongs, a resource identifier of the target virtual resource, transfer information of the target virtual resource, and the smart contract identifier;
the acquisition module is used for responding to the target intelligent contract indicated by the contract identification, and acquiring the user information of the original user and the resource information of the target virtual resource from the blockchain based on the user identification of the original user and the resource identification of the target virtual resource;
the verification module is used for verifying the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource and the transfer information of the target virtual resource;
The apparatus also includes a publishing module for publishing the transfer information of the target virtual resource in the blockchain system in response to the ownership transfer request verifying.
In one possible implementation, the verification module is configured to:
verifying whether ownership of the target virtual resource by the original user is valid or not based on user information of the original user and resource information of the target virtual resource;
verifying whether transfer information of the target virtual resource is valid based on resource information of the target virtual resource;
verifying whether the target virtual resource is in a tradable state based on transaction state information in the resource information of the target virtual resource;
and determining that the ownership transfer request is valid in response to whether the ownership of the original affiliated user is valid, transfer information of the target virtual resource is valid, and the target virtual resource is in a tradable state.
In one possible implementation, the publishing module is configured to:
and adding the transfer information of the target virtual resources to a transaction list of a target transaction platform in the blockchain system, wherein the transaction list is used for storing the transfer information of each virtual resource to be assigned.
In one possible implementation, the verification module is configured to:
Verifying the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource;
and verifying the target virtual resource based on the ownership information and the transaction state information in the resource information to obtain a verification result.
In one possible implementation, the verification module is configured to:
acquiring the number of virtual currency in a target account from the user information of the user to be subjected to the permission;
if the number of the virtual currencies in the target account is greater than or equal to the number of the virtual currencies corresponding to the target virtual resource, determining that the to-be-assigned user has assigned qualification of the target virtual resource.
In one possible implementation, the apparatus further includes:
the input module is used for inputting the user information of the user to be assigned and the resource information of the target virtual resource into a target model, and determining a matching score between the user information of the user to be assigned and the resource information by the target model;
and a sending module for sending the matching score to the to-be-assigned user, wherein the to-be-assigned user determines whether to execute the virtual money transfer based on the matching score.
In one possible implementation, the verification module is configured to:
responding to the qualification of the user to be assigned and the verification of the target virtual resource, initiating a virtual money transfer request in the blockchain system, wherein the virtual money transfer request is used for transferring virtual money corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the target virtual resource belongs;
in response to the virtual money transfer request, storing an ownership transfer record of the target virtual resource on the blockchain, the ownership transfer record for recording an update of ownership of the target virtual resource from the original affiliated user to the to-be-assigned user.
In one possible implementation, the verification module is configured to:
in response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing, invoking a target intelligent contract in the blockchain system, and setting the transaction state of the target virtual resource to a pre-transaction state by the target intelligent contract;
and initiating the virtual currency transfer request in the blockchain system through the target intelligent complex, and executing the step of transferring virtual currency corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the source belongs.
In one possible implementation, the apparatus further includes:
the setting module is used for calling the target intelligent contract in the blockchain system and setting the transaction state of the target virtual resource to be a transaction completion state by the target intelligent contract;
and the deleting module is used for deleting the transfer information of the target virtual resource in the transaction list of the target transaction platform in the blockchain system.
In one possible implementation, the verification module is configured to:
adding the ownership transfer record to a memory pool of a node device in the blockchain system, the memory pool for storing data not added to the blockchain;
constructing a block by the node device based on the ownership transfer record;
the block containing the ownership transfer record is stored in the blockchain.
In one possible implementation, the verification module is configured to:
and outputting transfer rejection information in response to any one of the assigned qualification of the to-be-assigned user and the target virtual resource failing to be verified.
In one aspect, a computer device is provided that includes one or more processors and one or more memories having stored therein at least one program code that is loaded and executed by the one or more processors to implement the operations performed by the resource processing method.
In one aspect, a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to perform operations performed by the resource processing method is provided.
According to the technical scheme provided by the embodiment of the application, the user information of the user to be assigned and the resource information of the target virtual resource are acquired from the blockchain of the blockchain system in response to the ownership assigned request of the target virtual resource, and the accuracy of acquiring the user information and the resource information can be ensured because the data stored in the blockchain is undeletable and untampered, so that the assigned qualification of the user to be assigned and the target virtual resource are verified based on the user information and the resource information, the feasibility and the legality of the assignment can be determined, virtual currency transfer is performed in the blockchain system in response to the assigned qualification of the user to be assigned and the verification of the target virtual resource, ownership assignment records of the target virtual resource are stored on the blockchain, the ownership of the target virtual resource is updated from the original user to be assigned, and the security of the target virtual resource can be improved based on the blockchain to execute the assignment step.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an implementation environment of a resource processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a resource processing method according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for resource transfer provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a detail page provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a transfer page provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a transaction presentation page provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a publication success page according to an embodiment of the present application;
FIG. 8 is a flow chart of a method for assigning resources provided by an embodiment of the present application;
FIG. 9 is a schematic diagram of a transaction details page provided by an embodiment of the present application;
FIG. 10 is a schematic diagram of data interaction in a resource processing procedure according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a resource processing device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
In order to facilitate understanding of the technical process of the embodiments of the present application, some terms related to the embodiments of the present application are explained below:
blockchain (Block chain): is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain is essentially a de-centralized database, which is a series of data blocks generated by cryptographic association, each data block containing information of a network transaction for verifying the validity (anti-counterfeiting) of the information and generating a next block, each block containing a time stamp and a link to the previous block. In a narrow sense, a blockchain is a chain data structure that combines blocks of data in a sequential manner in time order, and cryptographically guaranteed, non-tamperable and non-counterfeitable, distributed ledgers, i.e., the data in the blockchain will be irreversible once recorded.
Consensus mechanism (Consensus mechanism): is a mathematical algorithm for realizing trust establishment and rights acquisition among different nodes in a block chain system. In a blockchain system, the verification and confirmation of a transaction can be completed in a short time through voting of special nodes, and if a plurality of nodes with irrelevant interests can reach consensus for one transaction, all the nodes in the system can be considered to reach consensus for the same.
Smart contract: is a computer protocol that aims to propagate, verify or execute contracts in an informative manner. Each node in the blockchain system can operate the data stored on the chain according to the contract program automatically executed by the specific condition, and is an important way for users to interact with the blockchain and realize business logic by using the blockchain. The purpose of smart contracts is to provide a secure method over traditional contracts and reduce other transaction costs associated with the contracts, which allows trusted transactions to be conducted without third parties, which transactions are traceable and irreversible.
Public key (public key) and private key (private key): is a key pair (i.e., a public key and a private key) obtained by an algorithm, the public key being the public part of the key pair and the private key being the non-public part. The public key is typically used to encrypt a session key, verify a digital signature, or encrypt data that may be decrypted with a corresponding private key. The key pair obtained by this algorithm can be ensured to be unique. When using such a key pair, if a piece of data is encrypted with one of the keys, it must be decrypted with the other key. For example, encrypting data with a public key must be decrypted with a private key, and if encrypted with a private key must also be decrypted with a public key, otherwise decryption will not succeed.
Fig. 1 is a schematic diagram of an implementation environment of a resource processing method according to an embodiment of the present application, and referring to fig. 1, the implementation environment may include a terminal 100, a server 110, and a blockchain system 120.
The terminal 100 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal 100 may be a terminal used by any user, and the terminal 100 is installed and operated with a client of a target transaction platform, where the target transaction platform may support a virtual resource transaction, and the virtual resource may be a financial product or the like. For example, an account of any user may be logged into a client of a target transaction platform running in the terminal 100, and the any user may transfer or purchase virtual resources such as financial products through the target transaction platform. The terminal 100 may refer broadly to one of a plurality of terminals, and the present embodiment is illustrated by the terminal 100 only.
The server 110 may be a background server of the target trading platform, and the server 110 may be configured to process trading data generated during a virtual resource trading process. The server 110 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
The blockchain system 120 may include a plurality of node devices 1201, and the node devices 1201 may be any form of computer device in a network, such as servers, hosts, user terminals, etc. Data can be shared from node device 1201 to node device 1201, i.e., each node device 1201 can collectively maintain a blockchain in the blockchain system 120. Among other things, the node devices 1201 may establish a P2P network based on a Peer-To-Peer (P2P) protocol. The P2P protocol is an application layer protocol that runs on top of the transmission control protocol (Transmission Control Protocol, TCP) protocol. Each node device 1201 may receive input information during normal operation and maintain shared data within the blockchain system 120, i.e., maintain blockchains in the blockchain system 120, based on the received input information. To ensure interworking of information within the blockchain system 120, an information connection may exist between each node device 1201 in the blockchain system 120, and information may be transferred between the node devices 1201 through the information connection. For example, when any node device in the blockchain system receives input information, other node devices in the blockchain system may also acquire the input information, and store the input information as data in the shared data, so that the data stored on all node devices in the blockchain system are consistent. In an embodiment of the present application, the node device 1201 may obtain transaction data sent by the server 120, process the transaction data, and record a transaction process of the virtual resource.
In the embodiment of the present application, the terminal 100 and the server 110 may be registered as node devices in the blockchain system 120. The terminals 100, the server 110 and the blockchain system 120 may be directly or indirectly connected through wired or wireless communication to implement data transmission.
Those skilled in the art will appreciate that the number of terminals, servers, and node devices may be greater or lesser. The embodiment of the application does not limit the number and the device types of the terminal, the server and the node devices.
According to the technical scheme provided by the embodiment of the application, the target virtual resource with a certain value can flow among all users in a ownership transfer mode, so that all users holding the target virtual resource in different time periods can obtain reasonable benefits. For example, in the financial field, the target virtual resource may be a periodic financial product issued by a financial institution, and in a normal case, after a user purchases the periodic financial product, that is, the target virtual resource needs to be held for a fixed holding period, so that a higher profit can be obtained, and if an asset put into the target virtual resource is collected in advance, the obtained profit is greatly reduced. By combining the technical scheme provided by the embodiment of the application, the holding user of the target virtual resource can transfer the ownership of the target virtual resource within a fixed holding period, and the assigned user of the ownership continuously holds the target virtual resource. That is, the target virtual resource is held by the user for the fixed holding period, and the asset which is put into the target virtual resource does not need to be withdrawn. In this case, the users holding the target virtual resource in different time periods can obtain higher benefits, and the fluidity of the target virtual resource can also be improved.
Fig. 2 is a flowchart of a resource processing method according to an embodiment of the present application, as shown in fig. 2, the method may be applied to a node device of a blockchain system, and the method may specifically include the following steps:
201. an ownership-assigned request is received, the ownership-assigned request carrying a user identification of a user to be assigned, a resource identification of a target virtual resource to which the request is assigned, and an intelligent contract identification.
The target virtual resource may be any type of financial product, for example, a periodic financial product, and may be traded in a target trading platform. The to-be-assigned user is the user who will acquire ownership of the target virtual resource, i.e., the sending user of the ownership-assigned request.
The target virtual resource can be yielded by the user to which the source belongs, namely, the user currently owning the ownership of the target virtual resource can be yielded by the user to which the source belongs, and the source can send an ownership transfer request for the target virtual resource to node equipment in the blockchain system through the client of the target transaction platform so as to transfer the ownership of the target virtual resource. And the node equipment responds to the ownership transfer request and issues transfer information of the target virtual resource in the block chain system, and other users of the target transaction platform can acquire the transfer information issued in the block chain system.
After the to-be-assigned user obtains the transfer information of the target virtual resource through the client of the target transaction platform, after determining that the ownership of the target virtual resource needs to be transferred, an ownership assigned request can be sent to the node device to obtain the ownership of the target virtual resource.
202. And responding to the target intelligent contract indicated by the contract identification, and acquiring the user information of the user to be assigned and the resource information of the target virtual resource from a blockchain of a blockchain system based on the user identification of the user to be assigned and the resource identification of the target virtual resource.
Wherein the target smart contract may be used to indicate data processing logic during an ownership transaction of the target virtual resource, and may include processing logic for ownership transfer requests and processing logic for ownership assigned requests.
In the embodiment of the application, the blockchain of the blockchain system can store the user information of each user of the target transaction platform and the resource information of each virtual resource. After receiving the ownership grant request, the node device may invoke the target intelligent contract indicated by the contract identifier, and acquire the usage information and the resource information from the blockchain through the target intelligent contract, so as to perform subsequent user authentication to be granted and target virtual resource authentication based on the user information and the resource information. Because the data stored in the blockchain is not tamperable and not deletable, the accuracy and comprehensiveness of acquiring the user information and the resource information can be ensured, and the influence on the follow-up authentication process of the user to be assigned and the target virtual resource authentication process caused by inaccurate data is avoided.
203. Based on the user information and the resource information, verifying the assigned qualification of the user to be assigned and the target virtual resource to obtain a verification result.
The assigned qualification refers to that the to-be-assigned user needs to satisfy the assigned condition of the target virtual resource, for example, when the number of virtual currencies contained in the account of the to-be-assigned user is greater than or equal to the number of virtual currencies corresponding to the target virtual resource, the to-be-assigned user has the assigned qualification of the target virtual resource, that is, sufficient assets are needed in the account of the to-be-assigned user to purchase the target virtual resource. Of course, it may also be determined whether the to-be-assigned user has the assigned qualification based on other information, for example, whether the user information of the to-be-assigned user includes a bad transaction record, which is not limited in the embodiment of the present application.
In the embodiment of the present application, verifying the target virtual resource may include verifying the validity to which the target virtual resource belongs, that is, verifying whether the ownership user of the target virtual resource is the user to which the source belongs; verifying the transaction status of the target virtual resource, i.e., verifying whether the target virtual resource is transactable, may be included. Of course, the virtual resource may be verified in other aspects, which are not limited by the embodiment of the present application.
In the technical scheme, the user qualification of the user to be assigned and the target virtual resource are verified, so that the ownership assigned request can be ensured to be effective, and illegal transactions are avoided.
204. And responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
In the embodiment of the present application, if the assigned qualification of the to-be-assigned user and the verification of the target virtual resource pass, virtual money transfer may be performed in the blockchain system, and the virtual money corresponding to the target virtual resource may be transferred from the account of the to-be-assigned user to the account of the user to which the target virtual resource originally belongs. That is, the user to be assigned pays a certain amount of virtual money to the original user of the target virtual resource to purchase the target virtual resource, and obtains ownership of the target virtual resource. The virtual currency number corresponding to the target virtual resource can be set by the user to which the target virtual resource belongs. In one possible implementation, the node device may also store an ownership transfer record in the blockchain, and in particular, the node device may package the ownership transfer record and other transaction information into a block, consensus the block by each node device in the blockchain system, and add the block to the tail of the blockchain in response to the block being consensus. The ownership transfer record may be used to record that the ownership of the target virtual resource is updated from the original user to the to-be-assigned user, where the ownership transfer record may include information such as a resource identifier of the target virtual resource, a user identifier of the original user, a user identifier of the to-be-assigned user, a virtual currency number corresponding to the target virtual resource, and a timestamp.
In the embodiment of the application, if any one of the assigned qualification of the to-be-assigned user and the target virtual resource is verified to be not passed, the block chain system can output transfer refusal information, and the block chain system can feed back the result of transaction failure to the to-be-assigned user.
The above embodiment is merely a brief description of an embodiment of the present application, where the technical solution provided by the embodiment of the present application is to obtain, from a blockchain of a blockchain system, user information of a to-be-assigned user and resource information of a target virtual resource in response to an ownership-assigned request for the target virtual resource, and since data stored in the blockchain is indelible and untampered, it is possible to ensure accuracy of obtaining the user information and the resource information, and therefore, based on the user information and the resource information, the feasibility and legality of the present assignment can be determined by verifying the assigned qualification of the to-be-assigned user and the target virtual resource, virtual money transfer is performed in the blockchain system in response to the passing of the assigned qualification of the to-be-assigned user and the verification of the target virtual resource, ownership record of the target virtual resource is stored in the blockchain, and the ownership of the target virtual resource is updated from the original to the to-be-assigned user, so as to implement the target virtual resource assignment, and the above assignment step is performed based on the blockchain, and the security of the target virtual resource assignment can be improved.
The above embodiment describes a process that a to-be-assigned user obtains ownership of a target virtual resource, where the target virtual resource may be a virtual resource that is yielded by a user to which the to-be-assigned user belongs, and a process that the to-be-assigned user transfers ownership of the target virtual resource is shown in fig. 3. Fig. 3 is a flowchart of a resource transfer method according to an embodiment of the present application, where the method may be applied in the implementation environment shown in fig. 1, and referring to fig. 3, the method may specifically include the following steps:
301. the first terminal sends an ownership transfer request for the target virtual resource to the server.
The first terminal may be a terminal used by a user to which the target virtual resource belongs, where the user to which the target virtual resource belongs may transfer ownership of the target virtual resource through a client of a target transaction platform running in the first terminal. The server may be a background server of the target transaction platform, and the server may process data generated by a client of the target transaction platform. In the embodiment of the application, the virtual resource can be a financial product issued by a financial institution such as a bank.
In the embodiment of the present application, the ownership transfer request may carry a user identifier of the user to which the source belongs, a resource identifier of the target virtual resource, and transfer information of the target virtual resource. The user identifier may be used to uniquely indicate a user, and the user identifier may be represented by a document number, an account address, or the like, which is not limited by the embodiment of the present application. The resource identification may be used to uniquely indicate a virtual resource. The transfer information of the target virtual resource may include a transfer interest rate of the target virtual resource, a virtual currency number corresponding to the target virtual resource, and a transfer share of the target virtual resource. The transfer interest rate of the target virtual resource and the transfer share of the target virtual resource may be set by the user to whom the source belongs, and the virtual currency number corresponding to the target virtual resource, that is, the virtual currency number paid by the user to purchase the target virtual resource, may be determined based on the transfer interest rate of the target virtual resource and the transfer share of the target virtual resource. Of course, the transfer information of the target virtual resource may also include information such as remaining holding time of the target virtual resource, which is not limited in the embodiment of the present application.
In one possible implementation manner, the first terminal may display a detail page of the target virtual resource, referring to fig. 4, and fig. 4 is a schematic diagram of a detail page provided by an embodiment of the present application, where the detail page may include an information display area 401 of the target virtual resource and a transfer control 402. Taking the target virtual resource as a periodic financial product as an example, the information display area 401 may display information such as a holding period, a deposit time, an expiration time, an interest rate, and a total interest of the periodic financial product. When the first terminal detects the triggering operation of the transfer control 402 by the original user, the first terminal may display a transfer page of the target virtual resource, where the transfer page is used to collect transfer information of the target virtual resource.
Referring to fig. 5, fig. 5 is a schematic diagram of a transfer page provided in an embodiment of the present application, where the transfer page may include a transfer share display area 501, a transfer interest rate setting area 502, an information display area 503, and a confirmation control 504. The transfer share display area 501 may display the total share of the target virtual resource held by the user to which the source belongs, that is, the user to which the source belongs needs to transfer all the shares held in the current virtual resource transfer process. Of course, the user to whom the source belongs may set the transfer share, and only a part of the share is transferred in a virtual resource transfer process, which is not limited in the embodiment of the present application, and in the embodiment of the present application, only the transfer of all the shares is described as an example. In the embodiment of the present application, the primary user may set the transfer interest rate of the target virtual resource in the transfer interest setting area 502 based on the interest rate interval corresponding to the target virtual resource, and the first terminal may determine the virtual currency number corresponding to the target virtual resource in the current resource transfer process based on the transfer interest rate set by the primary user and the transfer share. The interest rate interval corresponding to the target virtual resource may be set by the issuing mechanism of the target virtual resource, different virtual resources may correspond to different interest rate intervals, and in one possible implementation manner, for one virtual resource, multiple interest rate intervals may be set based on the remaining holding time length of the virtual resource, that is, different remaining holding time lengths correspond to different interest rate intervals, for example, when the remaining holding time length of the target virtual resource is less than or equal to 2 years, the transfer interest rate may be set in the first interest rate interval, and when the remaining holding time length of the target virtual resource is greater than 2 years, the transfer interest rate may be set in the first interest rate interval. In one possible implementation, the higher the transfer interest rate set by the former affiliated user, the higher the income obtained by the assignee user after purchasing the target virtual resource, and the greater the number of virtual currencies corresponding to the target virtual resource determined based on the transfer interest rate already in the transfer share, that is, the greater the number of virtual currencies paid by the assignee user for purchasing the target virtual resource. It should be noted that the above description of the relationship between the virtual currency number corresponding to the target virtual resource and the transfer interest rate and the transfer share is merely an exemplary description, and the embodiment of the present application does not limit what kind of calculation method is specifically adopted to determine the virtual currency number corresponding to the target virtual resource. When the first terminal detects the triggering operation of the confirmation control 504 by the original user, information such as the share, the interest rate, the number of virtual currencies corresponding to the target virtual resource and the like collected by the transfer page can be obtained as transfer information of the target virtual resource, and an ownership transfer request of the target virtual resource is generated based on the transfer information.
The first terminal may send an ownership transfer request of the target virtual resource to a background server of the target transaction platform, and the server performs data processing based on the ownership transfer request.
302. The server validates the target virtual resource and transfer information of the target virtual resource in response to the ownership transfer request for the target virtual resource.
In one possible implementation, the server may initially verify the target virtual resource and transfer information for the target virtual resource based on data stored in a local database. The local database may store user information of each user and resource information of each virtual resource in the target transaction platform. For example, the server may obtain, from the local data, user information of the user to which the source belongs based on the user identifier of the user to which the source belongs, and verify whether the virtual resource held by the user to which the source belongs includes the target virtual resource, that is, verify whether the ownership user of the target virtual resource is the target user; based on the resource identification of the target virtual resource, acquiring resource information of the target virtual resource from a local database, wherein the resource information can comprise information such as interest rate interval and transaction state corresponding to the target virtual resource, and the server can compare transfer information of the target virtual resource with the resource information to verify whether the transfer interest rate of the target virtual resource is in the interest rate interval or not and verify whether the target virtual resource is in a tradable state or not. The above description of the verification method of the target virtual resource and the transfer information is merely an exemplary description, and the embodiment of the present application is not limited to the specific verification method adopted.
If the target virtual resource and the transfer information of the target virtual resource are both verified, the server may continue to execute the following step 303; if any one of the verification of the target virtual resource and the transfer information of the target virtual resource fails, the server does not need to execute the following step 303, and the server may feed back the transaction failure information to the user to which the source belongs.
303. Responsive to the target virtual resource and verification of transfer information of the target virtual resource passing, the server sends an ownership transfer request of the target virtual resource to a node device in the blockchain system.
In an embodiment of the present application, after determining that the target virtual resource and the transfer information of the target virtual resource pass verification, the server may broadcast the ownership transfer request to each node device of the blockchain system, and each node device verifies whether the ownership transfer request is valid based on the data in the blockchain, that is, performs step 304 described below.
In the embodiment of the application, the target virtual resource and the transfer information are initially verified based on the information stored in the local database of the server, namely whether the ownership transfer transaction of the target virtual resource is legal or not is initially verified, after the server passes the verification, the ownership transfer request is sent to the block chain system, and the block chain system performs the verification again. The server performs preliminary screening on ownership transfer transactions, so that the data processing capacity of the block chain system can be reduced, and invalid operation of the block chain is avoided. Of course, the server may also directly send the received ownership transfer request to the blockchain system, which is not limited in this embodiment of the present application.
304. The node equipment acquires user information of the original user and resource information of the target virtual resource from the blockchain, and verifies the validity of the ownership transfer request based on the acquired user information, resource information and transfer information of the target virtual resource.
Taking a node device to verify the ownership transfer request as an example, in one possible implementation manner, the ownership transfer request may carry a contract identifier of a target smart contract, the node device may invoke the target smart contract based on the contract identifier, obtain user information of the original user and resource information of the target virtual resource based on the target smart contract, and perform a subsequent verification step of the ownership transfer request based on the obtained information. In the embodiment of the application, the node equipment can verify whether the ownership of the original user to the target virtual resource is valid or not based on the user information of the original user and the resource information of the target virtual resource; verifying whether transfer information of the target virtual resource is valid based on resource information of the target virtual resource; based on the transaction state information in the resource information of the target virtual resource, verifying whether the target virtual resource is in a tradable state. And determining that the ownership transfer request is valid in response to the ownership of the target virtual resource by the original affiliated user being valid, the transfer information of the target virtual resource being valid, and the target virtual resource being in a tradable state. The verification process is the same as the verification process of the target virtual resource and the transfer information in step 302, and will not be described herein.
In one possible implementation, the node device may also verify a digital signature carried by the ownership transfer request. For example, the first terminal and the server may each be registered in the blockchain system, and public and private keys are assigned to the first terminal and the server by the blockchain system. When the first terminal sends the ownership transfer request to the server, a private key signature of the first terminal can be added in the ownership transfer request, after the server receives the ownership transfer request, a public key of the first terminal can be applied to match with the private key signature, and if the matching is successful, the ownership transfer request can be determined to be valid; similarly, when the server sends the ownership transfer request to the node device, a private key signature of the ownership transfer request may be added to the ownership transfer request, and after the node device receives the ownership transfer request, the public key of the server may be applied to verify the ownership transfer request.
It should be noted that the above description of the method for verifying the target virtual resource and the transfer information by the node device is merely an exemplary description, and the embodiment of the present application is not limited to what verification method is specifically adopted. If the ownership transfer request verifies, the server may proceed to step 305, described below; if the ownership transfer request fails to verify, the server does not need to perform the following step 305, and the server may feed back the transaction failure information to the user to whom the source belongs.
It should be noted that, in the steps 302, 303, and 404, in response to the target intelligent contract indicated by the contract identifier, the user information of the user to which the source belongs and the resource information of the target virtual resource are obtained from the blockchain based on the user identifier of the user to which the source belongs and the resource identifier of the target virtual resource; and verifying the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource and the transfer information of the target virtual resource. In the embodiment of the application, the data stored in the blockchain is undeletable and untampereable, so that the node equipment can be ensured to acquire the comprehensiveness and accuracy of the user information and the resource information, the accuracy of a verification result can be further ensured, the validity of an ownership transfer request is ensured, and the condition of illegal transaction is avoided.
305. Responsive to the ownership transfer request verifying, the node device issues transfer information for the target virtual resource in the blockchain system.
In one possible implementation, after determining that the ownership transfer request passes, the node device in the blockchain system may feed back the verification result to the server, and the server modifies the resource information in the local database, for example, may modify the transaction state of the target virtual resource to be a state to be assigned. After the modification of the resource information of the target virtual resource by the server is completed, a release request for the target virtual resource can be sent to the blockchain system, and the node equipment in the blockchain system executes the step of releasing the target virtual resource.
In one possible implementation manner, the node device may add the transfer information of the target virtual resource to a transaction list of a target transaction platform in the blockchain system, and in an embodiment of the present application, the node device may maintain a transaction list of at least one transaction platform, where the transaction list may be used to store transfer information of each virtual resource to be assigned in each transaction platform. In the embodiment of the present application, the node device also needs to update the transaction status of the target virtual resource in the blockchain system. For example, first, the node device may generate a transaction state update record, where the transaction state update record may include information that the target virtual resource is in a state to be assigned; then, storing the transaction state update record into a memory pool, and packaging data in the memory pool based on a target period to construct a block; finally, based on the consensus mechanism, the latest constructed block is added to the tail of the blockchain to finish updating the transaction state. The memory pool may be used to store data that is not uplink in the blockchain system, and the target period may be set by a developer. In one possible implementation, the updating of the transaction state may be accomplished based on a target smart contract, i.e., in response to the ownership transfer request verifying, the node device may invoke a target smart contract in the blockchain system, by which the transaction state of the target virtual resource is set to a to-be-assigned state.
The above description of the transfer information distribution method of the target virtual resource is merely an exemplary description, and the embodiment of the present application is not limited to what kind of transfer information distribution method is specifically adopted.
In the embodiment of the application, the transfer information of the target virtual resource is recorded by the blockchain system by modifying the transaction state information of the target virtual resource in the blockchain system, so that the transfer information is prevented from being tampered, and the real and effective ownership transfer transaction is ensured.
306. And the node equipment sends the target virtual resource release result to the server.
In the embodiment of the application, after the blockchain system completes the release of the target virtual resource, the release result of the target virtual resource can be fed back to the server.
In response to successful release of the target virtual resource in the blockchain system, the server may perform data synchronization based on the transaction list corresponding to the target transaction platform, that is, the server may update display information of a transaction display page of the target transaction platform based on the transaction list, add transfer information of the target virtual resource in the transaction display page, and the first terminal may display the transfer information of the target virtual resource in a link or hyperlink form on the transaction display page. Referring to fig. 6, fig. 6 is a schematic diagram of a transaction notification page according to an embodiment of the present application. The page may display transfer information 601 of the target virtual resource transferred by the user to which the source belongs, or may display transfer information of the virtual resource transferred by another user. In one possible implementation manner, the server may further send a prompt message that the target virtual resource is successfully issued to the first terminal, where the prompt message may be displayed in the first terminal in a form of a short message or a push message. The prompt information may further include a link of the release success page, and the first terminal may display the release success page when detecting a click operation of the link by the user to which the first terminal belongs. Fig. 7 is a schematic diagram of a successful release page according to an embodiment of the present application, where the successful release page may include an information display area 701, where the information display area 701 may display the share of the target virtual resource to be transferred, the rate of interest to be transferred, the number of virtual currencies corresponding to the target virtual resource, and the effective time of the current transfer transaction. The valid time of the transfer transaction may be set to seven days, and if the target virtual resource is not yielded within seven days, the blockchain system may delete the transfer information of the target virtual resource from the transaction list of the target transaction platform, the transaction public page may not display the transfer information of the target virtual resource any more, and the original affiliated user may initiate an ownership transfer request for the target virtual resource again.
And responding to the failure of the release of the target virtual resource in the blockchain system, the server can send prompt information of the failure of the release of the target virtual resource to the first terminal, and the first terminal displays the prompt information of the failure of the release so as to prompt the user to which the source belongs to resubmit the release request of the target virtual resource.
In the embodiment of the application, the original user of the target virtual resource can transfer the ownership of the target virtual resource, and the target virtual resource can flow in an ownership transfer mode, so that partial benefits are obtained in advance. For example, when the target virtual resource is a periodic financial product, the user can transfer the periodic financial product in a holding period, and different users can hold the periodic financial product in different time periods, so that the mobility of the periodic financial product is improved under the condition of taking a guarantee benefit.
The above embodiments mainly describe a process of publishing a target virtual resource to be yielded in a blockchain system, and in the embodiments of the present application, each user may purchase a virtual resource transferred by another user to obtain ownership of the virtual resource. Fig. 8 is a flowchart of a resource assigning method according to an embodiment of the present application, where the method may be applied in the implementation environment shown in fig. 1, and referring to fig. 8, the method may specifically include the following steps:
801. The second terminal sends an ownership-granted request for the target virtual resource to the server.
The second terminal may be a terminal used by a to-be-assigned user of the target virtual resource, where the to-be-assigned user may purchase the target virtual resource through a client of a target transaction platform running in the second terminal, and acquire ownership of the target virtual resource. In the embodiment of the application, the ownership assigned request can carry information such as user identification of the user to be assigned, resource identification of the target virtual resource to be assigned by the request, and the like.
In one possible implementation, the second terminal may display a transaction notification page of the target transaction platform, where transfer information of the target virtual resource may be displayed in the form of a hyperlink. And when the second terminal detects clicking operation of the hyperlink corresponding to the transfer information of the to-be-assigned user on the target virtual resource, displaying a transaction detail page of the target virtual resource. Fig. 9 is a schematic diagram of a transaction detail page provided in an embodiment of the present application, and referring to fig. 9, the transaction detail page may include an information display area 901 and a purchase control 902, where the information display area may display transfer information of the target virtual resource, for example, may display information of a transfer share, a transfer rate, an effective time of the current transfer transaction, and the like of the target virtual resource. When the second terminal detects the click operation of the purchase control by the to-be-assigned user, the resource identifier of the target virtual resource and the user identifier of the current login user in the client, namely the user identifier of the to-be-assigned user, can be obtained, and the ownership assigned request of the target virtual resource is generated based on the resource identifier of the target virtual resource and the user identifier of the to-be-assigned user.
The second terminal can send the ownership assigned request of the target virtual resource to a background server of the target transaction platform, and the server processes data based on the ownership assigned request.
802. The server initially verifies the ownership assigned request in response to the ownership assigned request for the target virtual resource.
In one possible implementation, after the server receives the ownership assigned request, the server may initially verify assigned qualifications of the target virtual resource and the to-be-assigned user based on data stored in a local database. For example, the server may obtain, from a local database, user information of the to-be-assigned user based on the user identifier of the to-be-assigned user, and further obtain the number of virtual currencies included in the target account of the to-be-assigned user, to determine whether the virtual currencies of the to-be-assigned user are sufficient, that is, whether funds for the to-be-assigned user to purchase the target virtual resource are sufficient. The target account may be one account or a plurality of accounts, for example, the publishing platform of the target virtual resource may limit payment to be made through a certain target account when the target virtual resource is purchased. The server may further obtain resource information of the target virtual resource from the local data based on the resource identifier of the target virtual resource, determine whether the transaction state of the target virtual resource is a state to be assigned, determine whether an ownership user of the target virtual resource is a user to which the source belongs, and determine whether the transfer interest rate corresponding to the target virtual resource is correct.
If the assigned qualification of the user to be assigned and the target virtual resource pass the verification, then it may be determined that the ownership assigned request passes the preliminary verification, and the server may continue to execute step 803 described below; if any one of the assigned qualification of the to-be-assigned user and the target virtual resource fails to verify, the ownership assigned request fails to initially verify, the server does not need to perform step 803 described below, and the server may feed back information of transaction failure to the to-be-assigned user.
It should be noted that the foregoing description of the verification method of the ownership assigned request is merely an exemplary illustration, and the embodiment of the present application is not limited to what kind of verification method is specifically adopted.
803. In response to the preliminary verification passing of the ownership grant request of the target virtual resource, the server sends the ownership grant request of the target virtual resource to a node device in the blockchain system.
In the embodiment of the present application, after determining that the ownership assigned request of the target virtual resource passes the preliminary verification, the server may broadcast the ownership assigned request to each node device of the blockchain system, and each node device verifies whether the ownership assigned request is valid again based on the data in the blockchain, that is, performs step 804 described below.
In the embodiment of the application, the ownership assigned request is initially verified based on the information stored in the local database of the server, and after the server passes the verification, the ownership assigned request is sent to the blockchain system and verified again by the blockchain system. The server performs preliminary screening on the ownership assigned request, so that the data processing capacity of the block chain system can be reduced, and invalid operation of the block chain is avoided. Of course, the server may also directly send the received ownership assigned request to the blockchain system, which is not limited in this embodiment of the present application.
804. The node equipment acquires user information of the user to be assigned and resource information of the target virtual resource from a block chain of the block chain system, and verifies assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information.
Taking a node device to verify the ownership-allowed request as an example, in one possible implementation manner, the ownership-allowed request may carry a contract identifier of a target intelligent contract, the node device may invoke the target intelligent contract based on the contract identifier, acquire user information of the user to be allowed and resource information of the target virtual resource based on the target intelligent contract, and execute subsequent steps of verifying the allowed qualification and the target virtual resource based on the acquired information. In the embodiment of the application, the node equipment can verify the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource. For example, the node device may obtain the number of virtual currencies in the target account from the user information of the to-be-assigned user, and if the number of virtual currencies in the target account is greater than or equal to the number of virtual currencies corresponding to the target virtual resource, may determine that the to-be-assigned user has assigned qualification for the target virtual resource. The node device may also verify the target virtual resource based on ownership information and transaction status information in the resource information. In response to the to-be-assigned user having assigned qualification and the ownership information and transaction status information of the target virtual resource being correct, the ownership assigned request may be determined to be valid. The authentication process is the same as the authentication process of the server for the ownership assigned request in step 802, and will not be described in detail herein.
In one possible implementation, the node device may also verify a digital signature carried by the ownership-assigned request. For example, the second terminal and the server may each be registered in the blockchain system, and public and private keys are assigned to the first terminal and the server by the blockchain system. When the second terminal and the server send the ownership assigned request, a private key signature of the second terminal and the server can be added into the ownership assigned request, a receiver of the ownership assigned request applies a corresponding public key to match with the private key signature, and whether the ownership assigned request is valid or not is determined based on a matching result. The above-mentioned process of verifying the ownership assigned request based on the key pair is the same as the above-mentioned process of verifying the ownership assigned request based on the key pair in step 304, and will not be described in detail here.
It should be noted that the foregoing description of the method for verifying the ownership-assigned request by the node device is merely an exemplary illustration, and the embodiment of the present application is not limited to what verification method is specifically adopted.
In one possible implementation, the node device may also calculate a match score for the to-be-assigned user with the target virtual resource through a target model, and the to-be-assigned user may determine whether to proceed with trading the target virtual resource, i.e., whether to perform a subsequent virtual money transfer step, based on the match score. The target model may be a model constructed based on a deep neural network, and the specific structure of the target model is not limited in the embodiment of the present application. In the embodiment of the application, the node device can input the user information of the to-be-assigned user and the resource information of the target virtual resource into a target model, the target model can perform data analysis based on the user information of the to-be-assigned user and the resource information of the target virtual resource, extract the user characteristics of the to-be-assigned user and the resource characteristics of the target virtual resource, and further determine the matching score between the user information of the to-be-assigned user and the resource information based on the user characteristics and the resource characteristics. For example, the target model may determine the investment preference type of the to-be-assigned user based on the user information, determine the rate of return, holding time length, and other characteristics of the target virtual resource based on the resource information, and obtain the matching score according to the matching degree between the target virtual resource and the investment preference type of the to-be-assigned user, where the higher the matching between the target virtual resource and the investment preference type of the to-be-assigned user is, the higher the matching score is. The foregoing description of the method for calculating the matching score is merely an exemplary illustration, and the embodiment of the present application is not limited thereto.
The node device may send the match score to the to-be-assigned user, which determines whether to perform the virtual money transfer based on the match score. If the to-be-assigned user determines to terminate the transaction, the node device need not perform step 805 described below, and if the to-be-assigned user determines to continue the transaction, the node device may continue to perform step 805 described below. In the embodiment of the application, the risk in the virtual resource transaction process can be reduced by feeding back the matching score to the user to be assigned, so that the user is prevented from purchasing the virtual resource which does not accord with the self investment preference, and the transaction risk is reduced.
If the ownership-assigned request is authenticated and the to-be-assigned user determines to continue the transaction, the node device may continue to perform step 805 as described below; if the ownership-assigned request fails or the pending-assigned user terminates the transaction, the node device may feed back to the server information of the transaction failure without performing step 805 described below.
It should be noted that, in the steps 802, 803 and 804, in response to the target intelligent contract indicated by the contract identifier, based on the user identifier of the user to be assigned and the resource identifier of the target virtual resource, the user information of the user to be assigned and the resource information of the target virtual resource are obtained from the blockchain of the blockchain system; and verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information. In the embodiment of the application, the data stored in the blockchain is undeletable and untampereable, so that the node equipment can acquire the comprehensiveness and accuracy of the user information and the resource information when carrying out ownership assigned request verification, the accuracy of a verification result can be further ensured, the validity of the ownership assigned request is ensured, and the illegal transaction is avoided.
805. The node device initiates a virtual money transfer request in the blockchain system in response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing.
The virtual currency transfer request may be used to transfer virtual currency corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to whom the target virtual resource belongs.
In one possible implementation, in response to the assigned qualification of the to-be-assigned user and the verification of the target virtual resource passing, the node device may invoke a target intelligent contract in the blockchain system, and the target intelligent contract sets the transaction state of the target virtual resource to a pre-transaction state, that is, locks the target virtual resource, so as to avoid transaction conflicts caused by other users initiating transactions on the target virtual resource. Of course, the locking time may also be set to the target virtual resource, for example, the locking time may be set to 5 seconds, that is, the transaction state of the target virtual resource is 5 seconds with the duration of the transaction state, and if the blockchain system does not complete the subsequent virtual money transfer step within 5 seconds, it may be determined that the transaction fails, and the transaction state of the target virtual resource is restored to the state to be assigned.
In one possible implementation, after the target virtual resource is locked, the virtual money transfer request may be initiated in the blockchain system by the target smart contract, and the step of transferring the virtual money corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to whom the source belongs is performed. For example, the node device may send a request for a virtual money transfer to the server based on the target smart contract, and in response to the request, the server may perform a step of virtual money transfer based on the target smart contract, that is, deducting the virtual money corresponding to the target virtual resource from the target account of the to-be-assigned user, and transferring the virtual money to the account of the original user. In the embodiment of the application, the virtual money transfer is completed based on the intelligent contract in the blockchain system, so that the transaction security can be improved. In one possible implementation, in response to completion of the virtual money transfer step execution, the node device may set the transaction status of the target virtual resource to a transaction completion status via a target smart contract, deleting transfer information of the target virtual resource from a transaction list of a target transaction platform in the blockchain system. The server may update the display information of the transaction display page and the data in the local database based on the data in the blockchain system, and the second terminal may no longer display the transfer information of the target virtual resource.
In one possible implementation, after the virtual money transfer is completed, that is, after the target virtual resource transaction is completed, the server may send a prompt for the completion of the transaction to the one terminal and the second terminal, so as to inform the user to whom the source belongs and the user to be assigned that the ownership transfer of the target virtual resource is completed.
806. The node device stores an ownership transfer record of the target virtual resource on the blockchain in response to the virtual money transfer request.
The ownership transfer record is used for recording that ownership of the target virtual resource is updated from the original affiliated user to the to-be-assigned user.
In one possible implementation, the ownership transfer record may be added to a memory pool of a node device in the blockchain system, the node device may construct a block based on the ownership transfer record, i.e., the node device may package data in the memory pool according to a target period to construct a block, and then store the block containing the ownership transfer record into the blockchain based on a consensus mechanism. It should be noted that the specific method for storing the ownership transfer record in the blockchain is not limited in the embodiment of the present application.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein.
According to the technical scheme provided by the embodiment of the application, the user information of the user to be assigned and the resource information of the target virtual resource are acquired from the blockchain of the blockchain system in response to the ownership assigned request of the target virtual resource, and the accuracy of acquiring the user information and the resource information can be ensured because the data stored in the blockchain is undeletable and untampered, so that the assigned qualification of the user to be assigned and the target virtual resource are verified based on the user information and the resource information, the feasibility and the legality of the assignment can be determined, virtual currency transfer is performed in the blockchain system in response to the assigned qualification of the user to be assigned and the verification of the target virtual resource, ownership assignment records of the target virtual resource are stored on the blockchain, the ownership of the target virtual resource is updated from the original user to be assigned, and the security of the target virtual resource can be improved based on the blockchain to execute the assignment step. Fig. 10 is a schematic diagram of data interaction in a resource processing process according to an embodiment of the present application, referring to fig. 10, in the resource processing process, a user may send a request to a server 1002 of a target application platform through a client 1001 of the target transaction platform, where the request may be an ownership assigned request, an ownership transfer request, etc., and the server 1002 performs data confirmation to a blockchain system 1003, and the blockchain system 1003 may feed back a data confirmation result to the server 1002, and then the server 1002 feeds back data to the client 1001, that is, feeds back data to the user. In the resource processing process, namely, transaction data generated in the transaction process is verified by the blockchain system, so that the transaction safety can be ensured.
Fig. 11 is a schematic structural diagram of a resource processing device according to an embodiment of the present application, referring to fig. 11, the device includes:
a receiving module 1101, configured to receive an ownership assigned request, where the ownership assigned request carries a user identifier of a user to be assigned, a resource identifier of a target virtual resource to be assigned by the request, and an intelligent contract identifier;
an obtaining module 1102, configured to obtain, in response to the target intelligent contract indicated by the contract identifier, user information of the user to be assigned and resource information of the target virtual resource from a blockchain of the blockchain system based on a user identifier of the user to be assigned and a resource identifier of the target virtual resource;
a verification module 1103, configured to verify the assigned qualification of the to-be-assigned user and the target virtual resource based on the user information and the resource information to obtain a verification result; and responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
In one possible implementation manner, the receiving module 1101 is configured to receive an ownership transfer request of the target virtual resource, where the ownership transfer request carries a user identifier of the user to which the source belongs, a resource identifier of the target virtual resource, transfer information of the target virtual resource, and the smart contract identifier;
The obtaining module 1102 is configured to obtain, in response to the target intelligent contract indicated by the contract identifier, user information of the user to which the source belongs and resource information of the target virtual resource from the blockchain based on a user identifier of the user to which the source belongs and a resource identifier of the target virtual resource;
the verification module 1103 is configured to verify the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource, and the transfer information of the target virtual resource;
the apparatus also includes a publishing module for publishing the transfer information of the target virtual resource in the blockchain system in response to the ownership transfer request verifying.
In one possible implementation, the verification module 1103 is configured to:
verifying whether ownership of the target virtual resource by the original user is valid or not based on user information of the original user and resource information of the target virtual resource;
verifying whether transfer information of the target virtual resource is valid based on resource information of the target virtual resource;
verifying whether the target virtual resource is in a tradable state based on transaction state information in the resource information of the target virtual resource;
And determining that the ownership transfer request is valid in response to whether the ownership of the original affiliated user is valid, transfer information of the target virtual resource is valid, and the target virtual resource is in a tradable state.
In one possible implementation, the publishing module is configured to:
and adding the transfer information of the target virtual resources to a transaction list of a target transaction platform in the blockchain system, wherein the transaction list is used for storing the transfer information of each virtual resource to be assigned.
In one possible implementation, the verification module 1103 is configured to:
verifying the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource;
and verifying the target virtual resource based on the ownership information and the transaction state information in the resource information to obtain a verification result.
In one possible implementation, the verification module 1103 is configured to:
acquiring the number of virtual currency in a target account from the user information of the user to be subjected to the permission;
if the number of the virtual currencies in the target account is greater than or equal to the number of the virtual currencies corresponding to the target virtual resource, determining that the to-be-assigned user has assigned qualification of the target virtual resource.
In one possible implementation, the apparatus further includes:
the input module is used for inputting the user information of the user to be assigned and the resource information of the target virtual resource into a target model, and determining a matching score between the user information of the user to be assigned and the resource information by the target model;
and a sending module for sending the matching score to the to-be-assigned user, wherein the to-be-assigned user determines whether to execute the virtual money transfer based on the matching score.
In one possible implementation, the verification module 1103 is configured to:
responding to the qualification of the user to be assigned and the verification of the target virtual resource, initiating a virtual money transfer request in the blockchain system, wherein the virtual money transfer request is used for transferring virtual money corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the target virtual resource belongs;
in response to the virtual money transfer request, storing an ownership transfer record of the target virtual resource on the blockchain, the ownership transfer record for recording an update of ownership of the target virtual resource from the original affiliated user to the to-be-assigned user.
In one possible implementation, the verification module 1103 is configured to:
in response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing, invoking a target intelligent contract in the blockchain system, and setting the transaction state of the target virtual resource to a pre-transaction state by the target intelligent contract;
and initiating the virtual currency transfer request in the blockchain system through the target intelligent complex, and executing the step of transferring virtual currency corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the source belongs.
In one possible implementation, the apparatus further includes:
the setting module is used for calling the target intelligent contract in the blockchain system and setting the transaction state of the target virtual resource to be a transaction completion state by the target intelligent contract;
and the deleting module is used for deleting the transfer information of the target virtual resource in the transaction list of the target transaction platform in the blockchain system.
In one possible implementation, the verification module 1103 is configured to:
adding the ownership transfer record to a memory pool of a node device in the blockchain system, the memory pool for storing data not added to the blockchain;
Constructing a block by the node device based on the ownership transfer record;
the block containing the ownership transfer record is stored in the blockchain.
In one possible implementation, the verification module 1103 is configured to:
and outputting transfer rejection information in response to any one of the assigned qualification of the to-be-assigned user and the target virtual resource failing to be verified.
According to the device provided by the embodiment of the application, the user information of the user to be assigned and the resource information of the target virtual resource are acquired from the block chain of the block chain system in response to the ownership assigned request of the target virtual resource, and the accuracy of acquiring the user information and the resource information can be ensured because the data stored in the block chain is undeletable and untampered, so that the feasibility and the legality of the current assignment can be determined by verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information, virtual currency transfer is performed in the block chain system in response to the assigned qualification of the user to be assigned and the verification of the target virtual resource, ownership assignment records of the target virtual resource are stored on the block chain, the ownership of the target virtual resource is updated from the original user to be assigned, and the security of the process of the target virtual resource can be improved by carrying out ownership assignment based on the block chain.
It should be noted that: in the resource processing device provided in the above embodiment, only the division of the above functional modules is used for illustration, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the resource processing device and the resource processing method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the resource processing device and the resource processing method are detailed in the method embodiments and are not repeated herein.
The computer device provided by the above technical solution may be implemented as a terminal or a server, for example, fig. 12 is a schematic structural diagram of a terminal provided by an embodiment of the present application. The terminal 1200 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 1200 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 1200 includes: one or more processors 1201 and one or more memories 1202.
Processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1201 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1201 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1202 is used to store at least one program code for execution by processor 1201 to implement the resource processing methods provided by the method embodiments of the present application.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203, and at least one peripheral. The processor 1201, the memory 1202, and the peripheral interface 1203 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 1203 via buses, signal lines, or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, a display 1205, a camera assembly 1206, audio circuitry 1207, and a power supply 1209.
The peripheral interface 1203 may be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1201, the memory 1202, and the peripheral interface 1203 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1204 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1204 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 1204 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 1204 may also include NFC (Near Field Communication ) related circuits, which the present application is not limited to.
The display 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1205 is a touch display, the display 1205 also has the ability to collect touch signals at or above the surface of the display 1205. The touch signal may be input as a control signal to the processor 1201 for processing. At this time, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, providing a front panel of the terminal 1200; in other embodiments, the display 1205 may be at least two, respectively disposed on different surfaces of the terminal 1200 or in a folded design; in some embodiments, the display 1205 may be a flexible display disposed on a curved surface or a folded surface of the terminal 1200. Even more, the display 1205 may be arranged in an irregular pattern that is not rectangular, i.e., a shaped screen. The display 1205 can be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1206 is used to capture images or video. Optionally, camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1206 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 1207 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1201 for processing, or inputting the electric signals to the radio frequency circuit 1204 for voice communication. For purposes of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 1200. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The power supply 1209 is used to power the various components in the terminal 1200. The power source 1209 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 1209 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1200 also includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: an acceleration sensor 1211, a gyro sensor 1212, a pressure sensor 1213, an optical sensor 1215, and a proximity sensor 1216.
The acceleration sensor 1211 may detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1200. For example, the acceleration sensor 1211 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1201 may control the display 1205 to display a user interface in either a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1212 may detect a body direction and a rotation angle of the terminal 1200, and the gyro sensor 1212 may collect a 3D motion of the user on the terminal 1200 in cooperation with the acceleration sensor 1211. The processor 1201 may implement the following functions based on the data collected by the gyro sensor 1212: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 1213 may be disposed at a side frame of the terminal 1200 and/or at a lower layer of the display 1205. When the pressure sensor 1213 is provided at a side frame of the terminal 1200, a grip signal of the terminal 1200 by a user may be detected, and the processor 1201 performs a left-right hand recognition or a shortcut operation according to the grip signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed at the lower layer of the display 1205, the processor 1201 controls the operability control on the UI interface according to the pressure operation of the user on the display 1205. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, processor 1201 may control the display brightness of display 1205 based on the intensity of ambient light collected by optical sensor 1215. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 1205 is turned up; when the ambient light intensity is low, the display brightness of the display screen 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the shooting parameters of camera assembly 1206 based on the intensity of ambient light collected by optical sensor 1215.
A proximity sensor 1216, also referred to as a distance sensor, is typically provided on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect the distance between the user and the front of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front face of the terminal 1200 gradually decreases, the processor 1201 controls the display 1205 to switch from the bright screen state to the off screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually increases, the processor 1201 controls the display 1205 to switch from the off-screen state to the on-screen state.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
Fig. 13 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 1300 may include one or more processors (Central Processing Units, CPU) 1301 and one or more memories 1302, where the one or more memories 1302 store at least one program code, and the at least one program code is loaded and executed by the one or more processors 1301 to implement the methods provided in the foregoing method embodiments. Of course, the server 1300 may also have a wired or wireless network interface, a keyboard, an input/output interface, etc. for performing input/output, and the server 1300 may also include other components for implementing the functions of the device, which are not described herein.
In an exemplary embodiment, a computer readable storage medium, such as a memory, comprising at least one program code executable by a processor to perform the resource processing method of the above-described embodiment is also provided. For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above-described embodiments may be implemented by hardware, or may be implemented by at least one piece of hardware associated with a program, where the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements within the spirit and principles of the present application.
Claims (26)
1. A method of resource processing for a node device in a blockchain system, the method comprising:
Receiving an ownership assigned request, wherein the ownership assigned request carries a user identifier of a user to be assigned, a resource identifier of a target virtual resource to be assigned and an intelligent contract identifier, and the target virtual resource is a financial product which is in a fixed holding period;
responding to the target intelligent contract indicated by the contract identification, and acquiring user information of the user to be assigned and resource information of the target virtual resource from a blockchain of the blockchain system based on the user identification of the user to be assigned and the resource identification of the target virtual resource;
verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information to obtain a verification result;
and responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
2. The method of claim 1, wherein prior to receiving the ownership assigned request, the method further comprises:
receiving an ownership transfer request of the target virtual resource, wherein the ownership transfer request carries a user identifier of an original user of the target virtual resource, a resource identifier of the target virtual resource, transfer information of the target virtual resource and the intelligent contract identifier;
Responding to the target intelligent contract indicated by the contract identification, and acquiring user information of the user to which the source belongs and resource information of the target virtual resource from the blockchain based on the user identification of the user to which the source belongs and the resource identification of the target virtual resource;
verifying the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource and the transfer information of the target virtual resource;
and issuing transfer information of the target virtual resource in a blockchain system in response to the ownership transfer request verification passing.
3. The method according to claim 2, wherein verifying the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource, and the transfer information of the target virtual resource, comprises:
verifying whether ownership of the original user to the target virtual resource is valid or not based on user information of the original user and resource information of the target virtual resource;
verifying whether transfer information of the target virtual resource is valid or not based on resource information of the target virtual resource;
Verifying whether the target virtual resource is in a tradable state based on transaction state information in the resource information of the target virtual resource;
and determining that the ownership transfer request is valid in response to whether the ownership of the original affiliated user is valid, transfer information of the target virtual resource is valid, and the target virtual resource is in a tradable state.
4. The method of claim 2, wherein said publishing the transfer information of the target virtual resource in a blockchain system comprises:
and adding the transfer information of the target virtual resources to a transaction list of a target transaction platform in the blockchain system, wherein the transaction list is used for storing the transfer information of each virtual resource to be assigned.
5. The method of claim 1, wherein verifying the assigned qualification of the to-be-assigned user and the target virtual resource based on the user information and the resource information to obtain a verification result comprises:
verifying the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource;
And verifying the target virtual resource based on the ownership information and the transaction state information in the resource information to obtain a verification result.
6. The method of claim 5, wherein verifying the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource comprises:
acquiring the number of virtual currencies in a target account from the user information of the user to be assigned;
and if the number of the virtual currencies in the target account is greater than or equal to the number of the virtual currencies corresponding to the target virtual resource, determining that the to-be-assigned user has assigned qualification of the target virtual resource.
7. The method of claim 5, wherein the verifying the target virtual resource based on ownership information and transaction status information in the resource information to obtain a verification result, and further comprising:
inputting the user information of the user to be assigned and the resource information of the target virtual resource into a target model, and determining a matching score between the user information of the user to be assigned and the resource information by the target model;
And sending the matching result to the to-be-assigned user, and determining whether to execute virtual money transfer or not by the to-be-assigned user based on the matching score.
8. The method of claim 1, wherein the performing an operation in the target smart contract corresponding to the verification result in response to the assigned qualification of the to-be-assigned user and the verification result of the target virtual resource comprises:
responding to the assigned qualification of the user to be assigned and the verification of the target virtual resource, and initiating a virtual money transfer request in the blockchain system, wherein the virtual money transfer request is used for transferring virtual money corresponding to the target virtual resource from an account of the user to be assigned to an account of an original user of the target virtual resource;
in response to the virtual money transfer request, storing an ownership transfer record of the target virtual resource on the blockchain, the ownership transfer record for recording an update of ownership of the target virtual resource from the original affiliated user to the to-be-assigned user.
9. The method of claim 8, wherein the initiating a virtual money transfer request in the blockchain system in response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing comprises:
In response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing, invoking a target intelligent contract in the blockchain system, and setting a transaction state of the target virtual resource to a pre-transaction state by the target intelligent contract;
and initiating the virtual currency transfer request in the blockchain system through the target intelligent contract, and executing the step of transferring virtual currency corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the source belongs.
10. The method of claim 8, wherein the responding to the assigned qualification of the to-be-assigned user and the target virtual resource verification passes, after initiating a virtual money transfer request in the blockchain system, the method further comprises:
invoking the target intelligent contract in the blockchain system, and setting the transaction state of the target virtual resource to be a transaction completion state by the target intelligent contract;
deleting the transfer information of the target virtual resource in a transaction list of a target transaction platform in the blockchain system.
11. The method of claim 8, wherein the storing the ownership transfer record of the target virtual resource on the blockchain in response to the virtual money transfer request comprises:
Adding the ownership transfer record to a memory pool of a node device in the blockchain system, the memory pool for storing data not added to a blockchain;
constructing, by the node device, a block based on the ownership transfer record;
and storing the block containing the ownership transfer record into the block chain.
12. The method of claim 1, wherein the performing an operation in the target smart contract corresponding to the verification result in response to the assigned qualification of the to-be-assigned user and the verification result of the target virtual resource comprises:
and outputting transfer rejection information in response to any one of the assigned qualification of the to-be-assigned user and the target virtual resource failing to be verified.
13. A resource processing apparatus, the apparatus comprising:
the system comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving an ownership assigned request, the ownership assigned request carries a user identifier of a user to be assigned, a resource identifier of a target virtual resource requested to be assigned and an intelligent contract identifier, the target virtual resource is a financial product, and the financial product is in a fixed holding period;
The acquisition module is used for responding to the target intelligent contract indicated by the contract identification, and acquiring the user information of the user to be assigned and the resource information of the target virtual resource from a blockchain of a blockchain system based on the user identification of the user to be assigned and the resource identification of the target virtual resource;
the verification module is used for verifying the assigned qualification of the user to be assigned and the target virtual resource based on the user information and the resource information so as to obtain a verification result; and responding to the assigned qualification of the user to be assigned and the verification result of the target virtual resource, and executing the operation corresponding to the verification result in the target intelligent contract.
14. The apparatus of claim 13, wherein the receiving module is configured to receive an ownership transfer request of the target virtual resource, where the ownership transfer request carries a user identifier of a user to whom the source of the target virtual resource belongs, a resource identifier of the target virtual resource, transfer information of the target virtual resource, and the smart contract identifier;
the acquisition module is used for responding to the target intelligent contract indicated by the contract identification, and acquiring user information of the user to which the source belongs and resource information of the target virtual resource from the blockchain based on the user identification of the user to which the source belongs and the resource identification of the target virtual resource;
The verification module is used for verifying the validity of the ownership transfer request based on the user information of the user to which the source belongs, the resource information of the target virtual resource and the transfer information of the target virtual resource;
the apparatus further includes a publishing module for publishing the transfer information of the target virtual resource in a blockchain system in response to the ownership transfer request verifying.
15. The apparatus of claim 14, wherein the verification module is configured to:
verifying whether ownership of the original user to the target virtual resource is valid or not based on user information of the original user and resource information of the target virtual resource;
verifying whether transfer information of the target virtual resource is valid or not based on resource information of the target virtual resource;
verifying whether the target virtual resource is in a tradable state based on transaction state information in the resource information of the target virtual resource;
and determining that the ownership transfer request is valid in response to whether the ownership of the original affiliated user is valid, transfer information of the target virtual resource is valid, and the target virtual resource is in a tradable state.
16. The apparatus of claim 14, wherein the publication module is configured to:
and adding the transfer information of the target virtual resources to a transaction list of a target transaction platform in the blockchain system, wherein the transaction list is used for storing the transfer information of each virtual resource to be assigned.
17. The apparatus of claim 13, wherein the authentication module is configured to:
verifying the assigned qualification of the assigned user based on the user information of the to-be-assigned user and the virtual currency corresponding to the target virtual resource;
and verifying the target virtual resource based on the ownership information and the transaction state information in the resource information to obtain a verification result.
18. The apparatus of claim 17, wherein the authentication module is configured to:
acquiring the number of virtual currencies in a target account from the user information of the user to be assigned;
and if the number of the virtual currencies in the target account is greater than or equal to the number of the virtual currencies corresponding to the target virtual resource, determining that the to-be-assigned user has assigned qualification of the target virtual resource.
19. The apparatus of claim 17, wherein the apparatus further comprises:
the input module is used for inputting the user information of the user to be assigned and the resource information of the target virtual resource into a target model, and determining a matching score between the user information of the user to be assigned and the resource information by the target model;
and the sending module is used for sending the matching result to the to-be-assigned user, and the to-be-assigned user determines whether to execute the virtual money transfer or not based on the matching score.
20. The apparatus of claim 13, wherein the authentication module is configured to:
responding to the assigned qualification of the user to be assigned and the verification of the target virtual resource, and initiating a virtual money transfer request in the blockchain system, wherein the virtual money transfer request is used for transferring virtual money corresponding to the target virtual resource from an account of the user to be assigned to an account of an original user of the target virtual resource;
in response to the virtual money transfer request, storing an ownership transfer record of the target virtual resource on the blockchain, the ownership transfer record for recording an update of ownership of the target virtual resource from the original affiliated user to the to-be-assigned user.
21. The apparatus of claim 20, wherein the verification module is configured to:
in response to the assigned qualification of the to-be-assigned user and the target virtual resource verification passing, invoking a target intelligent contract in the blockchain system, and setting a transaction state of the target virtual resource to a pre-transaction state by the target intelligent contract;
and initiating the virtual currency transfer request in the blockchain system through the target intelligent contract, and executing the step of transferring virtual currency corresponding to the target virtual resource from the account of the user to be assigned to the account of the user to which the source belongs.
22. The apparatus of claim 20, wherein the apparatus further comprises:
the setting module is used for calling the target intelligent contract in the blockchain system and setting the transaction state of the target virtual resource to be a transaction completion state by the target intelligent contract;
and the deleting module is used for deleting the transfer information of the target virtual resource in a transaction list of a target transaction platform in the blockchain system.
23. The apparatus of claim 20, wherein the verification module is configured to:
Adding the ownership transfer record to a memory pool of a node device in the blockchain system, the memory pool for storing data not added to a blockchain;
constructing, by the node device, a block based on the ownership transfer record;
and storing the block containing the ownership transfer record into the block chain.
24. The apparatus of claim 20, wherein the verification module is configured to:
and outputting transfer rejection information in response to any one of the assigned qualification of the to-be-assigned user and the target virtual resource failing to be verified.
25. A computer device comprising one or more processors and one or more memories, the one or more memories having stored therein at least one piece of program code that is loaded and executed by the one or more processors to implement the operations performed by the resource processing method of any of claims 1-12.
26. A computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement operations performed by a resource processing method as claimed in any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010238049.6A CN112991069B (en) | 2020-03-30 | 2020-03-30 | Resource processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010238049.6A CN112991069B (en) | 2020-03-30 | 2020-03-30 | Resource processing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112991069A CN112991069A (en) | 2021-06-18 |
CN112991069B true CN112991069B (en) | 2023-08-15 |
Family
ID=76344340
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010238049.6A Active CN112991069B (en) | 2020-03-30 | 2020-03-30 | Resource processing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112991069B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116467062A (en) * | 2022-01-11 | 2023-07-21 | 腾讯科技(深圳)有限公司 | Block chain-based data processing method, equipment and readable storage medium |
CN114596146B (en) * | 2022-02-24 | 2024-09-06 | 成都质数斯达克科技有限公司 | Business data interaction method, device, equipment and medium based on block chain |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108510412A (en) * | 2018-04-04 | 2018-09-07 | 广州科创空间科技服务有限公司 | Intellectual property transfer management method, electronic equipment and storage medium based on alliance's chain |
WO2019001139A1 (en) * | 2017-06-26 | 2019-01-03 | 华为技术有限公司 | Method and device for running chaincode |
CN109684876A (en) * | 2018-12-01 | 2019-04-26 | 河南中欧企业咨询有限公司 | A kind of contract business management method and system based on block chain |
CN110290489A (en) * | 2018-03-19 | 2019-09-27 | 杨世腾 | The storage of network flow resource and shared plateform system |
CN110555766A (en) * | 2018-06-01 | 2019-12-10 | 厦门本能管家科技有限公司 | Off-center asset exchange method and device |
CN110582775A (en) * | 2017-04-17 | 2019-12-17 | 科因普拉格株式会社 | Method for managing file based on block chain by using UTXO basic protocol and file management server using the same |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3559882A1 (en) * | 2017-03-22 | 2019-10-30 | NEC Laboratories Europe GmbH | Method for operating a blockchain |
-
2020
- 2020-03-30 CN CN202010238049.6A patent/CN112991069B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110582775A (en) * | 2017-04-17 | 2019-12-17 | 科因普拉格株式会社 | Method for managing file based on block chain by using UTXO basic protocol and file management server using the same |
WO2019001139A1 (en) * | 2017-06-26 | 2019-01-03 | 华为技术有限公司 | Method and device for running chaincode |
CN110290489A (en) * | 2018-03-19 | 2019-09-27 | 杨世腾 | The storage of network flow resource and shared plateform system |
CN108510412A (en) * | 2018-04-04 | 2018-09-07 | 广州科创空间科技服务有限公司 | Intellectual property transfer management method, electronic equipment and storage medium based on alliance's chain |
CN110555766A (en) * | 2018-06-01 | 2019-12-10 | 厦门本能管家科技有限公司 | Off-center asset exchange method and device |
CN109684876A (en) * | 2018-12-01 | 2019-04-26 | 河南中欧企业咨询有限公司 | A kind of contract business management method and system based on block chain |
Non-Patent Citations (1)
Title |
---|
基于区块链的开放获取资源建设与管理;孔繁超;;情报理论与实践(05);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112991069A (en) | 2021-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210201311A1 (en) | Method for operating electronic device, apparatus and storage medium thereof | |
US11978115B2 (en) | Method, device, and storage medium for blockchain data processing | |
CN108696514B (en) | Resource collection task management method, device, storage medium and system | |
CN109598142B (en) | Credit right certificate generation method and device, electronic equipment and storage medium | |
US12088566B2 (en) | User inviting method and apparatus, computer device, and computer-readable storage medium | |
CN110889772B (en) | Policy processing method and device, computer equipment and storage medium | |
CN111401867A (en) | Resource transfer method and device based on block chain, node equipment and storage medium | |
CN110598482A (en) | Block chain-based digital certificate management method, device, equipment and storage medium | |
CN111339086B (en) | Block processing method, and data query method and device based on block chain | |
CN111340482B (en) | Conflict detection method, device, node equipment and storage medium | |
CN111080443B (en) | Block chain-based service processing method, device, equipment and storage medium | |
CN111245745A (en) | Message sending method, device, node equipment and storage medium | |
CN110689460A (en) | Traffic accident data processing method, device, equipment and medium based on block chain | |
CN110555780B (en) | Insurance data processing method, device and equipment based on block chain and storage medium | |
CN110597924B (en) | Block chain-based user identification processing method, device, equipment and storage medium | |
CN111260347A (en) | Resource processing method, device and equipment based on block chain and storage medium | |
CN111667371B (en) | Resource aggregation method, system, device and storage medium based on block chain | |
CN112991069B (en) | Resource processing method, device, equipment and storage medium | |
CN111212074B (en) | Blockchain-based qualification identification method, device, equipment and storage medium | |
CN110599328B (en) | Block chain based risk user determination method, device, equipment and storage medium | |
CN112036887A (en) | Resource transfer method, device, equipment and storage medium | |
CN111327427B (en) | Method, device, node equipment, system and storage medium for submitting alternative blocks | |
CN110659975B (en) | Resource transfer method, device, equipment and storage medium based on block chain | |
CN110570289A (en) | service processing method, device, equipment and storage medium based on block chain | |
CN111028059B (en) | Article exchange method, device, equipment and storage medium based on blockchain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40045975 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |