Data processing method and device, equipment and storage medium
By calculating the resource floating ratio in foreign exchange transactions and setting thresholds, and automatically performing position closing operations, the problem of low exposure management efficiency in foreign exchange transactions in the existing technology is solved, and more efficient risk management is achieved.
Patent Information
- Application Number
- CN202410033081.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, when banks or institutions conduct exposure management in foreign exchange transactions, they only consider the size of their position exposure, resulting in low management efficiency and inability to effectively deal with the risks brought about by exchange rate fluctuations.
By obtaining the digital resource quantity and conversion rate of the resources to be transferred under different resource types, calculating the target resource cost and resource floating ratio, setting a preset threshold, and performing a closing operation when the resource floating ratio exceeds the threshold.
Improve the efficiency of exposure management, reduce the profit and loss risks caused by exchange rate fluctuations, and achieve faster and more efficient trading decisions.
Smart Images

Figure CN120298087A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a data processing method, apparatus, device, and storage medium. Background Art
[0002] In the intermediary service of foreign exchange trading for customers by banks or institutions, there are often "long positions" or "short positions" in foreign exchange positions. A long position means that the purchase amount is greater than the sale amount, and a short position means that the sale amount is greater than the purchase amount. Such "short positions" and "long positions" are called "foreign exchange exposures". An exposure has factors of income and expenditure imbalance, and due to exchange rate fluctuations, it may bring risks. Therefore, banks or institutions often need to sell long positions and cover short positions, which is called closing positions or closing out exposures.
[0003] Currently, for foreign exchange exposures formed by foreign exchange transactions of third-party institutions, in order to avoid large profits and losses caused by market fluctuations when the open positions are large, most trading executions actively close out these exposures by setting the open positions to exceed a certain threshold. However, such closing decisions only consider the factor of the size of the open positions, and the efficiency of exposure management is low. Therefore, how to improve the efficiency of exposure management is an urgent problem to be solved currently. Summary of the Invention
[0004] Embodiments of this application provide a data processing method, apparatus, device, and storage medium, which can improve the efficiency of exposure management.
[0005] In a first aspect, embodiments of this application provide a data processing method, which includes:
[0006] Obtain a first digital resource quantity of the resource to be transferred under a first resource type and a second digital resource quantity of the resource to be transferred under a second resource type from transfer information corresponding to the resource to be transferred;
[0007] Based on the second digital resource quantity and the first digital resource quantity, determine a target resource cost of the resource to be transferred when generating the transfer information;
[0008] Obtain a conversion rate at which the digital resource corresponding to the second resource type is converted into the digital resource corresponding to the first resource type at the current system time point;
[0009] Based on the conversion rate and the target resource cost, determine a resource floating ratio of the resource to be transferred;
[0010] If the resource floating ratio is greater than a first preset threshold, transfer the resource to be transferred to a target terminal.
[0011] In a second aspect, embodiments of this application provide a data processing apparatus, and the data processing apparatus includes:
[0012] An obtaining unit, configured to obtain a first digital resource amount of the resource to be transferred under a first resource type and a second digital resource amount of the resource to be transferred under a second resource type from transfer information corresponding to the resource to be transferred;
[0013] A determining unit, configured to determine a target resource cost of the resource to be transferred when generating the transfer information based on the second digital resource amount and the first digital resource amount;
[0014] The obtaining unit is further configured to obtain a conversion rate at which the digital resource corresponding to the second resource type is converted into the digital resource corresponding to the first resource type at the current system time point;
[0015] The determining unit is further configured to determine a resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost;
[0016] A transferring unit, configured to transfer the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold.
[0017] In one embodiment, the determining unit determining the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost includes:
[0018] Calculating a difference between the conversion rate and the target resource cost;
[0019] Determining a resource floating ratio based on a ratio of the difference to the target resource cost.
[0020] In one embodiment, the obtaining unit further includes:
[0021] If it is detected that the conversion rate at which the digital resource corresponding to the second resource type is converted into the digital resource corresponding to the first resource type changes, triggering an operation of obtaining the first digital resource amount of the resource to be transferred under the first resource type and the second digital resource amount of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred.
[0022] In one embodiment, the determining unit further includes:
[0023] Determining a target resource pair including the first resource type and the second resource type;
[0024] Obtaining a first preset threshold corresponding to the target resource pair according to the correspondence between the resource pair and the first preset threshold;
[0025] The transferring the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold includes:
[0026] If the floating ratio of the resource is greater than the first preset threshold corresponding to the target resource, transfer the resource to be transferred to the target terminal.
[0027] In one embodiment, the transfer unit is configured to transfer the resource to be transferred to the target terminal if the floating ratio of the resource is greater than the first preset threshold, including:
[0028] If the floating ratio of the resource is a positive number and the floating ratio of the resource is greater than the second preset threshold, transfer the resource to be transferred to the target terminal;
[0029] If the floating ratio of the resource is a negative number and the floating ratio of the resource is greater than the third preset threshold, transfer the resource to be transferred to the target terminal.
[0030] In one embodiment, the determining unit is further configured to include:
[0031] Determine a conversion rate threshold based on the first preset threshold and the target resource cost;
[0032] If the conversion rate of converting the digital resource corresponding to the second resource type into the digital resource corresponding to the first resource type at the current system time is greater than the conversion rate threshold, transfer the digital resource corresponding to the first resource type to the target terminal.
[0033] In one embodiment, the transfer unit is configured to transfer the resource to be transferred to the target terminal if the floating ratio of the resource is greater than the first preset threshold, including:
[0034] Determine the floating amount of the resource to be transferred at the current system time based on the first digital resource amount and the floating ratio of the resource;
[0035] If the floating ratio of the resource is greater than the first preset threshold and the floating amount of the resource is greater than the fourth preset threshold, transfer the resource to be transferred to the target terminal.
[0036] In a third aspect, an embodiment of the present invention provides a computer device, which includes a memory, a communication interface, and a processor, wherein the memory, the communication interface, and the processor are interconnected; the memory stores a computer program, and the processor calls the computer program stored in the memory to implement the method described in the first aspect above.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the method described in the first aspect above.
[0038] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer storage medium. A processor of a computer device reads the computer program from the computer storage medium, and the processor executes the computer program to enable the computer device to execute the above data processing method.
[0039] In an embodiment of the present application, a first digital resource amount of a resource to be transferred under a first resource type and a second digital resource amount of the resource to be transferred under a second resource type are obtained from transfer information corresponding to the resource to be transferred. Based on the second digital resource amount and the first digital resource amount, a target resource cost of the resource to be transferred when generating the transfer information is determined. A conversion rate at which a digital resource corresponding to the second resource type is converted into a digital resource corresponding to the first resource type at the current system time point is obtained. Based on the conversion rate and the target resource cost, a resource floating ratio of the resource to be transferred is determined. If the resource floating ratio is greater than a first preset threshold, the resource to be transferred is transferred to a target terminal. By setting a threshold for the resource floating ratio and transferring the resource to be transferred to the target terminal when the resource floating ratio is greater than the first preset threshold, the efficiency in exposure management can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the following will describe the drawings required to be used in the embodiments of the present application or the background art.
[0041] Figure 1 It is a schematic structural diagram of a data processing system provided by an embodiment of the present application;
[0042] Figure 2 It is a schematic flowchart of a data processing method provided by an embodiment of the present application;
[0043] Figure 3 It is a schematic flowchart of another data processing method provided by an embodiment of the present application;
[0044] Figure 4 It is a schematic structural diagram of a data processing device provided by an embodiment of the present application;
[0045] Figure 5 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0047] In the specific implementation manner of the present application, it involves user-related data, such as the digital resource information of the user, etc. When the embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with local laws, regulations, and standards.
[0048] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the architecture of a data processing system provided by an embodiment of the present application. As Figure 1 shown, the data processing system may include a user, a resource transfer institution, and a target terminal.
[0049] Exemplarily, the user sends a transaction request to the resource transfer institution, requesting to transfer resources to the resource transfer institution. The resource transfer institution determines the first digital resource amount of the user's resources under the first resource type and the second digital resource amount under the second resource type based on the transaction request sent by the user, calculates the target resource cost, stores the first digital resource amount of the user's resources under the first resource type, the second digital resource amount under the second resource type, and the target resource cost in the transfer information. The resource transfer institution real-time detects the conversion rate of the digital resources corresponding to the second resource type to the digital resources corresponding to the first resource type at the current system time point. If the conversion rate changes, it obtains the conversion rate, the second digital resource amount, the first digital resource amount, and the target resource cost, and determines the resource floating ratio of the resources to be transferred. If the resource floating ratio is greater than the first preset threshold, it transfers resources to the target terminal.
[0050] Among them, the first digital resource is the resource for which the user conducts a transaction with the resource transfer institution, such as it can be US dollars, British pounds, etc.
[0051] Among them, the second digital resource is the resource type used by the resource transfer institution to conduct a transaction with the user, such as it can be RMB, Korean won, etc.
[0052] Among them, the target resource cost is the holding cost, such as it can be the exchange rate of RMB and US dollars when the user conducts a transaction with the resource transfer institution.
[0053] Among them, the conversion rate refers to the exchange rate at which the digital resources corresponding to the second resource type are converted into the digital resources corresponding to the first resource type at the current system time point; the exchange rate refers to the ratio of the relative values between two different currencies.
[0054] Among them, the resource to be transferred is the foreign exchange exposure of the institution after the transaction with the user. For example, in the intermediary service of foreign exchange trading for users by banks or institutions, there are often "long positions" or "short positions" in foreign exchange positions. A long position means the purchase amount is greater than the sale amount, and a short position means the sale amount is greater than the purchase amount. Such "short positions" and "long positions" are called "foreign exchange exposures". The exposure has factors of income and expenditure imbalance, and due to exchange rate fluctuations, it may bring risks. Therefore, banks or institutions often need to sell long positions and cover short positions, which is called closing positions or offsetting exposures.
[0055] Among them, the transfer information refers to the relevant information when the resource transfer institution conducts transactions with the user, which is stored in the exposure record.
[0056] Among them, the resource floating ratio refers to the ratio of unrealized profit and loss: based on further calculation of unrealized profit and loss, the calculation formula: the ratio of unrealized profit and loss = unrealized profit and loss / (open position * holding cost) = (current exchange rate price - holding cost) / holding cost; unrealized profit and loss: also known as book profit and loss or floating profit and loss, refers to the price difference between the current exchange rate price and the original holding price of the open positions currently held by the institution, and the calculation formula: unrealized profit and loss = open position * (current exchange rate price - holding cost).
[0057] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a data processing method provided by an embodiment of the present application. As Figure 2 shown, the data processing solution includes but is not limited to steps S201 - S205, where:
[0058] S201, obtain the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred.
[0059] In this embodiment, the resource transfer institution obtains the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred, that is, from the exposure record. Among them, when the user transfers resources to the resource transfer institution, after the resource transfer institution completes the resource transfer with the user, it will store the transfer information in the exposure record. For example, please refer to Table 1 below:
[0060] Table 1 Exposure Record Table
[0061]
[0062] Exemplarily, the first digital resource type is US dollars, and the second digital resource type is RMB. The resource pair is a US dollar and RMB resource pair, i.e., USDCNY. Suppose the resource transfer institution receives a resource transfer transaction request from a user. For example, if the user sells 1 million US dollars on the settlement date T0, the resource transfer institution buys 1 million US dollars and records it in the exposure record. The previous exposure of the resource transfer institution has been closed. When the resource transfer institution completes the transaction with the user, the position exposure of the resource transfer institution is 1 million US dollars under the first digital resource type. According to the RMB-US dollar exchange rate of 7.00000 at the time of the transaction with the user, the position exposure of the resource transfer institution is 7 million RMB under the second digital resource type. The holding cost is the exchange rate at the time of the transaction, i.e., the conversion rate at that time, which is 7.00000. When the transaction is just completed, the exchange rate has not changed yet, that is, the resource floating ratio is 0.
[0063] In one implementation, the method further includes:
[0064] If it is detected that the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type changes, then trigger the operation of obtaining the first digital resource quantity of the to-be-transferred resource under the first resource type and the second digital resource quantity of the to-be-transferred resource under the second resource type from the transfer information corresponding to the to-be-transferred resource.
[0065] In this embodiment, the resource transfer institution will monitor in real time the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type. For example, it monitors in real time the exchange rate between RMB and US dollars. When the exchange rate changes, the resource transfer institution obtains from the transfer information corresponding to the to-be-transferred resource, that is, from the exposure record, the first digital resource quantity of the to-be-transferred resource under the first resource type and the second digital resource quantity of the to-be-transferred resource under the second resource type.
[0066] S202, based on the second digital resource quantity and the first digital resource quantity, determine the target resource cost of the to-be-transferred resource when generating the transfer information.
[0067] In this embodiment, after the resource transfer institution completes the transaction, it can only record in the exposure record the first digital resource quantity of the to-be-transferred resource under the first resource type and the second digital resource quantity of the to-be-transferred resource under the second resource type. After monitoring that the exchange rate changes, it calculates the target resource cost, that is, 7.00000 in the exposure record table.
[0068] S203, obtain the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time point.
[0069] In this embodiment, the resource transfer institution monitors in real time the conversion rate of the digital resources corresponding to the second resource type into the digital resources corresponding to the first resource type.
[0070] S204. Determine the resource floating ratio of the resources to be transferred based on the conversion rate and the target resource cost.
[0071] In this embodiment, when the resource transfer institution obtains the conversion rate in real time, it will determine the resource floating ratio of the resources to be transferred based on the target resource cost and the conversion rate.
[0072] In one implementation, the determining the resource floating ratio of the resources to be transferred based on the conversion rate and the target resource cost includes:
[0073] Calculate the difference between the conversion rate and the target resource cost;
[0074] Determine the resource floating ratio based on the ratio of the difference to the target resource cost.
[0075] In this embodiment, the calculation method of the resource floating ratio is: the difference between the conversion rate and the target resource cost; determine the resource floating ratio based on the ratio of the difference to the target resource cost. For example, the conversion rate, that is, the exchange rate, is 7.00360, and the target resource cost is 7.00000, then the resource floating ratio is (7.00360 - 7.00000) / 7.00000 = 0.00051 = 0.00051, that is, 5.1 bps. The resource transfer institution calculates the resource floating ratio according to the exchange rate obtained in real time and will update the exposure record, as shown in Table 2 below:
[0076] Table 2 Updated Exposure Record Table
[0077]
[0078] S205. If the resource floating ratio is greater than the first preset threshold, transfer the resources to be transferred to the target terminal.
[0079] In this embodiment, the resource transfer institution compares the calculated resource floating ratio with the first preset threshold. If the resource floating ratio is greater than the first preset threshold, it will transfer the resources to be transferred to the target terminal. For example, the first preset threshold is 5 bps, and the resource floating ratio is 5.1 bps. Since the resource floating ratio is greater than the first preset threshold, the resource transfer institution transfers the digital resources corresponding to the first resource type to the target terminal, that is, the resource transfer institution performs a bank flat trading operation to zero the T0 exposure of USDCNY.
[0080] In one implementation, the method further includes:
[0081] Determine a conversion rate threshold based on the first preset threshold and the target resource cost;
[0082] If the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time is greater than the conversion rate threshold, transfer the digital resource corresponding to the first resource type to the target terminal.
[0083] In this embodiment, the conversion rate threshold that meets the conditions can be calculated and stored in advance according to the first preset threshold and the target resource cost. For example, if the first preset threshold is 5 bps and the target resource cost is 7.00000, then the conversion rate threshold is 0.00050×7.00000 + 7.00000 = 7.00350. When calculating later, the current conversion rate, that is, the exchange rate, can be directly compared with the pre-calculated and stored conversion rate threshold. When the exchange rate obtained in real time is greater than or equal to 7.00350, transfer the digital resource corresponding to the first resource type to the target terminal.
[0084] In one implementation, the step of transferring the resource to be transferred to the target terminal when the resource floating ratio is greater than the first preset threshold includes:
[0085] Determine the resource floating amount of the resource to be transferred at the current system time based on the first digital resource amount and the resource floating ratio;
[0086] If the resource floating ratio is greater than the first preset threshold and the resource floating amount is greater than the fourth preset threshold, transfer the resource to be transferred to the target terminal.
[0087] In this embodiment, the resource floating amount of the resource to be transferred at the current system time can be determined based on the first digital resource amount and the resource floating ratio. For example, the resource floating amount of 100,000 US dollars at the current resource floating ratio is a profit of 5,000 US dollars, and the resource floating amount of 10,000 US dollars at the current resource floating ratio is a profit of 500 US dollars. For different first digital resource amounts, the resource floating amounts at the current resource floating ratio are different. The fourth preset threshold can be set according to the resource floating amount. For example, set the fourth preset threshold to 4,000 US dollars. When the resource floating ratio is greater than the first preset threshold and the resource floating amount is greater than the fourth preset threshold, transfer the resource to be transferred to the target terminal. That is, when the resource floating amount is relatively small and within an acceptable range, the exposure can be continued to be held.
[0088] In the embodiment of the present application, the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type are obtained from the transfer information corresponding to the resource to be transferred; based on the second digital resource quantity and the first digital resource quantity, the target resource cost of the resource to be transferred when generating the transfer information is determined; the conversion rate of the digital resource corresponding to the second resource type into the digital resource corresponding to the first resource type at the current system time point is obtained; based on the conversion rate and the target resource cost, the resource floating ratio of the resource to be transferred is determined; if the resource floating ratio is greater than the first preset threshold, the resource to be transferred is transferred to the target terminal. By setting a threshold for the resource floating ratio and transferring the resource to be transferred to the target terminal when the resource floating ratio is greater than the first preset threshold, the efficiency of exposure management can be improved.
[0089] Based on the above description, please refer to Figure 3 , Figure 3 which is a schematic flowchart of another data processing method provided by the embodiment of the present application. As Figure 3 shown, the data processing method includes but is not limited to steps S301 - S307, where:
[0090] S301, determine a target resource pair including the first resource type and the second resource type.
[0091] In this embodiment, a target resource pair including the first resource type and the second resource type can be determined first. For example, the target resource pair can be a US dollar - RMB resource pair or a Korean won - RMB resource pair, etc.
[0092] S302, obtain the first preset threshold corresponding to the target resource pair according to the corresponding relationship between the resource pair and the first preset threshold.
[0093] In this embodiment, different first preset thresholds can be set according to different resource pairs. For example, if the exchange rate fluctuation of a certain resource pair is small, the first preset threshold can be set larger; if the exchange rate fluctuation of another resource pair is large, the first preset threshold can be set smaller, reducing the loss risk of the resource transfer institution and lowering the transaction cost when conducting exposure management.
[0094] S303, obtain the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred.
[0095] For the specific steps of this solution, please refer to step S201 above, and this solution will not be elaborated here.
[0096] S304, based on the second digital resource quantity and the first digital resource quantity, determine the target resource cost of the resource to be transferred when generating the transfer information.
[0097] For the specific steps of this solution, please refer to the above step S202, and this solution will not be elaborated here.
[0098] S305. Obtain the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time point.
[0099] For the specific steps of this solution, please refer to the above step S203, and this solution will not be elaborated here.
[0100] S306. Determine the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost.
[0101] For the specific steps of this solution, please refer to the above step S204, and this solution will not be elaborated here.
[0102] S307. If the resource floating ratio is greater than the first preset threshold corresponding to the target resource, transfer the resource to be transferred to the target terminal.
[0103] In this embodiment, based on the determined target resource pair and the first preset threshold corresponding to the target resource pair, if the resource floating ratio is greater than the first preset threshold corresponding to the target resource pair, transfer the resource to be transferred to the target terminal, that is, the resource transfer institution executes the open position exposure at the bank.
[0104] In one implementation manner, the step of "if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal" includes:
[0105] If the resource floating ratio is positive and the resource floating ratio is greater than the second preset threshold, transfer the resource to be transferred to the target terminal;
[0106] If the resource floating ratio is negative and the resource floating ratio is greater than the third preset threshold, transfer the resource to be transferred to the target terminal.
[0107] In this embodiment, the threshold can be set according to whether the market is favorable or unfavorable to the resource transfer institution. If the resource floating ratio is positive, that is, the market is favorable to the resource transfer institution, the threshold is set to the second preset threshold. If the resource floating ratio is greater than the second preset threshold, the to-be-transferred resources are transferred between the resource transfer institution and the target terminal, that is, the resource transfer institution executes the position squaring of the open position at the bank. If the resource floating ratio is negative, that is, the market is unfavorable to the resource transfer institution, the threshold is set to the third preset threshold. If the resource floating ratio is greater than the third preset threshold, the to-be-transferred resources are transferred between the resource transfer institution and the target terminal, that is, the resource transfer institution executes the position squaring of the open position at the bank. By setting different thresholds based on whether the market is favorable or unfavorable to the resource transfer institution, the revenue can be increased, the profit can be locked in quickly by closing the position, and the loss can be stopped by closing the position immediately.
[0108] In the embodiment of the present application, a target resource pair including a first resource type and a second resource type is determined. According to the corresponding relationship between the resource pair and the first preset threshold, the first preset threshold corresponding to the target resource pair is obtained. The first digital resource quantity of the to-be-transferred resources in the first resource type and the second digital resource quantity of the to-be-transferred resources in the second resource type are obtained from the transfer information corresponding to the to-be-transferred resources. Based on the second digital resource quantity and the first digital resource quantity, the target resource cost of the to-be-transferred resources when generating the transfer information is determined. The conversion rate of the digital resources corresponding to the second resource type converted into the digital resources corresponding to the first resource type at the current system time point is obtained. Based on the conversion rate and the target resource cost, the resource floating ratio of the to-be-transferred resources is determined. If the resource floating ratio is greater than the first preset threshold corresponding to the target resource pair, the to-be-transferred resources are transferred between the resource transfer institution and the target terminal. By setting a threshold for the resource floating ratio of different target resource pairs, when the resource floating ratio is greater than the first preset threshold, the to-be-transferred resources are transferred between the resource transfer institution and the target terminal, which can improve the efficiency of exposure management.
[0109] The embodiment of the present application also provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the corresponding methods described in the above embodiments.
[0110] See again Figure 4 , Figure 4 which is a schematic structural diagram of a data processing device provided by the embodiment of the present application.
[0111] In an implementation manner of the data processing device according to the embodiment of the present application, the data processing device includes the following structure.
[0112] An obtaining unit 401, configured to obtain the first digital resource quantity of the to-be-transferred resources in the first resource type and the second digital resource quantity of the to-be-transferred resources in the second resource type from the transfer information corresponding to the to-be-transferred resources;
[0113] A determining unit 402, configured to determine a target resource cost of the resource to be transferred when generating the transfer information based on the second digital resource quantity and the first digital resource quantity;
[0114] The obtaining unit 401 is further configured to obtain a conversion rate at which the digital resource corresponding to the second resource type is converted into the digital resource corresponding to the first resource type at the current system time point;
[0115] The determining unit 402 is further configured to determine a resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost;
[0116] A transferring unit 403, configured to transfer the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold.
[0117] In one embodiment, the determining unit 402 determines the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost, including:
[0118] Calculating a difference between the conversion rate and the target resource cost;
[0119] Determining a resource floating ratio based on a ratio of the difference to the target resource cost.
[0120] In one embodiment, the obtaining unit 401 further includes:
[0121] If it is detected that the conversion rate at which the digital resource corresponding to the second resource type is converted into the digital resource corresponding to the first resource type changes, triggering an operation of obtaining a first digital resource quantity of the resource to be transferred in the first resource type and a second digital resource quantity of the resource to be transferred in the second resource type from the transfer information corresponding to the resource to be transferred.
[0122] In one embodiment, the determining unit 402 further includes:
[0123] Determining a target resource pair including the first resource type and the second resource type;
[0124] Obtaining a first preset threshold corresponding to the target resource pair according to a corresponding relationship between the resource pair and the first preset threshold;
[0125] The transferring the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold includes:
[0126] If the resource floating ratio is greater than the first preset threshold corresponding to the target resource pair, transferring the resource to be transferred to a target terminal.
[0127] In one embodiment, the transfer unit 403 is configured to transfer the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold, including:
[0128] If the resource floating ratio is positive and the resource floating ratio is greater than a second preset threshold, transfer the resource to be transferred to the target terminal;
[0129] If the resource floating ratio is negative and the resource floating ratio is greater than a third preset threshold, transfer the resource to be transferred to the target terminal.
[0130] In one embodiment, the determining unit 402 is further configured to include:
[0131] Determine a conversion rate threshold based on the first preset threshold and the target resource cost;
[0132] If the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time is greater than the conversion rate threshold, transfer the digital resource corresponding to the first resource type to the target terminal.
[0133] In one embodiment, the transfer unit 403 is configured to transfer the resource to be transferred to a target terminal if the resource floating ratio is greater than a first preset threshold, including:
[0134] Determine the resource floating amount of the resource to be transferred at the current system time based on the first digital resource amount and the resource floating ratio;
[0135] If the resource floating ratio is greater than a first preset threshold and the resource floating amount is greater than a fourth preset threshold, transfer the resource to be transferred to the target terminal.
[0136] In the embodiment of the present application, the obtaining unit 401 obtains the first digital resource amount of the resource to be transferred in the first resource type and the second digital resource amount of the resource to be transferred in the second resource type from the transfer information corresponding to the resource to be transferred; the determining unit 402 determines the target resource cost of the resource to be transferred when generating the transfer information based on the second digital resource amount and the first digital resource amount; the obtaining unit 401 obtains the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time point; the determining unit 402 determines the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost; the transfer unit 403 is configured to transfer the resource to be transferred to the target terminal if the resource floating ratio is greater than a first preset threshold. By setting a threshold for the resource floating ratio and transferring the resource to be transferred to the target terminal when the resource floating ratio is greater than the first preset threshold, the efficiency in exposure management can be improved.
[0137] Refer again to Figure 5 , Figure 5 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. The computer device in the embodiment of the present application includes structures such as a power supply module, and includes a processor 501, a memory 502, and a communication interface 503. Data can be exchanged between the processor 501, the memory 502, and the communication interface 503, and the corresponding data processing method is implemented by the processor 501.
[0138] The memory 502 may include a volatile memory, such as a random-access memory (RAM); the memory 502 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the memory 502 may further include a combination of the above types of memories.
[0139] The processor 501 may be a central processing unit (CPU). The processor 501 may also be a combination of a CPU and a GPU. In the computer device, multiple CPUs and GPUs may be included as needed for corresponding data transfer. In one embodiment, the memory 502 is used to store program instructions. The processor 501 may call the program instructions to implement various methods involved in the above embodiments of the present application.
[0140] In the first possible implementation manner, the processor 501 of the computer device calls the program instructions stored in the memory 502 to obtain the first digital resource amount of the resource to be transferred under the first resource type and the second digital resource amount of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred; based on the second digital resource amount and the first digital resource amount, determine the target resource cost of the resource to be transferred when generating the transfer information; obtain the conversion rate of the digital resource corresponding to the second resource type converted into the digital resource corresponding to the first resource type at the current system time point; based on the conversion rate and the target resource cost, determine the resource floating ratio of the resource to be transferred; if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal.
[0141] In one embodiment, the processor 501 determines the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost, and may perform the following operations:
[0142] Calculate the difference between the conversion rate and the target resource cost;
[0143] Determine the resource floating ratio based on the ratio of the difference value to the target resource cost.
[0144] In one embodiment, the processor 501 may further perform the following operations:
[0145] If it is detected that the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type changes, trigger the operation of obtaining the first digital resource quantity of the resource to be transferred in the first resource type and the second digital resource quantity of the resource to be transferred in the second resource type from the transfer information corresponding to the resource to be transferred.
[0146] In one embodiment, the processor 501 may further perform the following operations:
[0147] Determine a target resource pair including the first resource type and the second resource type;
[0148] Obtain the first preset threshold corresponding to the target resource pair according to the corresponding relationship between the resource pair and the first preset threshold;
[0149] The step of transferring the resource to be transferred to the target terminal if the resource floating ratio is greater than the first preset threshold includes:
[0150] If the resource floating ratio is greater than the first preset threshold corresponding to the target resource pair, transfer the resource to be transferred to the target terminal.
[0151] In one embodiment, for the operation of transferring the resource to be transferred to the target terminal if the resource floating ratio is greater than the first preset threshold, the processor 501 may perform the following operations:
[0152] If the resource floating ratio is positive and the resource floating ratio is greater than the second preset threshold, transfer the resource to be transferred to the target terminal;
[0153] If the resource floating ratio is negative and the resource floating ratio is greater than the third preset threshold, transfer the resource to be transferred to the target terminal.
[0154] In one embodiment, the processor 501 may further perform the following operations:
[0155] Determine a conversion rate threshold based on the first preset threshold and the target resource cost;
[0156] If the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time is greater than the conversion rate threshold, transfer the digital resource corresponding to the first resource type to the target terminal.
[0157] In one embodiment, when the resource floating ratio of the processor 501 is greater than a first preset threshold, the processor 501 may perform the following operations to transfer the resource to be transferred to the target terminal:
[0158] Based on the first digital resource quantity and the resource floating ratio, determine the resource floating quantity of the resource to be transferred at the current system time;
[0159] If the resource floating ratio is greater than the first preset threshold and the resource floating quantity is greater than a fourth preset threshold, transfer the resource to be transferred to the target terminal.
[0160] In the embodiment of the present application, the processor 501 obtains the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred; based on the second digital resource quantity and the first digital resource quantity, determine the target resource cost of the resource to be transferred when generating the transfer information; obtain the conversion rate of the digital resource corresponding to the second resource type converted into the digital resource corresponding to the first resource type at the current system time point; based on the conversion rate and the target resource cost, determine the resource floating ratio of the resource to be transferred; if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal. By setting a threshold for the resource floating ratio, when the resource floating ratio is greater than the first preset threshold, the resource to be transferred is transferred to the target terminal, which can improve the efficiency in exposure management.
[0161] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The foregoing storage medium includes: various media such as ROM or random access memory RAM, magnetic disk, or optical disc that can store program code.
[0162] The foregoing disclosure only shows some embodiments of the present application. Of course, the scope of rights of the present application cannot be limited thereby. Those of ordinary skill in the art can understand all or part of the processes of the above embodiments, and the equivalent changes made according to the claims of the present application still fall within the scope covered by the present invention.
Claims
1. A data processing method, characterized in that, Including: Obtain the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred; Based on the second digital resource quantity and the first digital resource quantity, determine the target resource cost of the resource to be transferred when generating the transfer information; Obtain the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time point; Based on the conversion rate and the target resource cost, determine the resource floating ratio of the resource to be transferred; If the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal.
2. The method according to claim 1, wherein The determining the resource floating ratio of the resource to be transferred based on the conversion rate and the target resource cost includes: Calculate the difference between the conversion rate and the target resource cost; Based on the ratio of the difference to the target resource cost, determine the resource floating ratio.
3. The method according to claim 1, wherein The method further includes: If it is detected that the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type changes, trigger the operation of obtaining the first digital resource quantity of the resource to be transferred under the first resource type and the second digital resource quantity of the resource to be transferred under the second resource type from the transfer information corresponding to the resource to be transferred.
4. The method according to claim 1, wherein The method further includes: Determine the target resource pair including the first resource type and the second resource type; According to the corresponding relationship between the resource pair and the first preset threshold, obtain the first preset threshold corresponding to the target resource pair; The if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal includes: If the resource floating ratio is greater than the first preset threshold corresponding to the target resource pair, transfer the resource to be transferred to the target terminal.
5. The method according to claim 1, wherein The if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal includes: If the resource floating ratio is positive and the resource floating ratio is greater than the second preset threshold, transfer the resource to be transferred to the target terminal; If the resource floating ratio is negative and the resource floating ratio is greater than the third preset threshold, transfer the resource to be transferred to the target terminal.
6. The method according to claim 1, wherein The method further includes: Based on the first preset threshold and the target resource cost, determine the conversion rate threshold; If the conversion rate of the digital resource corresponding to the second resource type to the digital resource corresponding to the first resource type at the current system time is greater than the conversion rate threshold, transfer the digital resource corresponding to the first resource type to the target terminal.
7. The method according to claim 1, wherein The if the resource floating ratio is greater than the first preset threshold, transfer the resource to be transferred to the target terminal includes: Based on the first digital resource quantity and the resource floating ratio, determine the resource floating quantity of the resource to be transferred at the current system time; If the floating ratio of the resource is greater than a first preset threshold and the floating amount of the resource is greater than a fourth preset threshold, transfer the resource to be transferred to the target terminal.
8. A data processing device, characterized in that, The device includes: an acquisition unit configured to acquire, from transfer information corresponding to the resource to be transferred, a first digital resource amount of the resource to be transferred under a first resource type and a second digital resource amount of the resource to be transferred under a second resource type; a determination unit configured to determine a target resource cost of the resource to be transferred when the transfer information is generated based on the second digital resource amount and the first digital resource amount; the acquisition unit is further configured to acquire a conversion rate for converting the digital resource corresponding to the second resource type into the digital resource corresponding to the first resource type at the current system time point; the determination unit is further configured to determine a floating ratio of the resource to be transferred based on the conversion rate and the target resource cost; a transfer unit configured to transfer the resource to be transferred to a target terminal if the floating ratio of the resource is greater than a first preset threshold.
9. A computer device, characterized in that, The computer device includes a memory, a communication interface, and a processor, wherein the memory, the communication interface, and the processor are interconnected; the memory stores a computer program, and the processor calls the computer program stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.