Data processing method and device, equipment and storage medium
By determining the aggregate resource quantity and swap data of the target resource pair, calculating the target resource conversion period, and optimizing the trading strategy, the problems of high transaction costs and opportunity cost loss in foreign exchange trading in the existing technology are solved, and the resource management efficiency is improved.
Patent Information
- Application Number
- CN202410016386.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2025-07-04
AI Technical Summary
When existing financial institutions have exposure management in foreign exchange trading, the transaction costs are high and the opportunity cost of swap transactions is lost, making it difficult to effectively manage resources.
By determining the aggregate resource quantity and swap data of the target resource pair, calculating the target resource conversion period, and transferring resources when the period is reached, optimizing the trading strategy to reduce costs.
Improve resource management efficiency, reduce transaction costs, obtain opportunity costs of swap transactions, and optimize exposure management.
Smart Images

Figure CN120258976A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing, and particularly to a data processing method, apparatus, device, and storage medium. Background Art
[0002] In the financial field, in the intermediary service of foreign exchange trading for customers by banks or institutions, situations often occur where the purchase amount is greater than the sale amount or the sale amount is greater than the purchase amount. Generally, the assets in such situations are called open positions. Due to the factor of unbalanced income and expenditure in open positions, risks will be brought in the case of fluctuations in foreign exchange market exchange rates. Therefore, it is necessary to square open positions, that is, to carry out closing operations to manage open positions.
[0003] Currently, when the open position management system of general financial institutions conducts closing operations, it independently conducts closing operations for the open positions of different currency pairs on different delivery dates respectively. However, conducting closing operations separately on different delivery dates will result in relatively high transaction costs. Or the open position management system of some financial institutions with swap trading capabilities can aggregate the open positions of different delivery dates and fix a delivery date for spot trading, and then conduct swap trading operations on the open positions of delivery dates other than this delivery date respectively to complete the closing operations. However, since the aggregated open positions are fixed on one delivery date for spot trading, when conducting swap trading operations on the open positions of delivery dates other than this delivery date respectively, one delivery date of the swap trading conducted is the delivery date corresponding to the open position, and the other delivery date is the fixed one delivery date. Therefore, the opportunity cost inherent in swap trading is lost.
[0004] Therefore, how to improve the management efficiency of resources is a problem that needs to be solved. Summary of the Invention
[0005] The technical problem to be solved by the embodiments of the present invention is to provide a data processing method, apparatus, device, and storage medium, which improve the management efficiency of resources.
[0006] In a first aspect, an embodiment of the present invention provides a data processing method, including:
[0007] Determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the aggregated resource amount in the aggregated resource information of the digital resources corresponding to each resource type in the target resource pair is not zero within the full term, and the full term includes a plurality of resource conversion terms;
[0008] Obtain the swap data of the target resource pair, where the swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type at the target system time;
[0009] Based on the swap data and the total resource volume of the digital resource corresponding to the first resource type over the entire term, determine the target resource conversion term;
[0010] According to the total resource volume of the digital resource corresponding to the first resource type over the entire term, the resource volume of the digital resource corresponding to the first resource type within the target resource conversion term, and the conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type during the target resource conversion term, determine the first amount of resources to be transferred of the digital resource corresponding to the first resource type within the target resource conversion term, and the second amount of resources to be transferred of the digital resource corresponding to the second resource type within the target resource conversion term;
[0011] When the target resource conversion term is reached, transfer the digital resource corresponding to the first resource type that meets the first amount of resources to be transferred and the digital resource corresponding to the second resource type that meets the second amount of resources to be transferred with the resource management terminal.
[0012] It can be seen that in the embodiment of the present application, after determining the target resource pair, the target resource pair includes a first resource type and a second resource type, and the aggregated resource quantity in the aggregated information of the digital resources corresponding to each resource type within the entire term is not zero. By obtaining the swap data of the target resource pair, based on the swap data and the aggregated resource quantity of the digital resources corresponding to the first resource type within the entire term, the target resource conversion term is determined. According to the aggregated resource quantity of the digital resources corresponding to the first resource type within the entire term, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion term, and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the target resource conversion term, the first quantity of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion term and the second quantity of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion term are determined. Then, when the target resource conversion term is reached, the digital resources corresponding to the first resource type that meet the first quantity of resources to be transferred and the digital resources corresponding to the second resource type that meet the second quantity of resources to be transferred are transferred with the resource management terminal. Since the target resource conversion term is determined by the swap data of the target resource pair and the aggregated resource quantity of the digital resources corresponding to the first resource type within the entire term, so that the subsequent swap processing can obtain the opportunity cost of the swap processing itself reflected by the swap data, the management efficiency of resources is improved.
[0013] In an alternative embodiment, the multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the aggregated resource information of the first resource type within the entire term includes an aggregated resource quantity;
[0014] The determining of the target resource conversion term based on the target swap data and the aggregated resource quantity of the first resource type within the entire term includes:
[0015] If the swap data is negative and the aggregated resource information of the first resource type within the entire term represents the transfer-in of the digital resources corresponding to the first resource type that meet the aggregated resource quantity, then the target resource conversion term is determined to be the first resource conversion term.
[0016] In an alternative embodiment, the multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the aggregated resource information of the first resource type within the entire term includes an aggregated resource quantity;
[0017] The determining of the target resource conversion term based on the target swap data and the aggregated resource quantity of the first resource type within the entire term includes:
[0018] If the swap data is negative, and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource volume, then determine that the target resource conversion term is the second resource conversion term.
[0019] In an alternative embodiment, the multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the aggregated resource information of the first resource type over the entire term includes an aggregated resource volume;
[0020] Determining the target resource conversion term based on the target swap data and the aggregated resource volume of the first resource type over the entire term includes:
[0021] If the swap data is positive, and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred in meet the aggregated resource volume, then determine that the target resource conversion term is the second resource conversion term.
[0022] In an alternative embodiment, the multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the aggregated resource information of the first resource type over the entire term includes an aggregated resource volume;
[0023] Determining the target resource conversion term based on the target swap data and the aggregated resource volume of the first resource type over the entire term includes:
[0024] If the swap data is positive, and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource volume, then determine that the target resource conversion term is the first resource conversion term.
[0025] In an alternative embodiment, the method further includes:
[0026] Obtain the resource information of the digital resources corresponding to the first resource type in the target resource pair during other resource conversion terms other than the target resource conversion term;
[0027] For any other resource conversion term, based on the resource information of the digital resources corresponding to the first resource type during the any other resource conversion term, and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type during the any other resource conversion term, determine the third resource volume to be transferred of the digital resources corresponding to the second resource type during the any other resource conversion term;
[0028] In the case of reaching any of the other resource conversion deadlines, transfer the digital resources corresponding to the second resource type that meet the third resource quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the other resource transfer deadlines, between the resource management terminal;
[0029] In the case of reaching the target resource conversion deadline, transfer the digital resources corresponding to the second resource type that meet the third resource quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the other resource transfer deadlines, between the resource management terminal.
[0030] In an optional implementation manner, determining the first resource quantity to be transferred of the digital resources corresponding to the first resource type within the target resource conversion deadline, and the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline, according to the total resource quantity of the digital resources corresponding to the first resource type within the entire deadline, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline, and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the target resource conversion deadline, includes:
[0031] Determine the first resource quantity to be transferred of the digital resources corresponding to the first resource type within the target resource conversion deadline according to the total resource quantity of the digital resources corresponding to the first resource type within the entire deadline and the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline;
[0032] Determine the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline according to the first resource quantity to be transferred and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the target resource conversion deadline.
[0033] In an optional implementation manner, a data processing cycle is set for one resource pair;
[0034] The determination of the target resource pair includes:
[0035] For any resource pair, in the case of reaching the data processing cycle corresponding to the any resource pair, obtain the total resource information of the digital resources corresponding to each resource type in the any resource pair within the entire deadline;
[0036] If the aggregated resource quantity in the obtained aggregated resource information is not zero, then use any of the resource pairs as the target resource pair.
[0037] In a second aspect, an embodiment of the present invention provides a data processing device, including:
[0038] A determination unit, configured to determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the aggregated resource quantity in the aggregated resource information of the digital resources corresponding to each resource type in the target resource pair is not zero within the entire period, and the entire period includes a plurality of resource conversion periods;
[0039] An acquisition unit, configured to acquire the swap data of the target resource pair, where the swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type at the target system time;
[0040] A determination unit, configured to determine a target resource conversion period based on the swap data and the aggregated resource quantity of the digital resource corresponding to the first resource type within the entire period;
[0041] The determination unit is further configured to determine a first resource quantity to be transferred of the digital resource corresponding to the first resource type within the target resource conversion period, and a second resource quantity to be transferred of the digital resource corresponding to the second resource type within the target resource conversion period according to the aggregated resource quantity of the digital resource corresponding to the first resource type within the entire period, the resource quantity of the digital resource corresponding to the first resource type within the target resource conversion period, and the conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type within the target resource conversion period;
[0042] A transfer unit, configured to transfer, when the target resource conversion period is reached, the digital resource corresponding to the first resource type that meets the first resource quantity to be transferred and the digital resource corresponding to the second resource type that meets the second resource quantity to be transferred to and from a resource management terminal.
[0043] In a third aspect, an embodiment of the present invention provides a data processing device, including a processor and a memory, the processor and the memory are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect. The implementation manner and beneficial effects of this processing device for solving problems can refer to the method and beneficial effects described in the first aspect above, and the repeated parts will not be elaborated.
[0044] Fourthly, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more first instructions, and the one or more first instructions are adapted to be loaded and executed by a processor to perform the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the drawings required to be used in the embodiments of the present invention or the background art will be described below.
[0046] Figure 1 It is a system architecture diagram of a data processing method provided by an embodiment of the present application;
[0047] Figure 2 It is a flowchart of a data processing method provided by an embodiment of the present application;
[0048] Figure 3 It is a flowchart of a data swap processing provided by an embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of a data processing device provided by an embodiment of the present application;
[0050] Figure 5 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] The embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
[0052] The terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally further includes steps or modules not listed, or optionally further includes other steps or modules inherent to these processes, methods, products or devices.
[0053] Foreign exchange trading is the simultaneous buying of one currency in a currency pair and selling of another. It is the exchange of one country's currency for another. In the intermediary service of foreign exchange trading for customers by banks or institutions, there are often situations where the purchase amount is greater than the sale amount, or the sale amount is greater than the purchase amount. The assets in these two situations are collectively referred to as foreign exchange exposure. This exposure has factors of income and expenditure imbalance and may bring risks under exchange rate fluctuations. Therefore, in managing this foreign exchange exposure, it is necessary to sell the part where the purchase amount is greater than the sale amount and make up the part where the sale amount is greater than the purchase amount, that is, to close the position.
[0054] Swap trading refers to a foreign exchange transaction that buys or sells spot foreign exchange while selling or buying forward foreign exchange of the same currency to prevent financial risks. Due to the time difference between the purchase and sale of spot foreign exchange and the purchase and sale of forward foreign exchange in swap trading, the exchange rate difference generated by exchange rate fluctuations within this time difference makes swap trading itself have a certain opportunity cost. Among them, spot foreign exchange trading, also known as cash transaction, is the opposite of forward foreign exchange trading. It refers to the transaction where both parties in the foreign exchange market deliver the agreed assets within the second business day or within the second business day after the transaction date after the transaction is concluded. Therefore, spot transactions can include three delivery dates, generally expressed as T+0, T+1, and T+2. T+0 means delivery on the transaction date, T+1 means delivery on the first business day after the transaction date, and T+2 means delivery on the second delivery day after the transaction date. Forward foreign exchange trading, also known as forward exchange transaction, refers to the transaction where both parties do not immediately handle the delivery after the transaction is concluded, but instead pre-agree on transaction conditions such as currency, amount, exchange rate, delivery time, etc., and only conduct the actual asset delivery when it expires. The fundamental difference between spot foreign exchange trading and forward foreign exchange trading lies in the different delivery dates. Any foreign exchange transaction with a delivery date after two business days from the transaction belongs to forward foreign exchange trading.
[0055] A data processing method provided by an embodiment of this application can be applied to the foreign exchange exposure management scenario. Taking the actual foreign exchange exposure management scenario as an example, based on a data processing method proposed by an embodiment of this application, the foreign exchange exposure management system of an institution can respectively and real-time summarize and record all received spot foreign exchange transactions according to different currency pairs and different delivery dates, and can also real-time summarize the exposure data of different delivery dates of the same currency pair for the same currency pair to obtain the full-term exposure data. According to the full-term exposure data and the swap data of this currency pair, select an appropriate delivery date for the full-term exposure data, and then conduct swap trading on the exposure data of other delivery dates except the appropriate delivery date. Therefore, a better swap trading cost can be obtained, and the management efficiency of the exposure can be improved.
[0056] To better understand a data processing method disclosed in an embodiment of the present invention, the system architecture applicable to the embodiment of the present invention will be described first below.
[0057] Please refer toFigure 1 , Figure 1 is an architecture diagram of a data processing method system provided by an embodiment of the present application. As Figure 1 shown, the system framework includes, but is not limited to, a server, at least one client, and at least one resource management terminal. Among them, the resource management terminal may be a platform corresponding to each bank, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or may also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The client may be any one of the following: a terminal, an independent application, an Application Programming Interface (API), or a Software Development Kit (SDK). Among them, the terminal may include, but is not limited to: smart phones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, Mobile Internet Devices (MIDs), etc. The embodiments of the present invention do not make limitations in this regard.
[0058] It can be understood that the data processing system described in the embodiments of the present invention is to more clearly illustrate the technical solutions of the embodiments of the present invention, and does not constitute a limitation to the technical solutions provided by the embodiments of the present invention. Those skilled in the art know that with the evolution of the system framework and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
[0059] Please refer to Figure 2 , Figure 2 is a schematic flowchart of a data processing method provided by an embodiment of the present application. As Figure 2 shown, the data processing method may include steps S201 to S205.
[0060] S201. Determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the total resource amount in the summary resource information of the digital resources corresponding to each resource type in the target resource pair is not zero within the entire period, and the entire period includes multiple resource conversion periods.
[0061] Among them, the resource type can be the currency types of various countries. The resource pair including the first resource type and the second resource type can be currency types of two different countries. The aggregated resource information can include the aggregated resource quantity of the digital resources corresponding to the aggregated resource information, the indication information for the transfer operation of the digital resources corresponding to the aggregated resource information, or the indication information for the transfer-in operation of the digital resources corresponding to the aggregated resource information, as well as the resource type identifier of the digital resources corresponding to the aggregated resource information, etc.
[0062] In an alternative embodiment, the aggregated resource information of the digital resources corresponding to each resource type in the target resource pair within the full term can be obtained by separately aggregating the statistical resource information corresponding to each resource type in each resource conversion period.
[0063] Furthermore, the statistical resource information corresponding to each resource type in each resource conversion period can be obtained by the following method. Receive a resource request sent by the client. The resource request carries the first resource type identifier, the resource information data of the digital resources corresponding to the first resource type, the resource pair identifier, and the resource conversion period. For the first resource type identified by the first resource type identifier and the resource pair identified by the resource pair identifier, determine the second resource type in the resource pair, and use the resource information data of the digital resources corresponding to the first resource type and the conversion rate of the digital resources corresponding to the first resource type converted to the digital resources corresponding to the second resource type at the current system time to obtain the resource information data of the digital resources corresponding to the second resource type in the resource pair.
[0064] When the resource conversion period is reached, transfer between the client and the digital resources corresponding to the resource quantity in the resource information data of the digital resources corresponding to the first resource type, and the digital resources corresponding to the resource quantity in the resource information data of the digital resources corresponding to the second resource type, and at the same time, associate and store the resource pair identifier, the first resource type identifier, the resource information data of the digital resources corresponding to the first resource type, the second resource type identifier, the resource information data of the digital resources corresponding to the second resource type, and the resource conversion period. Aggregate in real time the resource information of the digital resources corresponding to each resource type in each resource pair in each resource conversion period to obtain the statistical resource information corresponding to each resource type in each resource pair in each resource conversion period. Exemplarily, as shown in Table 1 Target Resource Information Table below.
[0065] Table 1 Target Resource Pair Resource Information Table
[0066]
[0067] In this embodiment, optionally, a resource request sent by a client is received. The resource request carries the first resource type identifier, the resource information data of the digital resource corresponding to the first resource type, the resource pair identifier, and the resource conversion period. The resource pair identified by the resource pair identifier includes the first resource type and the second resource type identified by the first resource type identifier. Based on the first resource type identifier and the resource pair identifier, the first resource pair identifier and the second resource pair identifier can be determined. The first resource pair identified by the first resource pair identifier includes the first resource type and the third resource type, and the second resource pair identified by the second resource pair identifier includes the third resource type and the second resource type. Among them, the third resource type can be the resource type with the most international influence, or the resource type corresponding to the digital resource with the largest resource volume in the current system. Exemplarily, the third resource type can be the US dollar.
[0068] Further, the resource information data of the digital resource corresponding to the third resource type in the first resource pair can be obtained from the resource information data of the digital resource corresponding to the first resource type and the conversion rate of the digital resource corresponding to the first resource type to the digital resource corresponding to the third resource type at the current system time. The resource information data of the digital resource corresponding to the third resource type in the second resource pair can be obtained from the resource information data of the digital resource corresponding to the third resource type and the conversion rate of the digital resource corresponding to the third resource type to the digital resource corresponding to the second resource type at the current system time.
[0069] When the resource conversion period is reached, digital resources corresponding to the resource volume in the resource information data of the digital resource corresponding to the first resource type and digital resources corresponding to the resource volume in the resource information data of the digital resource corresponding to the second resource type are transferred with the client. The first resource pair identifier, the first resource type identifier, the resource information data of the digital resource corresponding to the first resource type, the third resource type identifier, the resource information data of the digital resource corresponding to the third resource type, and the resource conversion period are stored in an associated manner. At the same time, the second resource pair identifier, the third resource type identifier, the resource information data of the digital resource corresponding to the third resource type, the second resource type, the resource information data of the digital resource corresponding to the second resource type, and the resource conversion period are stored in an associated manner. Exemplarily, if the first resource type identified by the first resource type identifier carried in the resource request of the client is X, and the resource pair identified by the resource pair identifier is X-Y, the first resource pair identifier and the second resource pair identifier are determined based on the first resource type identifier and the resource pair identifier. Therefore, the first resource pair identified by the first resource pair identifier can be obtained as X-Z, and the second resource pair identified by the second resource pair identifier can be obtained as Z-Y.
[0070] In an alternative embodiment, a data processing cycle can be set for a pair of resource pairs. For any resource pair, when the data processing cycle corresponding to the resource pair is reached, the summary resource information of the digital resources corresponding to each resource type in the resource pair over the entire period is obtained. If the total resource quantity in the obtained summary resource information is not zero, then the resource pair is used as the target resource pair for further processing. Optionally, for each resource pair identifier carried in the resource conversion requests of the received clients, different data processing cycles can be set for different resource pairs according to the different frequencies of occurrence of the resource pair identifiers carried in the resource conversion requests of the received clients. Specifically, the resource pair identified by the resource pair identifier with the highest frequency of occurrence can be set with the shortest data processing cycle, such as half an hour as a cycle, and the resource pair identified by the resource pair identifier with the lowest frequency of occurrence can be set with the longest data processing cycle, such as five hours as a cycle. Optionally, different data processing cycles can also be set for different resource pairs according to the total resource quantity in the summary resource information of the digital resources corresponding to each resource type in each resource pair over the entire period. Specifically, the resource pair with the largest total resource quantity in the summary resource information of the digital resources corresponding to each resource type included over the entire period can be set with the shortest data processing cycle, such as half an hour as a cycle, and the resource pair with the smallest total resource quantity in the summary resource information of the digital resources corresponding to each resource type included over the entire period can be set with the longest data processing cycle, such as six hours as a cycle.
[0071] S202. Obtain the swap data of the target resource pair.
[0072] The swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type at the target system time. The current system time is the time when the data processing method provided in the embodiment of the present application is run by the system. The target system time, by way of example, can be the delivery date agreed upon by both parties in a forward transaction in a swap transaction. The predicted conversion rate of the digital resource corresponding to the first resource type into the digital resource corresponding to the second resource type at the target system time can be the exchange rate agreed upon by both parties in a forward transaction in a swap transaction. It can be understood that in an actual foreign exchange scenario, the swap data can represent the swap points of two different currencies. Among them, the swap points reflect the market's expectation of the future exchange rate between the two different currencies. The positive or negative value of the swap points depends on the expected direction of the future exchange rate between the two different currencies in the financial market. That is, if the swap points are positive, it means that the financial market expects the exchange rate of the forward transaction between the two different currencies to be higher than the spot exchange rate; if the swap points are negative, it means that the financial market expects the exchange rate of the forward transaction between the two different currencies to be lower than the spot exchange rate.
[0073] In one implementation, the swap data of the target resource pair can be obtained by querying the Internet, or can be obtained from the terminal device or application program corresponding to a specific financial institution or financial organization.
[0074] S203. Determine the target resource conversion period based on the swap data and the total resource volume of the digital resource corresponding to the first resource type over the entire period.
[0075] The entire period includes multiple resource conversion periods, and the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period, where the first resource conversion period precedes the second resource conversion period, and the total resource information of the first resource type over the entire period includes the total resource volume.
[0076] In an alternative embodiment, if the swap data is negative and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred in meet the aggregated resource quantity, then the target resource conversion term is determined to be the first resource conversion term. Since the negative swap data indicates that the conversion rate of the digital resources corresponding to the first resource type to the digital resources corresponding to the second resource type at the current system time is less than the predicted conversion rate of the digital resources corresponding to the first resource type to the digital resources corresponding to the second resource type at the target system time, the target conversion term is determined to be the first resource conversion term. That is, the digital resources corresponding to the first resource type that meet the aggregated resource quantity are transferred in during the first resource conversion term, so that for other resource conversion terms such as the second resource conversion term, when performing a swap transaction operation, the digital resources corresponding to the first resource type that meet the resource quantity included in the resource information corresponding to the second resource conversion term can be transferred out during the first resource conversion term, and the digital resources corresponding to the first resource type that meet the resource quantity included in the resource information corresponding to the second resource conversion term are transferred in during the second resource conversion term, reducing the transaction cost for exposure management.
[0077] Taking an actual foreign exchange scenario as an example, if the entire term includes T+0, T+1, T+2, the target resource pair includes the first resource type as US dollars and the second resource type as RMB, the aggregated resource information of the first resource type of US dollars over the entire term indicates buying the digital resources corresponding to the first type that meet the aggregated resource quantity, and the swap data obtained for the target resource pair is negative, it indicates that when performing a swap transaction on the target resource pair, the exchange rate of US dollars to RMB in the spot transaction is lower than the exchange rate of US dollars to RMB in the forward transaction. Further, if swap transaction 1 is buying US dollars at T+0 and selling US dollars at T+2, and swap transaction 2 is selling US dollars at T+0 and buying US dollars at T+2, then the transaction cost of swap transaction 2 is significantly better than that of swap transaction 1 at this time. Therefore, to make the transaction cost more optimal when performing swap transactions for each resource conversion term of T+0, T+1, T+2 to close the exposure corresponding to each resource conversion term, it is necessary to conduct a spot transaction to sell US dollars, a forward transaction to buy US dollars, or reduce the US dollars bought in the spot transaction and correspondingly reduce the US dollars sold in the forward transaction. Therefore, the target resource conversion term can be determined to be T+0, that is, it is determined to buy US dollars that meet the aggregated resource quantity at T+0.
[0078] Similarly, if the swap data is negative and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource volume, then determine that the target resource conversion term is the second resource conversion term. If the swap data is positive and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred in meet the aggregated resource volume, then determine that the target resource conversion term is the second resource conversion term. If the swap data is positive and the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource volume, then determine that the target resource conversion term is the first resource conversion term. Among them, for the specific description of the swap transaction after determining the target resource term, reference can be made to the specific description of the following embodiments.
[0079] In one implementation, the swap data of the target resource pair can also be obtained by analyzing the annualized interest of the first resource type and the second resource type included in the target resource pair in the year when the current system time is located or the annualized interest in the previous N years before the year when the current system time is located, where N is a positive integer. If the previous N years are the previous year, in this implementation, based on the swap data and the aggregated resource volume of the digital resources corresponding to the first resource type over the entire term, determine the target resource conversion term. Specifically, it may include that if the annualized interest of the first resource type in the year when the current system time is located or the annualized interest in the previous year before the year when the current system time is located is higher than the annualized interest of the second resource type in the year when the current system time is located or the annualized interest in the previous year before the year when the current system time is located, and at the same time the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource volume, then determine that the target resource conversion term is the second resource conversion term.
[0080] If the annualized interest of the first resource type in the year when the current system time is located or the annualized interest in the previous year before the year when the current system time is located is higher than the annualized interest of the second resource type in the year when the current system time is located or the annualized interest in the previous year before the year when the current system time is located, and at the same time the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type transferred in meet the aggregated resource volume, then determine that the target resource conversion term is the first resource conversion term.
[0081] If the annualized interest of the first resource type in the year when the current system time is located or the annualized interest of the first resource type in the previous year of the year when the current system time is located is lower than the annualized interest of the second resource type in the year when the current system time is located or the annualized interest of the second resource type in the previous year of the year when the current system time is located, and at the same time, the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type that meet the aggregated resource volume are transferred out, then determine that the target resource conversion period is the first resource conversion period.
[0082] If the annualized interest of the first resource type in the year when the current system time is located or the annualized interest of the first resource type in the previous year of the year when the current system time is located is lower than the annualized interest of the second resource type in the year when the current system time is located or the annualized interest of the second resource type in the previous year of the year when the current system time is located, and at the same time, the aggregated resource information of the first resource type over the entire term indicates that the digital resources corresponding to the first resource type that meet the aggregated resource volume are transferred in, then determine that the target resource conversion period is the second resource conversion period.
[0083] S204. Determine the first quantity of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion period, and the second quantity of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period, based on the aggregated resource volume of the digital resources corresponding to the first resource type over the entire term, the resource volume of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type within the target resource conversion period.
[0084] Wherein, the conversion rate is the conversion rate of the first resource type and the second resource type at the current system time. Taking the first resource type and the second resource type as two different currency types as an example, the conversion rate is the exchange rate of the two different currency types at the current system time.
[0085] S205. When the target resource conversion period is reached, transfer the digital resources corresponding to the first resource type that meet the first quantity of resources to be transferred and the digital resources corresponding to the second resource type that meet the second quantity of resources to be transferred with the resource management terminal.
[0086] Wherein, the resource management terminal can be the platform server or application of each bank, etc., can also be the server or application corresponding to various institutions providing foreign exchange transactions, can also be the server or application corresponding to each enterprise with foreign exchange business needs, etc., and can also be the client corresponding to an individual with foreign exchange needs.
[0087] It can be seen that in the embodiments of the present application, after determining the target resource pair, by obtaining the swap data of the target resource pair, based on the swap data and the total resource amount of the digital resources corresponding to the first resource type within the full term, the target resource conversion term is determined. Further, the first amount of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion term, and the second amount of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion term are determined. Then, when the target resource conversion term is reached, the digital resources corresponding to the first resource type that meet the first amount of resources to be transferred, and the digital resources corresponding to the second resource type that meet the second amount of resources to be transferred are transferred between the resource management terminals. Since the target resource conversion term is determined by the swap data of the target resource pair and the total resource amount of the digital resources corresponding to the first resource type within the full term, so that the subsequent swap processing can obtain the opportunity cost of the swap processing itself reflected by the swap data, the management efficiency of resources can be improved.
[0088] In an alternative embodiment, after determining the target resource conversion term, as Figure 3 shown, Figure 3 FIG. is a schematic diagram of a data swap processing flow provided by an embodiment of the present application.
[0089] S301. Obtain the resource information of the digital resources corresponding to the first resource type in the target resource pair within other resource conversion terms except the target resource conversion term.
[0090] S302. For any other resource conversion term, according to the resource information of the digital resources corresponding to the first resource type within the any other resource conversion term, and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the any other resource conversion term, determine the third amount of resources to be transferred of the digital resources corresponding to the second resource type within the any other resource conversion term.
[0091] Among them, the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the any other resource conversion term can be the conversion rate of the first resource type and the second resource type at the current system time or can be the predicted conversion rate of the first resource type and the second resource type at the target system time. Taking the first resource type and the second resource type as two different currency types as an example, the conversion rate is the exchange rate of the two different currency types at the current system time or the exchange rate agreed upon by the buyers and sellers of the forward transaction in the swap transaction.
[0092] S303. When reaching any of the other resource conversion deadlines, transfer the digital resources corresponding to the second resource type that meet the third amount of resources to be transferred, and the digital resources corresponding to the first resource type that meet the amount of resources in the resource information of the digital resources corresponding to the first resource type within any of the other resource transfer deadlines, between the resource management terminal.
[0093] S304. When reaching the target resource conversion deadline, transfer the digital resources corresponding to the second resource type that meet the third amount of resources to be transferred, and the digital resources corresponding to the first resource type that meet the amount of resources in the resource information of the digital resources corresponding to the first resource type within any of the other resource transfer deadlines, between the resource management terminal.
[0094] Specifically, if the swap data is negative, and the aggregated resource information of the first resource type over the entire period indicates that the digital resources corresponding to the aggregated resource amount are transferred out, then determine that the target resource conversion deadline is the second resource conversion deadline. Taking the actual foreign exchange scenario as an example, at this time the entire period includes T+0, T+1, T+2. The target resource pair includes the first resource type as US dollars and the second resource type as RMB. The resource information and aggregated resource information of US dollars and RMB respectively within each resource conversion deadline of the target resource pair are shown in Table 2 below.
[0095] Table 2 Resource Information Table of US Dollars and RMB
[0096]
[0097]
[0098] Since the swap data is negative, and the aggregated resource information of the US dollars over the entire period indicates that to close the position of the digital resources corresponding to the aggregated resource information, 700,000 US dollars need to be transferred out and 4.9 million RMB need to be transferred in, so it is determined that the target resource conversion deadline is the second resource conversion deadline, that is, the target resource conversion deadline is T+2. At this time, the resource information and aggregated resource information of US dollars and RMB respectively within each resource conversion deadline can be obtained as shown in Table 3 below.
[0099] Table 3 Resource Information Table of US Dollars and RMB after Closing the Position of the Digital Resources Corresponding to the Aggregated Resource Information
[0100]
[0101] Further, the resource information of the US dollars in the target resource pair within other resource conversion periods except the target resource conversion period is as follows: the resource information within T+0 is 1 million US dollars, and the resource information within T+1 is -500,000 US dollars. Based on the resource information of the US dollars within T+0 and the exchange rate of the US dollar to the RMB of 1:7, the amount of resources to be transferred in RMB within T+0 is determined, which is 7 million RMB. Based on the resource information of the US dollars within T+1 and the exchange rate of the US dollar to the RMB of 1:7, the amount of resources to be transferred in RMB within T+1 is determined, which is 3.5 million RMB. On this basis, a swap transaction is carried out to close the digital resources at the two resource conversion periods of T+0 and T+1, that is, 1 million US dollars are sold at T+0 and 1 million US dollars are bought at T+2. Similarly, 500,000 US dollars are bought at T+1 and 500,000 US dollars are sold at T+2, realizing the closing of the digital resources at each resource period. The resource information of the US dollars and the RMB respectively and the aggregated resource information within each resource conversion period are shown in Table 4 below.
[0102] Table 4 Resource Information Table of US Dollars and RMB after Closing Positions for the Whole Period
[0103]
[0104] Since the swap data is negative, and the aggregated resource information of the US dollars within the whole period indicates that 700,000 US dollars need to be transferred out to close the digital resources corresponding to the aggregated resource information, it is determined that the target resource conversion period is the second resource conversion period, that is, the target resource conversion period is T+2, so that US dollars are sold in the spot transaction and bought in the forward transaction in the swap transaction, thereby obtaining the opportunity cost of the swap transaction itself and improving the resource management efficiency.
[0105] In an alternative embodiment, the multiple resource conversion periods include at least one other resource conversion period in addition to the first resource conversion period and the second resource conversion period. If it is determined that the target resource conversion period is the second resource conversion period, and at the same time, the resource information of the first resource type within the first resource conversion period indicates that the transfer direction of the digital resources corresponding to the first resource type that meet the resource volume is opposite to the transfer direction of the digital resources corresponding to the first resource type that meet the resource volume within at least one of the other resource conversion periods of the first resource type, for any resource conversion period of the at least one resource conversion period, according to the resource information of the digital resources corresponding to the first resource type within the any resource conversion period, and the conversion rate of the digital resources corresponding to the first resource type within the any resource conversion period to the digital resources corresponding to the second resource type, the fourth amount of resources to be transferred of the digital resources corresponding to the second resource type within the any resource conversion period is determined.
[0106] When reaching any of the resource transfer deadlines, transfer the digital resources corresponding to the second resource type that meet the fourth quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the resource transfer deadlines; when reaching the first resource conversion deadline, transfer the digital resources corresponding to the second resource type that meet the fourth quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the resource transfer deadlines.
[0107] Similarly, if it is determined that the target resource conversion deadline is the first resource conversion deadline, and at the same time, the resource information of the first resource type at the second resource conversion deadline indicates that the transfer direction of the digital resources corresponding to the first resource type that meet the resource quantity is opposite to the transfer direction of the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of at least one of the other resource conversion deadlines of the first resource type, for any resource transfer deadline of the at least one resource conversion deadline, according to the resource information of the digital resources corresponding to the first resource type within any of the resource transfer deadlines, and the conversion rate of the digital resources corresponding to the first resource type into the digital resources corresponding to the second resource type within any of the resource transfer deadlines, determine the fourth quantity to be transferred of the digital resources corresponding to the second resource type within any of the resource transfer deadlines.
[0108] When reaching any of the resource transfer deadlines, transfer the digital resources corresponding to the second resource type that meet the fourth quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the resource transfer deadlines; when reaching the second resource conversion deadline, transfer the digital resources corresponding to the second resource type that meet the fourth quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any of the resource transfer deadlines.
[0109] Exemplarily, for the resource information of US dollars and RMB shown in Table 3, it is determined that the target resource conversion deadline is the second resource conversion deadline, that is, T+2. The transfer directions of the digital resources corresponding to the same resource type characterized by the resource information in T+0 and T+2 are opposite. That is, T+0 indicates selling 1 million US dollars, and T+1 indicates buying 500,000 US dollars. Therefore, 500,000 US dollars can be sold at T+0 and 500,000 US dollars can be bought at T+1. At this time, the resource information of US dollars and RMB within each resource conversion deadline and the aggregated resource information are shown in Table 5 below.
[0110] Table 5 Resource Information of US Dollar and RMB after Swap Transactions for T+0 and T+1
[0111]
[0112]
[0113] Further, on this basis, perform the operation of closing positions by obtaining the resource information of the digital resources corresponding to the first resource type in the target resource pair during other resource conversion periods except the target resource conversion period. As shown in the example corresponding to Table 5, further, obtain the resource information corresponding to T+0 and T+1. Since the swap data is negative and the target resource conversion period is T+2, perform a swap transaction to close the positions of the digital resources in the two resource conversion periods of T+0 and T+1, that is, sell 500,000 US dollars at T+0 and buy 500,000 US dollars at T+2.
[0114] It can be seen that based on this embodiment, after determining the target resource conversion period, first perform swap transactions between the resource conversion periods with opposite transfer directions of the digital resources corresponding to the same resource type in each resource period except the target resource conversion period, and then perform the full-term closing position operation, which can reduce the overall transaction scale and further improve the resource management efficiency.
[0115] Based on the description of the related embodiments, the embodiment of the present application further provides a data processing device, and this data processing device can execute Figures 1 to 3 the operations performed by the server shown. Please refer to Figure 4 , Figure 4 which is a schematic diagram of a data processing device provided by the embodiment of the present application. As shown in Figure 4 ,the data processing device may include but is not limited to a determination unit 401, an acquisition unit 402, and a transfer unit 403.
[0116] The determination unit 401 is used to determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the total resource amount in the summary resource information of the digital resources corresponding to each resource type in the target resource pair is not zero during the full term, and the full term includes multiple resource conversion periods;
[0117] The acquisition unit 402 is used to acquire the swap data of the target resource pair, where the swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type at the target system time;
[0118] The determining unit 401 is further configured to determine a target resource conversion period based on the swap data and the total resource amount of the digital resources corresponding to the first resource type over the entire period.
[0119] The determining unit 401 is further configured to determine a first amount of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion period, and a second amount of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period according to the total resource amount of the digital resources corresponding to the first resource type over the entire period, the resource amount of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type within the target resource conversion period.
[0120] The transfer unit 403 is configured to transfer, when the target resource conversion period is reached, the digital resources corresponding to the first resource type that meet the first amount of resources to be transferred and the digital resources corresponding to the second resource type that meet the second amount of resources to be transferred with a resource management terminal.
[0121] In an alternative embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The total resource information of the first resource type over the entire period includes the total resource amount. The determining unit 401 determines the target resource conversion period based on the target swap data and the total resource amount of the first resource type over the entire period, including:
[0122] If the swap data is negative and the total resource information of the first resource type over the entire period indicates that digital resources corresponding to the first resource type that meet the total resource amount are transferred in, then determine that the target resource conversion period is the first resource conversion period.
[0123] In an embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The total resource information of the first resource type over the entire period includes the total resource amount. The determining unit 401 determines the target resource conversion period based on the target swap data and the total resource amount of the first resource type over the entire period, including:
[0124] If the swap data is negative and the total resource information of the first resource type over the entire period indicates that digital resources corresponding to the first resource type that meet the total resource amount are transferred out, then determine that the target resource conversion period is the second resource conversion period.
[0125] In one embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The aggregated resource information of the first resource type within the entire period includes an aggregated resource quantity. The determining unit 401 determines the target resource conversion period based on the target swap data and the aggregated resource quantity of the first resource type within the entire period, including:
[0126] If the swap data is positive, and the aggregated resource information of the first resource type within the entire period indicates that digital resources corresponding to the first resource type that meet the aggregated resource quantity are transferred in, then determine that the target resource conversion period is the second resource conversion period.
[0127] In one embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The aggregated resource information of the first resource type within the entire period includes an aggregated resource quantity. The determining unit 401 determines the target resource conversion period based on the target swap data and the aggregated resource quantity of the first resource type within the entire period, including:
[0128] If the swap data is positive, and the aggregated resource information of the first resource type within the entire period indicates that digital resources corresponding to the first resource type that meet the aggregated resource quantity are transferred out, then determine that the target resource conversion period is the first resource conversion period.
[0129] In one embodiment, the obtaining unit 402 may further be configured to obtain the resource information of the digital resources corresponding to the first resource type in the target resource pair within other resource conversion periods except the target resource conversion period;
[0130] The determining unit 401 is further configured to, for any other resource conversion period, determine the third resource quantity to be transferred of the digital resources corresponding to the second resource type within the any other resource conversion period according to the resource information of the digital resources corresponding to the first resource type within the any other resource conversion period and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the any other resource conversion period;
[0131] The transferring unit 403 is further configured to, when the any other resource conversion period is reached, transfer the digital resources corresponding to the second resource type that meet the third resource quantity to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within the any other resource transfer period, between the resource management terminal;
[0132] The transfer unit 403 is further configured to transfer, when the target resource conversion deadline is reached, digital resources corresponding to the second resource type that meet the third resource quantity to be transferred, and digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any other resource transfer deadline.
[0133] In one implementation, the determination unit 401 determines the first resource quantity to be transferred of the digital resources corresponding to the first resource type and the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline according to the total resource quantity of the digital resources corresponding to the first resource type within the entire deadline, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline, and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the target resource conversion deadline, including:
[0134] Determine the first resource quantity to be transferred of the digital resources corresponding to the first resource type within the target resource conversion deadline according to the total resource quantity of the digital resources corresponding to the first resource type within the entire deadline and the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline;
[0135] Determine the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline according to the first resource quantity to be transferred and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the target resource conversion deadline.
[0136] In one implementation, a data processing cycle is set for one resource pair. The determination unit 401 determines the target resource pair, including:
[0137] For any resource pair, when the data processing cycle corresponding to the any resource pair is reached, obtain the total resource information of the digital resources corresponding to each resource type in the any resource pair within the entire deadline;
[0138] If the total resource quantity in the obtained total resource information is not zero, then use the any resource pair as the target resource pair.
[0139] In an embodiment of the present application, after the determination unit 401 determines a target resource pair, the acquisition unit 402 acquires the swap data of the target resource pair. The determination unit 401 determines a target resource conversion period based on the swap data and the total resource amount of the digital resources corresponding to the first resource type within the full term. According to the total resource amount of the digital resources corresponding to the first resource type within the full term, the resource amount of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type within the target resource conversion period, the first amount of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion period and the second amount of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period are determined. When the target resource conversion period is reached, the transfer unit 403 transfers the digital resources corresponding to the first resource type that meet the first amount of resources to be transferred and the digital resources corresponding to the second resource type that meet the second amount of resources to be transferred with a resource management terminal. Since the target resource conversion period is determined by the swap data of the target resource pair and the total resource amount of the digital resources corresponding to the first resource type within the full term, so that the subsequent swap processing can obtain the opportunity cost of the swap processing itself reflected by the swap data, the management efficiency of resources can be improved.
[0140] An embodiment of the present application further provides a computer device. Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 5 shown, the computer device at least includes a processor 501, a memory 502, and a communication interface 503, which can be connected through a bus 504 or other means. In an embodiment of the present application, taking the connection through the bus 504 as an example. The processor 501 of the embodiment of the present application can perform the operations of the foregoing data processing method by running a computer program stored in the memory 502, for example:
[0141] Determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the total resource amount in the total resource information of the digital resources corresponding to each resource type in the target resource pair is not zero. The full term includes multiple resource conversion periods;
[0142] Obtain the swap data of the target resource pair through the communication interface 503, where the swap data of the target resource pair is used to represent the difference between the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type at the current system time and the predicted conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type at the target system time;
[0143] Determine a target resource conversion period based on the swap data and the total resource quantity of the digital resources corresponding to the first resource type within the full term.
[0144] Based on the total resource quantity of the digital resources corresponding to the first resource type within the full term, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type within the target resource conversion period, determine the first quantity of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion period, and the second quantity of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period.
[0145] When the target resource conversion period is reached, transfer the digital resources corresponding to the first resource type that meet the first quantity of resources to be transferred and the digital resources corresponding to the second resource type that meet the second quantity of resources to be transferred between the communication interface 503 and the resource management terminal.
[0146] In an alternative embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The total resource information of the first resource type within the full term includes the total resource quantity. The processor 501 determines the target resource conversion period based on the target swap data and the total resource quantity of the first resource type within the full term, and may perform the following operations:
[0147] If the swap data is negative and the total resource information of the first resource type within the full term indicates that the digital resources corresponding to the first resource type that meet the total resource quantity are transferred in, then determine that the target resource conversion period is the first resource conversion period.
[0148] In an alternative embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The total resource information of the first resource type within the full term includes the total resource quantity. The processor 501 determines the target resource conversion period based on the target swap data and the total resource quantity of the first resource type within the full term, and may perform the following operations:
[0149] If the swap data is negative and the total resource information of the first resource type within the full term indicates that the digital resources corresponding to the first resource type that meet the total resource quantity are transferred out, then determine that the target resource conversion period is the second resource conversion period.
[0150] In an alternative embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The aggregated resource information of the first resource type over the entire period includes an aggregated resource quantity. The processor 501 determines a target resource conversion period based on the target swap data and the aggregated resource quantity of the first resource type over the entire period, and may perform the following operations:
[0151] If the swap data is positive, and the aggregated resource information of the first resource type over the entire period indicates that the digital resources corresponding to the first resource type transferred in meet the aggregated resource quantity, then determine that the target resource conversion period is the second resource conversion period.
[0152] In an alternative embodiment, the multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period. The aggregated resource information of the first resource type over the entire period includes an aggregated resource quantity. The processor 501 determines a target resource conversion period based on the target swap data and the aggregated resource quantity of the first resource type over the entire period, and may perform the following operations:
[0153] If the swap data is positive, and the aggregated resource information of the first resource type over the entire period indicates that the digital resources corresponding to the first resource type transferred out meet the aggregated resource quantity, then determine that the target resource conversion period is the first resource conversion period.
[0154] In an alternative embodiment, the processor 501 may also call the program code stored in the memory 502 to perform the following operations:
[0155] Obtain the resource information of the digital resources corresponding to the first resource type in the target resource pair during other resource conversion periods except the target resource conversion period;
[0156] For any other resource conversion period, based on the resource information of the digital resources corresponding to the first resource type during the any other resource conversion period, and the conversion rate at which the digital resources corresponding to the first resource type are converted into the digital resources corresponding to the second resource type during the any other resource conversion period, determine the third quantity of resources to be transferred of the digital resources corresponding to the second resource type during the any other resource conversion period;
[0157] When the any other resource conversion period is reached, transfer between the resource management terminal the digital resources corresponding to the second resource type that meet the third quantity of resources to be transferred, and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type during the any other resource transfer period;
[0158] When the target resource conversion deadline is reached, transfer digital resources corresponding to the second resource type that meet the third resource quantity to be transferred, and digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within any other resource transfer deadline.
[0159] In an alternative embodiment, based on the total resource quantity of the digital resources corresponding to the first resource type over the entire period, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline, and the conversion rate at which the digital resources corresponding to the first resource type are converted into digital resources corresponding to the second resource type within the target resource conversion deadline, to determine the first resource quantity to be transferred of the digital resources corresponding to the first resource type within the target resource conversion deadline, and the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline, the processor 501 may call program code stored in the memory 502 to perform the following operations:
[0160] Based on the total resource quantity of the digital resources corresponding to the first resource type over the entire period and the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion deadline, determine the first resource quantity to be transferred of the digital resources corresponding to the first resource type within the target resource conversion deadline;
[0161] Based on the first resource quantity to be transferred and the conversion rate at which the digital resources corresponding to the first resource type are converted into digital resources corresponding to the second resource type within the target resource conversion deadline, determine the second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion deadline.
[0162] In an alternative embodiment, a data processing cycle is set for one resource pair, and the processor 501 determines the target resource pair and may perform the following operations:
[0163] For any resource pair, when the data processing cycle corresponding to the any resource pair is reached, obtain the total resource information of the digital resources corresponding to each resource type in the any resource pair over the entire period;
[0164] If the total resource quantity in the obtained total resource information is not zero, then use the any resource pair as the target resource pair.
[0165] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0166] An embodiment of the present application also provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer is caused to execute the steps in any of the above method embodiments.
[0167] An embodiment of the present application also provides a chip, which includes a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device equipped with the chip executes the steps in any of the above method embodiments.
[0168] The steps in the method embodiments of the present application can be adjusted, combined, and deleted according to actual needs.
[0169] The units in the device embodiments of the present application can be combined, divided, and deleted according to actual needs.
Claims
1. A data processing method, characterized in that, Including: Determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the total resource quantity in the summary resource information of the digital resources corresponding to each resource type in the target resource pair is not zero within the full term, and the full term includes multiple resource conversion terms; Obtain the swap data of the target resource pair, where the swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type at the target system time; Based on the swap data and the total resource quantity of the digital resource corresponding to the first resource type within the full term, determine the target resource conversion term; According to the total resource quantity of the digital resource corresponding to the first resource type within the full term, the resource quantity of the digital resource corresponding to the first resource type within the target resource conversion term, and the conversion rate of the digital resource corresponding to the first resource type converted into the digital resource corresponding to the second resource type within the target resource conversion term, determine the first quantity of resources to be transferred of the digital resource corresponding to the first resource type within the target resource conversion term, and the second quantity of resources to be transferred of the digital resource corresponding to the second resource type within the target resource conversion term; When the target resource conversion term is reached, transfer the digital resource corresponding to the first resource type that meets the first quantity of resources to be transferred and the digital resource corresponding to the second resource type that meets the second quantity of resources to be transferred with the resource management terminal.
2. The method according to claim 1, characterized in that, The multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the summary resource information of the digital resource corresponding to the first resource type within the full term includes the total resource quantity; The determining the target resource conversion term based on the swap data and the total resource quantity of the digital resource corresponding to the first resource type within the full term includes: If the swap data is negative, and the summary resource information of the digital resource corresponding to the first resource type within the full term indicates that the digital resource corresponding to the first resource type that meets the total resource quantity is transferred in, then determine the target resource conversion term as the first resource conversion term.
3. The method according to claim 1, wherein The multiple resource conversion terms at least include a first resource conversion term and a second resource conversion term, and the summary resource information of the digital resource corresponding to the first resource type within the full term includes the total resource quantity; The determining the target resource conversion term based on the swap data and the total resource quantity of the digital resource corresponding to the first resource type within the full term includes: If the swap data is negative, and the summary resource information of the digital resource corresponding to the first resource type within the full term indicates that the digital resource corresponding to the first resource type that meets the total resource quantity is transferred out, then determine the target resource conversion term as the second resource conversion term.
4. The method according to claim 1, wherein The multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period, and the aggregated resource information of the digital resources corresponding to the first resource type within the entire period includes the aggregated resource quantity; Determining the target resource conversion period based on the swap data and the aggregated resource quantity of the digital resources corresponding to the first resource type within the entire period includes: If the swap data is positive, and the aggregated resource information of the digital resources corresponding to the first resource type within the entire period indicates that digital resources corresponding to the first resource type transferred in meet the aggregated resource quantity, then determine that the target resource conversion period is the second resource conversion period.
5. The method according to claim 1, wherein The multiple resource conversion periods at least include a first resource conversion period and a second resource conversion period, and the aggregated resource information of the digital resources corresponding to the first resource type within the entire period includes the aggregated resource quantity; Determining the target resource conversion period based on the swap data and the aggregated resource quantity of the digital resources corresponding to the first resource type within the entire period includes: If the swap data is positive, and the aggregated resource information of the digital resources corresponding to the first resource type within the entire period indicates that digital resources corresponding to the first resource type transferred out meet the aggregated resource quantity, then determine that the target resource conversion period is the first resource conversion period.
6. The method according to claim 1, characterized in that, The method further includes: Obtaining the resource information of the digital resources corresponding to the first resource type in the target resource pair within other resource conversion periods except the target resource conversion period; For any other resource conversion period, according to the resource information of the digital resources corresponding to the first resource type within the any other resource conversion period and the conversion rate of the digital resources corresponding to the first resource type converted into the digital resources corresponding to the second resource type within the any other resource conversion period, determine the third quantity of resources to be transferred of the digital resources corresponding to the second resource type within the any other resource conversion period; When the any other resource conversion period is reached, transfer between the digital resources corresponding to the second resource type that meet the third quantity of resources to be transferred and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within the any other resource transfer period with the resource management terminal; When the target resource conversion period is reached, transfer between the digital resources corresponding to the second resource type that meet the third quantity of resources to be transferred and the digital resources corresponding to the first resource type that meet the resource quantity in the resource information of the digital resources corresponding to the first resource type within the any other resource transfer period with the resource management terminal.
7. The method according to claim 1, wherein Determining the first amount of resources to be transferred of the digital resources corresponding to the first resource type and the second amount of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period based on the total amount of resources of the digital resources corresponding to the first resource type over the entire period, the amount of resources of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the target resource conversion period includes: Determining the first amount of resources to be transferred of the digital resources corresponding to the first resource type within the target resource conversion period based on the total amount of resources of the digital resources corresponding to the first resource type over the entire period and the amount of resources of the digital resources corresponding to the first resource type within the target resource conversion period; Determining the second amount of resources to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period based on the first amount of resources to be transferred and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the target resource conversion period.
8. The method according to claim 1, characterized in that, A data processing cycle is set for a resource pair. The determining of the target resource pair includes: For any resource pair, when the data processing cycle corresponding to the any resource pair is reached, obtaining the total resource information of the digital resources corresponding to each resource type in the any resource pair over the entire period; If the total amount of resources in the obtained total resource information is not zero, then taking the any resource pair as the target resource pair.
9. A data processing device, characterized in that, The apparatus includes: A determining unit, configured to determine a target resource pair, where the target resource pair includes a first resource type and a second resource type, and the total amount of resources in the total resource information of the digital resources corresponding to each resource type in the target resource pair over the entire period is not zero, and the entire period includes multiple resource conversion periods; An obtaining unit, configured to obtain the swap data of the target resource pair, where the swap data of the target resource pair is used to represent the difference between the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type at the current system time and the predicted conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type at the target system time; The determining unit is further configured to determine a target resource conversion period based on the swap data and the total amount of resources of the digital resources corresponding to the first resource type over the entire period. The determining unit is further configured to determine a first resource quantity to be transferred of the digital resources corresponding to the first resource type and a second resource quantity to be transferred of the digital resources corresponding to the second resource type within the target resource conversion period according to the total resource quantity of the digital resources corresponding to the first resource type within the entire period, the resource quantity of the digital resources corresponding to the first resource type within the target resource conversion period, and the conversion rate of the digital resources corresponding to the first resource type being converted into the digital resources corresponding to the second resource type within the target resource conversion period; The transferring unit is configured to transfer, when the target resource conversion period is reached, the digital resources corresponding to the first resource type that meet the first resource quantity to be transferred and the digital resources corresponding to the second resource type that meet the second resource quantity to be transferred with the resource management terminal.
10. 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 8.
11. 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 8 is implemented.