Virtual resource processing method and device, electronic equipment and readable medium

By obtaining policy trigger messages in the conversion platform and closing virtual resources according to the target resource processing strategy, the problem of low response speed of virtual resource processing is solved, and more efficient resource management and processing efficiency is achieved.

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

Patent Information

Application Number
CN202311345398.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

With the increase in the types of virtual resources, the number of virtual resource pairs required to manage by the conversion platform has increased significantly, resulting in a long interval for judgment of processing rules and reducing the response speed of virtual resource processing.

Method used

By obtaining the policy trigger message, determining the target resource processing policy, and closing the virtual resource according to the policy trigger conditions, avoiding the waiting time during the polling process.

Benefits of technology

It improves the response speed of virtual resource processing, improves the processing efficiency of the conversion platform, and enables different resource processing strategies to operate independently, not perceive and do not interfere with each other.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847668A_ABST
    Figure CN119847668A_ABST
Patent Text Reader

Abstract

The invention provides a virtual resource processing method and device, electronic equipment and a readable medium. The method comprises the following steps: acquiring a strategy triggering message, wherein the strategy triggering message is used for triggering selection of a resource processing strategy; a target resource processing strategy corresponding to the strategy triggering message is determined from a resource processing strategy set, the resource processing strategy set comprises a plurality of resource processing strategies, and each resource processing strategy corresponds to at least one resource conversion record; and if a target resource conversion record corresponding to the target resource processing strategy meets a strategy triggering condition of the target resource processing strategy, performing a flattening operation on virtual resources in the target resource conversion record according to the target resource processing strategy. According to the method, long waiting time caused by polling time intervals can be avoided, and the response speed of virtual resource processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and readable medium for processing virtual resources. Background Art

[0002] The virtual resource conversion platform holds various types of virtual resources when providing conversion services. However, as more and more types of virtual resources are applied to various business scenarios, the types of virtual resources that need to be converted to each other are also increasing, and the management complexity of the virtual resources held by the conversion platform is also increasing.

[0003] Currently, the conversion platform usually polls the processing rules of various virtual resource pairs at a predetermined time to determine whether the rules need to be executed, and closes the virtual resources when it is determined that the conversion balance of a virtual resource pair needs to be processed.

[0004] However, with the increase in the types of virtual resources, the number of virtual resource pairs that the conversion platform needs to manage has increased significantly. When processing rules according to time polling, the processing rules need to wait for each other during the polling process, which makes the judgment interval of the processing rules longer and reduces the response speed of virtual resource processing. Summary of the invention

[0005] Based on the above technical problems, the present application provides a method, device, electronic device and readable medium for processing virtual resources to avoid the waiting time caused by the polling time interval and improve the response speed of virtual resource processing.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0007] According to one aspect of an embodiment of the present application, a method for processing virtual resources is provided, including:

[0008] Obtaining a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy;

[0009] Determine a target resource processing policy corresponding to the policy trigger message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record;

[0010] If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

[0011] According to one aspect of an embodiment of the present application, a device for processing virtual resources is provided, including:

[0012] A message acquisition module, configured to acquire a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy;

[0013] A policy determination module is configured to determine a target resource processing policy corresponding to the policy trigger message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record;

[0014] The resource processing module is configured to close the virtual resources in the target resource conversion record according to the target resource processing policy if the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy.

[0015] In some embodiments of the present application, based on the above technical solution, the target resource conversion record includes the resource quantity of the first virtual resource, and the target resource processing strategy includes a first resource quantity threshold corresponding to the first virtual resource; the resource processing module is also configured to: obtain the resource quantity of the first virtual resource included in the target resource conversion record; if the resource quantity of the first virtual resource is greater than the first resource quantity threshold, determine that the target resource conversion record meets the policy trigger condition; and according to the resource quantity of the first virtual resource, close the first virtual resource in the target resource conversion record.

[0016] In some embodiments of the present application, based on the above technical solution, the target resource conversion record also includes the resource quantity of the second virtual resource, and the target resource processing strategy also includes a second resource quantity threshold corresponding to the second virtual resource; the resource processing module is also configured to: if the resource quantity of the first virtual resource is greater than the first resource quantity threshold and the resource quantity of the second virtual resource is greater than the second resource quantity threshold, determine that the target resource conversion record meets the policy trigger condition; according to the resource quantity of the first virtual resource and the resource quantity of the second virtual resource, close the first virtual resource and the second virtual resource in the target resource conversion record.

[0017] In some embodiments of the present application, based on the above technical solution, the target resource processing strategy also includes a target liquidation threshold corresponding to the first virtual resource; the resource processing module is also configured to: perform a liquidation operation on the first virtual resource in the target resource conversion record according to the difference between the resource quantity of the first virtual resource and the target liquidation threshold, so that the resource quantity of the first virtual resource in the target resource conversion record is equal to the target liquidation threshold after the liquidation operation.

[0018] In some embodiments of the present application, based on the above technical solution, the policy trigger message includes a virtual resource pair to be processed, and the target resource processing policy also includes a target virtual resource pair; the resource processing module is also configured to: if the virtual resource pair to be processed in the policy trigger message matches the target virtual resource pair, then determine that the target resource conversion record meets the policy trigger condition.

[0019] In some embodiments of the present application, based on the above technical solution, the resource processing module is also configured to: determine other resource conversion records containing virtual resources that conform to the target resource type according to the target resource type of the virtual resource in the target resource conversion record, and the other resource conversion records correspond to other resource processing strategies; if the other resource conversion records meet the policy triggering conditions of the other resource processing strategies, then according to the other resource processing strategies, close the virtual resources in the other resource conversion records that conform to the target resource type.

[0020] In some embodiments of the present application, based on the above technical solution, the message acquisition module is also configured to: monitor the conversion ratio of virtual resources in the target resource conversion record, and when the conversion ratio changes, generate a policy trigger message corresponding to the target resource processing policy.

[0021] In some embodiments of the present application, based on the above technical solution, the policy trigger message comes from a trigger message queue; the message acquisition module is also configured to: receive a virtual resource conversion request, the virtual resource conversion request includes the business type of the target resource conversion record; obtain the target message generation policy corresponding to the business type from the message generation policy set; generate a policy trigger message corresponding to the target resource processing policy according to the target message generation policy; and add the policy trigger message to the trigger message queue.

[0022] In some embodiments of the present application, based on the above technical solution, the virtual resource conversion request also includes information of the virtual resource pair to be converted; the message acquisition module is specifically configured to: obtain the information corresponding to the virtual resource pair to be converted and the target message generation strategy of the business type from the message generation strategy set.

[0023] In some embodiments of the present application, based on the above technical solution, the message acquisition module is also configured to: if there is no virtual resource conversion request for the virtual resource pair to be converted in the target resource conversion record within a preset time, then a simulated conversion request is generated based on the information of the virtual resource pair to be converted in the target resource conversion record and the business type of the target resource conversion record.

[0024] In some embodiments of the present application, based on the above technical solution, the policy trigger message includes a message type; the policy determination module is also configured to: obtain a message subscription request, the message subscription request includes a specified message type and policy identification information of a specified resource processing policy in the resource processing policy set; and establish a correspondence between the specified resource processing policy and the policy trigger message based on the specified message type and policy identification information in the message subscription request.

[0025] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a method for processing virtual resources as in the above technical solution by executing the executable instructions.

[0026] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for processing virtual resources in the above technical solution is implemented.

[0027] According to one aspect of an embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the virtual resource processing method provided in the above various optional implementations.

[0028] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0029] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0031] Figure 1 The system architecture of the processing solution applied to virtual resources according to the embodiment of the present application.

[0032] Figure 2 This is a schematic diagram of a blockchain network in an embodiment of the present application.

[0033] Figure 3 This is a schematic diagram of blocks in a blockchain network in an embodiment of the present application.

[0034] Figure 4 The present invention is a flowchart of a method for processing virtual resources according to an embodiment of the present application.

[0035] Figure 5 The present invention is a flowchart of a method for processing virtual resources according to an embodiment of the present application.

[0036] Figure 6 The present invention is a flowchart of a method for processing virtual resources according to an embodiment of the present application.

[0037] Figure 7 The present invention is a flowchart of a method for processing virtual resources according to an embodiment of the present application.

[0038] Figure 8 The present invention is a flowchart of a method for processing virtual resources according to an embodiment of the present application.

[0039] Fig. 9 The present invention is a schematic flowchart of the message generation process in an embodiment of the present application.

[0040] Fig.10 This is a schematic flowchart of the liquidation triggering process in the embodiment of the present application.

[0041] Fig.11 The block diagram schematically shows the composition of the virtual resource processing device in the embodiment of the present application.

[0042] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of example embodiments to those skilled in the art.

[0044] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0045] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0046] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0047] It should be understood that the solution of the present application is applied in a virtual resource trading platform or conversion platform that provides mutual conversion of multiple virtual resources. The management party or operator of the conversion platform will divide multiple resource conversion records in the conversion platform according to business needs, types of virtual resources and management needs. Each resource conversion record will record the amount of resources after the mutual conversion of one or more virtual resources, so that the conversion orders of different businesses and different virtual resource pairs are recorded in the corresponding resource conversion records. For example, in the resource conversion record X corresponding to virtual resource A and virtual resource B, when a user requests to convert 100 units of virtual resource A into virtual resource B, the conversion platform will provide virtual resource B to the user according to a certain conversion ratio, for example, converted to 150 units of virtual resource B, then in the resource conversion record X, it will be recorded that the conversion platform has transferred in 100 units of virtual resource A and transferred out 150 units of virtual resource B, and subsequent conversion requests will continue to be superimposed on this result, so as to obtain the amount of resources of virtual resource A and virtual resource B held by the platform in the resource conversion record X. It is understandable that the amount of resources held by the platform may be a negative number, indicating that the platform has spent the corresponding virtual resources. For each resource conversion record, the management party of the conversion platform will be the corresponding virtual resource processing rules, such as under what conditions the virtual rules held are closed, and the specific execution method of the closing operation, etc. The closing operation usually refers to the operation in which the conversion platform converts the resource amount of the specified virtual resource as the execution object to the predetermined amount through the third-party platform. For example, the execution object specified in the above example is virtual resource A, and the predetermined amount is 0. When executing the closing operation, the conversion platform will request the third-party platform to convert all the virtual resources A held into virtual resources B, that is, if the amount of resources held is a positive number, virtual resource A will be transferred to the third-party platform and virtual resource B will be received. If the amount of resources held is a negative number, virtual resource B will be transferred to the third-party platform and virtual resource A will be received, so that after the closing operation, the resource amount of virtual resource A held by the conversion platform is 0.

[0048] The virtual resource conversion platform holds various virtual resources when providing conversion services. However, as more and more types of virtual resources are applied to various business scenarios, the types of virtual resources that need to be converted are also increasing, and the management complexity of the virtual resources held by the conversion platform is also increasing. At present, the conversion platform usually polls the processing rules of various virtual resource pairs at a predetermined time to determine whether the rules need to be executed, and closes the virtual resources when it is determined that the conversion balance of a virtual resource pair needs to be processed. However, with the increase in the types of virtual resources, the number of virtual resource pairs that the conversion platform needs to manage has increased significantly. When polling the processing rules according to the time, the processing rules need to wait for each other for the polling process, which makes the judgment interval of the processing rules longer and reduces the response speed of virtual resource processing.

[0049] Based on this, the technical solution of the embodiment of the present application proposes a processing solution for base virtual resources. Specifically, Figure 1 As shown, the system architecture 100 applied to the processing solution based on virtual resources according to the embodiment of the present application may include a terminal device 110, a network 120, a server 130 and a server 140. The terminal device 110 may include a smart phone, a tablet computer, a laptop computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, etc. The server 130 and the server 140 may be servers that provide various services, which may be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network) and big data and artificial intelligence platforms. The network 120 may be a communication medium of various connection types that can provide a communication link between the terminal device 110, the server 130 and the server 140, for example, it may be a wired communication link or a wireless communication link.

[0050] According to the implementation needs, the system architecture in the embodiment of the present application can have any number of terminal devices, networks and servers. For example, the server 130 and the server 140 can be a server group composed of multiple server devices. In addition, the technical solution provided in the embodiment of the present application can be applied to the terminal device 110, can also be applied to the server 130, or can be implemented by the terminal device 110 and the server 130 together, and the present application does not make special restrictions on this. In the embodiment of the present application, the server 130 can be a server of the conversion platform, the server 140 is a server of the third-party management platform of the virtual resources, and the terminal device 110 can be a blockchain node or a user terminal, and the client software of the conversion platform is run on the terminal device 110, so as to communicate with the server 130. The user makes a conversion request of the virtual resource to the server 130 of the conversion platform through the terminal device 110. The server 130 will hold the virtual resource after providing the virtual resource conversion service to the terminal device 110. When the processing rules are met, the server 130 initiates a liquidation operation to the server 140 of the third-party management platform according to the virtual resources held and the corresponding processing rules, thereby completing the processing process of the virtual resource.

[0051] Specifically, virtual resources are usually provided in a blockchain or a specific virtual scene, and both the server 130 and the terminal device 110 can be blockchain nodes in the blockchain. Blockchain is a peer-to-peer distributed ledger consisting of multiple nodes. Each node contains all transaction records, and all nodes need to verify each transaction. Each node in the blockchain network can be a full node or a local blockchain node. A full node can be connected to other nodes, while a local blockchain node refers to an independent node running in the blockchain and is not connected to other nodes. The local blockchain node does not participate in the consensus mechanism of the blockchain network like a full node, but it can independently verify transactions and create new blocks. Only the first node can decrypt the confidential information sent by the second node to the first node, thereby obtaining the content therein, thereby realizing confidential communication between the two connections.

[0052] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks (i.e. blocks) generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain is maintained by the nodes in the blockchain network. For example, in Figure 2 The blockchain network shown may include multiple nodes 201, and the multiple nodes 201 may be the various clients forming the blockchain network. Each node 201 may receive input information during normal operation, and maintain the shared data in the blockchain network based on the received input information. In order to ensure the information intercommunication within the blockchain network, there may be an information connection between each node in the blockchain network, and information may be transmitted between nodes through the above information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to the consensus algorithm, and store the input information as shared data, so that the data stored on all nodes in the blockchain network are consistent.

[0053] Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. A node identifier list can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. The node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node.

[0054] Each node in the blockchain network stores the same blockchain. The blockchain consists of multiple blocks, see Figure 3 As shown, the blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information feature values, version numbers, timestamps, and difficulty values, and the block body stores input information. The next block of the genesis block uses the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores input information feature values ​​of the current block, feature values ​​of the block header of the parent block, version numbers, timestamps, and difficulty values, and so on. This ensures that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, thereby ensuring the security of the input information in the block.

[0055] The implementation details of the technical solution of the embodiment of the present application are described in detail below: Figure 4 A flowchart of a method for processing virtual resources according to an embodiment of the present application is shown. The method for processing virtual resources is applied to a virtual resource conversion platform and can be specifically executed by a device with computing and processing functions, such as a server or terminal device where the virtual resource conversion platform is located. Figure 4 As shown, the method for processing virtual resources at least includes steps S410 to S430, which are described in detail as follows:

[0056] Step S410: obtaining a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy.

[0057] The conversion platform will obtain a policy trigger message. The policy trigger message is a message specifically used to trigger the resource processing policy for inspection and execution. It is different from the message or request used for virtual resource conversion, and can be a message generated based on the virtual resource conversion request trigger. In some embodiments, the policy trigger message will include information related to the reason why the policy trigger message is generated. For example, different policy trigger messages will be generated by conversion request triggering, system automatic triggering, manual triggering, etc.

[0058] Step S420: determining a target resource processing policy corresponding to the policy triggering message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record.

[0059] The conversion platform determines the target resource processing policy corresponding to the policy trigger message from the resource processing policy set. The resource processing policy set is a set of resource processing policies set for all resource conversion records in the conversion platform. These resource processing policies are usually stored in the server of the conversion platform and managed by the conversion platform. Each resource processing policy corresponds to at least one resource conversion record. Usually, each resource processing policy is set for a specific resource conversion record. In other words, in the conversion platform, at least one resource processing policy is set for each resource conversion record. In some embodiments, the resource processing policy may include virtual resource processing operations that need to be performed on multiple resource conversion records. For example, multiple resource conversion records respectively record conversion information between a specific virtual resource and multiple other virtual resources. The resource processing policy can be set to close the specific virtual resources in several other resource conversion records when a liquidation operation needs to be performed on a specific virtual resource in a resource conversion record. The resource conversion record is used to record the resource quantity after a pair or multiple virtual resources are converted to each other, and the conversion orders of different services and different virtual resource pairs will be recorded in the corresponding resource conversion records, so as to realize the separate management of the conversion between various virtual resource pairs under different services. It can be understood that the same virtual resource pair can be included in different resource conversion records. For example, the resource conversion record P is a conversion record corresponding to service X, which contains information on the conversion resource quantity between virtual resource A and virtual resource B, and the resource conversion record Q is a conversion record corresponding to service Y, which can also contain information on the conversion resource quantity between virtual resource A and virtual resource B. When the conversion request of the virtual resource reaches the conversion platform, the conversion platform will record the corresponding conversion information into the corresponding resource conversion record P or resource conversion record Q according to whether the service that initiated the conversion request is X or service Y.

[0060] The correspondence between the policy trigger message and the resource processing policy will be recorded in the conversion platform. The correspondence can be realized through a subscription relationship. For example, a specific resource processing policy may require subscription to a certain type of policy trigger message, such as subscription to a policy trigger message related to a certain virtual resource, or subscription to a policy trigger message related to its corresponding resource conversion record, or subscription to a policy trigger message triggered by a certain type of business. The policy trigger message will contain information for identifying the correspondence, such as business type information and related virtual resource type information. The conversion platform determines the target resource processing policy corresponding to the policy trigger message based on the correspondence recorded therein. It can be understood that the target resource processing policy can be specifically multiple resource processing policies. The conversion platform will execute the multiple resource processing policies triggered separately.

[0061] Step S430: If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, then a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

[0062] If the conversion platform determines that the target resource conversion record corresponding to the target resource processing strategy meets the policy triggering condition of the target resource processing strategy, the conversion platform will perform a liquidation operation on the virtual resources in the target resource conversion record according to the target resource processing strategy. The resource processing strategy will include the policy triggering condition and the virtual resource processing operation required. The policy triggering condition is the condition that the resource conversion record needs to meet when executing the resource processing strategy, for example, it may include a predetermined time interval between two executions or the resource amount of the specified virtual resource in the resource conversion record reaches a predetermined amount. The liquidation operation is usually an operation in which the conversion platform requests the third-party management platform of the virtual resource to convert the held virtual resource into another specified virtual resource. Specifically, the conversion platform usually specifies a virtual resource as its settlement virtual resource. During the liquidation operation, the conversion platform will initiate a request to the third-party platform to convert the virtual resource to be liquidated into a specified settlement virtual resource. Depending on whether the holding amount of the virtual resource to be liquidated is a positive number or a negative number, the conversion platform will obtain the settled virtual resource from the third-party platform or pay the settlement virtual resource to the third-party platform to obtain the virtual resource to be liquidated to make up for the resource amount previously paid to the user terminal.

[0063] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0064] In some optional embodiments, the policy trigger message includes a message type, and before determining the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, the conversion platform first obtains a message subscription request, the message subscription request includes a specified message type and policy identification information of the specified resource processing policy in the resource processing policy set, and then establishes a corresponding relationship between the specified resource processing policy and the policy trigger message according to the specified message type and policy identification information in the message subscription request. In this embodiment, different resource processing policies will be subscribed according to the message type of the policy trigger message. Specifically, the policy trigger message will include a message type, and the message type is associated with the generation reason of the policy trigger message. For example, if the policy trigger message is generated when performing virtual resource conversion, the message type is usually the business type for performing virtual resource conversion, and the resource processing policy corresponding to the resource conversion record that records the virtual resource conversion information of the type of business will subscribe to the message type. If the policy trigger message is a command message generated by the system, the message type will identify whether the policy trigger message is generated manually or by the system. The conversion platform obtains a message subscription request, which contains the specified message type and the policy identification information of the specified resource processing policy in the resource processing policy set. The policy identification information usually refers to the policy representation information of the specified resource processing policy. The message subscription request is usually triggered when a new resource processing policy is established or an existing resource processing policy is updated. During the triggering process, the message type to which the resource processing policy is to be subscribed is specified, thereby adding the message type and policy identification information to the message subscription request. The conversion platform will establish a correspondence between the specified resource processing policy and the policy triggering message based on the specified message type and policy identification information in the message subscription request. This correspondence is used to determine the resource processing policy corresponding to the obtained policy triggering message when the policy triggering message is obtained later. By subscribing the resource processing policy to the policy triggering message, a correspondence between the resource processing policy and the policy triggering message is established, so that no additional manual input is required to manage and update the correspondence, which is conducive to reducing the resource consumption of the solution.

[0065] In some optional embodiments, the policy trigger message includes a pair of virtual resources to be processed, and the target resource processing policy also includes a pair of target virtual resources; in the process of determining whether the target resource conversion record corresponding to the target resource processing policy satisfies the policy trigger condition of the target resource processing policy, if the pair of virtual resources to be processed in the policy trigger message matches the target virtual resource pair, the conversion platform determines that the target resource conversion record satisfies the policy trigger condition. In this embodiment, the policy trigger message includes a pair of virtual resources to be processed, and the target resource processing policy also includes a pair of target virtual resources. The pair of virtual resources to be processed in the policy trigger message is a pair of virtual resources involved in the virtual resource conversion process that triggers the policy trigger message. For example, if a user requests to convert virtual resource A to virtual resource B, the triggered policy trigger message will include a pair of virtual resources to be processed formed by virtual resource A and virtual resource B. The target virtual resource pair in the target resource processing policy is a pair of virtual resources contained in the virtual conversion record targeted by the resource processing policy. For example, the target virtual conversion record corresponding to the target resource processing policy is a record for recording the conversion data between virtual resource A and virtual resource B, then the target virtual resource pair of the target resource processing policy will include virtual resource A and virtual resource B. If the virtual resource pair to be processed in the policy trigger message matches the target virtual resource pair, it means that the conversion related to the policy trigger message matches the data recorded in the target resource conversion record, that is, the data in the target resource conversion record has changed due to the conversion related to the policy trigger message, so it is necessary to detect whether it is necessary to close the position, so as to determine whether the target resource conversion record meets the policy trigger condition, so as to determine whether it is necessary to close the position of the target resource conversion record according to the target resource processing policy. It is understandable that there may be multiple resource processing policies that contain the same target virtual resource pair, and these resource processing policies will close the corresponding resource conversion records according to the policy trigger message. The method of checking whether the virtual resource pair matches allows the target resource processing policy to check whether to close the position for a specific virtual resource pair, which is conducive to the flexibility of the solution.

[0066] In the embodiments of the present application, it is also proposed to Figure 4 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 5 As shown, in a virtual resource processing method of an embodiment of the present application, the target resource conversion record includes a resource amount of a first virtual resource, and the target resource processing strategy includes a first resource amount threshold corresponding to the first virtual resource. The processing method may include the following steps:

[0067] The closing operation of the virtual resources in the target resource conversion record according to the target resource processing strategy includes:

[0068] Step S510: obtaining a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy.

[0069] Optionally, the implementation details of step S510 are the same as Figure 4 The step S410 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0070] Step S520: determining a target resource processing policy corresponding to the policy triggering message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record.

[0071] Optionally, the implementation details of step S520 are the same as Figure 4 The step S420 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0072] Step S530, obtaining the resource amount of the first virtual resource included in the target resource conversion record;

[0073] Step S540: If the resource amount of the first virtual resource is greater than the first resource amount threshold, it is determined that the target resource conversion record meets the policy triggering condition.

[0074] Step S550: If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, a liquidation operation is performed on the first virtual resource in the target resource conversion record according to the resource quantity of the first virtual resource.

[0075] In this embodiment, the process of determining whether the target resource conversion record meets the policy triggering condition is determined by the resource amount of the first virtual resource in the target resource conversion record. Specifically, the target resource conversion record will contain at least two virtual resources, and the first virtual resource can be any one of the two virtual resources. The conversion platform will obtain the resource amount of the first virtual resource from the target resource conversion record. This resource amount represents the conversion amount of the first virtual resource accumulated from the last time the conversion platform closed the first virtual resource in the target resource conversion record to the current moment, and is also the current conversion platform's holding of the first virtual resource in the target resource conversion record. The target resource processing measurement policy contains a first resource amount threshold corresponding to the first virtual resource. The first resource amount threshold is the resource amount to be reached to close the first virtual resource in the target resource conversion record. If the resource amount of the first virtual resource is greater than the first resource amount threshold, the conversion platform determines that the target resource conversion record meets the policy triggering condition. For example, if the target resource processing strategy stipulates that the first resource threshold for virtual resource A is 10,000, then when judging whether the target resource conversion record meets the policy triggering condition, if the holding amount of virtual resource A in the target resource conversion record is more than 10,000, then the position will be closed, and if it is less than 10,000, then the position will not be closed. By setting a resource threshold for virtual resources to control the conditions for closing positions of virtual resources, it is possible to avoid too frequent closing operations occupying too many network resources and computing resources, thereby improving the efficiency of the solution operation.

[0076] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0077] In some optional embodiments of the present application, the target resource conversion record also includes the resource amount of the second virtual resource, and the target resource processing strategy also includes a second resource amount threshold corresponding to the second virtual resource. If the resource amount of the first virtual resource is greater than the first resource amount threshold and the resource amount of the second virtual resource is greater than the second resource amount threshold, it is determined that the target resource conversion record meets the policy triggering condition. In the process of performing a liquidation operation on the virtual resources in the target resource conversion record according to the target resource processing strategy, the conversion platform will perform a liquidation operation on the first virtual resource and the second virtual resource in the target resource conversion record according to the resource amount of the first virtual resource and the resource amount of the second virtual resource. In this embodiment, the target resource conversion record also includes the resource amount of the second virtual resource. It can be understood that the first virtual resource and the second virtual resource are both virtual resources that need to be liquidated, and the target resource conversion record will also include a designated virtual resource to be converted with the first virtual resource and the second virtual resource, that is, the target resource conversion record records the record of the conversion of the first virtual resource to the designated virtual resource and the record of the conversion of the second virtual resource to the designated virtual resource. The second resource amount threshold is similar to the first resource amount threshold, and is the resource amount that needs to be reached for the second virtual resource to be closed. If the resource amount of the first virtual resource and the resource amount of the second virtual resource both reach the requirements of the corresponding threshold, the conversion platform will perform a closing operation on both the first virtual resource and the second virtual resource. It can be understood that the target resource conversion record can contain more types of virtual resources, and the target resource processing strategy will set a corresponding threshold for each virtual resource. The conversion platform can perform centralized operations on various types of virtual resources in the target resource conversion record, that is, after the holding amount of various types of virtual resources in the target resource conversion record reaches the threshold, the various types of virtual resources in the target resource conversion record are closed together. In some embodiments, each virtual resource can also be operated separately, as long as the resource amount of any virtual resource exceeds the corresponding threshold, the type of virtual resource will be closed. By centrally closing multiple virtual resources, the number of closing operations can be reduced, the consumption of the solution in the closing operation can be reduced, and the number of closing communications can be reduced, thereby improving communication efficiency.

[0078] In some optional embodiments of the present application, the target resource processing strategy also includes a target liquidation threshold corresponding to the first virtual resource. In the process of performing a liquidation operation on the first virtual resource in the target resource conversion record according to the resource quantity of the first virtual resource, the conversion platform will perform a liquidation operation on the first virtual resource in the target resource conversion record according to the difference between the resource quantity of the first virtual resource and the target liquidation threshold, so that the resource quantity of the first virtual resource in the target resource conversion record is equal to the target liquidation threshold after the liquidation operation. In this solution, the liquidation operation will liquidate the virtual resource to reach the liquidation threshold according to the liquidation threshold set in the target resource processing strategy. For example, if the target liquidation threshold of the first virtual resource is 2000 and the first resource quantity threshold is 10000 in the target resource processing strategy, the conversion platform will liquidate after the resource quantity of the first virtual resource in the target resource conversion record exceeds 10000, and retain 2000 first virtual resources in the target resource conversion record. For example, after a virtual resource conversion, the resource amount of the first virtual resource in the target resource conversion record reaches 12,000, and the difference between the resource amount of the first virtual resource and the target liquidation threshold is 12,000-2,000=10,000. Then the conversion platform will liquidate 10,000 first virtual resources, that is, convert them into the corresponding virtual resources in the target resource conversion record, so that 2,000 first virtual resources are retained in the target resource conversion record for subsequent conversion processes. In this embodiment, a liquidation method for partially liquidating virtual resources in the liquidation process is provided, which is conducive to improving the flexibility of the liquidation process of the solution.

[0079] In the embodiments of the present application, it is also proposed to Figure 4 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 6 As shown, in a method for processing virtual resources in an embodiment of the present application, the following steps may be included:

[0080] Step S610: obtaining a policy trigger message, where the policy trigger message is used to trigger the selection of a resource processing policy.

[0081] Optionally, the implementation details of step S610 are the same as Figure 4 The step S410 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0082] Step S620: determining a target resource processing policy corresponding to the policy triggering message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record.

[0083] Optionally, the implementation details of step S620 are the same as Figure 4The step S420 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0084] Step S630: If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, then a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

[0085] Optionally, the implementation details of step S630 are the same as Figure 4 The step S430 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0086] Step S640, determining other resource conversion records containing virtual resources that conform to the target resource type according to the target resource type of the virtual resource in the target resource conversion record, wherein the other resource conversion records correspond to other resource processing strategies;

[0087] Step S650: If the other resource conversion record meets the policy triggering condition of the other resource processing policy, then according to the other resource processing policy, a liquidation operation is performed on the virtual resources in the other resource conversion record that meet the target resource type.

[0088] In this embodiment, in addition to closing the virtual resources in the target resource conversion record according to the target resource processing strategy, the conversion platform will also close other resource conversion records containing the same type of virtual resources. The conversion platform will determine other resource conversion records containing virtual resources that meet the target resource type according to the target resource type of the virtual resources in the target resource conversion record, and the other resource conversion records correspond to other resource processing strategies. Specifically, the target resource conversion record usually contains at least one virtual resource pair, and a virtual resource pair contains a target virtual resource and a specified virtual resource, wherein the specified virtual resource is the virtual resource used for the final settlement by the conversion platform, that is, all virtual resources of other types held by the conversion platform except the specified virtual resource will be converted into the specified virtual resource during the closing operation. After determining the target resource type of the target virtual resource in the target resource conversion record, the conversion platform will query other resource conversion records containing the target resource type in the conversion platform. Each other resource conversion record will have a corresponding other resource processing strategy. Subsequently, the conversion platform checks each other resource conversion record to see whether it meets the policy execution condition of the corresponding other resource processing strategy. If it does, the other resource conversion record is closed according to the other resource processing strategy. After determining to close the target resource conversion record, it is also checked whether other resource conversion records containing the same type of virtual resources need to be closed, which is beneficial to improving the coverage and processing capacity of the detection of resource processing strategies and improving the processing efficiency of virtual resources.

[0089] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0090] In the embodiments of the present application, it is also proposed to Figure 4 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 7 As shown, in a method for processing virtual resources in an embodiment of the present application, the following steps may be included:

[0091] Step S710, monitoring the conversion ratio of the virtual resources in the target resource conversion record;

[0092] Step S720: When the conversion ratio changes, a policy trigger message corresponding to the target resource processing policy is generated.

[0093] In this embodiment, the conversion platform detects the conversion ratio of the virtual resource in the target resource conversion record. The specific monitoring method can be that the conversion platform regularly sends a conversion ratio query request to the third-party platform responsible for publishing the conversion ratio, and compares the conversion ratio fed back by the third-party platform with the conversion ratio stored in the conversion platform. When the received conversion ratio is different from the local conversion ratio, the conversion platform can determine that the conversion ratio has changed, thereby generating a policy trigger message corresponding to the target resource processing strategy. The policy trigger message can be initiated for the virtual resource pair involved in the changed conversion ratio, that is, or, the policy trigger message can be not only for the target resource processing strategy, but for all resource processing strategies involving the virtual resource pair. The generated policy trigger message will trigger the conversion platform to check whether the corresponding target resource conversion record needs to be closed according to the target resource processing strategy. In this embodiment, the conversion ratio of the virtual resource is detected, and a policy trigger message is generated when the conversion ratio changes, so that when the conversion ratio changes, the virtual resources held in the conversion platform are promptly closed, thereby improving the real-time processing of virtual resources.

[0094] Step S730: Obtain a policy trigger message, where the policy trigger message is used to trigger the selection of a resource processing policy.

[0095] Optionally, the implementation details of step S730 are the same as Figure 4 The step S410 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0096] Step S740: determining a target resource processing policy corresponding to the policy triggering message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record.

[0097] Optionally, the implementation details of step S740 are the same as Figure 4 The step S420 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0098] Step S750: If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, then a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

[0099] Optionally, the implementation details of step S750 are the same as Figure 4 The step S430 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0100] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0101] In the embodiments of the present application, it is also proposed to Figure 4 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 8 As shown, in a method for processing virtual resources in an embodiment of the present application, a policy trigger message comes from a trigger message queue, and the processing method may include the following steps:

[0102] Step S810, receiving a virtual resource conversion request, wherein the virtual resource conversion request includes a business type of the target resource conversion record;

[0103] Step S820, obtaining a target message generation strategy corresponding to the service type from a message generation strategy set;

[0104] Step S830, generating a policy trigger message corresponding to the target resource processing policy according to the target message generation policy;

[0105] Step S840: Add the policy trigger message to the trigger message queue.

[0106] In this embodiment, the policy trigger message comes from the trigger message queue, that is, the conversion platform obtains the policy trigger message to be processed from the trigger message queue. The trigger message queue is a message queue established in the conversion platform for the policy trigger message. The conversion platform triggers the corresponding resource processing strategy according to the policy trigger message in the trigger message queue based on the corresponding relationship between each resource processing strategy and the policy trigger message. The conversion platform generates a policy trigger message according to the virtual resource conversion request. Specifically, the conversion platform receives a virtual resource conversion request. The virtual resource conversion request is usually a request from a user terminal, and contains the business type of the target resource conversion record, indicating that the virtual resource conversion request is a request generated by the business corresponding to the target resource conversion record. The conversion platform performs resource conversion according to the virtual resource requested to be converted in the virtual resource conversion request, and the relevant conversion data will be recorded in the target resource conversion record. Subsequently, the conversion platform obtains the target message generation strategy corresponding to the business type from the message generation strategy set. The message generation strategy is a preset method for generating a policy trigger message according to the virtual resource conversion request. For example, a policy trigger message of a corresponding type is generated according to the business type and other types of information in the virtual resource conversion request. The conversion platform will generate a policy trigger message corresponding to the target resource processing policy according to the target message generation strategy, and then add the policy trigger message to the trigger message queue. It is understandable that the target message generation strategy does not need to include the correspondence between the target resource processing strategy and the policy trigger message. The correspondence is generated in the process of the target resource processing strategy subscribing to the policy trigger message, and the correspondence is transmitted through the business type of the target resource conversion record. That is, there is a correspondence between the target resource conversion record and the target message generation strategy, and the target message generation strategy corresponds to the business type of the target resource conversion record. The policy trigger message generated based on the target message generation strategy is also a message corresponding to the business type, and the target message generation strategy will subscribe to the message generated based on the target message generation strategy to the conversion platform after generation, so that the target message generation strategy and the policy trigger message are established. The relationship between the policy trigger message. As long as the conversion platform generates a policy trigger message according to the target message, the generated policy trigger message naturally has a corresponding relationship with the target resource processing strategy. In this embodiment, a corresponding policy trigger message is generated according to the virtual resource conversion request, so that the closing process of the virtual resources can be automatically triggered during the conversion of the virtual resources, so that the virtual resources can be closed in time when the virtual resources held by the conversion platform change, thereby improving the real-time performance of the closing operation.

[0107] Step S850: Obtain a policy trigger message, where the policy trigger message is used to trigger the selection of a resource processing policy.

[0108] Optionally, the implementation details of step S850 are the same as Figure 4 The step S410 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0109] Step S860: determining a target resource processing policy corresponding to the policy triggering message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record.

[0110] Optionally, the implementation details of step S860 are the same as Figure 4 The step S420 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0111] Step S870: If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, then a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

[0112] Optionally, the implementation details of step S870 are the same as Figure 4 The step S430 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.

[0113] In an embodiment of the present application, the conversion platform will first obtain a policy trigger message, and then determine the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, wherein the resource processing policy set includes multiple resource processing policies, each resource processing policy corresponds to at least one resource conversion record, and if the target resource conversion record corresponding to the target resource processing policy meets the policy trigger condition of the target resource processing policy, then according to the target resource processing policy, the virtual resource in the target resource conversion record is closed. In the scheme of the present application, the process of triggering the execution of the closing operation is converted to a message trigger, and no longer needs to be polled according to time, thereby avoiding the waiting time caused by the polling time interval, and also allowing different resource processing policies to run independently, without perceiving and interfering with each other, which is conducive to improving the response speed of virtual resource processing.

[0114] In some optional embodiments of the present application, the virtual resource conversion request also includes information about the virtual resource pair to be converted. In the process of obtaining the target message generation policy corresponding to the business type from the message generation policy set, the conversion platform will obtain the information corresponding to the virtual resource pair to be converted and the target message generation policy of the business type from the message generation policy set. In this embodiment, in addition to being associated with the business type, the target message generation policy is also associated with the virtual resource pair to be converted requested for conversion in the virtual resource conversion request. Different virtual resource pairs to be converted of the same business type correspond to different message generation policies, and different types of policy trigger messages will also be generated, so that the management granularity of the policy trigger message generated by the virtual resource conversion request is increased by the conversion platform, and the flexibility of the execution process of the triggered resource processing policy is improved.

[0115] In some optional embodiments of the present application, before receiving a virtual resource conversion request containing a business type, if there is no virtual resource conversion request for the virtual resource pair to be converted in the target resource conversion record within a preset time, the conversion platform will generate a simulated conversion request based on the information of the virtual resource pair to be converted in the target resource conversion record and the business type of the target resource conversion record. In this embodiment, if there is no virtual resource conversion request from the user within a predetermined time to trigger the generation of a policy trigger message, thereby checking whether the corresponding target resource conversion record needs to be closed, the conversion platform will generate a simulated conversion request to trigger the generation process of the policy trigger message, thereby further triggering the process of checking whether the corresponding target resource conversion record needs to be closed. The simulated conversion request will contain the corresponding business type and the information of the virtual resource pair to be processed, but the amount of resources required to be converted is 0, or the conversion platform will not actually execute the simulated conversion request, nor will it record its related data in the target resource conversion record. In this embodiment, when there is no virtual resource conversion request within a predetermined time, the conversion platform will automatically generate a simulated conversion request to trigger the process of checking whether a closing operation is required, thereby avoiding the risk of holding virtual resources due to a long closing interval, thereby improving the security of the solution.

[0116] The following is an example of the implementation details of the technical solution of the embodiment of the present application:

[0117] See also Fig. 9 , Fig. 9 FIG. 1 is a schematic flow chart of the message generation process in the embodiment of the present application. Fig. 9As shown, a message generation service and a message system are provided in the conversion platform of virtual resources. The conversion request sent by the user will first reach the request receiving service. The request receiving service may be a service originally used to receive conversion requests to perform virtual resource conversion. The conversion platform will process the conversion request received by the request receiving service, and the conversion result will be recorded in the corresponding resource conversion record. The message generation service may be built into the request receiving service, and when the request receiving service receives the conversion request, it generates a policy trigger message according to the business type targeted by the received conversion request and the virtual resource pair required to be converted. The message generation service will include message generation rules, which are determined by the conversion platform for the correspondence between the conversion request and the policy trigger message, the policy trigger message and the resource processing policy, and the resource processing policy and the resource conversion record. In this embodiment, three types of policy trigger messages are generated for Topic A, Topic B and Topic C respectively according to the business type in the conversion request. The generated policy trigger message will be placed in the message queue of the message system by the message generation service. Please refer to the following Fig.10 , Fig.10 Schematic flow chart of the liquidation triggering process in the embodiment of this application. Fig.10 As shown, the policy trigger message put into the message system will be consumed by the rules that subscribe to the corresponding category of messages. Specifically, each resource processing strategy in the virtual resource management system is managed by the corresponding background service, and will subscribe to a certain category of policy trigger messages according to the business type involved in the resource conversion record it targets. When the policy trigger message is added to the message queue of the message system, the message system will send the policy trigger message to the resource processing policy that subscribes to the message according to the subscription record, and the virtual resource management system will determine whether the conditions for executing the policy are met based on the resource processing policy that receives the policy trigger message and the corresponding resource conversion record. If satisfied, the virtual resource management system executes a liquidation operation to the third-party platform. If not satisfied, it waits for the next time the resource processing policy is triggered.

[0118] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0119] The following introduces the device implementation of the present application, which can be used to execute the virtual resource processing method in the above-mentioned embodiment of the present application. Fig.11 The block diagram of the virtual resource processing device in the embodiment of the present application is shown schematically. Fig.11, the virtual resource processing device 1100 may include:

[0120] The message acquisition module 1110 is configured to acquire a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy;

[0121] The policy determination module 1120 is configured to determine the target resource processing policy corresponding to the policy trigger message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record;

[0122] The resource processing module 1130 is configured to close the virtual resources in the target resource conversion record according to the target resource processing policy if the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy.

[0123] In some embodiments of the present application, based on the above technical solution, the target resource conversion record includes the resource quantity of the first virtual resource, and the target resource processing strategy includes a first resource quantity threshold corresponding to the first virtual resource; the resource processing module 1120 is also configured to: obtain the resource quantity of the first virtual resource included in the target resource conversion record; if the resource quantity of the first virtual resource is greater than the first resource quantity threshold, determine that the target resource conversion record meets the policy trigger condition; and according to the resource quantity of the first virtual resource, close the first virtual resource in the target resource conversion record.

[0124] In some embodiments of the present application, based on the above technical solution, the target resource conversion record also includes the resource quantity of the second virtual resource, and the target resource processing strategy also includes a second resource quantity threshold corresponding to the second virtual resource; the resource processing module 1130 is also configured to: if the resource quantity of the first virtual resource is greater than the first resource quantity threshold and the resource quantity of the second virtual resource is greater than the second resource quantity threshold, determine that the target resource conversion record meets the policy trigger condition; according to the resource quantity of the first virtual resource and the resource quantity of the second virtual resource, close the first virtual resource and the second virtual resource in the target resource conversion record.

[0125] In some embodiments of the present application, based on the above technical solution, the target resource processing strategy also includes a target liquidation threshold corresponding to the first virtual resource; the resource processing module 1130 is also configured to: perform a liquidation operation on the first virtual resource in the target resource conversion record according to the difference between the resource quantity of the first virtual resource and the target liquidation threshold, so that the resource quantity of the first virtual resource in the target resource conversion record is equal to the target liquidation threshold after the liquidation operation.

[0126] In some embodiments of the present application, based on the above technical solution, the policy trigger message includes a virtual resource pair to be processed, and the target resource processing policy also includes a target virtual resource pair; the resource processing module 1130 is also configured: if the virtual resource pair to be processed in the policy trigger message matches the target virtual resource pair, it is determined that the target resource conversion record meets the policy trigger condition.

[0127] In some embodiments of the present application, based on the above technical solution, the resource processing module 1130 is also configured to: determine other resource conversion records containing virtual resources that conform to the target resource type according to the target resource type of the virtual resource in the target resource conversion record, and the other resource conversion records correspond to other resource processing strategies; if the other resource conversion records meet the policy triggering conditions of the other resource processing strategies, then according to the other resource processing strategies, close the virtual resources in the other resource conversion records that conform to the target resource type.

[0128] In some embodiments of the present application, based on the above technical solution, the message acquisition module 1110 is also configured to: monitor the conversion ratio of virtual resources in the target resource conversion record, and when the conversion ratio changes, generate a policy trigger message corresponding to the target resource processing policy.

[0129] In some embodiments of the present application, based on the above technical solution, the policy trigger message comes from a trigger message queue; the message acquisition module 1110 is also configured to: receive a virtual resource conversion request, the virtual resource conversion request includes the business type of the target resource conversion record; obtain the target message generation policy corresponding to the business type from the message generation policy set; generate a policy trigger message corresponding to the target resource processing policy according to the target message generation policy; and add the policy trigger message to the trigger message queue.

[0130] In some embodiments of the present application, based on the above technical solution, the virtual resource conversion request also includes information of the virtual resource pair to be converted; the message acquisition module 1110 is specifically configured to: obtain the information corresponding to the virtual resource pair to be converted and the target message generation strategy of the business type from the message generation strategy set.

[0131] In some embodiments of the present application, based on the above technical solution, the message acquisition module 1110 is also configured to: if there is no virtual resource conversion request for the virtual resource pair to be converted in the target resource conversion record within a preset time, then a simulated conversion request is generated based on the information of the virtual resource pair to be converted in the target resource conversion record and the business type of the target resource conversion record.

[0132] In some embodiments of the present application, based on the above technical solution, the policy trigger message includes a message type; the policy determination module 1120 is also configured to: obtain a message subscription request, the message subscription request includes a specified message type and policy identification information of a specified resource processing policy in the resource processing policy set; and establish a correspondence between the specified resource processing policy and the policy trigger message based on the specified message type and policy identification information in the message subscription request.

[0133] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.

[0134] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0135] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0136] like Fig.12As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203. Various programs and data required for system operation are also stored in the RAM 1203. The CPU 1201, the ROM 1202 and the RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0137] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1212, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0138] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.

[0139] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CompactDisc Read-OnlyMemory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0140] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0142] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.

[0143] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

[0144] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for processing virtual resources, characterized in that: include: Obtaining a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy; Determine a target resource processing policy corresponding to the policy trigger message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record; If the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy, a liquidation operation is performed on the virtual resources in the target resource conversion record according to the target resource processing policy.

2. The method according to claim 1, characterized in that The target resource conversion record includes a resource amount of a first virtual resource, and the target resource processing strategy includes a first resource amount threshold corresponding to the first virtual resource; the method further includes: Acquire the resource amount of the first virtual resource included in the target resource conversion record; If the resource amount of the first virtual resource is greater than the first resource amount threshold, determining that the target resource conversion record meets the policy triggering condition; The closing operation of the virtual resources in the target resource conversion record according to the target resource processing strategy includes: According to the resource quantity of the first virtual resource, a closing operation is performed on the first virtual resource in the target resource conversion record.

3. The method according to claim 2, characterized in that The target resource conversion record further includes a resource amount of a second virtual resource, and the target resource processing strategy further includes a second resource amount threshold corresponding to the second virtual resource; the method further includes: If the resource amount of the first virtual resource is greater than the first resource amount threshold and the resource amount of the second virtual resource is greater than the second resource amount threshold, determining that the target resource conversion record meets the policy trigger condition; The closing operation of the virtual resources in the target resource conversion record according to the target resource processing strategy includes: According to the resource amount of the first virtual resource and the resource amount of the second virtual resource, a closing operation is performed on the first virtual resource and the second virtual resource in the target resource conversion record.

4. The method according to claim 2, characterized in that: The target resource processing strategy further includes a target liquidation threshold corresponding to the first virtual resource; and performing a liquidation operation on the first virtual resource in the target resource conversion record according to the resource amount of the first virtual resource includes: According to the difference between the resource amount of the first virtual resource and the target liquidation threshold, a liquidation operation is performed on the first virtual resource in the target resource conversion record so that the resource amount of the first virtual resource in the target resource conversion record is equal to the target liquidation threshold after the liquidation operation.

5. The method according to claim 1, characterized in that The policy trigger message includes a to-be-processed virtual resource pair, and the target resource processing policy also includes a target virtual resource pair; the method further includes: If the to-be-processed virtual resource pair in the policy trigger message matches the target virtual resource pair, it is determined that the target resource conversion record satisfies the policy trigger condition.

6. The method according to claim 1, characterized in that After performing a liquidation operation on the virtual resources in the target resource conversion record according to the target resource processing strategy, the method further includes: According to the target resource type of the virtual resource in the target resource conversion record, determining other resource conversion records containing virtual resources that conform to the target resource type, wherein the other resource conversion records correspond to other resource processing strategies; If the other resource conversion record meets the policy triggering condition of the other resource processing policy, then according to the other resource processing policy, a liquidation operation is performed on the virtual resources in the other resource conversion record that meet the target resource type.

7. The method according to claim 1, characterized in that Before obtaining the policy trigger message, the method further includes: Monitoring the conversion ratio of the virtual resources in the target resource conversion record; When the conversion ratio changes, a policy trigger message corresponding to the target resource processing policy is generated.

8. The processing method according to claim 1, characterized in that: The policy trigger message comes from a trigger message queue; before obtaining the policy trigger message, the method further includes: receiving a virtual resource conversion request, wherein the virtual resource conversion request includes a service type of the target resource conversion record; Acquire a target message generation strategy corresponding to the service type from a message generation strategy set; Generate a policy trigger message corresponding to the target resource processing policy according to the target message generation policy; The policy trigger message is added to the trigger message queue.

9. The processing method according to claim 8, characterized in that: The virtual resource conversion request also includes information about the virtual resource pair to be converted; the step of obtaining the target message generation strategy corresponding to the service type from the message generation strategy set includes: The information corresponding to the virtual resource pair to be converted and the target message generation policy of the service type are acquired from the message generation policy set.

10. The method according to claim 8, characterized in that Before receiving the virtual resource conversion request, the method further includes: If there is no virtual resource conversion request for the virtual resource pair to be converted in the target resource conversion record within a preset time, a simulated conversion request is generated according to the information of the virtual resource pair to be converted in the target resource conversion record and the service type of the target resource conversion record.

11. The processing method according to claim 1, characterized in that: The policy trigger message includes a message type; before determining the target resource processing policy corresponding to the policy trigger message from the resource processing policy set, the method further includes: Obtaining a message subscription request, wherein the message subscription request includes a specified message type and policy identification information of a specified resource processing policy in the resource processing policy set; According to the designated message type and policy identification information in the message subscription request, a corresponding relationship between the designated resource processing policy and the policy triggering message is established.

12. A virtual resource processing device, characterized in that: include: A message acquisition module, configured to acquire a policy trigger message, wherein the policy trigger message is used to trigger the selection of a resource processing policy; A policy determination module is configured to determine a target resource processing policy corresponding to the policy trigger message from a resource processing policy set, wherein the resource processing policy set includes a plurality of resource processing policies, and each resource processing policy corresponds to at least one resource conversion record; The resource processing module is configured to close the virtual resources in the target resource conversion record according to the target resource processing policy if the target resource conversion record corresponding to the target resource processing policy meets the policy triggering condition of the target resource processing policy.

13. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the method for processing virtual resources according to any one of claims 1 to 11 by executing the executable instructions.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing virtual resources according to any one of claims 1 to 11 is implemented.

15. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. The processor of the electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the virtual resource processing method as claimed in any one of claims 1 to 11.