Virtual resource transaction method and device, electronic equipment and readable medium
By obtaining and updating virtual resource transaction records and performing position closing operations in advance, the problem of virtual resource loss and position closing operations in virtual resource trading platforms is solved, and the stability and management efficiency of the trading platform are improved.
Patent Information
- Application Number
- CN202310801420.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, virtual resource trading platforms perform position closing operations after completing virtual resource transactions initiated by users, which may lead to abnormal virtual resource transactions with third-party platforms, resulting in increased virtual resource losses or failed closing operations, affecting The stability of the trading platform.
By obtaining predicted trading orders, generating corresponding transaction records, and updating actual transaction information during the valid period of the predicted trading orders, and closing positions in advance to avoid abnormal occurrence.
It effectively avoids loss and failure of position closing operations in virtual resource trading, and improves the stability of the trading platform and the management efficiency of virtual resource.
Smart Images

Figure CN119228536A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and readable medium for virtualizing resources. Background Art
[0002] Trading platforms that provide virtual resource transactions or conversions often hold a portion of virtual resources during the transaction process. The trading platform itself usually does not hold virtual resources, so it is necessary to trade this portion of virtual resources to third-party platforms such as banks to complete the liquidation of virtual resources.
[0003] In the related art, after completing the virtual resource transaction initiated by the user, the trading platform will close the virtual resources obtained from the virtual resource transaction according to predetermined rules.
[0004] However, in such solutions, the closing operation of the trading platform can only be carried out after the virtual resource transaction initiated by the user is completed. Once an abnormality occurs in the virtual resource transaction between the third-party platform before the closing operation is completed, it will lead to increased virtual resource loss in the closing operation or the closing operation cannot be carried out, which is not conducive to the stability of virtual resource transactions and trading platform operations. Summary of the invention
[0005] Based on the above technical problems, the present application provides a method, device, electronic device and readable medium for virtual resources to improve the stability of virtual resource transactions and trading platform operations.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0007] According to one aspect of an embodiment of the present application, a virtual resource transaction method is provided, comprising:
[0008] Acquire a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order;
[0009] According to the predicted transaction amount in the predicted transaction order, generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record;
[0010] Performing a position closing operation according to the first transaction record;
[0011] Before the transaction validity period of the predicted transaction order expires, updating the second transaction record according to the received customer transaction information, wherein the customer transaction information includes the actual transaction amount of the first virtual resource converted into the second virtual resource;
[0012] When the transaction validity period expires, a position closing operation is performed according to the second transaction record.
[0013] According to one aspect of an embodiment of the present application, a virtual resource transaction device is provided, including:
[0014] An acquisition unit configured to acquire a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order;
[0015] a generating unit configured to generate, in a first transaction record, a transaction record for converting the first virtual resource into the second virtual resource, and to generate, in a second transaction record, a transaction record for converting the second virtual resource into the first virtual resource, according to the predicted transaction amount in the predicted transaction order;
[0016] a first position closing unit, configured to perform a position closing operation according to the first transaction record;
[0017] An updating unit, configured to update the second transaction record according to received customer transaction information before the transaction validity period of the predicted transaction order expires, wherein the customer transaction information includes an actual transaction amount of the first virtual resource converted into the second virtual resource;
[0018] The second position closing unit is configured to perform a position closing operation according to the second transaction record when the transaction validity period expires.
[0019] In some embodiments of the present application, based on the above technical solution, the update unit is configured to: receive customer transaction information; obtain the transaction validity period of the predicted transaction order based on the virtual resources contained in the customer transaction information; if the moment of receiving the customer transaction information is within the transaction validity period, then update the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record based on the actual transaction amount in the customer transaction information.
[0020] In some embodiments of the present application, based on the above technical solution, the updating unit is configured as follows: according to the virtual resources included in the customer transaction information, querying the transaction items between the first virtual resource and the second virtual resource in the second transaction record; and updating the predicted transaction amount of the queried transaction items according to the actual transaction amount in the customer transaction information.
[0021] In some embodiments of the present application, based on the above technical solution, the updating unit is configured as follows: if the second transaction record does not contain a transaction entry between the first virtual resource and the second virtual resource, a virtual resource transaction is performed according to the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0022] In some embodiments of the present application, based on the above technical solution, the updated unit is configured to: compare the predicted transaction amount of the transaction item with the actual transaction amount in the customer transaction information; if the actual transaction amount in the customer transaction information is higher than the predicted transaction amount of the transaction item, then execute the virtual resource transaction according to the customer transaction information, and perform a closing operation according to the predicted transaction amount of the transaction item.
[0023] In some embodiments of the present application, based on the above technical solution, the updating unit is configured as follows: if the moment of receiving the customer transaction information is outside the validity period of the transaction or the transaction validity period is not obtained, then executing the virtual resource transaction according to the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0024] In some embodiments of the present application, based on the above technical solution, the customer transaction information includes an order identifier of the predicted transaction order, and the update unit is configured to: query the transaction entry corresponding to the order identifier in the second transaction record according to the order identifier included in the customer transaction information; and update the predicted transaction amount of the queried transaction entry according to the actual transaction amount in the customer transaction information.
[0025] In some embodiments of the present application, based on the above technical solution, the generation unit is configured to: generate simulated transaction information and predicted transaction information according to the predicted transaction amount in the predicted transaction order, wherein the first virtual resource in the simulated transaction information is converted into the second virtual resource, and the second virtual resource in the predicted transaction information is converted into the first virtual resource; perform a simulated transaction according to the simulated transaction information to generate a transaction record in the first transaction record for converting the first virtual resource into the second virtual resource; and enter the predicted transaction information into the second transaction record.
[0026] In some embodiments of the present application, based on the above technical solution, the second closing unit is configured to: periodically query the time status between the current moment and the validity period of the transaction; if the current moment is outside the validity period of the transaction, generate a closing instruction for the second transaction record to perform a closing operation based on the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record.
[0027] In some embodiments of the present application, based on the above technical solution, the acquisition unit is further configured as:
[0028] Obtain an amount adjustment order, wherein the amount adjustment order includes an adjustment amount for a predicted transaction amount between the first virtual resource and the second virtual resource; and update the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the adjustment amount in the amount adjustment order.
[0029] In some embodiments of the present application, based on the above technical solution, the update unit is also configured to: determine the conversion direction between the first virtual resource and the second virtual resource in the second transaction record according to the predicted transaction amount in the second transaction record; if the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, mark the predicted transaction order as invalid, and perform a closing operation according to the predicted transaction amount in the second transaction record.
[0030] In some embodiments of the present application, based on the above technical solution, the update unit is also configured to: receive a transaction termination instruction for the predicted transaction order; in response to the transaction termination instruction, close the first virtual resource according to the second transaction record.
[0031] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a method for trading virtual resources as in the above technical solution by executing the executable instructions.
[0032] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the trading method of virtual resources in the above technical solution is implemented.
[0033] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A 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 the transaction method of virtual resources provided in the above various optional implementations.
[0034] In an embodiment of the present application, the predicted transaction order obtained includes the transaction amount and the transaction validity period. First, transaction records with opposite conversion directions are generated in the first transaction record and the second transaction record respectively according to the transaction amount, and then the transaction in the first transaction record is closed. The customer transaction information subsequently received is entered into the second transaction record and offset with the transaction record therein. After the validity period of the predicted transaction order expires, the position is closed according to the remaining transaction amount in the second transaction record. In this way, the closing operation of the virtual resource transaction can be carried out in advance to avoid increased virtual resource loss or failure of the closing operation caused by abnormal virtual resource transactions with a third-party platform. At the same time, the excessive virtual resources held can be processed in time to avoid virtual resource loss caused by holding virtual resources, which is beneficial to the stability of virtual resource transactions and trading platform operations.
[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] In the attached picture:
[0038] Figure 1 A schematic diagram of the system architecture of the implementation scheme of this application in an application scenario.
[0039] Figure 2 It is a schematic diagram of the virtual resource transaction process in the embodiment of the present application.
[0040] Figure 3 It is a schematic flow chart of a method for trading virtual resources in an embodiment of the present application.
[0041] Figure 4 It is a schematic flow chart of a method for trading virtual resources in an embodiment of the present application.
[0042] Figure 5 It is a schematic flow chart of a method for trading virtual resources in an embodiment of the present application.
[0043] Figure 6 This is a flow chart for processing customer transaction information within a valid time window in an embodiment of the present application.
[0044] Figure 7 A schematic diagram of the closing process corresponding to the predicted transaction order in the embodiment of the present application.
[0045] Figure 8 The block diagram schematically shows the composition of the virtual resource transaction device in the embodiment of the present application.
[0046] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0048] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0050] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0051] It should be understood that the scheme of the present application is applied in a virtual resource trading platform or conversion platform that provides a variety of virtual resources for mutual conversion, and is specifically applied in a trading platform with a predictive trading function. The trading platform that provides virtual resource trading or conversion services will set the conversion ratio used when providing trading services to users according to the virtual resource conversion ratio provided by the third-party platform. The user trades with the trading platform according to the conversion ratio, and the trading platform then trades the obtained virtual resources with the third-party platform to complete the trading process of virtual resources. In this trading process, the transaction between the trading platform and the third-party platform is usually not carried out in real time. The process after the trading platform completes the transaction with the user and before the transaction with the third-party platform forms the virtual resource assets held by the trading platform, or virtual resource exposure. The trading platform will select a virtual resource as the target virtual resource for its settlement to manage the virtual resources it buys and sells, and other virtual resources will be converted into target virtual resources in the closing transaction with the third-party platform. However, due to the lag in the closing transaction that needs to be carried out after the user transaction, the platform transaction will face an increased risk of abnormalities in the transaction process between the trading platform and the third-party platform. The solution of the present application, when applied in a trading platform or a system of a trading institution connected to a trading platform, can close positions in advance based on the platform's or institution's predicted value of trading volume within a period of time, and promptly handle and clear the exposure caused by "excessive predicted transactions" after the period of time targeted by the forecast, so as to avoid putting the institution at risk of virtual resource transactions due to inaccurate predicted transactions.
[0052] The following is an introduction to the application scenarios of the embodiments of this application. Figure 1 , Figure 1 This is a schematic diagram of the system architecture of the implementation scheme of this application in an application scenario. Figure 1As shown, the scenario includes a terminal 110, a trading platform server 120 and a third-party server 130. The terminal 110 is usually a device held by a terminal user, such as a mobile phone, a computer, a tablet computer and other devices, and a terminal held by a merchant, such as a POS machine and various cash registers. The trading platform server 120 provides a transaction or conversion service of virtual resources to the terminal 110. The user's terminal 110 pays the virtual resources to the trading platform service, and the trading platform server 120 provides the virtual resources obtained by the transaction or conversion to the terminal 110. For the virtual resources obtained from the terminal 110, the trading platform server 120 will trade with the third-party server 130 to close the position. In an embodiment of the present application, the trading platform server 120 will simulate the user transaction and trade with the third-party server 130 according to the estimated transaction volume before trading with the terminal 110, and record the corresponding transaction records locally. When the subsequent transaction request of the terminal 110 reaches the transaction platform server 120, the transaction platform server 120 can only trade with the terminal 110, and update the corresponding transaction record according to the predicted transaction and the user's transaction in advance, thereby completing the local closing operation. When the validity period of the estimated transaction volume expires, the transaction platform server 120 trades with the third-party server 130 according to the remaining estimated volume to close the position, thereby completing the overall virtual resource transaction process.
[0053] The terminal 110 includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, or a vehicle-mounted terminal. The terminal 110, the transaction platform server 120, and the third-party server 130 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application. The number of terminal conversion servers and third-party servers is also not limited.
[0054] The following is an introduction to the transaction process in the trading platform in this application. Figure 2 , Figure 2 Schematic diagram of the virtual resource transaction process in the embodiment of the present application. Figure 2As shown, the trading platform will conduct early closing transactions according to the instructions of trading service providers such as trading institutions. Specifically, in the original virtual resource exposure management system, in addition to the original virtual resource transaction records, an independent forecast transaction record will be opened for "forecast transactions". Forecast transactions are carried out in the pre-close system. Based on the forecast transaction information, the pre-close system simulates customer transactions and sends the simulated customer transaction orders to the exposure management system, so as to complete the early closing of forecast transactions through the virtual resource transaction and closing strategy or function of the exposure management system. When placing a forecast order, the pre-close system will also set the effective time window of the forecast order. When the subsequent actual customer transaction arrives, the exposure management system first inquires the pre-close system whether to enter the virtual resources to be traded in the customer transaction into the forecast transaction record of the "forecast transaction". The pre-close system will judge and answer "yes" or "no" according to whether there is a forecast document within the validity period, so as to determine whether to enter the forecast transaction record or the original virtual resource transaction record. When the forecast order reaches the end time, the forecast closing system issues an instruction to notify the exposure management system to clear the exposure in the forecast transaction record corresponding to the "forecast transaction", that is, to close the forecast transaction.
[0055] The following is a detailed description of the technical solution provided by this application in conjunction with the specific implementation method. For ease of introduction, please refer to Figure 3 , Figure 3 The following is a schematic flow chart of a virtual resource transaction method in an embodiment of the present application. In the embodiment of the present application, the server where the transaction platform is located is introduced as the execution subject, and the virtual resource transaction method may include the following steps S310 to S350:
[0056] Step S310, obtaining a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting a first virtual resource into a second virtual resource and a transaction validity period of the predicted transaction order.
[0057] The predicted transaction order is usually initiated by the trading institution that provides virtual resource trading services or the operator of the trading platform itself. The trading platform will obtain the predicted transaction order from the initiator. The predicted transaction order contains the predicted transaction amount of the first virtual resource converted into the second virtual resource and the transaction validity period of the predicted transaction order. The predicted transaction amount is a predicted amount of virtual resources that may be traded within the transaction validity period. The second virtual resource is usually a virtual resource used for settlement by the trading platform, that is, when the overall transaction of the trading platform is completed, all other virtual resources will be converted into the second virtual resource. The predicted transaction amount usually contains two values, namely the transaction amount of the first virtual resource and the transaction amount of the second virtual resource. For example, the predicted transaction amount of the first virtual resource converted into the second virtual resource can be to convert 1000 units of the first virtual resource into 6800 units of the second virtual resource. In some embodiments, the conversion direction is indicated by the positive and negative values of the transaction amount. Taking the above example as an example, the predicted transaction amount of the first virtual resource is -1000 and the predicted transaction amount of the second virtual resource is +6800.
[0058] Step S320, based on the predicted transaction amount in the predicted transaction order, generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record.
[0059] Two transaction records will be pre-established in the trading platform, namely the first transaction record and the second transaction record. The structure and content of the information recorded in these two transaction records are exactly the same, but the meanings of the data recorded therein are different. The first transaction record records the actual transaction, while the second transaction record records the estimated transaction. After receiving the predicted transaction order, the trading platform will generate corresponding records in the first transaction record and the second transaction record respectively according to the predicted transaction amount in the predicted transaction order. Among them, a transaction record for converting the first virtual resource into the second virtual resource is generated in the first transaction record. This means that for the trading platform, it is equivalent to receiving an application from a user to trade the first virtual resource into the second virtual resource. In some embodiments, the actual transaction process in the trading platform is managed by a separate open trading system, then generating a transaction record in the first transaction record is equivalent to actually conducting such a transaction for the open trading system, and the open trading system will not distinguish whether the transaction is generated by the trading platform or the simulated trading system. A transaction record for converting the second virtual resource into the first virtual resource will be generated in the second transaction record. The amount of the transaction record generated in the second transaction record is the same as the amount of the transaction record generated in the first transaction record. The only difference is that the direction of conversion is from the second virtual resource to the first virtual resource.
[0060] Step S330, performing a position closing operation according to the first transaction record.
[0061] After the transaction record is generated, the trading platform will perform a closing operation based on the first transaction record. The closing operation itself will be performed according to the strategy and rules of the closing operation in the trading platform. For example, to close the position according to the first transaction record, 1,000 first virtual resources are purchased from the third-party trading platform to close the -1,000 first virtual resources in the first transaction record. Since the conversion ratio and conversion loss of virtual resource transactions between the trading platform and the third-party trading platform are different from the conversion ratio and conversion loss of transactions with customers, the second virtual resources spent on purchasing 1,000 first virtual resources are usually less than 6,800 second virtual resources, and the generated forecast will be transferred to a special record for storage, and the corresponding second virtual resource amount in the first transaction record will also be reset to zero, thereby completing the closing.
[0062] Step S340, before the transaction validity period of the predicted transaction order expires, the second transaction record is updated according to the received customer transaction information, wherein the customer transaction information includes the actual transaction amount of the first virtual resource converted into the second virtual resource.
[0063] After completing the closing process based on the predicted transaction order, before the expiration of the transaction validity period of the predicted transaction order, or within the time window of the transaction validity period, the customer transaction information arriving at the trading platform will be entered into the corresponding second transaction record, that is, it will be offset against the previously conducted predicted transaction. Specifically, the data recorded in the second transaction record is the transaction amount of converting the second virtual resource into the first virtual resource according to the predicted transaction order record, and the customer transaction information contains the actual transaction amount of converting the first virtual resource into the second virtual resource. The conversion directions of these two sets of data are opposite, so these two amounts can offset each other, thereby reducing the transaction amount of converting the second virtual resource into the first virtual resource recorded in the second transaction record. This is equivalent to closing the customer transaction information, but since the closing transaction has been completed with the third-party platform before, it is no longer necessary to close the position with the third-party platform at this time, and it can be completed directly on the local trading platform.
[0064] Step S350: When the transaction validity period expires, a position closing operation is performed according to the second transaction record.
[0065] When the transaction validity period of the predicted transaction order expires, the trading platform will perform a closing operation according to the second transaction record. Specifically, the customer transaction information arriving during the transaction validity period will update the transaction amount of the second virtual resource converted into the first virtual resource in the second transaction record, and the transaction amount will usually decrease. When closing the position, the trading platform trades with the third-party platform according to the remaining transaction amount of the first virtual resource in the second transaction record. For example, if the remaining transaction amount in the second virtual resource is 100 second virtual resources converted into 680 first virtual resources, the trading platform will sell 100 second virtual resources to the third-party platform, thereby completing the process of closing the position according to the second transaction record. There can be multiple valid predicted transaction orders in the trading platform at the same time, and each transaction order will have a corresponding entry in the second transaction record. The trading platform will monitor the transaction validity period of each predicted transaction order. When the transaction validity period of a predicted transaction order expires, the trading platform will close the position according to the transaction amount of the corresponding entry in the second transaction record.
[0066] In an embodiment of the present application, the predicted transaction order obtained includes the transaction amount and the transaction validity period. First, transaction records with opposite conversion directions are generated in the first transaction record and the second transaction record respectively according to the transaction amount, and then the transaction in the first transaction record is closed. The customer transaction information subsequently received is entered into the second transaction record and offset with the transaction record therein. After the validity period of the predicted transaction order expires, the position is closed according to the remaining transaction amount in the second transaction record. In this way, the closing operation of the virtual resource transaction can be carried out in advance to avoid increased virtual resource loss or failure of the closing operation caused by abnormal virtual resource transactions with a third-party platform. At the same time, the excessive virtual resources held can be processed in time to avoid virtual resource loss caused by holding virtual resources, which is beneficial to the stability of virtual resource transactions and trading platform operations.
[0067] In some optional embodiments, in the transaction method of virtual resources in the present application, the trading platform can also obtain an amount adjustment order from the client. The amount adjustment order is an order generated when the initiator of the predicted transaction order adjusts or corrects the predicted transaction amount. The amount adjustment order contains the adjustment amount for the predicted transaction amount between the first virtual resource and the second virtual resource. The adjustment amount can be a positive number or a negative number, that is, the transaction amount of the first virtual resource converted into the second virtual resource can be increased or decreased. After receiving the amount adjustment order, the trading platform updates the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the adjustment amount in the amount adjustment order. Through the amount adjustment order, the predicted transaction amount in the predicted transaction order within the validity period can be adjusted in time, which is conducive to the flexibility of the solution.
[0068] In some optional embodiments, after updating the second transaction record according to the received customer transaction information, the trading platform determines the conversion direction between the first virtual resource and the second virtual resource in the second transaction record according to the predicted transaction amount in the second transaction record. The conversion direction can usually be determined according to the positive or negative of the predicted transaction amount, that is, the virtual resources with a negative transaction amount are converted into virtual resources with a positive transaction amount. If the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, the predicted transaction order is marked as invalid, and the position is closed according to the predicted transaction amount in the second transaction record. By comparing the conversion direction, if the customer transaction order causes the conversion direction in the second transaction record to change, the predicted transaction order is terminated in advance and marked as invalid and the position is closed, so that the predicted transaction can be terminated in time when the predicted transaction amount is insufficient, preventing data errors caused by excessive transactions and improving the stability of the solution.
[0069] In some optional embodiments, in the virtual resource trading method of the present application, the trading platform may also receive a transaction termination instruction for the predicted transaction order from the client. Subsequently, the trading platform responds to the transaction termination instruction and performs a liquidation operation on the first virtual resource according to the second transaction record. The transaction termination instruction allows the external system to directly terminate the predicted transaction and liquidate the remaining first virtual resource in the second transaction record when it is identified that the predicted transaction amount is obviously unable to support the predicted transaction, thereby avoiding the failure of the virtual resource transaction initiated by the user due to insufficient predicted transaction amount or reducing the execution efficiency of the transaction, which is conducive to improving the risk management capability of the solution.
[0070] In the embodiments of the present application, it is also proposed to Figure 3 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 4 As shown, in a virtual resource transaction method of an embodiment of the present application, the following steps may be included:
[0071] Step S410, obtaining a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order.
[0072] Optionally, the implementation details of step S410 are the same as Figure 3 The step S310 shown in FIG. 1 is consistent with the step S310 shown in FIG. 1 and will not be described in detail.
[0073] Step S420, based on the predicted transaction amount in the predicted transaction order, generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record.
[0074] Optionally, the implementation details of step S420 are the same as Figure 3 The step S320 shown in FIG. 1 is consistent with the step S320 shown in FIG. 1 and will not be repeated here.
[0075] Step S430, performing a position closing operation according to the first transaction record.
[0076] Optionally, the implementation details of step S430 are the same as Figure 3 The step S330 shown in FIG. 1 is consistent with the step S330 shown in FIG. 1 and will not be
[0077] Step S440: receiving customer transaction information, wherein the customer transaction information includes an actual transaction amount of converting the first virtual resource into the second virtual resource.
[0078] Client transaction information is information generated by the client in the actual virtual resource transaction initiated according to the user's instructions. Client transaction information includes the actual transaction amount of the first virtual resource converted into the second virtual resource. It is understandable that the actual transaction amount is usually less than the predicted transaction amount estimated by the transaction institution or transaction platform.
[0079] Step S450, obtaining the transaction validity period of the predicted transaction order according to the virtual resources included in the customer transaction information.
[0080] The transaction validity period is usually recorded in the trading platform, specifically in the pre-settlement system used to manage the forecasted transaction, and the conversion relationship between virtual resources is used as the index of the transaction validity period. If the customer transaction information contains the conversion of the first virtual resource to the second virtual resource, the trading platform will search for the forecasted transaction order that predicts the conversion relationship according to the conversion relationship, thereby obtaining the corresponding transaction validity period.
[0081] The trading platform determines whether to process the customer transaction information by using the predicted transaction amount in the second transaction record according to whether the time when the customer transaction information is received is within the validity period. If the time when the customer transaction information is received is within the validity period, step S460 is executed. Otherwise, if the time when the customer transaction information is received is outside the validity period or the validity period is not obtained, step S470 is executed.
[0082] Step S460: updating the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the actual transaction amount in the customer transaction information.
[0083] The trading platform updates the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the actual transaction amount in the customer transaction information. The actual transaction amount and the predicted transaction amount are usually two values with opposite signs, that is, when the actual transaction amount is a positive number, the predicted transaction amount is usually a negative number, and vice versa. The trading platform can directly sum the actual transaction amount and the predicted transaction amount, and record the result as the new predicted transaction amount in the corresponding entry of the second transaction record. For the received customer transaction information, if there is a predicted transaction order within the validity period, the local closing is directly performed through the data in the second transaction record, and there is no need to close the position for the customer transaction information, which simplifies the operation steps for processing customer transaction information and improves the response efficiency of customer transactions.
[0084] Step S470: Execute a virtual resource transaction according to the customer transaction information to update a transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0085] In the case of expiration, the trading platform will directly conduct virtual resource transactions on the customer's transaction information. During or after the transaction is completed, the trading platform will update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record, thereby closing the transaction in the first transaction record according to the closing logic of the trading platform. After the predicted transaction order expires, the customer's transaction information is directly processed to avoid the customer's transaction being affected by the predicted transaction order and causing the transaction to fail, which is conducive to improving the stability of the solution.
[0086] Step S480: When the transaction validity period expires, a position closing operation is performed according to the second transaction record.
[0087] Optionally, the implementation details of step S480 are the same as Figure 3 The step S350 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.
[0088] In an embodiment of the present application, the predicted transaction order obtained includes the transaction amount and the transaction validity period. First, transaction records with opposite conversion directions are generated in the first transaction record and the second transaction record respectively according to the transaction amount, and then the transaction in the first transaction record is closed. The customer transaction information subsequently received is entered into the second transaction record and offset with the transaction record therein. After the validity period of the predicted transaction order expires, the position is closed according to the remaining transaction amount in the second transaction record. In this way, the closing operation of the virtual resource transaction can be carried out in advance to avoid increased virtual resource loss or failure of the closing operation caused by abnormal virtual resource transactions with a third-party platform. At the same time, the excessive virtual resources held can be processed in time to avoid virtual resource loss caused by holding virtual resources, which is beneficial to the stability of virtual resource transactions and trading platform operations.
[0089] In some optional embodiments, in the transaction method of virtual resources in the present application, the trading platform can also obtain an amount adjustment order from the client. The amount adjustment order is an order generated when the initiator of the predicted transaction order adjusts or corrects the predicted transaction amount. The amount adjustment order contains the adjustment amount for the predicted transaction amount between the first virtual resource and the second virtual resource. The adjustment amount can be a positive number or a negative number, that is, the transaction amount of the first virtual resource converted into the second virtual resource can be increased or decreased. After receiving the amount adjustment order, the trading platform updates the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the adjustment amount in the amount adjustment order. Through the amount adjustment order, the predicted transaction amount in the predicted transaction order within the validity period can be adjusted in time, which is conducive to the flexibility of the solution.
[0090] In some optional embodiments, after updating the second transaction record according to the received customer transaction information, the trading platform determines the conversion direction between the first virtual resource and the second virtual resource in the second transaction record according to the predicted transaction amount in the second transaction record. The conversion direction can usually be determined according to the positive or negative of the predicted transaction amount, that is, the virtual resources with a negative transaction amount are converted into virtual resources with a positive transaction amount. If the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, the predicted transaction order is marked as invalid, and the position is closed according to the predicted transaction amount in the second transaction record. By comparing the conversion direction, if the customer transaction order causes the conversion direction in the second transaction record to change, the predicted transaction order is terminated in advance and marked as invalid and the position is closed, so that the predicted transaction can be terminated in time when the predicted transaction amount is insufficient, preventing data errors caused by excessive transactions and improving the stability of the solution.
[0091] In some optional embodiments, in the virtual resource trading method of the present application, the trading platform may also receive a transaction termination instruction for the predicted transaction order from the client. Subsequently, the trading platform responds to the transaction termination instruction and performs a liquidation operation on the first virtual resource according to the second transaction record. The transaction termination instruction allows the external system to directly terminate the predicted transaction and liquidate the remaining first virtual resource in the second transaction record when it is identified that the predicted transaction amount is obviously unable to support the predicted transaction, thereby avoiding the failure of the virtual resource transaction initiated by the user due to insufficient predicted transaction amount or reducing the execution efficiency of the transaction, which is conducive to improving the risk management capability of the solution.
[0092] In the embodiments of the present application, it is also proposed to Figure 4 Other embodiments that refine the technical solution of the embodiment shown in the figure are as follows Figure 5 As shown, in a virtual resource transaction method of an embodiment of the present application, the following steps may be included:
[0093] Step S510, obtaining a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting a first virtual resource into a second virtual resource and a transaction validity period of the predicted transaction order.
[0094] Optionally, the implementation details of step S510 are the same as Figure 3 The step S310 shown in FIG. 1 is consistent with the step S310 shown in FIG. 1 and will not be described in detail.
[0095] Step S520, based on the predicted transaction amount in the predicted transaction order, generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record.
[0096] Optionally, the implementation details of step S520 are the same as Figure 3 The step S320 shown in FIG. 1 is consistent with the step S320 shown in FIG. 1 and will not be repeated here.
[0097] Step S530: performing a position closing operation according to the first transaction record.
[0098] Optionally, the implementation details of step S530 are the same as Figure 3 The step S330 shown in FIG. 1 is consistent with the step S330 shown in FIG. 1 and will not be
[0099] Step S540: receiving customer transaction information, wherein the customer transaction information includes an actual transaction amount of converting the first virtual resource into the second virtual resource.
[0100] Optionally, the implementation details of step S540 are the same as Figure 4 The step S440 shown in FIG. 1 is consistent with the step S440 shown in FIG. 1 and will not be
[0101] Step S550, obtaining the transaction validity period of the predicted transaction order according to the virtual resources included in the customer transaction information.
[0102] Optionally, the implementation details of step S550 are the same as Figure 4 The step S450 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.
[0103] The trading platform determines whether to process the customer transaction information based on the predicted transaction amount in the second transaction record according to whether the time when the customer transaction information is received is within the validity period. If the time when the customer transaction information is received is within the transaction validity period, step S560 is executed. Otherwise, if the time when the customer transaction information is received is outside the transaction validity period or the transaction validity period is not obtained, step S580 is executed.
[0104] Step S560: According to the virtual resources included in the customer transaction information, query the second transaction record for transaction items between the first virtual resource and the second virtual resource.
[0105] Step S570: updating the predicted transaction amount of the queried transaction item according to the actual transaction amount in the customer transaction information.
[0106] Specifically, in the process of updating the predicted transaction amount, the trading platform queries the transaction item between the first virtual resource and the second virtual resource in the second transaction record according to the virtual resources contained in the customer transaction information. Specifically, the customer transaction information contains the conversion of the first virtual resource into the second virtual resource. The second transaction record will record the predicted transaction order for predicting each virtual resource pair. Therefore, the trading platform will query the resource pair of the first virtual resource and the second virtual resource as a search condition to retrieve the predicted transaction order for converting the first virtual resource into the second virtual resource. The predicted transaction order will be recorded as a transaction item in the second transaction record. After the corresponding transaction item is queried, the trading platform updates the predicted transaction amount of the queried transaction item according to the actual transaction amount in the customer transaction information. The corresponding transaction item is queried from the second transaction record through the virtual resources contained in the customer transaction information, so as to update the predicted transaction amount of the transaction item according to the actual transaction amount, thereby allowing the predicted transaction orders of different virtual resources in the second transaction record to be centrally stored and processed, which is beneficial to data query and processing efficiency.
[0107] Step S580: Execute a virtual resource transaction according to the customer transaction information to update a transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0108] Optionally, the implementation details of step S580 are the same as Figure 4 The step S470 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.
[0109] Step S590: When the transaction validity period expires, a position closing operation is performed according to the second transaction record.
[0110] Optionally, the implementation details of step S590 are the same as Figure 3 The step S350 shown in FIG. 1 is the same as that in FIG. 1 and will not be described in detail.
[0111] In an embodiment of the present application, the predicted transaction order obtained includes the transaction amount and the transaction validity period. First, transaction records with opposite conversion directions are generated in the first transaction record and the second transaction record respectively according to the transaction amount, and then the transaction in the first transaction record is closed. The customer transaction information subsequently received is entered into the second transaction record and offset with the transaction record therein. After the validity period of the predicted transaction order expires, the position is closed according to the remaining transaction amount in the second transaction record. In this way, the closing operation of the virtual resource transaction can be carried out in advance to avoid increased virtual resource loss or failure of the closing operation caused by abnormal virtual resource transactions with a third-party platform. At the same time, the excessive virtual resources held can be processed in time to avoid virtual resource loss caused by holding virtual resources, which is beneficial to the stability of virtual resource transactions and trading platform operations.
[0112] In some optional embodiments, in the transaction method of virtual resources in the present application, the trading platform can also obtain an amount adjustment order from the client. The amount adjustment order is an order generated when the initiator of the predicted transaction order adjusts or corrects the predicted transaction amount. The amount adjustment order contains the adjustment amount for the predicted transaction amount between the first virtual resource and the second virtual resource. The adjustment amount can be a positive number or a negative number, that is, the transaction amount of the first virtual resource converted into the second virtual resource can be increased or decreased. After receiving the amount adjustment order, the trading platform updates the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the adjustment amount in the amount adjustment order. Through the amount adjustment order, the predicted transaction amount in the predicted transaction order within the validity period can be adjusted in time, which is conducive to the flexibility of the solution.
[0113] In some optional embodiments, after updating the second transaction record according to the received customer transaction information, the trading platform determines the conversion direction between the first virtual resource and the second virtual resource in the second transaction record according to the predicted transaction amount in the second transaction record. The conversion direction can usually be determined according to the positive or negative of the predicted transaction amount, that is, the virtual resources with a negative transaction amount are converted into virtual resources with a positive transaction amount. If the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, the predicted transaction order is marked as invalid, and the position is closed according to the predicted transaction amount in the second transaction record. By comparing the conversion direction, if the customer transaction order causes the conversion direction in the second transaction record to change, the predicted transaction order is terminated in advance and marked as invalid and the position is closed, so that the predicted transaction can be terminated in time when the predicted transaction amount is insufficient, preventing data errors caused by excessive transactions and improving the stability of the solution.
[0114] In some optional embodiments, in the virtual resource trading method of the present application, the trading platform may also receive a transaction termination instruction for the predicted transaction order from the client. Subsequently, the trading platform responds to the transaction termination instruction and performs a liquidation operation on the first virtual resource according to the second transaction record. The transaction termination instruction allows the external system to directly terminate the predicted transaction and liquidate the remaining first virtual resource in the second transaction record when it is identified that the predicted transaction amount is obviously unable to support the predicted transaction, thereby avoiding the failure of the virtual resource transaction initiated by the user due to insufficient predicted transaction amount or reducing the execution efficiency of the transaction, which is conducive to improving the risk management capability of the solution.
[0115] In some optional embodiments, after querying the transaction entry between the first virtual resource and the second virtual resource in the second transaction record based on the virtual resources included in the customer transaction information, if the second transaction record does not contain the transaction entry between the first virtual resource and the second virtual resource, the virtual resource transaction is performed based on the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0116] In some optional embodiments, before updating the predicted transaction amount of the queried transaction item based on the actual transaction amount in the customer transaction information, the trading platform will compare the predicted transaction amount of the transaction item with the actual transaction amount in the customer transaction information; if the actual transaction amount in the customer transaction information is higher than the predicted transaction amount of the transaction item, the virtual resource transaction will be executed based on the customer transaction information, and the position will be closed based on the predicted transaction amount of the transaction item.
[0117] In some optional embodiments, the customer transaction information includes an order identifier of the predicted transaction order. In the process of updating the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the actual transaction amount in the customer transaction information, the trading platform will query the transaction item corresponding to the order identifier in the second transaction record according to the order identifier contained in the customer transaction information, and then update the predicted transaction amount of the queried transaction item according to the actual transaction amount in the customer transaction information. Different predicted transaction orders are identified by order identifiers, and the predicted transaction orders targeted by the transaction are specified in the customer transaction information, so that different predicted transaction orders can be closed independently, which is conducive to improving the management granularity of the virtual resource transaction process.
[0118] In some optional embodiments, in the process of generating a transaction record of converting the first virtual resource into the second virtual resource in the first transaction record according to the predicted transaction amount in the predicted transaction order, and generating a transaction record of converting the second virtual resource into the first virtual resource in the second transaction record, according to the predicted transaction amount in the predicted transaction order, generating simulated transaction information and predicted transaction information, wherein the first virtual resource is converted into the second virtual resource in the simulated transaction information, and the second virtual resource is converted into the first virtual resource in the predicted transaction information. It can be understood that the transaction amount in the simulated transaction information and the predicted transaction information is the same, but the conversion direction of the virtual resources is opposite. Subsequently, the trading platform performs a simulated transaction according to the simulated transaction information to generate a transaction record of converting the first virtual resource into the second virtual resource in the first transaction record, and enters the predicted transaction information into the second transaction record. By generating two transactions with the same transaction amount but opposite directions, it is possible to perform simulated transactions based on the predicted transaction order without modifying the original transaction logic of the virtual resources, which is conducive to reducing the implementation cost of the solution.
[0119] In some optional embodiments, when the transaction validity period expires, in the process of closing the position according to the second transaction record, the trading platform will periodically query the time status between the current moment and the transaction validity period. If the current moment is outside the transaction validity period, a closing instruction for the second transaction record is generated to close the position according to the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record. When the transaction validity period of the predicted transaction order expires, the trading platform directly closes the predicted transaction order in the second transaction record, thereby reducing the time the trading platform holds virtual resources, reducing the probability of virtual resource loss, and improving transaction stability.
[0120] The following is an example of the implementation details of the technical solution of the embodiment of the present application:
[0121] In one embodiment of the present application, the transaction of virtual resources will be recorded in the first transaction record, and the predicted transaction order will be recorded in the first transaction record and the second transaction record. The structure of the first transaction record and the second transaction record are completely consistent, and the structure of the first transaction record can be set with reference to the structure of Table 1.
[0122]
[0123] Table 1
[0124] Assume that the predicted transaction order received by the pre-leveling system is at 12:00 on April 28, and it is predicted that the transaction in the next 6 hours will cumulatively sell 680,000 second virtual resources and buy 100,000 first virtual resources, then the order information is "second virtual resource first virtual resource, -100000, 680000, 4.28 18:00". After receiving this predicted transaction order, the pre-leveling system generates two transaction information and sends it to the exposure management system, one simulated customer transaction, the transaction information is exactly the same as the data in the received predicted transaction order, and the other transaction, the virtual resources of the transaction are the same as the simulated customer transaction, and the buying and selling directions are opposite, that is, buying 680,000 yuan of the second virtual resource and selling 100,000 first virtual resources. The simulated customer transaction will be recorded in the first transaction record, and the exposure management system will close the position based on the original closing rules and strategies, as shown in Table 2:
[0125]
[0126] Table 2
[0127] Another transaction is recorded in the second transaction record, which is shown in Table 3:
[0128]
[0129] Table 3
[0130] When a new customer transaction arrives at the exposure management system, the exposure management system needs to refer to the virtual resource of this customer transaction. Figure 6 , Figure 6 This is a flow chart of processing customer transaction information within the effective time window in the embodiment of the present application. Figure 6 As shown, after receiving the real transaction of the customer, the exposure management system will send it to the pre-settlement system based on the virtual resource information of the real transaction as the query condition. The pre-settlement system queries whether there is a forecast transaction order within the validity period based on the virtual resources, that is, among the forecast transaction orders with the same virtual resources, whether there is an order with a forecast transaction end time greater than the current time. If there is, the exposure management system is informed to enter this transaction order into the second transaction record of "forecast transaction", otherwise, the exposure management system is informed to enter this transaction order into the first transaction record.
[0131] Assume that the current time is 15:00 on April 28, and two customer transactions have been received: the first customer order is to sell 340,000 second virtual resources and buy 50,000 first virtual resources; the second customer order is to sell 760,000 second virtual resources and buy 10,000 third virtual resources. The input results are shown in Table 4:
[0132]
[0133] Table 4
[0134] As can be seen from Table 4, the exposure management system inquires the pre-settlement system about the two documents to be entered into the first transaction record or the second transaction record of the "predicted transaction". Since a predicted transaction order is received at 12 o'clock and the end time of the order is 18:00, the pre-settlement system notifies the exposure management system to enter the first transaction into the second transaction record of the "predicted transaction". The second transaction is entered into the first transaction record, as shown in Table 5:
[0135]
[0136] Table 5
[0137] Assume that the time has come to 18:00 on April 28, and there are no other customer orders from 15:00 to 18:00, and the second transaction record of "predicted transaction" is not empty, which means that the actual transaction volume is less than the predicted transaction volume, so it is necessary to clean up and close the position in time. For example, at 18:00 on April 28, since the predicted transaction order "Second virtual resource first virtual resource, -100000, 680000, 4.28 18:00" has reached the end time, the notification will clear the corresponding remaining transaction amount in the second transaction record of "predicted transaction", that is, 50,000 first virtual resources are sold in the third-party trading market, and the final second transaction record is shown in Table 6:
[0138]
[0139] Table 6
[0140] Specific process reference Figure 7 As shown, Figure 7 The schematic diagram of the liquidation process corresponding to the forecast transaction order in the embodiment of the present application. The forecast transaction order is set with a timer in the forecast liquidation system. The timer queries the transaction validity period of the forecast transaction order to determine whether there is a forecast transaction order that has reached the end time. If so, the exposure management system is notified to liquidate the position according to its virtual resource information. The specific liquidation position is the remaining transaction amount of the virtual resources in the second transaction record of the "forecast transaction", and the liquidation transaction volume is to clear all the remaining transaction amount exposures to zero.
[0141] In summary of the above examples, since the forecast transaction order adds effective time window information, customer transactions will only fall into the second transaction record within the effective time window, while the rest of the time will still be recorded in the first transaction record and managed according to the original liquidation rules. As a result, the time-sensitive nature of the forecast transaction itself is also reflected in the corresponding exposure management activities. Especially within the time window, when the actual transaction volume is far less than the forecast transaction volume, the exposure formed by the excessive forecast transaction can be handled in time to avoid the risk of virtual resource loss caused by the trading platform holding virtual resources due to inaccurate forecast transactions.
[0142] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0143] The following introduces the device implementation of the present application, which can be used to execute the transaction method of virtual resources in the above-mentioned embodiments of the present application. Figure 8 The block diagram schematically shows the composition of the virtual resource transaction device in the embodiment of the present application. Figure 8 As shown, the virtual resource transaction device 800 may mainly include:
[0144] An acquisition unit 810 is configured to acquire a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order;
[0145] A generating unit 820 is configured to generate, in a first transaction record, a transaction record for converting the first virtual resource into the second virtual resource according to the predicted transaction amount in the predicted transaction order, and to generate, in a second transaction record, a transaction record for converting the second virtual resource into the first virtual resource;
[0146] A first position closing unit 830, configured to perform a position closing operation according to the first transaction record;
[0147] An updating unit 840 is configured to update the second transaction record according to the received customer transaction information before the transaction validity period of the predicted transaction order expires, wherein the customer transaction information includes an actual transaction amount of the first virtual resource converted into the second virtual resource;
[0148] The second position closing unit 850 is configured to perform a position closing operation according to the second transaction record when the transaction validity period expires.
[0149] In some embodiments of the present application, based on the above technical solution, the update unit 840 is configured to: receive customer transaction information; obtain the transaction validity period of the predicted transaction order based on the virtual resources contained in the customer transaction information; if the moment of receiving the customer transaction information is within the transaction validity period, then update the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record based on the actual transaction amount in the customer transaction information.
[0150] In some embodiments of the present application, based on the above technical solution, the update unit 840 is configured to: query the transaction items between the first virtual resource and the second virtual resource in the second transaction record according to the virtual resources included in the customer transaction information; and update the predicted transaction amount of the queried transaction items according to the actual transaction amount in the customer transaction information.
[0151] In some embodiments of the present application, based on the above technical solution, the update unit 840 is configured as follows: if the second transaction record does not contain a transaction entry between the first virtual resource and the second virtual resource, a virtual resource transaction is performed according to the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0152] In some embodiments of the present application, based on the above technical solution, the update unit 840 is configured to: compare the predicted transaction amount of the transaction item with the actual transaction amount in the customer transaction information; if the actual transaction amount in the customer transaction information is higher than the predicted transaction amount of the transaction item, execute the virtual resource transaction according to the customer transaction information, and perform a closing operation according to the predicted transaction amount of the transaction item.
[0153] In some embodiments of the present application, based on the above technical solution, the update unit 840 is configured as follows: if the moment of receiving the customer transaction information is outside the transaction validity period or the transaction validity period is not obtained, then executing the virtual resource transaction according to the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
[0154] In some embodiments of the present application, based on the above technical solution, the customer transaction information includes an order identifier of the predicted transaction order, and the update unit is configured to: query the transaction entry corresponding to the order identifier in the second transaction record according to the order identifier included in the customer transaction information; and update the predicted transaction amount of the queried transaction entry according to the actual transaction amount in the customer transaction information.
[0155] In some embodiments of the present application, based on the above technical solution, the generation unit 820 is configured to: generate simulated transaction information and predicted transaction information according to the predicted transaction amount in the predicted transaction order, wherein the first virtual resource in the simulated transaction information is converted into the second virtual resource, and the second virtual resource in the predicted transaction information is converted into the first virtual resource; perform a simulated transaction according to the simulated transaction information to generate a transaction record in the first transaction record for converting the first virtual resource into the second virtual resource; and enter the predicted transaction information into the second transaction record.
[0156] In some embodiments of the present application, based on the above technical solution, the second closing unit 850 is configured to: periodically query the time status between the current moment and the validity period of the transaction; if the current moment is outside the validity period of the transaction, generate a closing instruction for the second transaction record to perform a closing operation based on the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record.
[0157] In some embodiments of the present application, based on the above technical solution, the acquisition unit 810 is further configured as follows:
[0158] Obtain an amount adjustment order, wherein the amount adjustment order includes an adjustment amount for a predicted transaction amount between the first virtual resource and the second virtual resource; and update the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the adjustment amount in the amount adjustment order.
[0159] In some embodiments of the present application, based on the above technical solution, the update unit 840 is also configured to: determine the conversion direction between the first virtual resource and the second virtual resource in the second transaction record according to the predicted transaction amount in the second transaction record; if the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, mark the predicted transaction order as invalid, and perform a closing operation according to the predicted transaction amount in the second transaction record.
[0160] In some embodiments of the present application, based on the above technical solution, the update unit 840 is also configured to: receive a transaction termination instruction for the predicted transaction order; in response to the transaction termination instruction, close the first virtual resource according to the second transaction record.
[0161] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0162] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0163] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0164] like Fig. 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0165] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
[0166] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 909, and / or installed from a removable medium 911. When the computer program is executed by a central processing unit (CPU) 901, various functions defined in the system of the present application are executed.
[0167] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0168] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0170] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0171] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0172] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A virtual resource trading method, characterized in that: include: Acquire a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order; According to the predicted transaction amount in the predicted transaction order, generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record; Performing a position closing operation according to the first transaction record; Before the transaction validity period of the predicted transaction order expires, updating the second transaction record according to the received customer transaction information, wherein the customer transaction information includes the actual transaction amount of the first virtual resource converted into the second virtual resource; When the transaction validity period expires, a position closing operation is performed according to the second transaction record.
2. The transaction method according to claim 1, characterized in that: Before the transaction validity period of the predicted transaction order expires, updating the second transaction record according to the received customer transaction information includes: Receive customer transaction information; Acquire the transaction validity period of the predicted transaction order according to the virtual resources included in the customer transaction information; If the moment of receiving the customer transaction information is within the transaction validity period, the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record is updated according to the actual transaction amount in the customer transaction information.
3. The transaction method according to claim 2, characterized in that: The updating, according to the actual transaction amount in the customer transaction information, of the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record includes: According to the virtual resources included in the customer transaction information, querying the second transaction record for transaction entries between the first virtual resource and the second virtual resource; The predicted transaction amount of the queried transaction item is updated according to the actual transaction amount in the customer transaction information.
4. The transaction method according to claim 3, characterized in that: After searching the second transaction record for transaction entries between the first virtual resource and the second virtual resource according to the virtual resource included in the customer transaction information, the method further includes: If the second transaction record does not include a transaction entry between the first virtual resource and the second virtual resource, a virtual resource transaction is performed according to the customer transaction information to update a transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
5. The transaction method according to claim 3, characterized in that: Before updating the predicted transaction amount of the queried transaction item according to the actual transaction amount in the customer transaction information, the method further includes: comparing the predicted transaction amount of the transaction item with the actual transaction amount in the customer transaction information; If the actual transaction amount in the customer transaction information is higher than the predicted transaction amount of the transaction item, the virtual resource transaction is executed according to the customer transaction information, and the position is closed according to the predicted transaction amount of the transaction item.
6. The transaction method according to claim 2, characterized in that: The method further comprises: If the moment of receiving the customer transaction information is outside the transaction validity period or the transaction validity period is not obtained, the virtual resource transaction is performed according to the customer transaction information to update the transaction record of converting the first virtual resource into the second virtual resource in the first transaction record.
7. The transaction method according to claim 2, characterized in that: The customer transaction information includes an order identifier of the predicted transaction order; and updating the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record according to the actual transaction amount in the customer transaction information includes: According to the order identifier included in the customer transaction information, querying the second transaction record for a transaction entry corresponding to the order identifier; The predicted transaction amount of the queried transaction item is updated according to the actual transaction amount in the customer transaction information.
8. The transaction method according to claim 1, characterized in that: The step of generating a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record according to the predicted transaction amount in the predicted transaction order, and generating a transaction record for converting the second virtual resource into the first virtual resource in the second transaction record includes: Generate simulated transaction information and predicted transaction information according to the predicted transaction amount in the predicted transaction order, wherein the first virtual resource in the simulated transaction information is converted into the second virtual resource, and the second virtual resource in the predicted transaction information is converted into the first virtual resource; Performing a simulated transaction according to the simulated transaction information to generate a transaction record for converting the first virtual resource into the second virtual resource in the first transaction record; The predicted transaction information is entered into the second transaction record.
9. The transaction method according to claim 1, characterized in that: When the transaction validity period expires, performing a position closing operation according to the second transaction record includes: Periodically query the time status between the current time and the validity period of the transaction; If the current moment is outside the validity period of the transaction, a closing instruction for the second transaction record is generated to perform a closing operation according to the predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record.
10. The transaction method according to claim 1, characterized in that: The method further comprises: Acquire an amount adjustment order, wherein the amount adjustment order includes an adjustment amount for a predicted transaction amount between the first virtual resource and the second virtual resource; The predicted transaction amount between the first virtual resource and the second virtual resource in the second transaction record is updated according to the adjustment amount in the amount adjustment order.
11. The transaction method according to claim 1, characterized in that: After the second transaction record is updated according to the received customer transaction information, the method includes: determining, according to the predicted transaction amount in the second transaction record, a conversion direction between the first virtual resource and the second virtual resource in the second transaction record; If the conversion direction in the second transaction record is to convert the second virtual resource into the first virtual resource, the predicted transaction order is marked as invalid, and a closing operation is performed according to the predicted transaction amount in the second transaction record.
12. The transaction method according to claim 1, characterized in that: The method further comprises: Receiving a transaction termination instruction for the predicted transaction order; In response to the transaction termination instruction, a closing operation is performed on the first virtual resource according to the second transaction record.
13. A virtual resource trading device, characterized in that: include: An acquisition unit configured to acquire a predicted transaction order, wherein the predicted transaction order includes a predicted transaction amount of converting the first virtual resource into the second virtual resource and a transaction validity period of the predicted transaction order; a generating unit configured to generate, in a first transaction record, a transaction record for converting the first virtual resource into the second virtual resource, and to generate, in a second transaction record, a transaction record for converting the second virtual resource into the first virtual resource, according to the predicted transaction amount in the predicted transaction order; a first position closing unit, configured to perform a position closing operation according to the first transaction record; An updating unit, configured to update the second transaction record according to received customer transaction information before the transaction validity period of the predicted transaction order expires, wherein the customer transaction information includes an actual transaction amount of the first virtual resource converted into the second virtual resource; The second position closing unit is configured to perform a position closing operation according to the second transaction record when the transaction validity period expires.
14. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the virtual resource transaction method described in any one of claims 1 to 12 by executing the executable instructions.
15. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the virtual resource trading method according to any one of claims 1 to 12 is implemented.
16. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. The processor of the electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the virtual resource trading method as claimed in any one of claims 1 to 12.
Citation Information
Patent Citations
A method and apparatus for purchase foreign exchange
CN109523384A
Inter-bank transfer processing method and device
CN110619570A
Predictive interaction processing method and device in live broadcast, electronic equipment and storage medium
CN112235588A
Virtual resource exchange method and device, electronic equipment and storage medium
CN113205394A
Data processing method and device, equipment and storage medium
CN113421070A