CN111309745A - Virtual resource processing method and device, electronic equipment and storage medium - Google Patents
Virtual resource processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111309745A CN111309745A CN202010085257.7A CN202010085257A CN111309745A CN 111309745 A CN111309745 A CN 111309745A CN 202010085257 A CN202010085257 A CN 202010085257A CN 111309745 A CN111309745 A CN 111309745A
- Authority
- CN
- China
- Prior art keywords
- transaction
- information
- balance
- virtual resource
- order information
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 45
- 230000008439 repair process Effects 0.000 claims abstract description 61
- 238000012545 processing Methods 0.000 claims description 71
- 238000000034 method Methods 0.000 claims description 41
- 230000008569 process Effects 0.000 claims description 21
- 230000010365 information processing Effects 0.000 claims description 14
- 230000005540 biological transmission Effects 0.000 claims description 8
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 7
- 238000012795 verification Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 15
- 230000008859 change Effects 0.000 description 11
- 239000003795 chemical substances by application Substances 0.000 description 10
- 230000007246 mechanism Effects 0.000 description 10
- 238000007726 management method Methods 0.000 description 9
- 230000014509 gene expression Effects 0.000 description 7
- 238000012546 transfer Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 6
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000013475 authorization Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003203 everyday effect Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000002354 daily effect Effects 0.000 description 2
- 238000013524 data verification Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 235000019800 disodium phosphate Nutrition 0.000 description 2
- 229910001751 gemstone Inorganic materials 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000013070 change management Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Accounting & Taxation (AREA)
- Computational Linguistics (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a virtual resource processing method, which comprises the following steps: acquiring a standard balance of an account corresponding to a target user; determining balance repair running information and corresponding transaction order information of an account corresponding to a target user at a first time; when the disordered transaction records in the transaction order information are determined, the flow information is repaired according to the standard balance and the balance at the first time, the disordered transaction records in the transaction order information are repaired, corresponding transaction records are added, the continuity of the transaction records in the transaction order information is ensured, and the continuity of the distributable virtual resources displayed in the account corresponding to the target user is ensured. The invention can overcome the problems that disordered transaction records appear in the transaction order information and the distributable virtual resources are displayed discontinuously due to the occurrence of service scenes such as consumption customs orders, fund replacement and the like, and is convenient for users to know the distributable virtual resources in time.
Description
Technical Field
The present invention relates to computer technologies, and in particular, to a virtual resource processing method and apparatus, an electronic device, and a storage medium.
Background
In the conventional scheme, with the development of internet finance, various types of virtual resources, such as virtual insurance, virtual stock, virtual fund and the like, are also appeared in succession. A user can purchase resources anytime and anywhere through the Internet or convert the purchased original resources into equivalent target resources. Some abnormal situations may occur in the virtual resource conversion process, for example, the number of resource items in the resource transfer records generated by the server is wrong, or a certain resource transfer record is omitted by the server, or a repeated resource transfer record is generated by the server, and the like, and these abnormal situations may cause discontinuous change of the account balance watched by the user, which results in that the user cannot check the transaction details, and the user experience of the user is affected.
Disclosure of Invention
In view of this, embodiments of the present invention provide a virtual resource processing method, an apparatus, an electronic device, and a storage medium, which can overcome the problem that the display of allocable virtual resources is discontinuous due to the occurrence of service scenarios such as consumption customs and fund replacement in the conventional scheme, and facilitate users to know the allocable virtual resources in time.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a virtual resource processing method, which comprises the following steps:
the method comprises the steps of obtaining a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing the assignable virtual resources in an account corresponding to the target user;
responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user;
determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance;
detecting the transaction records with disorder in the transaction order information;
and when the out-of-order transaction records in the transaction order information are determined, repairing the flow information according to the standard balance and the balance at the first time, and repairing the out-of-order transaction records in the transaction order information.
An embodiment of the present invention further provides a virtual resource processing apparatus, where the apparatus includes:
the information transmission module is used for acquiring a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing a request for querying allocable virtual resources in an account corresponding to the target user;
the information processing module is used for responding to the virtual resource inquiry request and acquiring the standard balance of the account corresponding to the target user;
the information processing module is used for determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance;
the information processing module is used for detecting the transaction records which are out of order in the transaction order information;
and the information processing module is used for repairing the transaction records which are out of order in the transaction order information according to the standard balance and the balance repair flow information of the first time when the out of order transaction records in the transaction order information are determined to appear.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the virtual resource processing method when the executable instructions stored in the memory are executed.
The embodiment of the invention also provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to realize the virtual resource processing method.
The embodiment of the invention has the following beneficial effects:
the method comprises the steps of obtaining a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing a request for querying allocable virtual resources in an account corresponding to the target user; responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user; determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance; detecting the transaction records with disorder in the transaction order information; when the disordered transaction records in the transaction order information are determined, the disordered transaction records in the transaction order information are repaired according to the standard balance and the balance repair flow information at the first time, so that corresponding transaction records are increased, the continuity of the transaction records in the transaction order information is ensured, and the continuity of the distributable virtual resources displayed in the account corresponding to the target user is ensured.
Drawings
Fig. 1 is a schematic diagram of a usage environment of a virtual resource processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a virtual resource processing apparatus according to an embodiment of the present invention;
fig. 3 is an optional flowchart of a virtual resource processing method according to an embodiment of the present invention;
fig. 4 is an optional flowchart of a virtual resource processing method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a virtual resource processing apparatus 100 according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a block chain in the block chain network 200 according to an embodiment of the present invention;
fig. 7 is a functional architecture diagram of a blockchain network 200 according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an environment for processing virtual resources according to an embodiment of the present invention;
FIG. 9 is a schematic processing procedure diagram of a virtual resource processing method according to an embodiment of the present invention;
fig. 10 is a schematic flow chart illustrating an alternative virtual resource processing method according to an embodiment of the present invention;
fig. 11 is an optional flowchart of a virtual resource processing method according to an embodiment of the present invention;
fig. 12 is a schematic diagram illustrating a balance determination process in the virtual resource processing method according to the embodiment of the present invention;
fig. 13 is a schematic view illustrating an account balance repair in the virtual resource processing method according to the embodiment of the present invention;
fig. 14 is an optional flowchart of a virtual resource processing method according to an embodiment of the present invention;
fig. 15 is a schematic front-end display diagram of a virtual resource processing method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) Transactions (transactions), equivalent to the computer term "Transaction," include operations that need to be committed to a blockchain network for execution and do not refer solely to transactions in the context of commerce, which embodiments of the present invention follow in view of the convention colloquially used in blockchain technology.
For example, a deployment (deployment) transaction is used to install a specified smart contract to a node in a blockchain network and is ready to be invoked; the Invoke (Invoke) transaction is used to append records of the transaction in the blockchain by invoking the smart contract and to perform operations on the state database of the blockchain, including update operations (including adding, deleting, and modifying key-value pairs in the state database) and query operations (i.e., querying key-value pairs in the state database).
2) A Block chain (Block chain) is an encrypted, chained transaction storage structure formed of blocks (blocks).
For example, the header of each block may include hash values of all transactions in the block, and also include hash values of all transactions in the previous block, so as to achieve tamper resistance and forgery resistance of the transactions in the block based on the hash values; newly generated transactions, after being filled into the tiles and passing through the consensus of nodes in the blockchain network, are appended to the end of the blockchain to form a chain growth.
3) A Block chain Network (Block chain Network) incorporates new blocks into a set of nodes of a Block chain in a consensus manner.
4) Ledger (legger) is a general term for blockchains (also called Ledger data) and state databases synchronized with blockchains.
Wherein, the blockchain records the transaction in the form of a file in a file system; the state database records the transactions in the blockchain in the form of different types of Key (Key) Value pairs for supporting fast query of the transactions in the blockchain.
5) Intelligent Contracts (Smart Contracts), also known as Chain codes (Chain codes) or application codes, are programs deployed in nodes of a blockchain network, which execute intelligent Contracts called in received transactions to perform operations of updating or querying key-value data of the account database.
6) Consensus (Consensus), a process in a blockchain network, is used to agree on transactions in blocks among the nodes involved, the agreed blocks are to be appended to the end of the blockchain, and the mechanisms to achieve Consensus include Proof of workload (Po W), Proof of rights and interests (PoS, Proof of stamp), Proof of equity authorization (D PoS, released Proof of-stamp), Proof of Elapsed Time (Po ET, Proof of Elapsed Time), etc.
7) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
8) Terminals, including but not limited to: the system comprises a common terminal and a special terminal, wherein the common terminal is in long connection and/or short connection with a sending channel, and the special terminal is in long connection with the sending channel.
9) The client, the carrier in the terminal implementing the specific function, such as mobile client (APP), is the carrier of the specific function in the mobile terminal, such as executing the function of paying for consumption or purchasing a financial product.
10) Transaction detail: the user makes a recorded transaction order when making a subscription, redemption, or conversion operation.
11) Balance: the user makes the share of the current virtual resource after each transaction.
12) Closing the order: during the payment process, the system or the merchant actively initiates closing the transaction because of uncertain factors such as timeout and the like.
13) And (3) fund conversion: the user changes from holding the share of the a fund to holding the B fund.
14) Consumption customs: means that the order is closed by a system or a merchant due to factors such as timeout in the process of consuming payment.
15) And (4) sub-account: the account of a fund held by the user records the share of the fund held by the user.
Fig. 1 is a schematic view of a usage scenario of a virtual resource processing method provided in an embodiment of the present invention, referring to fig. 1, a client capable of displaying software of a corresponding allocable virtual resource, such as a client or a plug-in for performing a financial activity on a virtual resource or paying through a virtual resource, is disposed on a terminal (including a terminal 10-1 and a terminal 10-2), and a user may obtain and display the allocable virtual resource through the corresponding client and trigger a corresponding virtual resource processing process (such as a process of paying through a wechat or purchasing an item through a fund in a wechat) in a virtual resource change process; the terminal is connected to the server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two, and uses a wireless link to realize data transmission.
As an example, the server 200 is configured to deploy the virtual resource processing apparatus to implement the virtual resource processing method provided by the present invention, so as to obtain a virtual resource query request for a target user, where the virtual resource query request is used to represent a request for querying allocable virtual resources in an account corresponding to the target user; responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user; determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance; according to the standard balance and the balance of the first time, repairing running information, and detecting out-of-order transaction records in the transaction order information; and when determining that the disordered transaction records appear in the transaction order information, repairing the disordered transaction records in the transaction order information to increase corresponding transaction records, ensuring the continuity of the transaction records in the transaction order information and the continuity of the distributable virtual resources displayed in the account corresponding to the target user, and finally displaying the distributable virtual resources corresponding to the virtual resource query request through a terminal display interface. Certainly, the virtual resource processing apparatus provided by the present invention may be applied to a use environment in which a virtual resource performs a financial activity or performs information interaction through a virtual resource payment environment (including but not limited to various types of virtual resource change environments) or social software, and may generally process allocable virtual resources of different data sources during the financial activity or the payment through the virtual resource, and finally present, on a User Interface (UI), the allocable virtual resource corresponding to the virtual resource query request. Allocable virtual resources (such as virtual gifts or non-physical currency such as virtual game coins) obtained in the current display interface by the user can be also called by other application programs.
Certainly, determining the allocable virtual resources by the virtual resource processing apparatus specifically includes: the method comprises the steps of obtaining a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing the assignable virtual resources in an account corresponding to the target user; responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user; determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance; according to the standard balance and the balance of the first time, repairing running information, and detecting out-of-order transaction records in the transaction order information; and when the disordered transaction records appear in the transaction order information, repairing the disordered transaction records in the transaction order information so as to increase the corresponding transaction records, ensure the continuity of the transaction records in the transaction order information and the continuity of the distributable virtual resources displayed in the account corresponding to the target user.
To explain the structure of the virtual resource processing apparatus according to the embodiment of the present invention in detail, the virtual resource processing apparatus may be implemented in various forms, such as a dedicated terminal with processing function of the virtual resource processing apparatus, or a server with processing function of the virtual resource processing apparatus, such as the server 200 in the foregoing fig. 1. Fig. 2 is a schematic diagram of a composition structure of a virtual resource processing apparatus according to an embodiment of the present invention, and it can be understood that fig. 2 only shows an exemplary structure of the virtual resource processing apparatus, and not a whole structure, and a part of the structure or the whole structure shown in fig. 2 may be implemented as needed.
The virtual resource processing device provided by the embodiment of the invention comprises: at least one processor 201, memory 202, user interface 203, and at least one network interface 204. The various components in the virtual resource handling device are coupled together by a bus system 205. It will be appreciated that the bus system 205 is used to enable communications among the components. The bus system 205 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 205 in fig. 2.
The user interface 203 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 202 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 202 in embodiments of the present invention is capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
In some embodiments, the virtual resource processing apparatus provided in the embodiments of the present invention may be implemented by a combination of hardware and software, and as an example, the virtual resource processing apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the virtual resource processing method provided in the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate arrays (FPGAs), or other electronic components.
As an example of the virtual resource processing apparatus provided by the embodiment of the present invention implemented by combining software and hardware, the virtual resource processing apparatus provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 201, where the software modules may be located in a storage medium, the storage medium is located in the memory 202, and the processor 201 reads executable instructions included in the software modules in the memory 202, and completes the virtual resource processing method provided by the embodiment of the present invention in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
By way of example, the Processor 201 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor or the like.
As an example of the virtual resource processing apparatus provided by the embodiment of the present invention implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using a processor 201 in the form of a hardware decoding processor, for example, by being executed by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components, to implement the virtual resource processing method provided by the embodiment of the present invention.
The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the virtual resource processing apparatus. Examples of such data include: any executable instructions for operating on a virtual resource processing apparatus, such as executable instructions, may be included in the program for implementing the slave virtual resource processing method of an embodiment of the present invention.
In other embodiments, the virtual resource processing apparatus provided in the embodiments of the present invention may be implemented in software, and fig. 2 illustrates the virtual resource processing apparatus stored in the memory 202, which may be software in the form of programs, plug-ins, and the like, and includes a series of modules, and as an example of the programs stored in the memory 202, the virtual resource processing apparatus may include the following software module information transmission module 2081 and information processing module 2082. When the software modules in the virtual resource processing apparatus are read into the RAM by the processor 201 and executed, the virtual resource processing method provided by the embodiment of the present invention is implemented, where the functions of each software module in the virtual resource processing apparatus include:
the information transmission module 2081, configured to obtain a virtual resource query request for a target user, where the virtual resource query request is used to represent a request for querying allocable virtual resources in an account corresponding to the target user;
the information processing module 2082 and the information transmission module are used for acquiring a virtual resource query request for a target user, wherein the virtual resource query request is used for representing a request for querying allocable virtual resources in an account corresponding to the target user;
the information processing module 2082, configured to respond to the virtual resource query request and obtain a standard balance of an account corresponding to the target user;
the information processing module 2082 is configured to determine balance repair running water information and corresponding transaction order information of an account corresponding to the target user at a first time based on the standard balance;
the information processing module 2082 is configured to repair the running water information according to the standard balance and the balance at the first time, and detect a transaction record with disorder in the transaction order information;
the information processing module 2082 is configured to, when it is determined that the out-of-order transaction records occur in the transaction order information, repair the out-of-order transaction records in the transaction order information to increase corresponding transaction records, and ensure continuity of the transaction records in the transaction order information and continuity of distributable virtual resources displayed in the account corresponding to the target user.
Referring to fig. 3, fig. 3 is an optional flowchart of the virtual resource processing method provided in the embodiment of the present invention, and it can be understood that the steps shown in fig. 3 may be executed by various electronic devices operating the virtual resource processing apparatus, for example, a server or a server cluster with the virtual resource processing apparatus, where a dedicated terminal with the virtual resource processing apparatus may be packaged in the server shown in fig. 1 to execute a corresponding software module in the virtual resource processing apparatus shown in the foregoing fig. 2. The following is a description of the steps shown in fig. 3.
Step 301: the virtual resource processing device acquires a virtual resource query request aiming at a target user.
The virtual resource query request is used for representing the assignable virtual resources in the account corresponding to the target user.
In some embodiments of the present invention, when the virtual resource is processed into a corresponding payment activity, the resource in the account corresponding to the target user and the resource to be consumed for participating in the payment activity may have different expression forms, and some embodiments of the present invention do not limit the specific expression form of the virtual resource, and optionally, the virtual resource may be a real fund, a real money management product, a virtual copper money, a virtual gemstone, a user point, a voucher, a virtual ingot, a virtual bank ticket, or the like. Illustratively, the virtual resource in the account corresponding to the target user may be in one expression form or may include multiple expressions, for example, the virtual resource in the account corresponding to the target user may be in a uniform real currency (single currency or mixed currency), and further, the virtual resource in the account corresponding to the target user may include multiple expressions such as a virtual shoe-shaped ingot, a virtual silver ticket, a virtual gem, and the like. In some embodiments of the present invention, to conveniently represent the total amount of the virtual resources in the account corresponding to the target user, the virtual resources in the account corresponding to the target user are represented in one representation form, and optionally, the virtual resources in other representation forms and the virtual resources in the representation form in the account corresponding to the target user may be mutually converted.
Step 302: and the virtual resource processing device responds to the virtual resource query request and acquires the standard balance of the account corresponding to the target user.
Optionally, when the balance in the account is queried at any time in 23 days in 9 months, the balance at the beginning of the transaction day (i.e., 23 days in 9 months) is the standard balance of the account corresponding to the target user.
Step 303: and the virtual resource processing device determines balance repair running information and corresponding transaction list information of the account corresponding to the target user at the first time based on the standard balance.
Step 304: the virtual resource processing device detects the transaction records with disorder in the transaction order information.
Step 305: and when determining that the disordered transaction records appear in the transaction list information, the virtual resource processing device repairs the running water information according to the standard balance and the balance at the first time, and repairs the disordered transaction records in the transaction list information.
Therefore, the corresponding transaction records can be added, the continuity of the transaction records in the transaction list information and the continuity of the allocable virtual resources displayed in the account corresponding to the target user can be ensured, namely the allocable virtual resources in the account corresponding to the target user are matched with the transaction information. With the development of internet finance and on platforms such as change management and the like, a user can conveniently and quickly purchase a financial product to obtain income and use the income for daily consumption payment, and the user needs to know the balance change condition after each transaction urgently. However, due to the occurrence of service scenes such as consumption customs and fund replacement, the current method for calculating the balance by the single currency has the problem of discontinuous balance change, so that a user is confused when checking transaction details, misdeems that the fund is lost and complaints are carried out, the use experience of the user is influenced, the distributable virtual resources in the account corresponding to the target user can be adjusted by traversing the transaction information matched with the time parameter and according to the repair flow information, the transaction information of the user can be perfected, the displayed distributable virtual resources can correspond to each transaction of the target user, and disordered transactions in the transaction list are avoided.
Continuing to describe the virtual resource processing method provided by the embodiment of the present invention with reference to the virtual resource processing apparatus shown in fig. 2, referring to fig. 4, fig. 4 is an optional flowchart of the virtual resource processing method provided by the embodiment of the present invention, and it can be understood that the steps shown in fig. 4 may be executed by various electronic devices running the virtual resource processing apparatus, for example, a server or a server cluster with the virtual resource processing apparatus, where a dedicated terminal with the virtual resource processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the virtual resource processing apparatus shown in the foregoing fig. 2. The following is a description of the steps shown in fig. 4.
Step 401: and traversing the transaction order information by the virtual resource processing device, and determining the actual balance information corresponding to each transaction in the transaction order information and the distributable balance displayed by each transaction in the transaction order information.
Step 402: and judging whether the transaction order information has disorder transaction records.
Step 403: and when the actual balance information corresponding to each exchange in the transaction list information is consistent with the distributable balance information displayed by each exchange in the transaction list information, determining that the out-of-order transaction records do not appear in the transaction list information.
When the actual balance information corresponding to each transaction in the transaction list information is consistent with the allocable balance information displayed by each transaction in the transaction list information, it is indicated that no transaction order is generated on the account of the target user in the current transaction time period, each transaction record in the transaction list information which can be checked by the user is continuous, and the query of the user cannot be influenced by disorder transaction records, so that the user can determine that no loss occurs to allocable virtual resources in the account.
Step 404: and when the actual balance information corresponding to each exchange in the transaction list information is inconsistent with the distributable balance information displayed by each exchange in the transaction list information, determining that disorder transaction records appear in the transaction list information.
The actual balance information corresponding to each transaction in the transaction order information is inconsistent with the distributable balance information displayed by each transaction in the transaction order information, which indicates that some abnormal situations may occur in the virtual resource conversion (transaction) process, and due to the fact that the transaction order is closed, the holding situations (for subscription or redemption) of funds of the user are adjusted, such as resource quantity item errors in resource transfer records generated by the server, or a certain resource transfer record is omitted by the server, or a repeated resource transfer record is generated by the server, and the like, the abnormal situations can cause discontinuous account balance change watched by the user, so that the user cannot check the transaction details, and the use experience of the user is influenced, and therefore, the displayed distributable virtual resources need to be repaired.
In some embodiments of the present invention, when it is determined that the transaction record in the transaction order information is out of order, repairing the transaction record in the transaction order information that is out of order may be performed by:
when the out-of-order transaction records appear in the transaction order information, triggering a transaction service process; and replacing the distributable balance information displayed by each transaction in the transaction list information with the actual balance information corresponding to each transaction in the transaction list information through the transaction service process, and adjusting the state of the balance repair running information at the first time to be a repaired state. And adding corresponding transaction records through the transaction service process, so that the transaction records in the transaction order information have continuity, and the allocable virtual resources displayed in the account corresponding to the target user have continuity.
In some embodiments of the present invention, the virtual resource processing method further includes:
detecting the transaction state of an account corresponding to the target user; and when the transaction of the account corresponding to the target user has a statement, determining balance repair running water information matched with the statement transaction. The distributable virtual resource display is discontinuous due to the occurrence of service scenes such as consumption of the customs clearance, exchange of funds (customs clearance occurs in fund transaction) and the like, balance repair flow information matched with the customs clearance transaction is determined, transaction records corresponding to the customs clearance transaction can be recorded in time, and disorder transaction records in the transaction list information are avoided.
In some embodiments of the present invention, the virtual resource processing method further includes:
determining balance information of an account corresponding to the target user at a second time and corresponding standard transaction order information; traversing the standard transaction order information, and determining allocable virtual resources matched with the standard transaction order information; and determining the standard balance information based on the allocable virtual resource matched with the balance information of the account corresponding to the target user at the second time and the standard transaction order information.
In some embodiments of the present invention, the virtual resource processing method further includes:
and sending a user identifier, allocable virtual resource information corresponding to the user identifier and corresponding repair record information to a block chain network, so that a node of the block chain network fills the user identifier, the allocable virtual resource information corresponding to the user identifier and the corresponding repair record information into a new block, and when the new block is identified in common, the new block is added to the tail of the block chain.
In some embodiments of the present invention, the virtual resource processing method further includes:
receiving data synchronization requests of other nodes in the blockchain network;
responding to the data synchronization request, and verifying the authority of the other nodes;
and when the authority of the other nodes passes the verification, controlling the current node and the other nodes to carry out data synchronization so as to realize that the other nodes acquire the user identification, the allocable virtual resource information corresponding to the user identification and the corresponding repair record information.
In some embodiments of the present invention, the virtual resource processing method further includes:
responding to the virtual resource query request, and analyzing the virtual resource query request to obtain a corresponding user identifier;
acquiring authority information in a target block in a block chain network according to the user identification;
checking the matching of the authority information and the user identification;
when the authority information is matched with the user identification, acquiring corresponding repair record information and allocable virtual resources corresponding to the user identification in the block chain network;
and responding to the query instruction, pushing the acquired corresponding repair record information and the allocable virtual resource information corresponding to the user identifier to a corresponding client, so that the client acquires the corresponding repair record information stored in the block chain network and the allocable virtual resource information corresponding to the user identifier.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a virtual resource processing apparatus 100 according to an embodiment of the present invention, which includes a block chain network 200 (exemplarily illustrating a consensus node 210-1 to a consensus node 210-3), an authentication center 300, a service entity 400, and a service entity 500, which are respectively described below.
The type of blockchain network 200 is flexible and may be, for example, any of a public chain, a private chain, or a federation chain. Taking a public link as an example, electronic devices such as user terminals and servers of any service entity can access the blockchain network 200 without authorization; taking a federation chain as an example, an electronic device (e.g., a terminal/server) under the jurisdiction of a service entity after obtaining authorization may access the blockchain network 200, and at this time, become a client node in the blockchain network 200.
In some embodiments, the client node may act as a mere watcher of the blockchain network 200, i.e., provides functionality to support a business entity to initiate a transaction (e.g., for uplink storage of data or querying of data on a chain), and may be implemented by default or selectively (e.g., depending on the specific business requirements of the business entity) with respect to the functions of the consensus node 210 of the blockchain network 200, such as a ranking function, a consensus service, and an accounting function, etc. Therefore, the data and the service processing logic of the service subject can be migrated into the block chain network 200 to the maximum extent, and the credibility and traceability of the data and service processing process are realized through the block chain network 200.
Consensus nodes in blockchain network 200 receive transactions submitted from client nodes (e.g., client node 410 shown in fig. 1 as belonging to business entity 400 and client node 510 shown in fig. 1 as belonging to system 500 of electronic devices) of different business entities (e.g., business entity 400 and business entity 500 shown in fig. 1), perform the transactions to update the ledger or query the ledger, and various intermediate or final results of performing the transactions may be returned for display in the business entity's client nodes.
For example, the client node 410/510 may subscribe to events of interest in the blockchain network 200, such as transactions occurring in a particular organization/channel in the blockchain network 200, and the corresponding transaction notifications are pushed by the consensus node 210 to the client node 410/510, thereby triggering the corresponding business logic in the client node 410/510.
An exemplary application of the blockchain network is described below, taking an example in which a plurality of service entities access the blockchain network to implement management of virtual resource processing results.
Referring to fig. 5, a plurality of business entities involved in the management link, for example, the business entity 400 may be an artificial intelligence-based virtual resource processing device, the business entity 500 may be a display system with a virtual resource processing function, and registers from the certificate authority 300 to obtain respective digital certificates, where the digital certificates include the public key of the business entity and the digital signature signed by the certificate authority 300 on the public key and the identity information of the business entity, and are used to be attached to the transaction together with the digital signature of the business entity for the transaction, and are sent to the blockchain network, so that the blockchain network takes out the digital certificate and the signature from the transaction, verifies the reliability of the message (i.e. whether the message is not tampered), and the identity information of the business entity sending the message, and the blockchain network verifies the identity according to whether the digital certificate has the right to initiate the transaction, for example, whether the digital certificate has the. Clients running on electronic devices (e.g., terminals or servers) hosted by the business entity may request access from the blockchain network 200 to become client nodes.
The client node 410 of the service body 400 is configured to obtain a virtual resource query request of a target user, where the virtual resource query request is used to characterize a virtual resource assignable in an account corresponding to the target user; responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user; determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance; detecting the transaction records with disorder in the transaction order information; when the disordered transaction records in the transaction order information are determined, repairing the disordered transaction records in the transaction order information according to the standard balance and the balance repair flow information at the first time so as to increase the corresponding transaction records, ensure the continuity of the transaction records in the transaction order information and the continuity of the distributable virtual resources displayed in the account corresponding to the target user; and displaying the allocable virtual resources corresponding to the virtual resource query request through a terminal display interface, and sending the user identifier, the allocable virtual resource information corresponding to the user identifier and the corresponding repair record information to the blockchain network 200.
The user identifier, the allocatable virtual resource information corresponding to the user identifier, and the corresponding repair record information are sent to the blockchain network 200, a service logic may be set in the client node 410 in advance, when a corresponding virtual resource processing result is formed, the client node 410 automatically sends the user identifier, the allocatable virtual resource information corresponding to the user identifier, and the corresponding repair record information to the blockchain network 200, or a service person of the service agent 400 logs in the client node 410, manually packages the user identifier, the allocatable virtual resource information corresponding to the user identifier, and the corresponding repair record information, and sends the user identifier, the allocatable virtual resource information corresponding to the user identifier, and the corresponding repair record information to the blockchain network 200. During sending, the client node 410 generates a transaction corresponding to the update operation according to the user identifier, the allocatable virtual resource information corresponding to the user identifier, and the corresponding repair record information, specifies an intelligent contract that needs to be invoked to implement the update operation, and parameters transferred to the intelligent contract in the transaction, and also carries a digital certificate of the client node 410 and a signed digital signature (for example, a digest of the transaction is encrypted by using a private key in the digital certificate of the client node 410), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
When the transaction is received in the consensus node 210 in the blockchain network 200, the digital certificate and the digital signature carried by the transaction are verified, after the verification is successful, whether the service agent 400 has the transaction right is determined according to the identity of the service agent 400 carried in the transaction, and the transaction fails due to any verification judgment of the digital signature and the right verification. After successful verification, node 210 signs its own digital signature (e.g., by encrypting the digest of the transaction using the private key of node 210-1) and continues to broadcast in blockchain network 200.
After receiving the transaction successfully verified, the consensus node 210 in the blockchain network 200 fills the transaction into a new block and broadcasts the new block. When a new block is broadcasted by the consensus node 210 in the block chain network 200, performing a consensus process on the new block, if the consensus is successful, adding the new block to the tail of the block chain stored in the new block, updating the state database according to a transaction result, and executing a transaction in the new block: and for the transaction of submitting and updating the user identification, the allocable virtual resource information corresponding to the user identification and the corresponding repair record information, adding a key value pair comprising the user identification, the allocable virtual resource information corresponding to the user identification and the corresponding repair record information into the state database.
A service person of the service agent 500 logs in the client node 510, inputs a virtual resource processing result or a virtual resource query request, the client node 510 generates a transaction corresponding to an update operation/query operation according to the virtual resource processing result or the virtual resource query request, specifies an intelligent contract that needs to be called to implement the update operation/query operation and a parameter transferred to the intelligent contract in the transaction, and the transaction also carries a digital certificate of the client node 510 and a signed digital signature (for example, a digest of the transaction is encrypted by using a private key in the digital certificate of the client node 510), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
After receiving the transaction in the consensus node 210 in the blockchain network 200, verifying the transaction, filling the block and making the consensus consistent, adding the filled new block to the tail of the blockchain stored in the new block, updating the state database according to the transaction result, and executing the transaction in the new block: for the submitted transaction of updating a certain user identifier, the distributable virtual resource information corresponding to the user identifier and the corresponding repair record information, updating the key value pair corresponding to the virtual resource processing result in the state database according to the manual identification result; and for the submitted transaction for inquiring the processing result of a certain virtual resource, inquiring the key value pair corresponding to the processing result of the virtual resource from the state database, and returning the transaction result.
It should be noted that fig. 5 exemplarily shows a process of directly linking the user identifier, the allocable virtual resource information corresponding to the user identifier, and the corresponding repair record information, but in other embodiments, for a case that the data size of the virtual resource processing result is large, the client node 410 may pair and link the hash of the virtual resource processing result and the hash of the corresponding virtual resource processing result, and store the original virtual resource processing result and the corresponding virtual resource processing result in the distributed file system or the database. After obtaining the virtual resource processing result and the corresponding virtual resource processing result from the distributed file system or the database, the client node 510 may perform a check in combination with the corresponding hash in the block chain network 200, thereby reducing the workload of uplink operations.
As an example of a block chain, referring to fig. 6, fig. 6 is a schematic structural diagram of a block chain in a block chain network 200 according to an embodiment of the present invention, where a header of each block may include hash values of all transactions in the block and also include hash values of all transactions in a previous block, a record of a newly generated transaction is filled in the block and is added to a tail of the block chain after being identified by nodes in the block chain network, so as to form a chain growth, and a chain structure based on hash values between blocks ensures tamper resistance and forgery prevention of transactions in the block.
An exemplary functional architecture of a block chain network provided in the embodiment of the present invention is described below, referring to fig. 7, fig. 7 is a functional architecture schematic diagram of a block chain network 200 provided in the embodiment of the present invention, which includes an application layer 201, a consensus layer 202, a network layer 203, a data layer 204, and a resource layer 205, which are described below respectively.
The resource layer 205 encapsulates the computing, storage, and communication resources that implement each node 210 in the blockchain network 200.
The data layer 204 encapsulates various data structures that implement the ledger, including blockchains implemented in files in a file system, state databases of the key-value type, and presence certificates (e.g., hash trees of transactions in blocks).
The network layer 203 encapsulates the functions of a Point-to-Point (P2P) network protocol, a data propagation mechanism and a data verification mechanism, an access authentication mechanism and service agent identity management.
Wherein the P2P network protocol implements communication between nodes 210 in the blockchain network 200, the data propagation mechanism ensures propagation of transactions in the blockchain network 200, and the data verification mechanism implements reliability of data transmission between nodes 210 based on cryptography methods (e.g., digital certificates, digital signatures, public/private key pairs); the access authentication mechanism is used for authenticating the identity of the service subject added into the block chain network 200 according to an actual service scene, and endowing the service subject with the authority of accessing the block chain network 200 when the authentication is passed; the business entity identity management is used to store the identity of the business entity that is allowed to access blockchain network 200, as well as the permissions (e.g., the types of transactions that can be initiated).
The consensus layer 202 encapsulates the functions of the mechanism for the nodes 210 in the blockchain network 200 to agree on a block (i.e., a consensus mechanism), transaction management, and ledger management. The consensus mechanism comprises consensus algorithms such as POS, POW and DPOS, and the pluggable consensus algorithm is supported.
The transaction management is configured to verify a digital signature carried in the transaction received by the node 210, verify identity information of the service entity, and determine whether the node has an authority to perform the transaction (read related information from the identity management of the service entity) according to the identity information; for the service agents authorized to access the blockchain network 200, the service agents all have digital certificates issued by the certificate authority, and the service agents sign the submitted transactions by using private keys in the digital certificates of the service agents, so that the legal identities of the service agents are declared.
The ledger administration is used to maintain blockchains and state databases. For the block with the consensus, adding the block to the tail of the block chain; executing the transaction in the acquired consensus block, updating the key-value pairs in the state database when the transaction comprises an update operation, querying the key-value pairs in the state database when the transaction comprises a query operation and returning a query result to the client node of the business entity. Supporting query operations for multiple dimensions of a state database, comprising: querying the block based on the block vector number (e.g., hash value of the transaction); inquiring the block according to the block hash value; inquiring a block according to the transaction vector number; inquiring the transaction according to the transaction vector number; inquiring account data of a business main body according to an account (vector number) of the business main body; and inquiring the block chain in the channel according to the channel name.
The application layer 201 encapsulates various services that the blockchain network can implement, including tracing, crediting, and verifying transactions.
The virtual resource processing method provided by the present invention is described below by taking a fund processing function (a financial payment function, which supports different processes of fund payment in an account, and consumption and purchase of any financial product) in a WeChat program as an example, wherein fig. 8 is a schematic view of a use environment of the virtual resource processing method according to the embodiment of the present invention; fig. 9 is a schematic processing procedure diagram of a virtual resource processing method according to an embodiment of the present invention. Referring to fig. 8, the terminals (including the terminal 10-1 and the terminal 10-2) are provided with corresponding clients capable of executing different functions, wherein the clients are the terminals (including the terminal 10-1 and the terminal 10-2) which acquire different fund information from the corresponding server 200 through the network 300 for browsing, the terminals are connected to the server 200 through the network 300, the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is realized by using a wireless link, wherein the types of resource processing of the fund and the like acquired by the terminals (including the terminal 10-1 and the terminal 10-2) from the corresponding server 200 through the network 300 may be the same or different, and as internet finance develops, on platforms such as change communications, users may conveniently and quickly purchase financial products to acquire profits, and is used for daily consumption payment, and the user also needs to know the balance change condition after each transaction urgently. However, due to the occurrence of service scenarios such as a consumption customs clearance and a fund change, the current method for calculating the balance in a single currency has a problem of discontinuous balance change, which causes confusion when a user checks transaction details, misdeems that a fund is lost to make a complaint, and affects the user experience, specifically, referring to fig. 9, the conventional virtual resource processing includes the following steps (taking the purchase of a new fund as an example):
step 901: the user applies for financing products, and requests to be sent to the transaction service after successful payment.
Step 902: the transaction service records the purchase requisition in a database (DB database).
Step 903: the transaction service invokes the sub-account service to add shares to the user.
Step 904: the sub-account service locks and updates the user balance to ensure that operations are performed serially.
Step 905: the sub-account service returns the new balance to the transaction service.
Step 906: and after the transaction service receives the balance, updating the new balance into the purchase requisition for showing the user.
However, due to the occurrence of service scenes such as fund replacement and the like, the current method for calculating the balance by single currency has the problem of discontinuous balance change, so that the user cannot check the transaction details, and the use experience of the user is influenced.
To solve the foregoing drawback, referring to fig. 10, fig. 10 is an optional flowchart of a virtual resource processing method provided in an embodiment of the present invention, where the target user is an operating user of a current terminal, and the method specifically includes the following steps:
step 1001: and acquiring a virtual resource query request of a target user, and triggering a corresponding process to record the repair flow.
Step 1002: and calculating the standard balance of the target user at 0 point every day.
Step 1003: and repairing the out-of-order transaction in the transaction order information, and repairing the account balance of the target user.
Step 1004: and triggering a bottom-holding repair process to complete the repair of the account balance of the target user.
Referring to fig. 11, fig. 11 is an optional flowchart of the virtual resource processing method according to the embodiment of the present invention, and because a balance may be discontinuous when a customs clearance is consumed, a repair flow may be added at the end, so that a balance in the user transaction details may be repaired when repairing.
Specifically, referring to fig. 12, fig. 12 is a schematic diagram illustrating a balance determination process in the virtual resource processing method according to the embodiment of the present invention; the 0 point balance referred to in the application is the balance of the cursor target user at 23:59:59 times per day, and the 0 point balance of yesterday can be calculated and updated in the early morning every day and used in the corresponding repair transaction detail. Taking the example that the cursor calculation of 23:59:59 can be calculated in the morning of 24 days in 9 months, the method specifically comprises the following steps:
step 1201: and acquiring the last balance point 0 of the user.
For example, in the previous embodiment (23: 59: 22/9/month), the balance of the newly added user is 0.
Step 1202: acquiring the trade list information of the user on the day of 9 months and 23 days.
The transaction order information of the day of 9/23 includes all transaction records of the day of 9/23.
Step 1203: and traversing the transaction list to calculate the balance corresponding to each transaction record one by one.
Wherein, the purchase, income, transfer and the like are balance increase; redemption, consumption, roll-out, etc. is a decrease in balance.
Step 1204: after the calculation is completed, the user's new point-0 balance (i.e., point-0 balance at 23:59:59 on 23.9 months) is recorded as the standard balance at the beginning of the next transaction day, and the new point-0 balance is saved in the corresponding cursor database.
Referring to fig. 13, fig. 13 is a schematic view illustrating an account balance repair in a virtual resource processing method according to an embodiment of the present invention, where repairing an account balance of a target user includes the following steps:
step 1301: and acquiring the balance of the user at point 0.
Step 1302: and acquiring balance repair running water from 0 point to the current time.
Step 1303: get the trade order from point 0 to repair pipeline. I.e. there may be an out of order transaction order for the balance in the preceding embodiment.
Step 1304: and traversing the transaction list, calculating the actual balance corresponding to each transaction record one by one, comparing the actual balance with the balance displayed by the transaction list, and repairing the corresponding out-of-order transaction record if the actual balance is inconsistent with the balance displayed by the transaction list.
Step 1305: and calling the transaction service, and updating the balance field in the transaction list to be the correct value.
Step 1306: and after the restoration is finished, updating the state of the restoration flow water into the restored state.
Referring to fig. 14, fig. 14 is a schematic view of an optional flowchart of a virtual resource processing method according to an embodiment of the present invention; in step 1002 of the preamble embodiment, it may be checked whether the balance in the transaction data is continuous, and if not, a bottom-pocketed repair flow is recorded, and step 1003 is triggered to be executed circularly.
Fig. 15 is a schematic front-end display diagram of the virtual resource processing method according to the embodiment of the present invention. In the real-time transaction link, when the balance is discontinuous, the repair flow is recorded, the balance at 0 point every day is calculated, and the repair flow at the bottom of a pocket is recorded, so that the balance in the transaction detail is repaired one by one based on the vernier technology and the repair flow.
The invention has the following beneficial technical effects:
the method comprises the steps of obtaining a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing a request for querying allocable virtual resources in an account corresponding to the target user; responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user; determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance; detecting the transaction records with disorder in the transaction order information; when the disordered transaction records in the transaction order information are determined, the disordered transaction records in the transaction order information are repaired according to the standard balance and the balance repair flow information at the first time, so that corresponding transaction records are increased, the continuity of the transaction records in the transaction order information is ensured, and the continuity of the distributable virtual resources displayed in the account corresponding to the target user is ensured.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A virtual resource processing method, the method comprising:
the method comprises the steps of obtaining a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing the assignable virtual resources in an account corresponding to the target user;
responding to the virtual resource query request, and acquiring a standard balance of an account corresponding to the target user;
determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance;
detecting the transaction records with disorder in the transaction order information;
and when the out-of-order transaction records in the transaction order information are determined, repairing the flow information according to the standard balance and the balance at the first time, and repairing the out-of-order transaction records in the transaction order information.
2. The method of claim 1, wherein the detecting the transaction record having the disorder in the transaction order information comprises:
traversing the transaction order information, and determining actual balance information corresponding to each transaction in the transaction order information and distributable balance displayed by each transaction in the transaction order information;
when the actual balance information corresponding to each exchange in the transaction order information is consistent with the distributable balance information displayed by each exchange in the transaction order information, determining that unordered transaction records do not appear in the transaction order information; or,
and when the actual balance information corresponding to each exchange in the transaction list information is inconsistent with the distributable balance information displayed by each exchange in the transaction list information, determining that disorder transaction records appear in the transaction list information.
3. The method of claim 2, wherein when it is determined that out-of-order transaction records occur in the transaction order information, repairing the out-of-order transaction records in the transaction order information according to the standard balance and the balance repair running information at the first time comprises:
when the out-of-order transaction records appear in the transaction order information, triggering a transaction service process;
replacing the distributable balance information displayed by each transaction in the transaction order information with the actual balance information corresponding to each transaction in the transaction order information through the transaction service process, and adjusting the state of the balance repair running information at the first time to be a repaired state; and adding corresponding transaction records to ensure that the transaction records in the transaction order information have continuity and the allocable virtual resources displayed in the account corresponding to the target user have continuity.
4. The method of claim 1, further comprising:
detecting the transaction state of an account corresponding to the target user;
and when the transaction of the account corresponding to the target user has a statement, determining balance repair running water information matched with the statement transaction.
5. The method of claim 1, further comprising:
determining balance information of an account corresponding to the target user at a second time and corresponding standard transaction order information;
traversing the standard transaction order information, and determining allocable virtual resources matched with the standard transaction order information;
and determining the standard balance information based on the allocable virtual resource matched with the balance information of the account corresponding to the target user at the second time and the standard transaction order information.
6. The method according to any one of claims 1-5, further comprising:
sending the user identification, the allocatable virtual resource information corresponding to the user identification and the corresponding repair record information to a block chain network so as to enable the user identification, the allocatable virtual resource information corresponding to the user identification and the corresponding repair record information to be transmitted to the block chain network
And the node of the block chain network fills the user identification, the allocable virtual resource information corresponding to the user identification and the corresponding repair record information into a new block, and when the new block is identified consistently, the new block is added to the tail of the block chain.
7. The method of claim 6, further comprising:
receiving data synchronization requests of other nodes in the blockchain network;
responding to the data synchronization request, and verifying the authority of the other nodes;
and when the authority of the other nodes passes the verification, controlling the current node and the other nodes to carry out data synchronization so as to realize that the other nodes acquire the user identification, the allocable virtual resource information corresponding to the user identification and the corresponding repair record information.
8. An apparatus for virtual resource processing, the apparatus comprising:
the information transmission module is used for acquiring a virtual resource query request aiming at a target user, wherein the virtual resource query request is used for representing a request for querying allocable virtual resources in an account corresponding to the target user;
the information processing module is used for responding to the virtual resource inquiry request and acquiring the standard balance of the account corresponding to the target user;
the information processing module is used for determining balance repair running information and corresponding transaction order information of an account corresponding to the target user at the first time based on the standard balance;
the information processing module is used for detecting the transaction records which are out of order in the transaction order information;
and the information processing module is used for repairing the transaction records which are out of order in the transaction order information according to the standard balance and the balance repair flow information of the first time when the out of order transaction records in the transaction order information are determined to appear.
9. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions stored in the memory, to implement the virtual resource processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, implement the virtual resource processing method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010085257.7A CN111309745B (en) | 2020-02-10 | 2020-02-10 | Virtual resource processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010085257.7A CN111309745B (en) | 2020-02-10 | 2020-02-10 | Virtual resource processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111309745A true CN111309745A (en) | 2020-06-19 |
CN111309745B CN111309745B (en) | 2022-04-22 |
Family
ID=71145172
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010085257.7A Active CN111309745B (en) | 2020-02-10 | 2020-02-10 | Virtual resource processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111309745B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112241889A (en) * | 2020-09-28 | 2021-01-19 | 中国建设银行股份有限公司 | Account detail repairing method, device, equipment and storage medium |
CN112328580A (en) * | 2020-07-01 | 2021-02-05 | 浙江口碑网络技术有限公司 | User data upgrading method and device, electronic equipment and storage medium |
CN113244630A (en) * | 2021-06-25 | 2021-08-13 | 北京达佳互联信息技术有限公司 | Resource allocation method and device, electronic equipment and storage medium |
CN113448647A (en) * | 2021-06-28 | 2021-09-28 | 华云数据控股集团有限公司 | Resource synchronization method, implementation equipment and electronic equipment |
US20210383371A1 (en) * | 2020-06-05 | 2021-12-09 | Hon Hai Precision Industry Co., Ltd. | Method of recording transactions based on blockchain and electronic device using the same |
CN113781154A (en) * | 2021-03-19 | 2021-12-10 | 北京京东拓先科技有限公司 | Information rollback method, system, electronic equipment and storage medium |
CN113837593A (en) * | 2021-09-18 | 2021-12-24 | 北京百度网讯科技有限公司 | Virtual data distribution method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120150742A1 (en) * | 2010-12-14 | 2012-06-14 | Xtreme Mobility Inc. | System and Method for Authenticating Transactions Through a Mobile Device |
CN104572781A (en) * | 2013-10-29 | 2015-04-29 | ***股份有限公司 | Method and device for generating transaction log |
CN105989059A (en) * | 2015-02-09 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Data record checking method and device |
CN109146653A (en) * | 2018-07-06 | 2019-01-04 | 苏宁易购集团股份有限公司 | A kind of checking method and device for cutting account day based on distributed environment |
WO2019009974A1 (en) * | 2017-07-03 | 2019-01-10 | Mastercard International Incorporated | Method and system for offline digital exchanges via cellular communication |
CN109978521A (en) * | 2019-03-18 | 2019-07-05 | 南通中实纺织交易市场有限公司 | Online transaction Accounting system and online transaction method based on B2B platform |
CN110597832A (en) * | 2019-09-12 | 2019-12-20 | 腾讯云计算(北京)有限责任公司 | Government affair information processing method and device based on block chain network, electronic equipment and storage medium |
-
2020
- 2020-02-10 CN CN202010085257.7A patent/CN111309745B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120150742A1 (en) * | 2010-12-14 | 2012-06-14 | Xtreme Mobility Inc. | System and Method for Authenticating Transactions Through a Mobile Device |
CN104572781A (en) * | 2013-10-29 | 2015-04-29 | ***股份有限公司 | Method and device for generating transaction log |
CN105989059A (en) * | 2015-02-09 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Data record checking method and device |
WO2019009974A1 (en) * | 2017-07-03 | 2019-01-10 | Mastercard International Incorporated | Method and system for offline digital exchanges via cellular communication |
CN109146653A (en) * | 2018-07-06 | 2019-01-04 | 苏宁易购集团股份有限公司 | A kind of checking method and device for cutting account day based on distributed environment |
CN109978521A (en) * | 2019-03-18 | 2019-07-05 | 南通中实纺织交易市场有限公司 | Online transaction Accounting system and online transaction method based on B2B platform |
CN110597832A (en) * | 2019-09-12 | 2019-12-20 | 腾讯云计算(北京)有限责任公司 | Government affair information processing method and device based on block chain network, electronic equipment and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210383371A1 (en) * | 2020-06-05 | 2021-12-09 | Hon Hai Precision Industry Co., Ltd. | Method of recording transactions based on blockchain and electronic device using the same |
CN112328580A (en) * | 2020-07-01 | 2021-02-05 | 浙江口碑网络技术有限公司 | User data upgrading method and device, electronic equipment and storage medium |
CN112241889A (en) * | 2020-09-28 | 2021-01-19 | 中国建设银行股份有限公司 | Account detail repairing method, device, equipment and storage medium |
CN113781154A (en) * | 2021-03-19 | 2021-12-10 | 北京京东拓先科技有限公司 | Information rollback method, system, electronic equipment and storage medium |
CN113244630A (en) * | 2021-06-25 | 2021-08-13 | 北京达佳互联信息技术有限公司 | Resource allocation method and device, electronic equipment and storage medium |
CN113448647A (en) * | 2021-06-28 | 2021-09-28 | 华云数据控股集团有限公司 | Resource synchronization method, implementation equipment and electronic equipment |
CN113448647B (en) * | 2021-06-28 | 2024-02-09 | 华云数据控股集团有限公司 | Resource synchronization method, implementation equipment and electronic equipment |
CN113837593A (en) * | 2021-09-18 | 2021-12-24 | 北京百度网讯科技有限公司 | Virtual data distribution method, device, equipment and storage medium |
CN113837593B (en) * | 2021-09-18 | 2023-08-15 | 北京百度网讯科技有限公司 | Virtual data distribution method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111309745B (en) | 2022-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111309745B (en) | Virtual resource processing method and device, electronic equipment and storage medium | |
JP7450339B2 (en) | Systems, methods, and computer programs for resource fairness for blockchain | |
CN110688425B (en) | Method and system for conditionally deferring transactions for blockchains | |
US11244313B2 (en) | Systems, methods, and apparatuses for implementing declarative smart actions for coins and assets transacted onto a blockchain using distributed ledger technology (DLT) | |
US10904009B2 (en) | Blockchain implementing delta storage | |
US10742398B2 (en) | Bespoke programmable crypto token | |
US11341121B2 (en) | Peer partitioning | |
US11062294B2 (en) | Cognitive blockchain for customized interchange determination | |
US20200250683A1 (en) | Systems, methods, and apparatuses for implementing certificates of authenticity of digital twins transacted onto a blockchain using distributed ledger technology (dlt) | |
US20200074458A1 (en) | Privacy preserving transaction system | |
US11663197B2 (en) | Convolutional and ephemeral datachains with conditional period | |
CN112020705A (en) | Block chain random timer transaction synchronization | |
US20200074470A1 (en) | Database configuration for asset transfers | |
US11720545B2 (en) | Optimization of chaincode statements | |
US11568402B2 (en) | Decentralized out-of-band accelerated blockchain transaction processing | |
US20200145214A1 (en) | Verification of telemetry data | |
US20200151266A1 (en) | Data processing using external information | |
US11397960B2 (en) | Direct marketing via chained interactions in a blockchain | |
US20220156725A1 (en) | Cross-chain settlement mechanism | |
US11316385B2 (en) | Wireless energy transfer | |
US11488162B2 (en) | Automatically storing metrics relating to payments in a blockchain | |
US11893554B2 (en) | Secure smart note | |
US11769147B2 (en) | Secure smart note | |
US20210256512A1 (en) | Provisioning Of Assets Based On Content Usage | |
CN112989338A (en) | Abnormal application data detection method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40025276 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |