CN111638954A - Virtual resource allocation method and device and electronic equipment - Google Patents

Virtual resource allocation method and device and electronic equipment Download PDF

Info

Publication number
CN111638954A
CN111638954A CN202010444285.3A CN202010444285A CN111638954A CN 111638954 A CN111638954 A CN 111638954A CN 202010444285 A CN202010444285 A CN 202010444285A CN 111638954 A CN111638954 A CN 111638954A
Authority
CN
China
Prior art keywords
virtual
resource
resource type
type
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010444285.3A
Other languages
Chinese (zh)
Inventor
孙健康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alipay Labs Singapore Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Labs Singapore Pte Ltd filed Critical Alipay Labs Singapore Pte Ltd
Priority to CN202010444285.3A priority Critical patent/CN111638954A/en
Publication of CN111638954A publication Critical patent/CN111638954A/en
Priority to PCT/IB2021/054405 priority patent/WO2021234648A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the specification provides a virtual resource allocation method and device and electronic equipment. The method comprises the following steps: receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system, and a second resource type of the virtual resources in a resource pool of a second system; responding to the virtual resource receiving request, and judging whether the first resource type is matched with the second resource type; if the first resource type is not matched with the second resource type, converting the resources of the first resource type with a first quantity provided by the first system into virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type; allocating the second number of virtual resources of the second resource type to a resource pool of the second system.

Description

Virtual resource allocation method and device and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of internet, in particular to a virtual resource allocation method and device and electronic equipment.
Background
In a distributed system, virtual resources may be exchanged between different systems as needed. For example, when a system has too many virtual resources, the redundant virtual resources may be sent to other systems. For another example, when a virtual resource of a certain system is insufficient, a request for acquiring the virtual resource may be made to other systems.
Disclosure of Invention
The embodiment of the specification provides a virtual resource allocation method and device and electronic equipment.
According to a first aspect of embodiments herein, there is provided a virtual resource allocation method, the method including:
receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
responding to the virtual resource receiving request, and judging whether the first resource type is matched with the second resource type;
if the first resource type is not matched with the second resource type, converting the virtual resources of the first resource type with a first quantity provided by the first system into the virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
allocating the second number of virtual resources of the second resource type to a resource pool of the second system.
Optionally, after the receiving a request in response to the virtual resource, the method further includes:
performing security check on the virtual resource in the virtual resource receiving request;
the determining whether the first resource type matches the second resource type includes:
and under the condition that the virtual resource in the virtual resource receiving request passes the security check, judging whether the first resource type is matched with the second resource type.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
According to a second aspect of embodiments herein, there is provided a virtual resource allocation method, the method comprising:
receiving a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
responding to the virtual resource sending request, and acquiring a second resource type of the virtual resource in a resource pool in a second system from the second system corresponding to the second system address;
if the first resource type is not matched with the second resource type, converting the virtual resources of the first resource type with a first quantity provided by the first system into the virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
assembling the second quantity of virtual resources of the second resource type and the second system address into a new virtual resource sending request, and sending the new virtual resource sending request to a second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
Optionally, after the sending the request in response to the virtual resource, the method further includes:
carrying out security check on the virtual resource in the virtual resource sending request;
the obtaining, from the second system corresponding to the second system address, the second resource type of the virtual resource in the resource pool in the second system includes:
and under the condition that the virtual resource in the virtual resource sending request passes the security check, acquiring a second resource type of the virtual resource in the resource pool in the second system from the second system corresponding to the second system address.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
According to a third aspect of embodiments herein, there is provided a virtual resource allocation apparatus, the apparatus comprising:
the receiving unit is used for receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
the response unit is used for responding to the virtual resource receiving request and judging whether the first resource type is matched with the second resource type;
a conversion unit, configured to convert, according to a conversion relationship between a first resource type and a second resource type, a first number of virtual resources of the first resource type provided by the first system into a second number of virtual resources of the second resource type if the first resource type does not match the second resource type;
and the allocation unit allocates the second quantity of virtual resources of the second resource type to the resource pool of the second system.
Optionally, the response unit specifically includes:
the checking subunit responds to the virtual resource receiving request and carries out security check on the virtual resource in the virtual resource receiving request;
and the judging subunit judges whether the first resource type is matched with the second resource type or not under the condition that the virtual resource in the virtual resource receiving request passes the security check.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
According to a fourth aspect of embodiments herein, there is provided a virtual resource allocation apparatus, the apparatus comprising:
the receiving unit is used for receiving a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
the response unit is used for responding to the virtual resource sending request and acquiring a second resource type of the virtual resource in the resource pool in the second system from the second system corresponding to the second system address;
a conversion unit, configured to convert, according to a conversion relationship between a first resource type and a second resource type, a first number of virtual resources of the first resource type provided by the first system into a second number of virtual resources of the second resource type if the first resource type does not match the second resource type;
the allocation unit is used for assembling the second quantity of virtual resources of the second resource type and the second system address into a new virtual resource sending request and sending the new virtual resource sending request to a second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
Optionally, the response unit specifically includes:
a checking subunit, configured to perform security check on the virtual resource in the virtual resource sending request;
and the obtaining subunit is configured to, when the virtual resource in the virtual resource sending request passes the security check, obtain, from the second system corresponding to the second system address, the second resource type of the virtual resource in the resource pool in the second system.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
According to a fifth aspect of embodiments herein, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to any one of the above virtual resource allocation methods.
In an embodiment of the present specification, a virtual resource allocation scheme is provided, where a resource type of a virtual resource provided by a first system is compared with a resource type of a virtual resource used by a second system, and when the two resource types are not matched, the resource type of the virtual resource provided by the first system is automatically converted into a resource type used by the second system; therefore, the virtual resources received by the second system can be directly used, the availability of the virtual resources is ensured, and the use efficiency of the virtual resources is improved.
Drawings
Fig. 1 is a flowchart of a virtual resource allocation method provided in an embodiment of the present specification;
FIG. 2 is a schematic diagram of a virtual red envelope scene provided in an embodiment of the present specification;
fig. 3 is a flowchart of a virtual resource allocation method provided in an embodiment of the present specification;
fig. 4 is a hardware configuration diagram of a virtual resource allocation apparatus according to an embodiment of the present specification;
fig. 5 is a block diagram of a virtual resource allocation apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram of a virtual resource allocation apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. Plural in this context may refer to two or more.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
There is a need in distributed systems to allocate virtual resources for different systems. Since the distributed system is constructed by several systems together, each system is actually an independent individual. It is inevitable that there is a problem of virtual resource incompatibility between systems. The reasons for the virtual resource incompatibility here are: the resource types of the virtual resources used by the two systems do not match.
For a virtual resource with incompatible virtual resources, the system cannot normally use the virtual resource even if the system receives the virtual resource; because there is a problem that virtual resources are not available.
In order to solve the above problem, the present specification provides a virtual resource allocation method, which may be described below with reference to an example shown in fig. 1, and may include the following steps:
step 210: receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
step 220: responding to the virtual resource receiving request, and judging whether the first resource type is matched with the second resource type;
step 230: if the first resource type is not matched with the second resource type, converting the resources of the first resource type with a first quantity provided by the first system into the resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
step 240: allocating the second number of resources of the second resource type to a resource pool of the second system.
The method may be applied to a distributed system, and both the first system and the second system may be systems in the distributed system. In a distributed system, the scheduling of virtual resources between different systems can be uniformly managed by a management server of the distributed system. In a distributed system, each system has a unique system address and can therefore route to the corresponding system based on the system address.
Specifically, when the first system sends the virtual resource in the local resource pool to the second system, the first system needs to assemble a virtual resource sending request. The virtual resource sending request comprises a first system address, a first number of virtual resources of a first resource type provided by the first system and a second system address.
Then responding to the virtual resource sending request initiated by the first system by a management server of the distributed system, and routing to a second system in the distributed system based on a second system address; and sending the virtual resource sending request to the second system.
After receiving the virtual resource sending request, the second system may receive the resource provided by the first system if the virtual resource sending request is triggered; at this time, the second system initiates a virtual resource receiving request to the management server. The virtual resource receiving request comprises a first quantity of virtual resources of a first resource type provided by a first system and a second resource type of the virtual resources in a local resource pool of a second system.
The management server of the distributed system receives a request in response to the virtual resource initiated in response to the second system. Firstly, judging whether a first resource type and a second resource type contained in the virtual resource receiving request are matched or not; if the first resource type is not matched with the second resource type, converting the first quantity of resources of the first resource type provided by the first system into a second quantity of resources of the second resource type according to the conversion relation between the first resource type and the second resource type, and then distributing the second quantity of resources of the second resource type to a resource pool of the second system.
The determining whether the first resource type is matched with the second resource type may specifically include determining whether the first resource type is consistent with the second resource type.
The allocating the second number of resources of the second resource type to the resource pool of the second system may specifically include injecting the second number of resources of the second resource type into the resource pool of the second system.
Because the resources allocated to the second system resource pool and the existing resources in the resource pool are of the second resource type, the second system can directly use the received resources without additional processing; therefore, the availability of the virtual resources is ensured, and the resource use efficiency is improved.
The virtual resource may include a task to be executed by each system in the distributed system. When the tasks to be executed by a certain system are excessive, part of the tasks to be executed can be sent to other systems so as to relieve the execution pressure of the system. Correspondingly, the resource pool may be a task pool local to each system, and is used for storing tasks to be executed.
The virtual resources may also include virtual computing resources and/or virtual storage resources of each system in the distributed system. In the distributed system, although each system has independent physical computing resources or physical storage resources, the physical computing resources or physical storage resources can be uniformly managed by the distributed management system, and respective virtual computing resources and/or virtual storage resources are reallocated for each system. That is, virtual computing resources and storage resources usable by the respective systems may be dynamically adjusted. Based on the virtual resource allocation method, virtual resources can be dynamically allocated among the systems according to the actual required resource amount of each system. For example, a first system with a large number of virtual computing resources may allocate excess virtual computing resources to a second system with a small number of virtual computing resources. A first system with a large amount of virtual memory resources may allocate excess virtual memory resources to a second system with a small amount of virtual memory resources.
In practical applications, in order to ensure the security of the system, security check needs to be performed on relevant information such as a system address, a virtual resource, and the like in a virtual resource receiving request or a virtual resource sending request. The subsequent steps can continue only if the relevant information in the request passes the security check. The security check may be a check commonly used in the industry, such as the KYC check (Know your customer, fully aware of your customer).
The following exemplary introduces the security check content:
and checking whether the addresses of the first system and the second system in the virtual resource receiving request are correct or not, and whether the addresses are correct or not is checked. If the address of any system is wrong, the request is not safe, but the safety check is not carried out.
It is checked whether a first amount of virtual resources provided by a first system in a virtual resource reception request exceeds a remaining amount of virtual resources within a resource pool of the first system. If so, the request is not secure, but the security check is not passed.
It is checked whether a first amount of virtual resources provided by the first system in the virtual resource reception request exceeds a preset threshold. If so, the request is not secure, but the security check is not passed. Wherein the preset threshold may be a preset empirical value. Or an optimal value calculated based on a machine learning algorithm or a big data technique.
Problems can be found in advance through security check, and allocation failure caused by abnormity in the process of virtual resource allocation is avoided.
The following describes the technical solution shown in steps 210 and 240 by taking the virtual resource as a "virtual red packet".
Of course, the example of the virtual resource being a "virtual red packet" is merely exemplary. In practical applications, the virtual resource may also be another virtual article capable of being distributed and transmitted on line besides the "virtual red packet": such as electronic coupons, electronic vouchers, electronic coupons, and the like.
Fig. 2 is a schematic view of a scene with the virtual resource as a "virtual red packet". In this example, the first system may refer to a client that sends a virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource types include currency; the resource pool includes user accounts.
In an implementation, user a may send a virtual red envelope to client B through client a. Before sending, user a needs to determine a target user (i.e. user B in the example of fig. 2) that receives the virtual red envelope; a first currency of the virtual red envelope and a first amount of funds within the virtual red envelope are determined. The first currency type may be determined by the user a through manual selection, or may be determined by the client a automatically according to the usage habit of the user a. And the user A completes the payment of the virtual red envelope through the payment service provided by the service. Thereby sending a virtual red packet send request to user B. The virtual red packet send request carries a virtual red packet in a first currency of a first amount of funds, and the user B address. And the server is routed to the client B where the user B is located based on the address of the user B, and sends the virtual red packet sending request to the client B.
And the client B of the user B receives the virtual red packet of the user A, and when the user B triggers to receive the virtual red packet, the client B of the user B can initiate a virtual red packet receiving request to the server. The receiving request comprises a virtual red packet of a first currency of a first fund amount carried by the virtual red packet sending request; and a second currency used by the user account of user B.
The server side responds to a virtual red packet receiving request initiated by the client side B; it is determined whether the first currency type and the second currency type match. If not, converting the virtual red envelope of the first currency of the first amount of funds to a virtual red envelope of a second currency of the second amount of funds according to an exchange rate relationship between the first currency and the second currency; finally, a virtual red envelope in a second currency of a second amount of funds is remitted into the user account of user B.
In addition, when the server side responds to the virtual red packet receiving request, security check can be carried out on the virtual red packet in the virtual red packet receiving request so as to judge whether the transfer of the virtual red packet is legal or not. The security check may include KYC check and AML check (Anti-Money landing). Multiple reviews are made of the account holders of the two parties involved in the virtual red envelope through KYC inspection to see the validity of the source of funds in the virtual red envelope. And judging whether the behavior of sending the virtual red envelope is money laundering behavior or not through AML check.
The currency of the virtual red packet imported into the user account of the user B is the currency supported by the user account; therefore, the user B can directly use the funds in the virtual red envelope without manually carrying out currency conversion; this ensures the availability of virtual red packs across currencies.
In practical application, the playing of the money between different currencies needs to be completed through a cross-border remittance channel; the virtual red envelope may thus comprise a cross-border virtual red envelope sent based on a cross-border money transfer channel. Thus, embodiments of the present disclosure may provide a solution for receiving and sending a virtual red envelope that supports transnational and transnational currencies in conjunction with a trans-border remittance, under which the currency of the virtual red envelope may be automatically converted to the currency used by the recipient. So that the receiving party can receive the virtual red packet to obtain the money of the currently used currency without manually converting the currency.
The present specification provides a virtual resource allocation method, which may be described below with reference to the example shown in fig. 3, and which may include the steps of:
step 310: receiving a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
step 320: responding to the virtual resource sending request, and acquiring a second resource type of the virtual resource in a resource pool in a second system from the second system corresponding to the second system address;
step 330: if the first resource type is not matched with the second resource type, converting the virtual resources of the first resource type with a first quantity provided by the first system into the virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
step 340: assembling the second quantity of virtual resources of the second resource type and the second system address into a new virtual resource sending request, and sending the new virtual resource sending request to a second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
As with the foregoing embodiment of fig. 1, the method shown in this embodiment may be applied to a distributed system, and both the first system and the second system may be systems in the distributed system. In a distributed system, the scheduling of virtual resources between different systems can be uniformly managed by a management server of the distributed system. In a distributed system, each system has a unique system address and can therefore route to the corresponding system based on the system address.
Specifically, when the first system sends the virtual resource in the local resource pool to the second system, the first system needs to assemble a virtual resource sending request. The virtual resource sending request comprises a first system address, a first number of virtual resources of a first resource type provided by the first system and a second system address.
The difference from the embodiment of fig. 1 is that, in this embodiment, the management server of the distributed system responds to the virtual resource sending request initiated by the first system, and routes to a second system in the distributed system based on the address of the second system; the virtual resource sending request is not directly sent to the second system, but the second resource type of the virtual resource in the resource pool in the second system is actively obtained from the second system.
Then the management server judges whether the first resource type contained in the virtual resource sending request is matched with the acquired second resource type; if the first resource type is not matched with the second resource type, converting the resources of the first resource type of the first quantity provided by the first system into the resources of the second resource type of the second quantity according to the conversion relation between the first resource type and the second resource type, and then reassembling a new virtual resource sending request and sending the request to the second system. After the second system triggers the new virtual resource sending request, the management server directly injects a second amount of virtual resources of the second resource type into the resource pool of the second system.
Because the resources allocated to the second system resource pool and the existing resources in the resource pool are of the second resource type, the second system can directly use the received resources without additional processing; therefore, the availability of the virtual resources is ensured, and the resource use efficiency is improved.
The virtual resource may include a task to be executed by each system in the distributed system. When the tasks to be executed by a certain system are excessive, part of the tasks to be executed can be sent to other systems so as to relieve the execution pressure of the system. Correspondingly, the resource pool may be a task pool local to each system, and is used for storing tasks to be executed.
The virtual resources may also include virtual computing resources and/or virtual storage resources of each system in the distributed system. In the distributed system, although each system has independent physical computing resources or physical storage resources, the physical computing resources or physical storage resources can be uniformly managed by the distributed management system, and respective virtual computing resources and/or virtual storage resources are reallocated for each system. That is, virtual computing resources and storage resources usable by the respective systems may be dynamically adjusted. Based on the virtual resource allocation method, virtual resources can be dynamically allocated among the systems according to the actual required resource amount of each system. For example, a first system with a large number of virtual computing resources may allocate excess virtual computing resources to a second system with a small number of virtual computing resources. A first system with a large amount of virtual memory resources may allocate excess virtual memory resources to a second system with a small amount of virtual memory resources.
In practical applications, in order to ensure the security of the system, security check needs to be performed on relevant information in the virtual resource sending request, such as a system address, a virtual resource, and the like. Only if the request passes the security check can the subsequent steps be continued. The security check may be a check commonly used in the industry, such as the KYC check (Know yourcustomer, fully aware of your customer).
The following exemplary introduces the security check content:
and checking whether the addresses of the first system and the second system in the virtual resource sending request are correct or not, and whether the addresses are correct or not is checked. If the address of any system is wrong, the request is not safe, but the safety check is not carried out.
It is checked whether a first amount of virtual resources provided by a first system in a virtual resource transmission request exceeds a remaining amount of virtual resources within a resource pool of the first system. If so, the request is not secure, but the security check is not passed.
It is checked whether a first amount of virtual resources provided by the first system in the virtual resource transmission request exceeds a preset threshold. If so, the request is not secure, but the security check is not passed. Wherein the preset threshold may be a preset empirical value. Or an optimal value calculated based on a machine learning algorithm or a big data technique.
Problems can be found in advance through security check, and allocation failure caused by abnormity in the process of virtual resource allocation is avoided.
The following describes the technical solution shown in steps 310-340 by taking the virtual resource as a "virtual red packet" as an example.
Of course, the example of the virtual resource being a "virtual red packet" is merely exemplary. In practical applications, the virtual resource may also be another virtual article capable of being distributed and transmitted on line besides the "virtual red packet": such as electronic coupons, electronic vouchers, electronic coupons, and the like.
Fig. 2 is a schematic view of a scene with the virtual resource as a "virtual red packet". In this example, the first system may refer to a client that sends a virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource types include currency; the resource pool includes user accounts.
As in the previous embodiment, the virtual red envelope may comprise a cross-border virtual red envelope sent based on a cross-border money transfer channel.
In an implementation, user a may send a virtual red envelope to client B through client a. Before sending, user a needs to determine a target user (i.e. user B in the example of fig. 2) that receives the virtual red envelope; a first currency of the virtual red envelope and a first amount of funds within the virtual red envelope are determined. The first currency type may be determined by the user a through manual selection, or may be determined by the client a automatically according to the usage habit of the user a. And the user A completes the payment of the virtual red envelope through the payment service provided by the service. Thereby sending a virtual red packet send request to user B. The virtual red packet send request carries a virtual red packet in a first currency of a first amount of funds, and the user B address.
And the server responds to the virtual red packet sending request, routes to the client B where the user B is located based on the address of the user B, and acquires a second currency used by the user account of the user B from the client B.
The server determines whether the first currency type and the second currency type match. If so, converting the virtual red envelope of the first currency of the first amount of funds to a virtual red envelope of the second currency of the second amount of funds in accordance with an exchange rate relationship between the first currency and the second currency.
Further, the server side assembles the virtual red packet of the second currency with the second fund amount and the user B address into a new virtual red packet sending request, and sends the new virtual red packet sending request to the user B address to be routed to the client side B where the user B is located.
And finally, after the user B triggers and receives a new virtual red packet sending request, the server end remits the virtual red packet of the second currency with the second fund amount into the user account of the user B.
The currency of the virtual red packet imported into the user account of the user B is the currency supported by the user account; therefore, the user B can directly use the funds in the virtual red envelope without currency conversion; this ensures the availability of virtual red packs across currencies.
In addition, when the server side responds to the virtual red packet sending request, security check can be carried out on the virtual red packet in the virtual red packet sending request so as to judge whether the transfer of the virtual red packet is legal or not. The security check may include KYC check and AML check (Anti-Money landing). Multiple reviews are made of the account holders of the two parties involved in the virtual red envelope through KYC inspection to see the validity of the source of funds in the virtual red envelope. And judging whether the behavior of sending the virtual red envelope is money laundering behavior or not through AML check. And under the condition that the virtual red packet sending request passes the security check, acquiring a second currency used by the user account of the user B from the client B.
Corresponding to the foregoing embodiments of the virtual resource allocation method, the present specification further provides embodiments of a virtual resource allocation apparatus. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer business program instructions in the nonvolatile memory into the memory for operation through the processor of the device in which the device is located. In terms of hardware, as shown in fig. 4, a hardware structure diagram of a device in which the virtual resource allocation apparatus is located in this specification is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 4, the device in which the apparatus is located in the embodiment may generally allocate an actual function according to the virtual resource, and may further include other hardware, which is not described again.
Referring to fig. 5, a block diagram of a virtual resource allocation apparatus according to an embodiment of the present disclosure is provided, where the apparatus corresponds to the embodiment shown in fig. 1, and the apparatus includes:
a receiving unit 410, which receives a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
a response unit 420, configured to determine whether the first resource type and the second resource type are matched in response to the virtual resource receiving request;
a converting unit 430, configured to convert, according to a conversion relationship between a first resource type and a second resource type, a first number of virtual resources of the first resource type provided by the first system into a second number of virtual resources of the second resource type if the first resource type does not match the second resource type;
the allocating unit 440 allocates the second amount of virtual resources of the second resource type to the resource pool of the second system.
Optionally, the response unit 410 specifically includes:
the checking subunit responds to the virtual resource receiving request and carries out security check on the virtual resource in the virtual resource receiving request;
and the judging subunit judges whether the first resource type is matched with the second resource type or not under the condition that the virtual resource in the virtual resource receiving request passes the security check.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
Referring to fig. 6, a block diagram of a virtual resource allocation apparatus according to an embodiment of the present disclosure is provided, where the apparatus corresponds to the embodiment shown in fig. 3, and the apparatus includes:
a receiving unit 510, configured to receive a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
a response unit 520, configured to, in response to the virtual resource sending request, obtain, from a second system corresponding to the second system address, a second resource type of a virtual resource in a resource pool in the second system;
a transforming unit 530, configured to transform a first amount of virtual resources of a first resource type provided by the first system into a second amount of virtual resources of a second resource type according to a transformation relationship between the first resource type and the second resource type if the first resource type does not match the second resource type;
the allocating unit 540 is configured to assemble the second number of virtual resources of the second resource type and the second system address into a new virtual resource sending request, and send the new virtual resource sending request to the second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
Optionally, the response unit 510 specifically includes:
a checking subunit, configured to perform security check on the virtual resource in the virtual resource sending request;
and the obtaining subunit is configured to, when the virtual resource in the virtual resource sending request passes the security check, obtain, from the second system corresponding to the second system address, the second resource type of the virtual resource in the resource pool in the second system.
Optionally, the virtual resource includes a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
Optionally, the virtual red envelope comprises a cross-border virtual red envelope sent based on a cross-border money transfer channel.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Fig. 5 and 6 above describe the internal functional modules and the structural schematic of the virtual resource allocation apparatus, and the substantial execution subject may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the virtual resource allocation method shown in any one of the foregoing fig. 1 and fig. 3.
In the above embodiments of the electronic device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in a hardware processor, or in a combination of the hardware and software modules of the processor.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiment of the electronic device, since it is substantially similar to the embodiment of the method, the description is simple, and for the relevant points, reference may be made to part of the description of the embodiment of the method.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements 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 description is limited only by the appended claims.

Claims (17)

1. A method of virtual resource allocation, the method comprising:
receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
responding to the virtual resource receiving request, and judging whether the first resource type is matched with the second resource type;
if the first resource type is not matched with the second resource type, converting the virtual resources of the first resource type with a first quantity provided by the first system into the virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
allocating the second number of virtual resources of the second resource type to a resource pool of the second system.
2. The method of claim 1, after the receiving a request in response to the virtual resource, the method further comprising:
performing security check on the virtual resource in the virtual resource receiving request;
the determining whether the first resource type matches the second resource type includes:
and under the condition that the virtual resource in the virtual resource receiving request passes the security check, judging whether the first resource type is matched with the second resource type.
3. The method of claim 1, the virtual resource comprising a virtual red envelope; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
4. The method of claim 3, the virtual red envelope comprising a cross-border virtual red envelope sent based on a cross-border money transfer channel.
5. A method of virtual resource allocation, the method comprising:
receiving a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
responding to the virtual resource sending request, and acquiring a second resource type of the virtual resource in a resource pool in a second system from the second system corresponding to the second system address;
if the first resource type is not matched with the second resource type, converting the virtual resources of the first resource type with a first quantity provided by the first system into the virtual resources of the second resource type with a second quantity according to the conversion relation between the first resource type and the second resource type;
assembling the second quantity of virtual resources of the second resource type and the second system address into a new virtual resource sending request, and sending the new virtual resource sending request to a second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
6. The method of claim 5, after the sending a request in response to the virtual resource, the method further comprising:
carrying out security check on the virtual resource in the virtual resource sending request;
the obtaining, from the second system corresponding to the second system address, the second resource type of the virtual resource in the resource pool in the second system includes:
and under the condition that the virtual resource in the virtual resource sending request passes the security check, acquiring a second resource type of the virtual resource in the resource pool in the second system from the second system corresponding to the second system address.
7. The method of claim 5, the virtual resource comprising a virtual red envelope; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
8. The method of claim 4, the virtual red envelope comprising a cross-border virtual red envelope sent based on a cross-border money transfer channel.
9. An apparatus for virtual resource allocation, the apparatus comprising:
the receiving unit is used for receiving a virtual resource receiving request initiated by a second system; the virtual resource receiving request comprises a first number of virtual resources of a first resource type provided by a first system and carried in a virtual resource sending request sent by the first system to a second system, and a second resource type of the virtual resources in a resource pool of the second system;
the response unit is used for responding to the virtual resource receiving request and judging whether the first resource type is matched with the second resource type;
a conversion unit, configured to convert, according to a conversion relationship between a first resource type and a second resource type, a first number of virtual resources of the first resource type provided by the first system into a second number of virtual resources of the second resource type if the first resource type does not match the second resource type;
and the allocation unit allocates the second quantity of virtual resources of the second resource type to the resource pool of the second system.
10. The apparatus according to claim 9, wherein the response unit specifically includes:
the checking subunit responds to the virtual resource receiving request and carries out security check on the virtual resource in the virtual resource receiving request;
and the judging subunit judges whether the first resource type is matched with the second resource type or not under the condition that the virtual resource in the virtual resource receiving request passes the security check.
11. The apparatus of claim 9, the virtual resource comprising a virtual red packet; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
12. The apparatus of claim 9, the virtual red envelope comprising a cross-border virtual red envelope sent based on a cross-border money transfer channel.
13. An apparatus for virtual resource allocation, the apparatus comprising:
the receiving unit is used for receiving a virtual resource sending request initiated by a first system; the virtual resource sending request carries a first number of virtual resources of a first resource type provided by the first system and a second system address for receiving the virtual resources;
the response unit is used for responding to the virtual resource sending request and acquiring a second resource type of the virtual resource in the resource pool in the second system from the second system corresponding to the second system address;
a conversion unit, configured to convert, according to a conversion relationship between a first resource type and a second resource type, a first number of virtual resources of the first resource type provided by the first system into a second number of virtual resources of the second resource type if the first resource type does not match the second resource type;
the allocation unit is used for assembling the second quantity of virtual resources of the second resource type and the second system address into a new virtual resource sending request and sending the new virtual resource sending request to a second system corresponding to the second system address; and allocating the second number of virtual resources of the second resource type to the resource pool of the second system after the second system triggers the new virtual resource sending request.
14. The apparatus according to claim 13, wherein the response unit specifically includes:
the checking subunit is used for responding to the virtual resource sending request and carrying out security check on the virtual resource in the virtual resource sending request;
and the obtaining subunit is configured to, when the virtual resource in the virtual resource sending request passes the security check, obtain, from the second system corresponding to the second system address, the second resource type of the virtual resource in the resource pool in the second system.
15. The apparatus of claim 13, the virtual resource comprising a virtual red envelope; the first system comprises a client side for sending the virtual red packet; the second system comprises a client for receiving the virtual red packet; the resource type includes a currency; the resource pool includes user accounts.
16. The apparatus of claim 3, the virtual red envelope comprising a cross-border virtual red envelope sent based on a cross-border money transfer channel.
17. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured as the method of any of the preceding claims 1-8.
CN202010444285.3A 2020-05-22 2020-05-22 Virtual resource allocation method and device and electronic equipment Pending CN111638954A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010444285.3A CN111638954A (en) 2020-05-22 2020-05-22 Virtual resource allocation method and device and electronic equipment
PCT/IB2021/054405 WO2021234648A1 (en) 2020-05-22 2021-05-21 Virtual resource allocation method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010444285.3A CN111638954A (en) 2020-05-22 2020-05-22 Virtual resource allocation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111638954A true CN111638954A (en) 2020-09-08

Family

ID=72330279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010444285.3A Pending CN111638954A (en) 2020-05-22 2020-05-22 Virtual resource allocation method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN111638954A (en)
WO (1) WO2021234648A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427473A (en) * 2011-11-28 2012-04-25 中国联合网络通信集团有限公司 Method and system for constructing cross-platform resource
CN106855828A (en) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 A kind of method for processing resource and device
CN108270773A (en) * 2017-12-22 2018-07-10 杭州顺网珑腾信息技术有限公司 A kind of processing system for being used to implement electronics red packet granting
CN109146437A (en) * 2018-07-25 2019-01-04 腾讯科技(深圳)有限公司 Processing method, client and the storage medium of virtual resource
CN109951374A (en) * 2019-02-22 2019-06-28 上海掌门科技有限公司 A kind of method and apparatus of virtual resource object distribution
CN110569127A (en) * 2019-09-10 2019-12-13 腾讯科技(深圳)有限公司 Virtual resource transferring, sending and acquiring method and device
CN110910109A (en) * 2019-11-25 2020-03-24 腾讯科技(深圳)有限公司 Electronic resource transfer method and device based on block chain
CN111028075A (en) * 2019-12-12 2020-04-17 腾讯科技(深圳)有限公司 Virtual resource transfer method, device and equipment
CN111027951A (en) * 2019-11-27 2020-04-17 腾讯科技(深圳)有限公司 Cross-domain virtual resource flow control method and device, electronic equipment and storage medium
CN111131420A (en) * 2019-12-12 2020-05-08 腾讯科技(深圳)有限公司 Electronic resource transfer method, device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9881336B2 (en) * 2010-03-25 2018-01-30 Leftovercash, Inc. Foreign currency exchange system and method
CN107784491A (en) * 2016-08-26 2018-03-09 财付通支付科技有限公司 Resource packet transmission method, distribution method, resource acquiring method and device
CN107767267B (en) * 2017-10-20 2021-04-02 上海策赢网络科技有限公司 Virtual resource transfer method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427473A (en) * 2011-11-28 2012-04-25 中国联合网络通信集团有限公司 Method and system for constructing cross-platform resource
CN106855828A (en) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 A kind of method for processing resource and device
CN108270773A (en) * 2017-12-22 2018-07-10 杭州顺网珑腾信息技术有限公司 A kind of processing system for being used to implement electronics red packet granting
CN109146437A (en) * 2018-07-25 2019-01-04 腾讯科技(深圳)有限公司 Processing method, client and the storage medium of virtual resource
CN109951374A (en) * 2019-02-22 2019-06-28 上海掌门科技有限公司 A kind of method and apparatus of virtual resource object distribution
CN110569127A (en) * 2019-09-10 2019-12-13 腾讯科技(深圳)有限公司 Virtual resource transferring, sending and acquiring method and device
CN110910109A (en) * 2019-11-25 2020-03-24 腾讯科技(深圳)有限公司 Electronic resource transfer method and device based on block chain
CN111027951A (en) * 2019-11-27 2020-04-17 腾讯科技(深圳)有限公司 Cross-domain virtual resource flow control method and device, electronic equipment and storage medium
CN111028075A (en) * 2019-12-12 2020-04-17 腾讯科技(深圳)有限公司 Virtual resource transfer method, device and equipment
CN111131420A (en) * 2019-12-12 2020-05-08 腾讯科技(深圳)有限公司 Electronic resource transfer method, device and storage medium

Also Published As

Publication number Publication date
WO2021234648A1 (en) 2021-11-25

Similar Documents

Publication Publication Date Title
CN108764868B (en) Block chain node proxy reconciliation method and block reconciliation proxy node
CN108921525B (en) Processing method and device for block chain red packet, electronic equipment and medium
WO2019019490A1 (en) Method and system for paying transaction cost in blockchain network
WO2019134543A1 (en) Method and apparatus for information transmission and electronic device
CN110020846B (en) Transfer service processing method and system
US20230088625A1 (en) Operation method of blockchain remittance service system, and electronic wallet for remittance
CN111092814B (en) Service handling request message distribution method and equipment
CN112633954B (en) Rights and interests processing method and device based on block chain
CN113762940A (en) Asset management method and device based on block chain and electronic equipment
US11461772B2 (en) Digital wallet conversion engine
CN111028075B (en) Virtual resource transfer method, device and equipment
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN111638954A (en) Virtual resource allocation method and device and electronic equipment
CN110111188A (en) Business handling method and apparatus
TW201624373A (en) Method and device for processing data service
CN111612608A (en) Remittance execution method and device and electronic equipment
US11227266B2 (en) Digital holding account
CN114116174A (en) Queuing management method and device
CN113312184A (en) Service data processing method and related equipment
CN108765138B (en) Object and fund transfer method and device
CN106130740B (en) Digital certificate synchronous method, digital signature server and digital certificate synchronization system
CN112734533A (en) Logistics rights and interests processing method and device for member user
CN112001800A (en) Method and device for processing service in block chain system
CN111640022A (en) Counter transaction authorization method, device and system
CN111127003B (en) Wallet account payment method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40036419

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240208

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Applicant after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: 45-01 Anson Building, 8 Shanton Avenue, Singapore

Applicant before: Alipay laboratories (Singapore) Ltd.

Country or region before: Singapore