Virtual resource processing method and device and storage medium
By locking the exchange rate on the virtual resource exchange platform and regularly updating the initial resource quantity, the problem of inefficiency in traditional foreign exchange forward transactions is solved, and a more efficient and convenient virtual resource exchange process is achieved.
Patent Information
- Application Number
- CN202411617920.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-18
AI Technical Summary
In traditional foreign exchange forward trading, it is difficult for traders to obtain exchange rates provided by different foreign exchange banks accurately and conveniently, resulting in inefficient trading.
By implementing a virtual resource processing method on the virtual resource redemption platform, lock the exchange rate when creating an order, regularly update the initial resource volume, avoid forward-term market risks, and perform virtual resource conversion processing on the target redemption date.
It improves the efficiency and convenience of virtual resource redemption, ensures real-time and accuracy of transactions, and effectively avoids the risks brought about by exchange rate fluctuations.
Smart Images

Figure CN119477314A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a virtual resource processing method, device and storage medium. Background Art
[0002] With the development of economic globalization, foreign exchange exchange has gradually become a daily means of transaction. In order to reduce the impact of exchange rate fluctuations on transactions, foreign exchange forward transactions are becoming more and more widely used. Foreign exchange forward transactions refer to foreign exchange transactions in which the two parties agree on the foreign exchange currency, amount, and exchange rate and settle on a certain agreed target date (more than two business days after the transaction date).
[0003] In traditional solutions, traders often need to go to offline banks to exchange foreign exchange. They cannot accurately and conveniently obtain the foreign exchange forward transaction rates provided by different foreign exchange banks, nor can they meet real-time needs, which affects traders' decisions and makes the foreign exchange exchange process inefficient.
[0004] Therefore, how to improve the efficiency and convenience of virtual resource exchange is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a virtual resource processing method, device and storage medium, which can improve the efficiency and convenience of virtual resource exchange.
[0006] On the one hand, an embodiment of the present application provides a virtual resource processing method, which is applied to a virtual resource exchange platform, and the method includes:
[0007] In response to a virtual resource exchange request of a target object, a first order is created; the first order includes a first resource type, an amount of virtual resources to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type;
[0008] Determine the initial resource amount according to the virtual resource amount to be exchanged and the preset coefficient ratio;
[0009] When receiving the initial resource amount transferred from the target account of the target object, determining that the first order is in a waiting for redemption state, and regularly updating the initial resource amount according to a preset time period to obtain a target initial resource amount;
[0010] updating the order status of the first order according to the target initial resource quantity and the initial resource quantity;
[0011] Obtain the order status corresponding to the target exchange date, and when the order status is still in the waiting exchange status, perform virtual resource conversion processing on the virtual resource amount to be exchanged according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and transfer the target virtual resource amount to the target account.
[0012] In an exemplary embodiment, the periodically updating the initial resource amount according to a preset time period to obtain a target initial resource amount includes:
[0013] According to the preset time period, regularly determining a first discount factor corresponding to the first resource type and a second discount factor corresponding to the second resource type;
[0014] determining a forward estimated exchange rate between the first resource type and the second resource type based on the first discount factor, the second discount factor, and a spot exchange rate;
[0015] Determining an estimation result of the first resource type based on the amount of virtual resources to be exchanged, the forward estimated exchange rate and the locked exchange rate;
[0016] The initial resource quantity is updated according to the estimation result to obtain the target initial resource quantity.
[0017] In an exemplary embodiment, determining a first discount factor corresponding to the first resource type includes:
[0018] Obtaining a correspondence table between the midpoint interest rate corresponding to the first resource type and the preset term;
[0019] According to the number of natural days between the current date and the target exchange date, based on the corresponding relationship table, determine the risk-free interest rate corresponding to the first resource type;
[0020] The first discount factor is determined according to the risk-free interest rate and interest calculation basis corresponding to the first resource type.
[0021] In an exemplary embodiment, the method further comprises:
[0022] Determining an occupation ratio according to a ratio between the estimation result and the initial resource amount;
[0023] When the occupancy ratio is greater than or equal to the first level warning ratio, a first warning message is issued;
[0024] When the occupancy ratio is less than the first level warning ratio and greater than or equal to the second level warning ratio, a second warning message is issued; the second level warning ratio is less than the first level warning ratio;
[0025] When the occupancy ratio is less than the second-level warning ratio and greater than or equal to the third-level warning ratio, a third warning message is issued; the third-level warning ratio is less than the second-level warning ratio.
[0026] In an exemplary embodiment, updating the order status of the first order according to the target initial resource quantity and the initial resource quantity includes:
[0027] When the target initial resource amount is greater than the initial resource amount, an initial resource amount recovery instruction is initiated to instruct the target object to confirm the transfer of the vacant resource amount from the target account to the virtual resource exchange platform; the vacant resource amount is the difference between the target initial resource amount and the initial resource amount;
[0028] When the vacant resource amount transferred from the target account is not received after a preset period, changing the order status to a default status;
[0029] When the vacant resource amount transferred from the target account is received within a preset period, the order status is maintained as a waiting for redemption status.
[0030] In an exemplary embodiment, when the order status is still the waiting exchange status, performing virtual resource conversion processing on the to-be-exchanged virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type includes:
[0031] If the order status is still the waiting-for-redemption status, scanning the total amount of resources of the first resource type in the target account;
[0032] Determine the remaining requested resource amount according to the target initial resource amount and the virtual resource amount to be exchanged;
[0033] When the total amount of resources is greater than or equal to the remaining requested amount of resources, performing virtual resource conversion processing on the to-be-exchanged virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type;
[0034] When the total amount of resources is less than the remaining requested amount of resources, the order status is changed to a default status.
[0035] In an exemplary embodiment, the method further comprises:
[0036] When the order status is the waiting-for-exchange status, in response to the target object's order cancellation request, performing order verification on the first order to obtain a verification result;
[0037] When the verification result indicates that the order verification has passed, the order status is changed to a default status.
[0038] In an exemplary embodiment, before responding to the virtual resource exchange request of the target object, the method further includes:
[0039] In response to the forward price inquiry request of the target object, obtaining the forward exchange rate provided by each resource management organization from the quotation center;
[0040] Based on the comparison result of the forward exchange rates provided by the resource management organizations, determine a target forward exchange rate from the forward exchange rates provided by the resource management organizations, and determine the locked exchange rate based on the target forward exchange rate;
[0041] The resource management organization corresponding to the target forward exchange rate is used as the target resource management organization.
[0042] In an exemplary embodiment, when receiving the initial amount of resources transferred from the target account of the target object, determining that the first order is in a waiting for redemption state includes:
[0043] When the initial resource amount transferred from the target account of the target object is received, a second order is created based on the first order; the second order includes the target resource management organization, the first resource type, the amount of virtual resources to be exchanged, the second resource type, the target exchange date and the target forward exchange rate;
[0044] Initiating a forward resource exchange request to the target resource management organization based on the second order;
[0045] After receiving the processing success notification fed back by the target resource management organization, the order status is determined as the waiting for redemption status.
[0046] In an exemplary embodiment, the method further comprises:
[0047] When it is detected that the order status changes to a default status, the current date is determined as the default date;
[0048] Initiate a reverse resource exchange request to the target resource management organization, and upon receiving a successful processing notification fed back by the target resource management organization, determine the reverse exchange rate corresponding to the default date;
[0049] determining the amount of lost resources according to the locked exchange rate and the reverse exchange rate;
[0050] Determining a returned resource amount based on the lost resource amount and the initial resource amount;
[0051] Return the returned resource amount to the target account.
[0052] On the other hand, the present application also provides a virtual resource processing device, which is applied to a virtual resource exchange platform, and the device includes:
[0053] A first order creation module is used to create a first order in response to a virtual resource exchange request of a target object; the first order includes a first resource type, an amount of virtual resources to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type;
[0054] An initial resource quantity determination module, used to determine the initial resource quantity according to the virtual resource quantity to be exchanged and a preset coefficient ratio;
[0055] a target initial resource amount determination module, configured to, upon receiving the initial resource amount transferred from the target account of the target object, determine that the first order is in a waiting-for-redemption state, and regularly update the initial resource amount according to a preset time period to obtain a target initial resource amount;
[0056] An order status updating module, configured to update the order status of the first order according to the target initial resource quantity and the initial resource quantity;
[0057] The target virtual resource exchange module is used to obtain the order status corresponding to the target exchange date, and when the order status is still the waiting exchange status, perform virtual resource conversion processing on the virtual resource to be exchanged according to the locked exchange rate, obtain the target virtual resource corresponding to the second resource type, and transfer the target virtual resource to the target account.
[0058] On the other hand, the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the virtual resource processing method as described above.
[0059] On the other hand, the present application also provides a computer storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the virtual resource processing method as described above.
[0060] On the other hand, the present application also provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the virtual resource processing method as described above.
[0061] The virtual resource processing method provided by this application has the following technical effects:
[0062] In the embodiment of the present application, by carrying the virtual resource processing method provided by the present application on the virtual resource exchange platform, the convenience of virtual resource exchange can be improved. By responding to the virtual resource exchange request of the target object, a first order is created; the initial resource amount is determined according to the virtual resource amount to be exchanged and the preset coefficient ratio; when the initial resource amount transferred from the target account of the target object is received, it is determined that the first order is in a waiting exchange state, and the initial resource amount is regularly updated according to the preset time period to obtain the target initial resource amount; according to the target initial resource amount and the initial resource amount, the order status of the first order is updated, so that during the existence of the first order, the forward duration market risk is effectively avoided, making the credit process more scientific and efficient; then on the target exchange date, the order status corresponding to the first order is obtained, and when the order status is still in the waiting exchange state, the virtual resource amount to be exchanged is processed according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and the target virtual resource amount is transferred to the target account, thereby improving the efficiency of virtual resource exchange. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 It is an application environment diagram of the virtual resource processing method provided in the embodiment of the present application.
[0065] Figure 2 It is a schematic diagram of the virtual resource processing flow provided in an embodiment of the present application.
[0066] Figure 3 It is a flowchart of determining the target initial resource quantity provided in an embodiment of the present application.
[0067] Figure 4 It is a flowchart of issuing warning information provided by an embodiment of the present application.
[0068] Figure 5 It is a flowchart of updating order status provided in an embodiment of the present application.
[0069] Figure 6 It is a flowchart of determining the target virtual resource amount on the target redemption date provided by an embodiment of the present application.
[0070] Figure 7 It is a flowchart of canceling an order provided in an embodiment of the present application.
[0071] Figure 8 It is a flowchart corresponding to the order default provided in the embodiment of the present application.
[0072] Fig. 9 It is a schematic diagram of the process architecture of the virtual resource exchange platform provided in the embodiment of the present application.
[0073] Fig.10 It is a structural diagram of a virtual resource processing device provided in an embodiment of the present application.
[0074] Fig.11 It is a hardware structure block diagram of a server of a virtual resource processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0076] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0077] Figure 1 : is an application environment diagram of the virtual resource processing method provided in the embodiment of the present application. Figure 1 As shown, the application environment may at least include a server 01 and a terminal 02 .
[0078] In an optional embodiment, server 01 can be used to perform exchange processing between virtual resources of different types. Server 01 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0079] In an optional embodiment, the terminal 02 can be used to initiate a resource exchange request to the server 01, and after the server 01 completes the processing, the virtual resource exchange result is displayed, including the resource volume of the target account used for the transaction. Specifically, the terminal 02 may include, but is not limited to, electronic devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, vehicle terminals, smart TVs, etc.; it may also be software running on the above electronic devices, such as applications, applets, etc. The operating system running on the electronic device in the embodiment of the present application may include, but is not limited to, Android system, IOS system, Linux, Windows, etc.
[0080] The following describes the application scenarios of the present application method. It usually takes a long time (possibly 30 to 90 days, or even longer) for importers and exporters to go from signing a sales contract to delivery and payment. During this period, changes in exchange rates may cause losses to importers and exporters. In addition to the above application scenarios, the present application method can also be applied to scenarios such as investment, foreign exchange position balance, and resource liquidity management to reduce the uncertainty and risks brought about by exchange rate changes.
[0081] Figure 2 It is a schematic diagram of the virtual resource processing flow provided in an embodiment of the present application. Figure 2 The method described can be applied to a virtual resource exchange platform, which can realize foreign exchange forward transactions.
[0082] S201: creating a first order in response to a virtual resource exchange request of a target object;
[0083] The first order includes a first resource type, a virtual resource quantity to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type.
[0084] The target object is a user who needs to conduct forward currency exchange. The target object can initiate a virtual resource exchange request based on the virtual resource exchange platform, and the request carries the first resource type, the amount of virtual resources to be exchanged, the second resource type, the target exchange date, and the locked exchange rate. The virtual resource exchange platform creates a first order based on the received virtual resource exchange request, wherein the first order also includes information such as the first resource type, the amount of virtual resources to be exchanged, the second resource type, the target exchange date, and the locked exchange rate.
[0085] The first resource type is the virtual resource type to be exchanged, that is, the selling currency; the amount of virtual resources to be exchanged is the transaction amount corresponding to the first resource type, that is, the selling amount of the selling currency; the second resource type is the target virtual resource type, that is, the buying currency.
[0086] In order to avoid the impact of exchange rate fluctuations, the two parties to the transaction can usually agree to exchange currencies at an agreed exchange rate on a specific date in the future, effectively avoiding the uncertainty risks caused by exchange rate fluctuations. The agreed exchange rate here is the locked exchange rate, which represents the exchange relationship between the first resource type and the second resource type when exchanging on that specific date.
[0087] In an example, assuming that the current date when the target object initiates a virtual resource exchange request is September 24, 2024, the first resource type recorded in the first order is A, the amount of virtual resources to be exchanged is 10,000, the target exchange date is March 24, 2025, the second resource type is B, and the locked exchange rate is 7.1, then the first order determined based on the above information indicates that on March 24, 2025, according to the locked exchange rate, 10,000 of currency A will be exchanged for 71,000 of currency B, instead of converting currencies according to the exchange rate on March 24, 2025 (for example, 6.9), thereby avoiding the uncertainty and risks caused by exchange rate fluctuations. It should be understood that the above values are only examples, and this application does not limit the initiation time of the virtual resource exchange request and the specific values of the information in the first order.
[0088] S203: Determine the initial resource amount according to the virtual resource amount to be exchanged and the preset coefficient ratio;
[0089] The preset coefficient ratio is determined according to the type of virtual resources to be exchanged, that is, the first resource type, and the natural day difference between the target exchange date and the current date. In one example, when the natural day difference is within one month, when the first resource type is A1, the corresponding preset coefficient ratio is 3%, and when the first resource type is A2, the corresponding preset coefficient ratio is 5%; when the natural day difference exceeds one month, when the first resource type is A1, the corresponding preset coefficient ratio is 5%, and when the first resource type is A2, the corresponding preset coefficient ratio is 8%. It should be understood that the above values are only examples, and the present application does not limit the specific values of the preset coefficient ratio.
[0090] The initial resource amount can be obtained by multiplying the virtual resource amount to be exchanged by the preset coefficient ratio, and the initial resource amount is used for credit granting after the first order is created. In an example, when the virtual resource amount to be exchanged is 10,000 and the preset coefficient ratio is 3%, the initial resource amount is 300. It should be understood that the above values are only examples, and this application does not limit the specific values of the initial resource amount.
[0091] S205: When receiving the initial resource amount transferred from the target account of the target object, determining that the first order is in a waiting for redemption state, and regularly updating the initial resource amount according to a preset time period to obtain a target initial resource amount;
[0092] When the initial amount of resources transferred from the target account is successfully received, the credit is confirmed to be successful, and the exchange contract has been reached between the virtual resource exchange platform and the target object. Therefore, the first order status is set to the waiting exchange status, so that the virtual resources can be exchanged at the locked exchange rate on the target exchange date.
[0093] In one implementation, the first order may be stored in a database to facilitate subsequent order verification.
[0094] However, during the period when the first order is waiting for redemption, as the contract term increases, the possibility of exchange rate fluctuations also increases. Therefore, in order to avoid the market risk of the forward duration, this application regularly values the first resource type and the second resource type in the first order, thereby updating the initial resource quantity and obtaining the target initial resource quantity for credit granting again.
[0095] S207: updating the order status of the first order according to the target initial resource quantity and the initial resource quantity;
[0096] According to the relationship between the target initial resource volume and the initial resource volume, it can be determined whether it is necessary to initiate an initial resource volume recovery instruction to the target account, so as to re-credit the target account. According to the feedback result of the recovery instruction received, it can be determined again whether the order status of the first order is waiting for redemption or default, so as to update the order status of the first order and update the data of the first order in the database at the same time.
[0097] S209: Obtain the order status corresponding to the target exchange date, and when the order status is still the waiting exchange status, perform virtual resource conversion processing on the virtual resource amount to be exchanged according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and transfer the target virtual resource amount to the target account.
[0098] When the target exchange date is reached, the order status of the first order at this time is obtained to determine whether it is in the waiting exchange state. If so, the virtual resource amount can be converted according to the locked exchange rate and the amount of virtual resources to be exchanged. Still taking the example in step S201 as an example, when it reaches March 24, 2025, the currency exchange is performed according to the locked exchange rate of 7.1 instead of the exchange rate on March 24, 2025 (for example, 6.9). Specifically, the virtual resource exchange platform exchanges currency A with an amount of 10,000 for currency B with an amount of 71,000. Since the target initial resource amount has been transferred from the target account in step S207, it is only necessary to transfer the remaining virtual resource amount to be exchanged after deducting the target initial resource amount from the target account at this time, and transfer the target virtual resource amount corresponding to the second resource type to the target account, thereby completing the virtual resource exchange (forward currency exchange).
[0099] In the embodiment of the present application, by carrying the virtual resource processing method provided by the present application on the virtual resource exchange platform, the convenience of virtual resource exchange can be improved. By responding to the virtual resource exchange request of the target object, a first order is created; the initial resource amount is determined according to the virtual resource amount to be exchanged and the preset coefficient ratio; when the initial resource amount transferred from the target account of the target object is received, it is determined that the first order is in a waiting exchange state, and the initial resource amount is regularly updated according to the preset time period to obtain the target initial resource amount; according to the target initial resource amount and the initial resource amount, the order status of the first order is updated, so that during the existence of the first order, the forward duration market risk is effectively avoided, making the credit process more scientific and efficient; then on the target exchange date, the order status corresponding to the first order is obtained, and when the order status is still in the waiting exchange state, the virtual resource amount to be exchanged is processed according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and the target virtual resource amount is transferred to the target account, thereby improving the efficiency of virtual resource exchange.
[0100] In one embodiment, before responding to the virtual resource exchange request of the target object, the virtual resource processing method provided by the present application also includes: responding to the forward inquiry request of the target object, obtaining the forward exchange rates provided by each resource management organization from the quotation center; based on the comparison results of the forward exchange rates provided by each resource management organization, determining the target forward exchange rate from the forward exchange rates provided by each resource management organization, and determining the locked exchange rate based on the target forward exchange rate; and taking the resource management organization corresponding to the target forward exchange rate as the target resource management organization.
[0101] Resource management organizations in different countries and different resource management organizations in the same country often provide different forward exchange rates for virtual resource exchange; resource management organizations can be banking institutions, etc. In order to further ensure the benefits of virtual resource exchange and improve the benefits of the virtual resource exchange process, the forward exchange rates provided by each resource management organization can be compared to obtain a relationship comparison result, which can include forward exchange rates arranged in ascending or descending order. Then, the best forward exchange rate is selected from the sorted forward exchange rate queue as the target forward exchange rate; at the same time, the target forward exchange rate is provided to the target object as the locked exchange rate. If the locked exchange rate meets the expectations of the target object, the target object will initiate an exchange request according to the demand, thereby improving the efficiency of the target resource management organization, and quickly determining the best forward exchange rate for virtual resource exchange, which can maximize the target resources and improve the benefits of the resource exchange process.
[0102] In one embodiment, when the initial amount of resources transferred from the target account of the target object is received, determining that the first order is in a waiting for redemption state includes: when the initial amount of resources transferred from the target account of the target object is received, creating a second order based on the first order; the second order includes the target resource management organization, the first resource type, the amount of virtual resources to be redeemed, the second resource type, the target redemption date and the target forward exchange rate; initiating a forward resource redemption request to the target resource management organization based on the second order; after receiving a successful processing notification fed back by the target resource management organization, determining the order status as the waiting for redemption status.
[0103] When the initial amount of resources transferred from the target account of the target object is received, it can be determined that the first order is successfully credited, and the virtual resource exchange platform will create a second order based on the first order; further, for the virtual resource exchange platform in this application, the transaction between the target object and the virtual resource exchange platform is an internal exchange transaction; the transaction between the virtual resource exchange platform and the resource management organization is an external exchange transaction, and the second order contains the first resource type, the amount of virtual resources to be exchanged, the second resource type, the target exchange date and other information in the first order, and on this basis, it also contains the target resource management organization, the target forward exchange rate and other information. After the virtual resource exchange platform receives the processing success notification fed back by the target resource management organization, it can be determined that the first order and the second order corresponding to the first order are both in a waiting exchange state. The target object no longer needs to go offline to the resource management organization to inquire about the forward exchange rate, which realizes the convenience and real-time management of virtual resource exchange.
[0104] Figure 3 It is a flowchart of determining the target initial resource quantity provided in an embodiment of the present application.
[0105] like Figure 3 As shown, the periodic updating of the initial resource amount according to a preset time period to obtain a target initial resource amount may include:
[0106] S301: regularly determining a first discount factor corresponding to the first resource type and a second discount factor corresponding to the second resource type according to the preset time period;
[0107] In one implementation, the preset time period may be every day, that is, at a preset time every day, the first discount factor corresponding to the first resource type and the second discount factor corresponding to the second resource type are regularly determined.
[0108] Among them, determining the first discount factor corresponding to the first resource type may include: obtaining a correspondence table between the interest rate mid-price corresponding to the first resource type and the preset term; determining the risk-free interest rate corresponding to the first resource type based on the correspondence table according to the number of natural days between the current date and the target redemption date; determining the first discount factor according to the risk-free interest rate and interest calculation basis corresponding to the first resource type.
[0109] The interest rate midpoint corresponding to the first resource type is the average of the buying rate and the selling rate of the first resource type. The interest rate midpoint varies according to the term. The term here means the number of days between the valuation date and the exchange date. In an example, Table 1 is a table of the correspondence between the interest rate midpoint of the first resource type and the preset term.
[0110] Table 1
[0111] the term Days Interest rate midpoint Calculation composition 1 week 7 1.3021% 7*1 2 weeks 14 1.4007% 14*1 January 30 1.6031% 30*1 March 90 1.7054% 30*3 June 180 1.9711% 30*6 1 year 365 2.3012% 365*1
[0112] As shown in Table 1, the midpoint interest rate is the risk-free interest rate; when the preset term is 1 week, the midpoint interest rate is 1.3021%; when the preset term is 1 month, the midpoint interest rate is 1.6031%, ..., it can be seen that when the term changes, the midpoint interest rate corresponding to the same resource type also changes.
[0113] If the number of natural days between the current date of the valuation date and the target exchange date is not 1 week, 2 weeks, etc., which can be directly looked up in the correspondence table, linear interpolation can be performed based on the correspondence table to obtain the risk-free interest rate of the first resource type.
[0114] For example, if the number of natural days between the current date of the valuation date and the target exchange date is 25 days, since 25 days is between 2 weeks and 1 month, the risk-free interest rate corresponding to a term of 25 days can be calculated according to the formula 1.4007+(25-14)*(1.6031-1.4007) / (30-14). In addition, it should be noted that if the number of natural days between the current date of the valuation date and the target exchange date is less than the minimum term in the corresponding relationship table, the interest rate midpoint corresponding to the minimum term is taken as the risk-free interest rate; if the number of natural days between the current date of the valuation date and the target exchange date is greater than the maximum term in the corresponding relationship table, the interest rate midpoint corresponding to the maximum term is taken as the risk-free interest rate.
[0115] The discount factor is used to represent the ratio of future cash flows discounted to current value. The first discount factor can be determined based on the risk-free interest rate and the interest calculation basis. Specifically, when the interest calculation basis is ACT / 365, the first discount factor can be determined by the following formula:
[0116]
[0117] Among them, D x2 (T x2 ) represents the first discount factor, t 目标 represents the target redemption date, t 当前 represents the current date, and r represents the risk-free interest rate.
[0118] When the interest calculation basis is ACT / 360, the first discount factor can be determined by the following formula:
[0119]
[0120] Among them, D x2 (T x2 ) represents the first discount factor, t 目标 represents the target redemption date, t 当前 represents the current date, and r represents the risk-free interest rate.
[0121] It should be understood that the process of determining the second discount factor is similar to the process of determining the first discount factor, which will not be described in detail here.
[0122] The above method can accurately and quickly determine the discount factor, so as to facilitate the subsequent valuation of the first resource type and the second resource type.
[0123] S303: Determine a forward estimated exchange rate between the first resource type and the second resource type based on the first discount factor, the second discount factor and the spot exchange rate;
[0124] In one implementation, the forward estimated exchange rate may be determined according to the following formula:
[0125] F x2 / x1 =S x2 / x1 *D x2 (T x2 ) / D x1 (T x1 )
[0126] Among them, F x2 / x1 represents the estimated forward exchange rate, S x2 / x1 represents the spot exchange rate, D x2 (T x2 ) represents the first discount factor of the first resource type, D x1 (T x1 ) represents a second discount factor for a second resource type.
[0127] S305: Determine an estimation result of the first resource type based on the amount of virtual resources to be exchanged, the forward estimated exchange rate and the locked exchange rate;
[0128] The estimation result can be used to describe the value of the first resource type; when the first resource type is the base currency, the estimation result of the first resource type can be determined by the following formula:
[0129] V=-1*L*(F x2 / x1 -K)*D x1 (T x1 ) / S x2 / x1
[0130] Among them, V represents the estimation result, F x2 / x1 represents the forward estimated exchange rate, K represents the locked exchange rate, and D x1 (T x1 ) represents the second discount factor, S x2 / x1 represents the spot exchange rate, and L represents the amount of virtual resources to be exchanged.
[0131] When the first resource type is a non-base currency, the estimation result of the first resource type can be determined by the following formula:
[0132] V=L*(F x2 / x1 -K)*D x1 (T x1 )
[0133] Among them, V represents the estimation result, F x2 / x1 represents the forward estimated exchange rate, K represents the locked exchange rate, and D x1 (T x1 ) represents the second discount factor, and L represents the amount of virtual resources to be exchanged.
[0134] S307: Update the initial resource amount according to the estimation result to obtain the target initial resource amount.
[0135] If the forward estimated exchange rate is higher than the locked exchange rate, then the estimated result of the first resource type is a negative number. At this time, it is necessary to update the initial resource quantity and initiate an initial resource quantity recovery instruction to the target account.
[0136] In an example, assuming that the first resource type is A, the second resource type is B, and the locked exchange rate between the AB currencies is 7.0; the amount of virtual resources to be exchanged is 10,000; assuming that the initial resource amount is 1,000; on a valuation date, assuming that the spot exchange rate of the AB currency pair is 7.2, then according to the above valuation formula, the valuation of the first resource type is a negative number -200, and the initial resource amount is updated at this time, and the target initial resource amount is determined to be 1,200 according to the estimation result.
[0137] In the embodiment of the present application, the first resource type is valued by periodically obtaining a discount factor and a spot exchange rate, thereby updating the target initial resource quantity, avoiding the virtual resource exchange risk caused by exchange rate fluctuations, and improving the credibility of virtual resource exchange.
[0138] Figure 4 Schematic diagram of the process of issuing warning information provided by the embodiment of the present application. Figure 4 As shown, the method provided by the present application also includes:
[0139] S401: Determine an occupation ratio according to a ratio between the estimation result and the initial resource amount;
[0140] In one embodiment, it is first determined whether the estimation result of the first resource type is a negative number. If it is a negative number, the occupancy ratio is the absolute value of the ratio between the estimation result and the initial resource amount, that is, the occupancy ratio is numerically equal to (-1)*estimation result*initial resource amount*100%; if it is a positive number, the occupancy ratio is determined to be 0.
[0141] S403: When the occupancy ratio is greater than or equal to the first level warning ratio, issuing a first warning message;
[0142] S405: When the occupancy ratio is less than the first level warning ratio and greater than or equal to the second level warning ratio, issuing a second warning message; the second level warning ratio is less than the first level warning ratio;
[0143] S407: When the occupancy ratio is less than the second-level warning ratio and greater than or equal to the third-level warning ratio, a third warning message is issued; the third-level warning ratio is less than the second-level warning ratio.
[0144] The first level warning ratio indicates the asset loss warning ratio. In one example, the first level warning ratio can be set to 100%. The second level warning ratio indicates the forced liquidation warning ratio. In one example, the second level warning ratio can be set to 80%. The third level warning ratio indicates the general warning ratio. In one example, the third level warning ratio can be set to 50%. When the occupancy ratio is less than the third level warning ratio, no warning information is issued.
[0145] In an embodiment of the present application, by determining the occupancy ratio and issuing a warning message of the corresponding level, the associated business system is notified of the value change of the initial resource amount that has been transferred out, so that the target object can pay attention to the exchange rate changes in a timely manner and make corresponding decisions in a timely manner, such as determining whether to continue to transfer the target initial resource amount or whether to continue to maintain the first order, etc., to avoid losses caused by untimely acquisition of information.
[0146] Figure 5 is a flow chart of updating order status provided by the embodiment of the present application. Figure 5 As shown, updating the order status of the first order according to the target initial resource quantity and the initial resource quantity includes:
[0147] S501: When the target initial resource amount is greater than the initial resource amount, initiating an initial resource amount recovery instruction to instruct the target object to confirm transferring the vacant resource amount from the target account to the virtual resource exchange platform; the vacant resource amount is the difference between the target initial resource amount and the initial resource amount;
[0148] In one example, assuming that Figure 3 The target initial resource volume determined by the method shown is 1200, while the initial resource volume is 1000, and the vacant resource volume is 200. If the target initial resource volume is greater than the initial resource volume, it means that the initial resource volume is insufficient for credit and needs to be recovered. In this case, the virtual resource exchange platform sends an initial resource volume recovery instruction to the target account, which includes the order ID of the first order, the account ID of the target account, the initial resource volume, the vacant resource volume, the first resource type and other information, so as to facilitate order verification and ensure the security of recovery.
[0149] S503: When the vacant resource amount transferred from the target account is not received after a preset period, changing the order status to a default status;
[0150] If the vacant resource amount transferred from the target account is not received after the preset period, it is determined that the initial resource amount recovery has failed, and the first order will be cancelled due to insufficient initial resource amount. At this time, the order status of the first order is changed to default status.
[0151] It should be noted that the preset period can be set according to actual needs, such as 12 hours.
[0152] By automatically setting the first order to a default status when the initial resource recovery fails, the order status is updated in a timely manner to facilitate the subsequent default handling process, thereby reducing manual operations.
[0153] S505: When the vacant resource amount transferred from the target account is received within a preset period, the order status is maintained as a waiting for redemption status.
[0154] When the amount of unused resources transferred from the target account is received within the preset period, the first order can continue to be maintained in the waiting exchange state. In addition, the target initial resource amount is used as the initial resource amount of the first order to facilitate comparison with subsequent valuations and to facilitate determination of the amount of the first resource type that needs to be transferred from the target account during subsequent exchange.
[0155] In an embodiment of the present application, by comparing the initial resource amount with the target resource amount, it is determined whether to initiate an initial resource amount recovery instruction, and based on the execution result of the recovery instruction, the order status of the first order is determined, thereby ensuring that the first order can continue until the target redemption date, thereby improving the convenience and security of virtual resource redemption.
[0156] Figure 6 1 is a flow chart of determining the target virtual resource amount on the target exchange date provided by an embodiment of the present application. Figure 6 As shown, when the order status is still the waiting exchange status, the virtual resource amount to be exchanged is converted into virtual resources according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, including:
[0157] S601: If the order status is still in the waiting for redemption status, scan the total amount of resources of the first resource type in the target account;
[0158] S603: Determine the remaining requested resource amount according to the target initial resource amount and the virtual resource amount to be exchanged;
[0159] The remaining requested resource amount is the difference between the virtual resource amount to be exchanged and the target initial resource amount.
[0160] S605: When the total amount of resources is greater than or equal to the remaining requested amount of resources, performing virtual resource conversion processing on the to-be-exchanged virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type;
[0161] S607: When the total amount of resources is less than the remaining requested amount of resources, the order status is changed to a default status.
[0162] When the target exchange date is reached, first determine whether the first order is valid based on the order status. If the order status is not waiting for the exchange status, the virtual resources can be automatically exchanged. Specifically, the total amount of resources of the first resource type can be obtained by scanning the target account. Since the initial amount of resources transferred into the target account and the target initial amount of resources to be collected later have been received after the first order is created, when exchanging virtual resources on the target exchange date, it is only necessary to transfer the remaining requested amount of resources from the target account, so that the total value can reach the amount of virtual resources to be exchanged, so that the normal exchange process can be carried out, that is, the virtual resources to be exchanged are converted according to the locked exchange rate, and the target virtual resources corresponding to the second resource type are obtained, and the target virtual resources are transferred to the target account. If the total amount of resources is less than the remaining requested amount of resources, it can be determined that the first resource type in the target account is insufficient, and the virtual resources cannot be exchanged according to the record of the first order. At this time, the order status of the first order is changed to a default state.
[0163] In the embodiment of the present application, by comparing the remaining requested resource amount with the total resource amount in the scanned target account on the target exchange date, the exchange of virtual resources is automatically realized, which improves the convenience of virtual resource exchange and the efficiency of virtual resource exchange. When the total resource amount is insufficient, the first order is automatically set to a default state, and the order status is updated in time to facilitate the subsequent default processing process, reducing manual operations.
[0164] Figure 7 Schematic diagram of the process of canceling an order provided in the embodiment of the present application. Figure 7 As shown, the virtual resource processing method provided by the present application also includes:
[0165] S701: When the order status is the waiting-for-exchange status, in response to the target object's order cancellation request, perform order verification on the first order to obtain a verification result;
[0166] S703: When the verification result indicates that the order verification has passed, the order status is changed to a default status.
[0167] In an embodiment of the present application, the target object can make corresponding decisions on the first order in the existence period according to the change in exchange rate, such as canceling the first order. In response to the request to cancel the order, in an embodiment of the present application, the first order is verified to obtain a verification result. Specifically, the order verification can be performed on the order identification, the amount of virtual resources to be exchanged, the first resource type, the second resource type and other fields of the first order to determine whether they are the same as the data of the first order pre-stored in the database. If they are the same, the order verification passes, and the order status of the first order is updated to a default status. Through the embodiment of the present application, it is possible to facilitate the subsequent default process processing and improve the security of virtual resource exchange.
[0168] Figure 8 This is a flow chart of the corresponding order default provided by the embodiment of the present application. Figure 8 As shown, the virtual resource processing method provided by the present application also includes:
[0169] S801: when it is detected that the order status is changed to a default status, the current date is determined as the default date;
[0170] There are three situations in which the order status is changed to the default status. 1. The initial resource amount recovery fails; 2. The target redemption date is reached, but the total resource amount of the first resource type in the target account is insufficient; 3. The target object actively initiates the order cancellation operation. The current date when these three situations occur is determined as the default date.
[0171] S803: Initiate a reverse resource exchange request to the target resource management organization, and upon receiving a processing success notification fed back by the target resource management organization, determine a reverse exchange rate corresponding to the default date;
[0172] The reverse resource exchange request corresponds to the forward resource exchange request, and includes information such as the first resource type, the second resource type, the amount of virtual resources to be exchanged, and the locked exchange rate to instruct the target resource management organization to terminate the second order. Upon receiving the successful processing notification from the target resource management organization, the reverse exchange rate corresponding to the default date can be determined. The reverse exchange rate can be determined based on the spot exchange rate.
[0173] S805: Determine the amount of lost resources according to the locked exchange rate and the reverse exchange rate;
[0174] In one example, the amount of lost resources can be determined by:
[0175] SS=L*(1-K / J)
[0176] Among them, SS represents the amount of lost resources, K represents the locked exchange rate, J represents the reverse exchange rate, and L represents the amount of virtual resources to be exchanged. In an example, assuming that the first resource type is A, the second resource type is B, the locked exchange rate is 6.7, and the amount of virtual resources to be exchanged is 50,000; if the reverse exchange rate on the default date is 6.8, the amount of lost resources is 50,000*(1-6.7 / 6.8), which is numerically equal to 735.29.
[0177] S807: Determine the amount of returned resources based on the lost resource amount and the initial resource amount;
[0178] The returned resource volume can be the difference between the lost resource volume and the initial resource volume.
[0179] S809: Return the returned resource amount to the target account.
[0180] In the embodiment of the present application, by determining the amount of lost resources and the amount of returned resources when the order status is a default state, default handling is achieved in various situations, and the virtual resource exchange transactions corresponding to the first order and the second order are terminated in a timely manner, making resource management more convenient and efficient.
[0181] Fig. 9 It is a schematic diagram of the process architecture of the virtual resource exchange platform provided in the embodiment of the present application.
[0182] like Fig. 9 As shown, the virtual resource processing method provided by the present application can be applied to a virtual resource exchange platform. Taking the virtual resource exchange platform 900 as an example, the virtual resource exchange platform 900 may include a front desk 910, a back desk 920, and a valuation system 930. The front desk 910 is used to interact with the user, the back desk 920 is used to perform virtual resource exchange processing, and the valuation system 930 is used to value the virtual resources. It should be noted that the valuation system 930 can also be integrated inside the back desk 920. The following is a description of the processing flow of the virtual resource processing method provided by the present application in conjunction with the virtual resource exchange platform 900. First, the user initiates a forward price inquiry request to the front desk 910. After receiving the request, the front desk 910 forwards the forward price inquiry request to the quotation center 940, and the quotation center 940 returns the forward price. It should be noted that the forward price inquiry request includes not only the resource type (first resource type) to be exchanged by the user, the resource type (second resource type) to be obtained by the exchange, and the amount of resources to be exchanged corresponding to the first resource type, but also a future date (target exchange date) that the user expects to exchange. The front desk 910 can display the obtained forward price to the user. For example, M and N are different resource types, and the obtained forward price is that 1M can be exchanged for 7N on the target exchange date.
[0183] When the user is satisfied with the price, a forward transaction can be initiated at the foreground 910 based on the price. After receiving the transaction request, the background 920 creates a customer order and calculates the margin for credit. Then the background 920 creates an external order based on the customer order, and initiates a forward transaction to the bank channel 950 according to the external order; when the background 920 receives the transaction result feedback notification from the bank channel 950, it can be determined that the order is reached, and the information that the user successfully purchased is displayed at the foreground 910. It should be noted that the customer order is a virtual resource exchange order between the user and the virtual resource exchange platform 900, and the external order is a resource exchange order between the virtual resource exchange platform 900 and the resource management organization (i.e., the bank channel). Since the target exchange date is agreed upon, the order is not immediately redeemed. During the order period, the valuation system 930 regularly re-estimates the margin and calculates whether it is necessary to initiate a margin recovery to the user for further credit, thereby avoiding the risk of large exchange rate fluctuations during the order period.
[0184] In addition, the virtual resource exchange platform can also implement submission exchange or extension operations, and realize early or delayed exchange settlement. Users can perform early exchange or extension operations for all or part of the virtual resources to be exchanged, which improves the flexibility of virtual resource exchange.
[0185] The method of the embodiment of the present application enables users to obtain forward exchange information of virtual resource quantities in real time, so that users can quickly and easily understand market dynamics, efficiently provide decision-making basis, reduce the risks brought by information asymmetry, and help traders make more wise trading decisions. Virtual resource exchange based on the virtual resource exchange platform equipped with the virtual resource processing method described in the present invention can reduce the restrictions on resource exchange by time, region and currency, and improve the convenience and efficiency of resource exchange.
[0186] It can be seen from the technical solutions provided by the above embodiments of the present application that the method provided by the present application allows traders to exchange currencies at an agreed exchange rate on a specific date in the future, thereby locking the exchange rate, effectively avoiding the uncertainty risk caused by exchange rate fluctuations, and traders conduct forward transactions according to their own needs, thereby meeting personalized risk management needs and having greater flexibility. Through foreign exchange forward transactions, investors can build hedging strategies to reduce the negative impact caused by exchange rate fluctuations. For example, export companies can use foreign exchange forward contracts to lock in the foreign exchange rate of export revenue to prevent a reduction in revenue caused by a fall in the exchange rate. In addition, by planning in advance and arranging the use of funds reasonably, the efficiency of fund utilization is improved. At the same time, due to the locking of the forward exchange relationship, users can more accurately predict future costs or benefits.
[0187] Fig.10 It is a structural diagram of a virtual resource processing device provided in an embodiment of the present application.
[0188] like Fig.10 As shown, the device 1000 can be applied to a virtual resource exchange platform, including:
[0189] The first order creation module 1001 is used to create a first order in response to a virtual resource exchange request of a target object; the first order includes a first resource type, an amount of virtual resources to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type;
[0190] An initial resource quantity determination module 1002 is used to determine the initial resource quantity according to the virtual resource quantity to be exchanged and a preset coefficient ratio;
[0191] The target initial resource amount determination module 1003 is used to determine that the first order is in a waiting for redemption state when receiving the initial resource amount transferred from the target account of the target object, and regularly update the initial resource amount according to a preset time period to obtain the target initial resource amount;
[0192] An order status updating module 1004, configured to update the order status of the first order according to the target initial resource quantity and the initial resource quantity;
[0193] The target virtual resource exchange module 1005 is used to obtain the order status corresponding to the target exchange date, and when the order status is still the waiting exchange status, perform virtual resource conversion processing on the virtual resource to be exchanged according to the locked exchange rate, obtain the target virtual resource corresponding to the second resource type, and transfer the target virtual resource to the target account.
[0194] In some embodiments, the target initial resource amount determination module may include:
[0195] a discount factor determination submodule, configured to periodically determine a first discount factor corresponding to the first resource type and a second discount factor corresponding to the second resource type according to the preset time period;
[0196] a forward estimated exchange rate determination submodule, configured to determine a forward estimated exchange rate between the first resource type and the second resource type based on the first discount factor, the second discount factor and the spot exchange rate;
[0197] An estimation result determination submodule, configured to determine an estimation result of the first resource type based on the amount of virtual resources to be exchanged, the forward estimated exchange rate and the locked exchange rate;
[0198] The initial resource quantity updating submodule is used to update the initial resource quantity according to the estimation result to obtain the target initial resource quantity.
[0199] In some embodiments, the discount factor determination submodule may include:
[0200] A relationship table acquisition unit, used to acquire a corresponding relationship table between the interest rate midpoint corresponding to the first resource type and the preset term;
[0201] a risk-free interest rate determination unit, configured to determine the risk-free interest rate corresponding to the first resource type based on the correspondence table according to the number of natural days between the current date and the target exchange date;
[0202] The first discount factor determination unit is used to determine the first discount factor according to the risk-free interest rate and interest calculation basis corresponding to the first resource type.
[0203] In some embodiments, the target initial resource amount determination module may further include:
[0204] An occupancy ratio determination submodule, used to determine the occupancy ratio according to the ratio between the estimation result and the initial resource amount;
[0205] A first warning information issuing submodule, configured to issue a first warning information when the occupancy ratio is greater than or equal to the first level warning ratio;
[0206] A second warning information issuing submodule is used to issue a second warning information when the occupancy ratio is less than the first level warning ratio and greater than or equal to the second level warning ratio; the second level warning ratio is less than the first level warning ratio;
[0207] The third warning information issuing submodule is used to issue a third warning information when the occupancy ratio is less than the second level warning ratio and greater than or equal to the third level warning ratio; the third level warning ratio is less than the second level warning ratio.
[0208] In some embodiments, the order status update module may include:
[0209] A recovery instruction initiation submodule is used to initiate an initial resource recovery instruction to instruct the target object to confirm the transfer of the vacant resource amount from the target account to the virtual resource exchange platform when the target initial resource amount is greater than the initial resource amount; the vacant resource amount is the difference between the target initial resource amount and the initial resource amount;
[0210] A status change submodule, configured to change the order status to a default status when the vacant resource amount transferred from the target account is not received after a preset period;
[0211] The status maintaining submodule is used to maintain the order status as a waiting for redemption status when the vacant resource amount transferred from the target account is received within a preset period.
[0212] In some embodiments, the target virtual resource amount exchange module may include:
[0213] A resource scanning submodule, configured to scan the total amount of resources of the first resource type in the target account if the order status is still the waiting-for-redemption status;
[0214] A remaining requested resource amount determination submodule, used to determine the remaining requested resource amount according to the target initial resource amount and the to-be-exchanged virtual resource amount;
[0215] A virtual resource conversion submodule, configured to, when the total amount of resources is greater than or equal to the remaining requested amount of resources, perform virtual resource conversion processing on the to-be-converted virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type;
[0216] The state changing submodule is used to change the order state to a default state when the total amount of resources is less than the remaining requested amount of resources.
[0217] In some embodiments, the apparatus 1000 further includes:
[0218] An order verification module, configured to, when the order status is the waiting-for-exchange status, respond to the target object's order cancellation request, perform order verification on the first order to obtain a verification result;
[0219] The status changing module is used to change the order status to a default status when the verification result indicates that the order verification has passed.
[0220] In some embodiments, the apparatus 1000 further includes:
[0221] A quotation acquisition module, used to respond to the forward quotation request of the target object and obtain the forward exchange rate provided by each resource management organization from the quotation center;
[0222] An exchange rate comparison module, configured to determine a target forward exchange rate from the forward exchange rates provided by the resource management organizations based on a comparison result of the forward exchange rates provided by the resource management organizations, and determine the locked exchange rate based on the target forward exchange rate;
[0223] The target resource management organization determination module is used to take the resource management organization corresponding to the target forward exchange rate as the target resource management organization.
[0224] In some embodiments, the target initial resource amount determination module may include:
[0225] A second order creation submodule is configured to create a second order based on the first order when receiving the initial resource amount transferred from the target account of the target object; the second order includes the target resource management organization, the first resource type, the virtual resource amount to be exchanged, the second resource type, the target exchange date and the target forward exchange rate;
[0226] A forward resource exchange request initiating submodule, configured to initiate a forward resource exchange request to the target resource management organization based on the second order;
[0227] The waiting-for-exchange status determination submodule is used to determine the order status as the waiting-for-exchange status after receiving the processing success notification fed back by the target resource management organization.
[0228] In some embodiments, the apparatus 1000 further comprises:
[0229] A default status determination module, configured to determine the default date from the current date when detecting that the order status has changed to a default status;
[0230] A reverse exchange rate determination module, used to initiate a reverse resource exchange request to the target resource management organization, and upon receiving a processing success notification fed back by the target resource management organization, determine the reverse exchange rate corresponding to the default date;
[0231] A lost resource amount determination module, used to determine the lost resource amount according to the locked exchange rate and the reverse exchange rate;
[0232] A returned resource amount determination module, used to determine the returned resource amount based on the lost resource amount and the initial resource amount;
[0233] The resource return module is used to return the returned resource amount to the target account.
[0234] The device and method embodiments in the described device embodiments are based on the same inventive concept.
[0235] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the method provided in the above method embodiment.
[0236] An embodiment of the present application also provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program related to a method provided in the above method embodiment for implementing a method embodiment, and the at least one instruction or at least one program is loaded and executed by the processor to implement the method provided in the above method embodiment.
[0237] The embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the method provided in the above method embodiment.
[0238] Optionally, in the embodiment of the present application, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in the present embodiment, the storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0239] The memory described in the embodiment of the present application can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0240] The method provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.11 1 is a hardware structure diagram of a server of a virtual resource processing method provided in an embodiment of the present application. Fig.11As shown, the server 1100 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1110 (the central processing unit 1110 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (such as one or more mass storage devices) for storing application programs 1123 or data 1122. Among them, the memory 1130 and the storage medium 1120 can be short-term storage or permanent storage. The program stored in the storage medium 1120 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 1110 can be configured to communicate with the storage medium 1120 and execute a series of instruction operations in the storage medium 1120 on the server 1100. The server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1140, and / or one or more operating systems 1121, such as Windows ServerTM, MacOS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0241] The input / output interface 1140 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 1100. In one example, the input / output interface 1140 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1140 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0242] It can be understood by those skilled in the art that Fig.11 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.11 More or fewer components as shown, or with Fig.11 Different configurations are shown.
[0243] It can be seen from the embodiments of the method, device and storage medium for processing virtual resources provided by the present application that in the embodiments of the present application, by carrying the virtual resource processing method provided by the present application on the virtual resource exchange platform, the convenience of virtual resource exchange can be improved. By responding to the virtual resource exchange request of the target object, a first order is created; the initial resource amount is determined according to the amount of virtual resources to be exchanged and the preset coefficient ratio; when the initial resource amount transferred from the target account of the target object is received, the first order is determined to be in a waiting exchange state, and the initial resource amount is regularly updated according to the preset time period to obtain the target initial resource amount; according to the target initial resource amount and the initial resource amount, the order status of the first order is updated, so that during the existence of the first order, the forward duration market risk is effectively avoided, making the credit process more scientific and efficient; then on the target exchange date, the order status corresponding to the first order is obtained, and when the order status is still in the waiting exchange state, the virtual resource amount to be exchanged is processed according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and the target virtual resource amount is transferred to the target account, thereby improving the efficiency of virtual resource exchange.
[0244] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0245] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0246] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0247] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A virtual resource processing method, characterized in that: Applied to virtual resource exchange platform, including: In response to a virtual resource exchange request of a target object, a first order is created; the first order includes a first resource type, an amount of virtual resources to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type; Determine the initial resource amount according to the virtual resource amount to be exchanged and the preset coefficient ratio; When receiving the initial resource amount transferred from the target account of the target object, determining that the first order is in a waiting for redemption state, and regularly updating the initial resource amount according to a preset time period to obtain a target initial resource amount; updating the order status of the first order according to the target initial resource quantity and the initial resource quantity; Obtain the order status corresponding to the target exchange date, and when the order status is still in the waiting exchange status, perform virtual resource conversion processing on the virtual resource amount to be exchanged according to the locked exchange rate to obtain the target virtual resource amount corresponding to the second resource type, and transfer the target virtual resource amount to the target account.
2. The method according to claim 1, characterized in that The step of regularly updating the initial resource amount according to a preset time period to obtain a target initial resource amount includes: According to the preset time period, regularly determining a first discount factor corresponding to the first resource type and a second discount factor corresponding to the second resource type; determining a forward estimated exchange rate between the first resource type and the second resource type based on the first discount factor, the second discount factor, and a spot exchange rate; Determining an estimation result of the first resource type based on the amount of virtual resources to be exchanged, the forward estimated exchange rate and the locked exchange rate; The initial resource quantity is updated according to the estimation result to obtain the target initial resource quantity.
3. The method according to claim 2, characterized in that The determining a first discount factor corresponding to the first resource type includes: Obtaining a correspondence table between the midpoint interest rate corresponding to the first resource type and the preset term; According to the number of natural days between the current date and the target exchange date, based on the corresponding relationship table, determine the risk-free interest rate corresponding to the first resource type; The first discount factor is determined according to the risk-free interest rate and interest calculation basis corresponding to the first resource type.
4. The method according to claim 2, characterized in that: The method further comprises: Determining an occupation ratio according to a ratio between the estimation result and the initial resource amount; When the occupancy ratio is greater than or equal to the first level warning ratio, a first warning message is issued; When the occupancy ratio is less than the first level warning ratio and greater than or equal to the second level warning ratio, a second warning message is issued; the second level warning ratio is less than the first level warning ratio; When the occupancy ratio is less than the second-level warning ratio and greater than or equal to the third-level warning ratio, a third warning message is issued; the third-level warning ratio is less than the second-level warning ratio.
5. The method according to claim 1, characterized in that The updating of the order status of the first order according to the target initial resource quantity and the initial resource quantity includes: When the target initial resource amount is greater than the initial resource amount, an initial resource amount recovery instruction is initiated to instruct the target object to confirm the transfer of the vacant resource amount from the target account to the virtual resource exchange platform; the vacant resource amount is the difference between the target initial resource amount and the initial resource amount; When the vacant resource amount transferred from the target account is not received after a preset period, changing the order status to a default status; When the vacant resource amount transferred from the target account is received within a preset period, the order status is maintained as a waiting for redemption status.
6. The method according to claim 1, characterized in that When the order status is still the waiting exchange status, performing virtual resource conversion processing on the to-be-exchanged virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type includes: If the order status is still the waiting-for-redemption status, scanning the total amount of resources of the first resource type in the target account; Determine the remaining requested resource amount according to the target initial resource amount and the virtual resource amount to be exchanged; When the total amount of resources is greater than or equal to the remaining requested amount of resources, performing virtual resource conversion processing on the to-be-exchanged virtual resource amount according to the locked exchange rate to obtain a target virtual resource amount corresponding to the second resource type; When the total amount of resources is less than the remaining requested amount of resources, the order status is changed to a default status.
7. The method according to claim 1, characterized in that The method further comprises: When the order status is the waiting-for-exchange status, in response to the target object's order cancellation request, performing order verification on the first order to obtain a verification result; When the verification result indicates that the order verification has passed, the order status is changed to a default status.
8. The method according to claim 1, characterized in that Before responding to the virtual resource exchange request of the target object, the method further includes: In response to the forward price inquiry request of the target object, obtaining the forward exchange rate provided by each resource management organization from the quotation center; Based on the comparison result of the forward exchange rates provided by the resource management organizations, determine a target forward exchange rate from the forward exchange rates provided by the resource management organizations, and determine the locked exchange rate based on the target forward exchange rate; The resource management organization corresponding to the target forward exchange rate is used as the target resource management organization.
9. The method according to claim 8, characterized in that When receiving the initial resource amount transferred from the target account of the target object, determining that the first order is in a waiting for redemption state includes: When the initial resource amount transferred from the target account of the target object is received, a second order is created based on the first order; the second order includes the target resource management organization, the first resource type, the amount of virtual resources to be exchanged, the second resource type, the target exchange date and the target forward exchange rate; Initiating a forward resource exchange request to the target resource management organization based on the second order; After receiving the processing success notification fed back by the target resource management organization, the order status is determined as the waiting for redemption status.
10. The method according to claim 9, characterized in that The method further comprises: When it is detected that the order status changes to a default status, the current date is determined as the default date; Initiate a reverse resource exchange request to the target resource management organization, and upon receiving a successful processing notification fed back by the target resource management organization, determine the reverse exchange rate corresponding to the default date; determining the amount of lost resources according to the locked exchange rate and the reverse exchange rate; Determining a returned resource amount based on the lost resource amount and the initial resource amount; Return the returned resource amount to the target account.
11. A virtual resource processing device, characterized in that: Applied to virtual resource exchange platform, including: A first order creation module is used to create a first order in response to a virtual resource exchange request of a target object; the first order includes a first resource type, an amount of virtual resources to be exchanged, a second resource type, a target exchange date, and a locked exchange rate; the locked exchange rate represents an exchange relationship between the first resource type and the second resource type; An initial resource quantity determination module, used to determine the initial resource quantity according to the virtual resource quantity to be exchanged and a preset coefficient ratio; a target initial resource amount determination module, configured to, upon receiving the initial resource amount transferred from the target account of the target object, determine that the first order is in a waiting-for-redemption state, and regularly update the initial resource amount according to a preset time period to obtain a target initial resource amount; An order status updating module, configured to update the order status of the first order according to the target initial resource quantity and the initial resource quantity; The target virtual resource exchange module is used to obtain the order status corresponding to the target exchange date, and when the order status is still the waiting exchange status, perform virtual resource conversion processing on the virtual resource to be exchanged according to the locked exchange rate, obtain the target virtual resource corresponding to the second resource type, and transfer the target virtual resource to the target account.
12. An electronic device, characterized in that: The electronic device comprises: a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the virtual resource processing method as described in any one of claims 1-10.
13. A computer storage medium, characterized in that: The computer storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the virtual resource processing method according to any one of claims 1-10.
Citation Information
Cited By
Payment method, wallet system and storage medium
CN121120059A