CN117010891A - Data processing method, apparatus, device, medium and program product for resource conversion - Google Patents

Data processing method, apparatus, device, medium and program product for resource conversion Download PDF

Info

Publication number
CN117010891A
CN117010891A CN202211090885.XA CN202211090885A CN117010891A CN 117010891 A CN117010891 A CN 117010891A CN 202211090885 A CN202211090885 A CN 202211090885A CN 117010891 A CN117010891 A CN 117010891A
Authority
CN
China
Prior art keywords
conversion rate
resource
target
resource type
type pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211090885.XA
Other languages
Chinese (zh)
Inventor
叶安浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211090885.XA priority Critical patent/CN117010891A/en
Publication of CN117010891A publication Critical patent/CN117010891A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to a data processing method, apparatus, computer device, storage medium and computer program product for resource conversion, the method being implementable in connection with artificial intelligence techniques, the method comprising: and receiving a resource conversion rate query request of the target object about the target resource type pair and carrying the locking time length, querying a conversion rate fluctuation parameter of the target resource type pair corresponding to the locking time length when the long-term resource conversion rate of the target object corresponding to the target resource type pair is not queried, adjusting the real-time resource conversion rate corresponding to the target resource type pair based on the conversion rate fluctuation parameter to obtain the long-term resource conversion rate of the target object corresponding to the target resource type pair and with the validity time length being the locking time length, returning the long-term resource conversion rate to the target object, and then, if the target object queries the resource conversion rate about the target resource type pair in the validity time length, directly returning the long-term resource conversion rate to the target object, thereby improving the interaction efficiency with the target object.

Description

Data processing method, apparatus, device, medium and program product for resource conversion
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for processing data of resource conversion.
Background
With the development of computer technology, resource conversion based on the Internet appears, and people can realize resource conversion based on the Internet through the intelligent terminal, so that great convenience is brought to daily life of people. For example, people can not only pay online through the paymate, but also realize swift foreign exchange transactions through the paymate.
However, when the payment platform receives a query request about a resource conversion rate initiated by the terminal, the payment platform needs to interact with the background of the financial institution in real time, for example, the foreign exchange license price updated in real time by the background of the financial institution in the query is transferred to the terminal, so that the interaction efficiency with the terminal is low, and the overall resource processing performance of the payment platform is also affected under the condition of higher concurrency of the query request.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data processing method, apparatus, computer device, computer readable storage medium, and computer program product for resource conversion that can quickly and accurately report a conversion rate regarding resource conversion, thereby improving interaction efficiency with a terminal.
In a first aspect, the present application provides a method for processing data for resource conversion. The method comprises the following steps:
receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
when the long-acting resource conversion rate of the target object corresponding to the target resource type pair is not queried, querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
acquiring a real-time resource conversion rate corresponding to the target resource type pair;
adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
In a second aspect, the application further provides a data processing device for resource conversion. The device comprises:
The resource conversion rate query module is used for receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
the query module is used for querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration when the long-acting resource conversion rate of the target resource type pair corresponding to the target object is not queried, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
the acquisition module is used for acquiring the real-time resource conversion rate corresponding to the target resource type pair;
the adjustment module is used for adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
the return module is used for returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
In one embodiment, the query module is further configured to, when a long-term resource conversion rate that exists in the target object corresponding to the target resource type pair, is of a type that can be converted into multiple resources, and is still within a valid period, return the queried long-term resource conversion rate to the target object.
In one embodiment, the apparatus further comprises: a conversion rate fluctuation parameter determining module;
the conversion rate fluctuation parameter determining module specifically comprises:
the return window determining unit is used for determining a return interval and at least one return time period according to the locking duration; dividing a sub-time period from the starting time of the return time period at each interval of the return time period, wherein the duration of each sub-time period is the locking duration;
a calculating unit, configured to calculate, for each sub-period, a historical fluctuation parameter of the sub-period corresponding to the target resource type pair according to a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period and a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period;
And the conversion rate fluctuation parameter determining unit is used for determining the conversion rate fluctuation parameter of the target resource type corresponding to the locking duration according to the historical fluctuation parameter of the target resource type pair corresponding to each sub-time period.
In one embodiment, the callback window determining unit is configured to determine a target time zone in which the target object is located; determining the number of the return days and the return interval corresponding to the locking time according to the locking time; and determining at least one time period for callback according to the target time zone and the number of callback days.
In one embodiment, the calculating unit is configured to calculate a difference between a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period and a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period; and taking the ratio of the difference to the historical reference resource conversion rate corresponding to the target resource type pair at the starting time point as the historical fluctuation parameter corresponding to the target resource type pair at the sub-time period.
In one embodiment, the conversion rate fluctuation parameter determining unit is configured to sort the historical fluctuation parameters corresponding to the target resource type pair in each sub-time period in order from high to low, so as to obtain a sorting result; and taking the historical fluctuation parameter positioned on the target allocation in the sequencing result as a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration.
In one embodiment, the calculating unit is configured to calculate a ratio of a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period to a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period; and taking the natural logarithm of the ratio as a historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
In one embodiment, the conversion rate fluctuation parameter determination unit is configured to determine a total number of the sub-time periods; calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period and the total number; and calculating a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration according to the square root of the total number and the standard deviation.
In one embodiment, the apparatus further comprises:
the long-acting resource conversion rate adjustment module is used for acquiring historical resource conversion data of the target object; determining a resource conversion risk coefficient of the target object according to the historical resource conversion data; according to the resource conversion risk coefficient, the long-acting resource conversion rate is adjusted, and the adjusted long-acting resource conversion rate is obtained;
And the return module is used for returning the adjusted long-acting resource conversion rate to the target object.
In one embodiment, the target resource type pair includes a swap-out resource type and a swap-in resource type; the query module is configured to query a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration when the swap-out resource type or the swap-in resource type is the target resource type; when the change-out resource type and the change-in resource type are not the target resource type, inquiring a first conversion rate fluctuation parameter of the locking duration corresponding to the change-out resource type and the target resource type, inquiring a second conversion rate fluctuation parameter of the locking duration corresponding to the change-in resource type and the target resource type, and taking the larger one of the first conversion rate fluctuation parameter and the second conversion rate fluctuation parameter as the conversion rate fluctuation parameter of the locking duration corresponding to the target resource type.
In one embodiment, the apparatus further comprises:
and the resource conversion module is used for carrying out resource conversion on the target object according to the long-acting resource conversion rate when the resource conversion request on the target resource type pair initiated by the target object is received in the validity period.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
when the long-acting resource conversion rate of the target object corresponding to the target resource type pair is not queried, querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
acquiring a real-time resource conversion rate corresponding to the target resource type pair;
adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
when the long-acting resource conversion rate of the target object corresponding to the target resource type pair is not queried, querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
acquiring a real-time resource conversion rate corresponding to the target resource type pair;
adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
when the long-acting resource conversion rate of the target object corresponding to the target resource type pair is not queried, querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
acquiring a real-time resource conversion rate corresponding to the target resource type pair;
adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
According to the data processing method, the device, the computer equipment, the storage medium and the computer program product for resource conversion, conversion rate fluctuation parameters corresponding to different locking time periods are provided for the target resource type pairs, the conversion rate fluctuation parameters are determined according to historical reference resource conversion rates of the target resource type pairs, after a resource conversion rate query request carrying the locking time periods and related to the target resource type pairs sent by a target object is received, if the long-acting resource conversion rate of the target resource type pairs corresponding to the target object is not queried, the conversion rate fluctuation parameters corresponding to the locking time periods are adjusted according to the query target resource type pairs, the long-acting resource conversion rate related to the target resource type pairs can be accurately provided for the target object in the corresponding effective time period of the locking time periods, and when the resource conversion rate query request of the target object related to the target resource type pairs is received in the effective time period later, the long-acting resource conversion rate which is still in the effective time period is not needed to be rapidly reported to the target object, and is then reported to the target object after the background query of a financial institution, so that the efficiency of interaction with the target object is greatly improved, and the performance of the resource query is high in the overall performance is achieved when the request is processed.
Drawings
FIG. 1 is an application environment diagram of a data processing method of resource conversion in one embodiment;
FIG. 2 is a flow diagram of a data processing method for resource conversion in one embodiment;
FIG. 3 is a flow chart illustrating steps for determining a conversion rate fluctuation parameter in one embodiment;
FIG. 4 is a schematic diagram of the configuration parameters for different lock periods according to one embodiment;
FIG. 5 is a flow chart of predicting slew rate fluctuation parameters in one embodiment;
FIG. 6 is a flow chart of predicting slew rate fluctuation parameters in another embodiment;
FIG. 7 is a flow diagram of generating a long-term exchange rate in one embodiment;
FIG. 8 is a flow chart of a method of processing data for resource conversion in one embodiment;
FIG. 9 is a block diagram of a data processing apparatus for resource conversion in one embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The application will first be described with reference to some names:
fluctuation ratio: volatility is the degree of fluctuation of a financial asset and is a measure of uncertainty in the asset's rate of return to reflect the risk level of the financial asset. The higher the volatility, the more severe the fluctuation of the financial asset price, the stronger the uncertainty of the asset profitability; the lower the volatility, the more gradual the fluctuation in the price of the financial asset and the more deterministic the asset return. Thus, the volatility is an important indicator of financial risk control.
Compliant exchange rate: the foreign exchange rate published by the financial structure comprises a reference price for buying and selling, can not be directly exchanged, does not have transaction amount, and has relatively lag update frequency.
Exchange rate: the financial structure provides customers with a foreign exchange rate for direct exchange, including buying and selling prices, generally with a tradable amount, with a high update frequency and a definite timeliness, which is generally in the order of milliseconds or seconds.
Price locking transaction: the financial institution performs the foreign exchange transaction with the customer (including the paymate or average customer) by locking a fixed exchange rate for a period of time. The financial institution reports out a exchange rate, promises not to be influenced by market fluctuation in a certain time, customers can immediately deal with the trade by proposing the trade, and the damage and benefit caused by the market fluctuation are born by the financial institution, so that the trade mode is called price locking trade.
Long-acting exchange rate: the financial institution and the customer (including the payment platform or the common customer) lock a fixed exchange rate for carrying out the exchange transaction of the foreign exchange within a certain time, and the exchange rate is not influenced by market price fluctuation, and is called a long-acting exchange rate, and the timeliness is generally in the order of minutes or hours, even in the order of days.
Black swan event: refers to very difficult to predict and unusual events, in the foreign exchange trade market, that lead to the occurrence of large fluctuations in foreign exchange rate prices in a short time.
The application relates to an artificial intelligence related technology. Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning, automatic driving, intelligent traffic and other directions.
According to the artificial intelligence, for example, the resource conversion behavior of the target object is predicted based on the historical resource conversion data of the target object in an artificial intelligence mode, so that the risk coefficient of the target object can be determined based on the predicted resource conversion behavior, and the conversion rate fluctuation parameter of the target object is adjusted according to the risk coefficient.
The data processing method for resource conversion provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. The terminal 102 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, the terminal 102 may have an application client, the server 104 may be a background server of the application client, the application client may initiate a resource conversion request to the server 104, and the server 104 executes resource conversion according to a resource conversion rate corresponding to the target object. The application client may also initiate a resource conversion rate query request to the server 104 regarding the target resource type pair, and the server 104 may return to the application client the current resource conversion rate corresponding to the target object, which may be a long-acting resource conversion rate of the target object corresponding to the target resource type pair and that is still within the validity period. The server 104 may also calculate a long-term resource conversion rate with a validity period for the target object quickly and accurately when the long-term resource conversion rate of the target object corresponding to the target resource type pair is not queried. The application client may be any form of application client supporting resource transfer, resource conversion functions.
In one embodiment, the terminal 102 associated with the target object may initiate a resource conversion rate query request to the server regarding the target resource type pair, where the resource conversion rate query request includes a locking duration of a resource conversion rate of the target resource type pair, and when the server 104 does not query a long-acting resource conversion rate of the target object corresponding to the target resource type pair, query a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, where the conversion rate fluctuation parameter is determined according to a historical reference resource conversion rate of the target resource type pair, and then the server 104 obtains a real-time resource conversion rate corresponding to the target resource type pair, adjusts the real-time resource conversion rate based on the conversion rate fluctuation parameter, obtains a long-acting resource conversion rate of the target object corresponding to the target resource type pair and having an effective duration of the locking duration, and returns the long-acting resource conversion rate to the target object, where the long-acting resource conversion rate is used for querying the target object about the resource conversion rate of the target resource type pair in the effective duration. When the resource conversion rate query request of the target object about the target resource type pair is received in the validity period later, the long-acting resource conversion rate which is still in the validity period can be rapidly reported to the target object, the target object is not required to be reported after being queried in the background of a financial institution, the interaction efficiency with the target object is greatly improved, and particularly when the concurrency of the query request is high, the overall resource processing performance can be improved.
FIG. 2 is a flow chart of a method of processing data for resource conversion in one embodiment of the application. The execution body in the embodiment of the application can be one computer device or a computer device cluster formed by a plurality of computer devices. The computer device may be a server or a terminal. Therefore, the execution body in the embodiment of the application can be a server, a terminal or a server and a terminal. Here, the execution body in the embodiment of the present application is described as an example of a server.
In one embodiment, as shown in fig. 2, a data processing method for resource conversion is provided, and the method is applied to a server (such as server 104 in fig. 1) for illustration, and includes the following steps:
step 202, receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request includes a locking duration of a resource conversion rate of the target resource type pair.
Where a resource is an asset that may be exchanged for a good or service. The resources may be funds, currency, or the like. In the foreign exchange transaction scene, the resources are currencies with different currencies, and the resource conversion is a conversion processing process between different resources, specifically, conversion between currencies with different currencies. Converting a resource of a first resource type (also called a swap-out resource type) of a target object to a resource of a second resource type (also called a swap-in resource type) may be accomplished by resource conversion, e.g. converting a currency (e.g. renminbi) to another currency (e.g. dollars). The target resource type pair includes a pair of resource types, i.e., a swap-out resource type and a swap-in resource type, e.g., the target resource type pair is Renminbi and USD.
The current resource conversion rate may be queried from the server before the terminal initiates a resource conversion request to the server. The resource conversion rate is an amount of swap-out resource types required to swap in a unit amount of swap-in resources of a resource type, for example, 6.894 Renminbi is required to swap in $1. Alternatively, the resource conversion rate is the amount of resources of the swap-in resource type that can be converted per unit amount of resources of the swap-out resource type, e.g., 0.145 dollars can be swapped in using 1 Renminbi.
The target object may specifically be a certain user identification or a resource account. For example, an application client on the terminal logs in with a user identifier, and the application client initiates a resource conversion rate query request, which carries a target object, about a target resource type pair to the server. The application client may also initiate a resource conversion request for the target resource type pair carrying the target object to the server, and the server performs a resource conversion process on the resource of the target object in response to the resource conversion request.
In a related art price locking transaction scenario, a rate provider (such as a payment platform) locks an exchange rate with a user, and during the locking time, the user can exchange an exchange with the exchange rate provider at the locked exchange rate, for example, a user requests a long-term exchange rate of USD-CNH (dollar-Renminbi) with a validity period of 24 hours at 2022.8.23 12:00:00, the validity period is 12:00:00 the next day, and the server queries market price in real time to calculate and provide the long-term exchange rate of 6.85 for the user. After one hour, the user again requests a USD-CNH long-term exchange rate with a validity period of 24 hours at 2022.8.2313:00:00, the validity period is 13:00:00 the next day, and the server queries the market price in real time, calculates and provides the long-term exchange rate for the user to be 6.84. Similarly, if the user applies for a long-acting exchange rate with a validity period of 24 hours in one day, the user theoretically has 24 exchange rates capable of being exchanged in one day, and if the user selects the lowest exchange rate and the exchange rate provider to complete the transaction each time, the action is preferential. On one hand, the preferred arbitrage behavior makes the rate provider such as a payment platform have larger damage risk, on the other hand, the server is required to inquire the market price in real time every time the user sends out a long-acting rate, and then the long-acting rate is calculated and provided for the user, so that the interaction efficiency between the server and the terminal is low, and the whole resource processing performance of the payment platform can be influenced under the condition of higher concurrency of inquiry requests.
In the application, the long-acting resource conversion rate refers to the constant resource conversion rate provided for the target object in the effective period, the long-acting resource conversion rate can support multiple transactions in the effective period, and the server can directly return the same long-acting resource conversion rate for the resource conversion rate query requests sent by the terminal for multiple times in the effective period of the long-acting resource conversion rate of the target object relative to the target resource type pair, the effective period is not prolonged, the number of times of calculating a new long-acting exchange rate for real-time query market price is reduced, the interaction efficiency with the target object is improved, and the overall resource processing performance can be improved especially when the concurrency of the query requests is higher.
For example, when a user requests a long-acting exchange rate of USD-CNH with a validity period of 24 hours at 2022.8.23 12:00:00, the server calculates and provides the long-acting exchange rate of 6.83 for the user, and then the user directly returns to 6.83 when the user initiates a long-acting exchange rate query request of USD-CNH again within 24 hours, and the resource conversion process is carried out on multiple resource conversion requests initiated by the user according to 6.83 within 24 hours, so that preferential benefit behavior can be avoided, and the damage risk of a payment platform is reduced.
The resource conversion rate query request includes a locking duration of the resource conversion rate of the target resource type pair, where the locking duration may be used to query the conversion rate fluctuation parameter corresponding to the locking duration, and the locking duration is used to determine an validity period of the long-acting resource conversion rate, for example, the locking duration is 15 seconds, and the validity period expires to 15 seconds after the query request is initiated.
Step 204, when the conversion rate of the long-acting resource corresponding to the target resource type pair of the target object is not queried, querying the conversion rate fluctuation parameter of the locking duration corresponding to the target resource type; the slew rate fluctuation parameter is determined based on a historical reference resource slew rate of the target resource type pair.
The conversion rate fluctuation parameter is an adjustment parameter of the resource conversion rate, is determined according to the historical reference resource conversion rate of the target resource type pair, and can be used for adjusting (adding price or reducing price) the real-time resource conversion rate so as to obtain the resource conversion rate which is close to the market and has more competitiveness and user benefit assurance and can control the damage and benefit risk of the payment platform within a proper range, namely the long-acting resource conversion rate, within the validity period determined by the locking duration.
The server may determine conversion rate fluctuation parameters of each group of resource types corresponding to different locking durations in advance, record the conversion rate fluctuation parameters of each group of resource types corresponding to different locking durations, and update the conversion rate fluctuation parameters periodically, for example, once a day, so that the server may query the corresponding conversion rate fluctuation parameters according to the target resource type pairs and the locking durations in the resource conversion rate query request. For example, on a certain day, the conversion rate fluctuation parameter for a corresponding lock period of 15s between dollars and Renminbi is 0.0010 (by way of example only), the conversion rate fluctuation parameter for a corresponding lock period of 30s between dollars and Renminbi is 0.0012, the conversion rate fluctuation parameter for a corresponding lock period of 60s between dollars and Renminbi is 0.0014, the conversion rate fluctuation parameter for a corresponding lock period of 15s between dollars and Singapore is 0.0011, the conversion rate fluctuation parameter for a corresponding lock period of 30s between dollars and Singapore is 0.0013, the conversion rate fluctuation parameter for a corresponding lock period of 60s between dollars and Singapore is 0.0015, and so on.
Specifically, after receiving a resource conversion rate query request initiated by a terminal, the server queries whether the resource conversion rate query request exists or not according to the resource conversion rate query request: the target object corresponds to the long-acting resource conversion rate of the target resource type pair and is still in the validity period (i.e. the basis of the query is the target object and the target resource type pair). If so, the server directly returns the queried long-term resource conversion rate, and optionally, the server can also return the validity period (or deadline) of the long-term resource conversion rate. If the conversion rate of the long-acting resource corresponding to the target resource type pair is not queried by the server or the conversion rate of the long-acting resource corresponding to the target resource type pair is queried to be outdated, the server queries the conversion rate fluctuation parameter of the locking duration corresponding to the target resource type according to the target resource type pair included by the resource conversion rate query request and the locking duration, and then through the follow-up step, the conversion rate fluctuation parameter can be used for calculating a new long-acting resource conversion rate with the validity period being the locking duration, and the new long-acting resource conversion rate is returned to the target object. In addition, the server can also correspondingly record the target object, the target resource type pair, the long-acting resource conversion rate and the corresponding validity period, so that when the target object is received in the validity period for multiple times to inquire about the resource conversion rate of the target resource type pair, the server can directly return the recorded long-acting resource conversion rate.
In one embodiment, the resource conversion rate query request further includes a type of long-term resource conversion rate. If the type indicates that the terminal requests to inquire is a long-acting resource conversion rate capable of initiating multiple resource conversion requests within the valid period, namely, the type is the long-acting resource conversion rate capable of multiple resource conversion types, the server inquires whether the resource conversion rate exists or not: and if the long-acting resource conversion rate exists, the server directly returns the queried long-acting resource conversion rate to the target object, if the long-acting resource conversion rate does not exist, the server queries the conversion rate fluctuation parameter of the target resource type pair corresponding to the locking duration, then calculates a new long-acting resource conversion rate with the validity period being the locking duration according to the conversion rate fluctuation parameter, returns the long-acting resource conversion rate to the target object, and the target object can initiate a plurality of resource conversion requests within the validity period, and performs resource conversion processing according to the long-acting resource conversion rate.
If the type indicates that the terminal requests to inquire is a long-acting resource conversion rate capable of only initiating a resource conversion request once in the validity period, namely, the type is a long-acting resource conversion rate of a single resource conversion type, the server can also inquire a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration, then calculate a new validity period as the long-acting resource conversion rate of the locking duration according to the conversion rate fluctuation parameter, and return the new validity period to the target object, wherein the target object can initiate a resource conversion request about the target resource type pair once in the validity period, and the long-acting resource conversion rate is invalid after the server carries out resource conversion processing according to the long-acting resource conversion rate.
Step 206, obtaining the real-time resource conversion rate corresponding to the target resource type pair.
The real-time resource conversion rate is a resource conversion rate which is queried by a server from a financial institution background in real time and can be used for directly converting resources, for example, the real-time resource conversion rate is an exchange rate which is provided by a financial structure to a client and can be used for directly making a transaction, and comprises a buying price and a selling price, and generally has a tradable quantity. The real-time resource conversion rate is updated more frequently, and has definite timeliness. That is, only when the long-term resource conversion rate of the target object corresponding to the target resource type pair and still within the validity period is not queried, the server needs to acquire the real-time resource conversion rate corresponding to the target resource type pair from the background of the financial institution in real time, and then execute the subsequent steps, namely calculate a new long-term resource conversion rate according to the queried conversion rate fluctuation parameter corresponding to the locking duration and the acquired real-time resource conversion rate.
In one embodiment, the server may obtain the target resource types from the plurality of different financial institutions in the background to sort the corresponding real-time resource conversion rate and the corresponding resource conversion amount, according to the size of the real-time resource conversion rate and the size of the resource conversion amount, to form a real-time resource conversion rate table, where the real-time resource conversion rate table may reflect the current resource conversion rates of different resource types and different conversion orders and may be used for directly converting the resource, and the server may select one real-time resource conversion rate from the sorted results as a basis for generating the long-acting resource conversion rate, for example, the server may select the real-time resource conversion rate that corresponds to the resource conversion amount and is the minimum according to the predicted resource conversion amount of the target object corresponding to the target resource conversion type pair. In some embodiments, the real-time resource conversion rate table is obtained and updated asynchronously, and the server only needs to pull the real-time resource conversion rate table to select a suitable real-time resource conversion rate.
And step 208, adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain the long-acting resource conversion rate of which the validity period is the locking duration and the target object corresponds to the target resource type pair.
After obtaining the conversion rate fluctuation parameter of the locking duration initiated by the target resource type to the corresponding target object and the real-time resource conversion rate corresponding to the target resource type pair, the server can adjust the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate. For example, the larger the conversion rate fluctuation parameter is, the larger the foreign exchange market fluctuation is, the higher the uncertainty is, and then the server can superimpose a relatively higher price on the basis of the real-time resource conversion rate to obtain the long-acting resource conversion rate. The conversion rate fluctuation parameters of the target resource types on the locking time initiated by the corresponding target objects can accurately reflect fluctuation conditions of the foreign exchange market, so that the calculated long-acting resource conversion rate can be close to the market and has more competitiveness, the benefit of a user is guaranteed, and the preferential arbitrage behavior can be limited because the long-acting resource conversion rate is unchanged in the locking time, and the damage and benefit risk of a payment platform can be controlled in a proper range.
In one embodiment, the server may further perform fine adjustment on the calculated long-term resource conversion rate according to the historical transaction behavior of the target object, and return the adjusted long-term resource conversion rate to the target object. For example, the server may determine a resource conversion risk coefficient of the target object according to whether the resource conversion amount of the target object is predictable, whether the resource conversion amount can be sent to the market for performing resource conversion in advance, and a resource conversion scene of the target object, and based on the resource conversion risk coefficient, superimpose a price on the calculated long-acting resource conversion rate.
In one embodiment, the server may obtain historical resource conversion data of the target object, determine a resource conversion risk coefficient of the target object according to the historical resource conversion data, and adjust the long-term resource conversion rate according to the resource conversion risk coefficient to obtain an adjusted long-term resource conversion rate.
Wherein, the resource conversion risk coefficient is denoted as R, and comprises two aspects: the prediction probability p1 of the target object resource conversion behavior and the risk coefficient p2, r= (1-p 1) p2 corresponding to the resource conversion scene. The prediction probability of the target object resource conversion behavior is as follows: if the resource conversion amount of the target object is predictable and can be sent to the market for resource conversion in advance, the server can switch the switch-in resource of the resource conversion amount from the market in advance at a lower price, and the risk coefficient of the resource conversion of the target object is relatively smaller, that is, the smaller the prediction probability is, the larger the risk is, and the smaller the risk is. For example, if a user purchases 50 dollars after selling one per day, the probability of predicting the user's resource conversion behavior will be greater. The resource conversion scenes of the target object, such as 'reserved payment', 'port Liu Huikuan', 'enterprise foreign exchange', are different in arbitrage risk faced by different resource conversion scenes, so that the price adding amplitude is further adjusted by using the risk coefficient corresponding to the resource conversion scene, and the larger the coefficient is, the larger the price is. Thus, the final long-acting resource conversion rate is obtained by adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter V corresponding to the locking time length and the resource conversion risk coefficient R.
Optionally, the server may generate a statement of the price locking transaction for the target object by counting historical resource conversion data of the target object, where each row in the statement may include seven fields: counting a time window, a target object, a price locking duration, a price locking profit and loss amount, a price locking transaction total, a price locking transaction profit and loss rate and a price locking transaction number. By analyzing the historical data of the target object in a certain period of time, quantitative profit and loss rate is calculated to determine whether to stop the service of providing the long-acting resource conversion rate for the target object or to improve the long-acting resource conversion rate, and the historical data can be used as a data evidence to determine whether to reduce the resource conversion risk coefficient of the target object so as to correct the fluctuation parameter of the conversion rate and provide the long-acting resource conversion rate with more competitive power.
In one embodiment, the server may also determine a validity period based on the current time, the lock duration, and determine whether the validity period spans a weekend (or holiday). If so, a corresponding weekend risk coefficient W can be further superimposed, and the adjusted long-acting resource conversion rate is further subjected to protective pricing, so that the final long-acting resource conversion rate is obtained by adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter V corresponding to the locking duration, the resource conversion risk coefficient R and the weekend risk coefficient W. If not, the server can directly report the adjusted long-acting resource conversion rate.
In one embodiment, the server may further adjust the validity period of the long-acting resource conversion rate according to the validity period corresponding to the locking duration, the delivery deadline (such as t0\t1\t2) and the deadline of different deadlines, so as to ensure that the reported long-acting resource conversion rate can complete resource conversion within the determined validity period.
Step 210, returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
For the long-acting resource conversion rate determined according to the steps, the server can return the long-acting resource conversion rate to the target object, the target resource type pair, the long-acting resource conversion rate and the corresponding effective period are correspondingly recorded by the server, so that when the target object is received in the effective period to inquire the resource conversion rate related to the target resource type pair for many times, the server can directly return the recorded long-acting resource conversion rate, the server is required to inquire the market price in real time every time the user sends an inquiry request, the long-acting exchange rate is calculated and provided for the user, and the interaction efficiency with the terminal is improved.
In one embodiment, when a resource conversion request initiated by a target object with respect to a target resource type pair is received within a validity period, the target object is resource converted with respect to the target resource type pair at a long-term resource conversion rate. Specifically, when the server receives a resource conversion request about a target resource type pair initiated by a target object within the validity period, the server may query a long-acting resource conversion rate of the target object about the target resource type pair according to the target object and the target resource type pair, and perform resource conversion about the target resource type pair on a resource account of the target object according to the long-acting resource conversion rate and a resource conversion amount carried in the resource conversion request.
In one embodiment, when the amount of resource conversion corresponding to the resource conversion request about the target resource type pair initiated by the target object (the total amount of resource conversion obtained by converting the resource according to the long-term resource conversion rate currently corresponding to the target resource type pair) is greater than the set limit in the validity period, and when the server receives the resource conversion rate query request about the target resource type pair initiated by the target object again in the validity period, the server may recalculate a long-term resource conversion rate, so as to avoid that when the real-time market price accessed from the background of the financial institution is higher than the long-term resource conversion rate, the target object repeatedly initiates the resource conversion request in the validity period through the fixed long-term resource conversion rate, thereby causing the loss of the payment platform.
According to the data processing method for resource conversion, the conversion rate fluctuation parameters corresponding to different locking time periods are provided for the target resource type pairs, the conversion rate fluctuation parameters are determined according to the historical reference resource conversion rate of the target resource type pairs, after a resource conversion rate query request which carries the locking time periods and is related to the target resource type pairs and is sent by the target object is received, if the long-acting resource conversion rate of the target resource type pairs corresponding to the target object is not queried, the real-time resource conversion rate is adjusted according to the conversion rate fluctuation parameters corresponding to the locking time periods and corresponding to the target resource type pairs, the long-acting resource conversion rate related to the target resource type pairs can be accurately provided for the target object in the validity period corresponding to the locking time period, when the resource conversion rate query request of the target object related to the target resource type pairs is received in the validity period later, the long-acting resource conversion rate which is still in the validity period can be rapidly reported to the target object, the long-acting resource conversion rate is not required to be reported to the target object after the background query of a financial institution, interaction efficiency between the long-acting resource conversion rate and the target object is greatly improved, and particularly, and the resource processing performance of the whole resource can be improved when the concurrency of the query request is high is improved.
How to predict the conversion rate fluctuation parameter, specifically, the fluctuation risk of the long-term resource conversion rate, that is, the conversion rate fluctuation parameter, is predicted by the fluctuation parameter of the history reference resource conversion rate is described below. It should be noted that the conversion rate fluctuation parameter may be updated periodically, for example, the server updates the historical reference resource conversion rate once a day, thereby updating the conversion rate fluctuation parameter once.
In one embodiment, as shown in fig. 3, the step of determining the conversion rate fluctuation parameter includes:
step 302, determining a back measurement interval and at least one back measurement period according to the locking duration.
The lock duration is used to determine the validity period of the long-acting resource conversion rate, and the lock duration may be denoted as X, and the lock duration may be some enumerated values, such as 15s,30s,1min,5min, and so on. The locking time length is also used for determining a return window, the return window is also called a return time interval, and the length of the return window is the locking time length.
The return interval is a value interval of the return time interval, the return interval can be recorded as L, the return interval is increased, the number of the return time intervals can be reduced under the condition that the return time interval is more, and the calculated amount is reduced on the premise that the calculated result is credible. For example, for a certain price-locking duration X1, historical data of n1 days is taken, a server divides a return time interval with a length of X1 every interval step L1, and historical data corresponding to the divided multiple return time intervals is obtained and used for predicting conversion rate fluctuation parameters corresponding to the price-locking duration X1 corresponding to the dollar and the RMB. For a certain price locking duration X2, historical data of n2 days are taken, a return time interval with the length of X2 is divided by the server every interval step length L2, and the historical data corresponding to the divided multiple return time intervals are obtained and used for predicting conversion rate fluctuation parameters corresponding to the price locking duration X2 corresponding to dollars and RMB.
The time period of the return is the time range of the historical data which needs to be measured back, for example, the time period of the return is 6-14 points per day. For different locking duration, the server can return the historical data of the past n days (the n values corresponding to different locking duration can be different), in general, the longer the locking duration is, the more the number of the return days is, namely the more the return time period is, and the more the conversion rate fluctuation parameter obtained by the return has the reference value. For example, the lock-in period is 15s and the number of return days is 3 days in the past. The number of return days may be the last 90 days, taking into account the reference value and the calculated amount. The locking time period is different, and the value of n can be different. It will be appreciated that if n days contain weekends or holidays, proceed forward.
In one embodiment, determining the back-off interval and the at least one back-off period according to the lock-off period includes: determining a target time zone in which the target object is located; determining the number of the return days and the return interval corresponding to the locking time according to the locking time; and determining at least one return time period according to the target time zone and the number of return days.
For example, the server may divide a day into 3 time zones, e.g., the time zones for the returns for tokyo time zones are 06:00:00-14:00:00, the return time period for London time zone is 14:00:00-22:00:00, the return time period for New York time zone is 22:00:00-06:00:00 (6 am on the next day), the server may also set an enumeration set of resource type pairs, e.g., dollars and Renminbi, dollars and Japanese, dollars and Singapore, etc. Because the return time periods of each time zone corresponding to each day are different, the server sets corresponding return days and return intervals for each time zone, each resource type pair and each locking duration, and then calculates corresponding conversion rate fluctuation parameters through subsequent steps, and stores the time zone, the resource type pair, the locking duration and the conversion rate fluctuation parameters correspondingly. For example, for tokyo time zone, the locking time is 15s, the number of the callback days is 3 days, the callback interval is 10s, then 3 callback time periods can be determined, which are 06:00:00-14:00:00 in the past 3 days, and each callback time period can be divided into a plurality of sub-time periods, namely, callback time periods. Thus, when the server receives the resource conversion rate query request initiated by the target object, the target time zone in which the target object is located can be determined, and the corresponding conversion rate fluctuation parameter is queried according to the target time zone, the target resource type pair and the locking duration.
Step 304, starting from the starting time of the return time period, dividing a sub-time period from each interval of the return time period, wherein the duration of each sub-time period is the locking duration.
FIG. 4 is a schematic diagram of the configuration parameters for the lock-out period in one embodiment. Referring to fig. 4, when the lock time is 15s, the return interval is 10s, the return days are 3 days, when the lock time is 30s, the return interval is 5min, the return days are 5 days, and the return interval is 30 s. Referring to fig. 4, the longer the locking time, the more days the test are, and the larger the test interval is, so that the calculated amount can be reduced while the test data has higher reference value.
For example, for tokyo time zone, the corresponding time period for return is 06:00:00-14:00:00 a day, when the locking time period is 15s, the time interval for return is 10s, and the time period for return is 3 days, then 8 x 3600 x 3/10=8640 subtime periods can be obtained as follows:
06:00:00~(06:00:00+15);
06:00:10~(06:00:10+15);
06:00:20~(06:00:20+15);
06:00:30~(06:00:30+15);
……
step 306, for each sub-time period, calculating a historical fluctuation parameter of the sub-time period corresponding to the target resource type pair according to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period.
As mentioned above, the number of days for the return may be up to 90 days in the past, and for each target resource type pair, such as dollars and Renminbi, the server may update the historical data, i.e., the historical reference resource conversion rate, for each day for 90 days in the past for calculating the conversion rate fluctuation parameters for the target resource type pair for different lock-up durations.
Specifically, after the server determines the number of return days and each sub-time period according to the locking duration, the historical reference resource conversion rate (denoted as rate_open) of the target resource type pair corresponding to the start time point of each time period and the historical reference resource conversion rate (denoted as rate_close) of the target resource type pair corresponding to the end time point of each sub-time period can be obtained from the historical data, so that the historical fluctuation parameter of the target resource type pair corresponding to each time period can be calculated according to the rate_open and the rate_close.
It should be noted that the historical reference resource conversion rate of the target resource type pair may be a reference resource conversion rate approved by the market for a period of time, for example, may be a reference exchange rate provided by an authoritative and large-scale foreign exchange platform in a global foreign exchange market, for example, a fair exchange rate.
Step 308, determining the conversion rate fluctuation parameter of the target resource type pair corresponding to the locking duration according to the historical fluctuation parameter of the target resource type pair corresponding to each sub-time period.
In this embodiment, the historical fluctuation parameter of the target resource type corresponding to each sub-period reflects the fluctuation of the target resource type pair in each period, and the fluctuation of the target resource type pair in the past period can be reflected according to the historical fluctuation parameter of the target resource type corresponding to a plurality of sub-periods, so that the server can predict the fluctuation risk of the long-acting resource conversion rate corresponding to the locking duration, namely the conversion rate fluctuation parameter, according to the fluctuation of the target resource type pair in a plurality of sub-periods.
In one embodiment, calculating the historical fluctuation parameter of the sub-time period corresponding to the target resource type pair according to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period comprises: calculating a difference between a historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and a historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period; and taking the ratio of the difference to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point as the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
For example, for the ith sub-period, a historical volatility parameter of the target resource type pair for the sub-period is calculated as follows:
wherein, rate_close (i) is the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-period, rate_open (i) is the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-period, that is, the ratio of the absolute value of the difference value between the initial historical reference resource conversion rate and the final historical reference resource conversion rate in the ith sub-period to the initial exchange rate is recorded as the historical fluctuation parameter of the target resource type pair corresponding to the sub-period.
In one embodiment, determining the slew rate fluctuation parameter of the target resource type pair corresponding to the lock duration according to the history fluctuation parameter of the target resource type pair corresponding to each sub-time period includes: sequencing the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period according to the sequence from high to low to obtain a sequencing result; and taking the historical fluctuation parameter positioned on the target allocation in the sequencing result as the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration.
Specifically, the server sorts the historical fluctuation parameters of the target resource type pairs corresponding to the sub-time periods according to the order from high to low to obtain a sorting result, the higher the historical fluctuation parameters are, the higher the risk is, the larger the price adding amplitude of the corresponding real-time resource conversion rate is, otherwise, the lower the historical fluctuation risk is, the price adding amplitude of the corresponding real-time resource conversion rate is also at the end of month, the server selects the historical fluctuation parameters on the target positions from the sorting result as the conversion rate fluctuation parameters V of the target resource types for the corresponding locking duration, and the historical fluctuation parameters on the target positions can cover the fluctuation risk of the resource conversion rate in most cases within the number of back measurement days, for example, the historical fluctuation parameters positioned at 75 positions are selected, so that the fluctuation risk in the condition of 87.5% within the number of back measurement days can be covered.
That is, as shown in fig. 5, in one embodiment, a flow chart of predicting a conversion rate fluctuation parameter for a target resource type is shown, and referring to fig. 5, the method includes the following steps:
step 502, determining a target time zone, a target resource type pair, and a lock duration.
Step 504, determining a return day and a return interval corresponding to the locking duration according to the locking duration, determining at least one return time period according to the target time zone and the return day, and dividing each interval of the return time period into sub-time periods from the starting time of the return time period, wherein the duration of each sub-time period is the locking duration.
Step 506, for each sub-period, calculating a difference between the historical reference resource conversion rate of the target resource type pair corresponding to the start time point of the sub-period and the historical reference resource conversion rate of the target resource type pair corresponding to the end time point of the sub-period; and taking the ratio of the difference to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point as the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
Step 508, sorting the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period according to the order from high to low to obtain a sorting result; and taking the historical fluctuation parameter positioned on the target allocation in the sequencing result as the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration.
Step 510, storing the target time zone, the target resource type pair, and the locking duration in correspondence with the conversion rate fluctuation parameter, and querying the corresponding conversion rate fluctuation parameter according to the correspondence when receiving a resource conversion rate query request for specifying the locking duration, which belongs to the target time zone, regarding the target resource type pair.
In this embodiment, for each sub-period, the ratio of the absolute value of the difference between the conversion rate of the historical reference resource at the beginning of the sub-period and the conversion rate of the historical reference resource at the end of the sub-period to the initial exchange rate is recorded as the historical fluctuation parameter of the target resource type pair corresponding to the sub-period, so that the fluctuation of each sub-period can be accurately reflected, the target quantile is selected from all the historical fluctuation parameters to serve as the conversion rate fluctuation parameter, the representative fluctuation degree in the whole return period can be reflected, the real-time resource conversion rate can be adjusted based on the conversion rate fluctuation parameter, and the obtained long-acting resource conversion rate can be accurately attached to the recent market price.
In one embodiment, calculating the historical fluctuation parameter of the sub-time period corresponding to the target resource type pair according to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period comprises: calculating the ratio of the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period; and taking the natural logarithm of the ratio as a historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
For example, for the ith sub-period, a historical volatility parameter of the target resource type pair for the sub-period is calculated as follows:
wherein, rate_close (i) is the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-period, rate_open (i) is the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-period, i.e. the natural logarithm of the ratio of the historical reference resource conversion rate terminated to the initial historical reference resource conversion rate in the ith sub-period is recorded as the historical fluctuation parameter of the target resource type pair corresponding to the sub-period.
In one embodiment, determining the slew rate fluctuation parameter of the target resource type pair corresponding to the lock duration according to the history fluctuation parameter of the target resource type pair corresponding to each sub-time period includes: determining a total number of sub-time periods; calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters and the total number of the corresponding target resource type pairs of each sub-time period; and calculating the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration according to the square root and standard deviation of the total number.
For example, the slew rate fluctuation parameter corresponding to the lock-up period can be calculated by the following formula:
Wherein sigma is the standard deviation of the historical fluctuation parameter, N is the total number of sub-time periods, V is the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration, namely, the standard deviation of the historical fluctuation parameter is obtained, and then the square root of the total number of sub-time periods contained in the return time period of the number of return days is multiplied, so that the conversion rate fluctuation parameter is obtained.
That is, as shown in fig. 6, in one embodiment, a flow chart of predicting a conversion rate fluctuation parameter for a target resource type is shown, and referring to fig. 6, the method includes the following steps:
step 602, determining a target time zone, a target resource type pair, and a lock duration.
Step 604, determining a return day and a return interval corresponding to the locking duration according to the locking duration, determining at least one return time period according to the target time zone and the return day, and dividing each interval of the return time period into sub-time periods from the starting time of the return time period, wherein the duration of each sub-time period is the locking duration.
Step 606, for each sub-time period, calculating the ratio of the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period, and taking the natural logarithm of the ratio as the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
At step 608, a total number of sub-time periods is determined.
Step 610, calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters and the total number of the corresponding target resource type pairs in each sub-time period.
Step 612, calculating the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration according to the square root and standard deviation of the total number.
Step 614, storing the target time zone, the target resource type pair, and the locking duration in correspondence with the conversion rate fluctuation parameter, and querying the corresponding conversion rate fluctuation parameter according to the correspondence when receiving a resource conversion rate query request for specifying the locking duration, which belongs to the target time zone, regarding the target resource type pair.
In this embodiment, for each sub-period, the natural logarithm of the ratio of the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-period is used as the historical fluctuation parameter of the target resource type pair corresponding to the sub-period, so that the fluctuation of each sub-period can be accurately reflected, the standard deviation of the historical fluctuation parameter can be obtained according to the historical fluctuation parameter corresponding to each sub-period, the square root of the total number of sub-periods is multiplied, the obtained fluctuation parameter is the conversion rate fluctuation parameter, the discrete degree of the fluctuation of the whole return time period can be reflected, the real-time resource conversion rate can be adjusted based on the conversion rate fluctuation parameter, the obtained long-acting resource conversion rate can be accurately attached, and the recent market price can be accurately attached.
In one embodiment, to reduce the amount of computation, the server may further use a certain resource type as a target resource type (also referred to as a basic resource type), such as dollars or rmbs, and the server only needs to count corresponding conversion rate fluctuation parameters for a target resource type pair containing the basic resource type, and determine corresponding conversion rate fluctuation parameters for a target resource type pair not containing the basic resource type by means of conversion.
In one embodiment, the target resource type pair includes a swap-out resource type and a swap-in resource type, and querying a slew rate fluctuation parameter of the target resource type corresponding to the lock duration includes: when the type of the resources is changed out or the type of the resources is changed in to the type of the target resources, inquiring the conversion rate fluctuation parameters of the type of the target resources corresponding to the locking time length; when the change-out resource type and the change-in resource type are not the target resource type, inquiring a first conversion rate fluctuation parameter of locking duration corresponding to the change-out resource type and the target resource type, inquiring a second conversion rate fluctuation parameter of locking duration corresponding to the change-in resource type and the target resource type, and taking the larger one of the first conversion rate fluctuation parameter and the second conversion rate fluctuation parameter as the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration.
For example, the target resource type is exemplified as USD: when the out-of resource type or the in-of resource type is the target resource type, for example, the target resource type pair is USD-CNH, including the target resource type USD, the server inquires the conversion rate fluctuation parameter of the USD-CNH corresponding to the locking duration. When the change-out resource type and the change-in resource type are not target resource types, for example, the target resource type pair is SGD-CNH, the server inquires a first conversion rate fluctuation parameter V1 of the SGD-USD corresponding to the locking time length, inquires a second conversion rate fluctuation parameter V2 of the CNH-USD corresponding to the locking time length, compares the first conversion rate fluctuation parameter V1 with the second conversion rate fluctuation parameter V2, and takes the larger conversion rate fluctuation parameter as the conversion rate fluctuation parameter of the SGD-CNH corresponding to the locking time length. Or, the server may also take the average value of V1 and V2 as the slew rate fluctuation parameter of the SGD-CNH corresponding to the lock duration.
FIG. 7 is a flow chart illustrating the generation of a long-term exchange rate in one embodiment. Referring to fig. 7, the method includes the steps of:
1. a request is received. And receiving a long-acting exchange rate query request of the target object for the currency pairs A and B, wherein the long-acting exchange rate query request carries the target resource type pair (namely A and B), the locking duration and the long-acting exchange rate type.
2. And judging the long-acting exchange rate still in the validity period. That is, the server judges whether the long-acting exchange rate type of the target object queried at the time is a type capable of converting resources for multiple times, if so, the server queries whether the long-acting exchange rate of the currency pair A and B corresponding to the locking duration and still in the validity period exists, and if so, the long-acting exchange rate and the corresponding validity period are directly returned to the target object. If not, step 703 is performed.
3. And (5) adjusting the long-acting exchange rate. The server inquires the calculated exchange rate adjustment parameter of the currency pair corresponding to the price locking duration according to the currency pair information, and adjusts the price of the real-time exchange rate of the currency pair (namely A and B) in the foreign exchange market according to the exchange rate adjustment parameter. Specifically, the server judges whether the currency pair A and the currency pair B comprise USD coins or not, if yes, directly takes the exchange rate adjustment parameter of the currency pair corresponding to the locking time length, if not, obtains the exchange rate adjustment parameter V1 of the currency pair A and the USD coins corresponding to the locking time length, obtains the exchange rate adjustment parameter V2 of the currency pair B and the USD coins corresponding to the locking time length, takes the larger one of the V1 and the V2 as the exchange rate adjustment parameter of the currency pair A and the currency pair B corresponding to the locking time length, and then utilizes the exchange rate adjustment parameter to conduct price adjustment on the real-time exchange rate to obtain a long-acting exchange rate. The server may further rate the risk factor of the target object to the long-term exchange rate.
4. And adding price in the holiday. The server determines whether the validity period corresponding to the locking duration spans a holiday or a weekend, if yes, the server superimposes a weekend price on the basis of the long-acting exchange rate calculated in step 703, and if not, the server directly reports the long-acting exchange rate calculated in step 703.
5. And (5) processing the validity period. The server correspondingly adjusts the validity period of the long-acting resource conversion rate according to the validity period corresponding to the locking duration, the delivery time period (such as T0/T1/T2) and the deadlines of different time periods, so as to ensure that the reported long-acting resource conversion rate can finish resource conversion within the determined validity period.
6. Reporting the long-acting exchange rate and the corresponding validity period.
Therefore, the target object only needs to request a long-acting exchange rate with the validity period of T, and the price obtained by multiple inquiry of the server to the target object is unchanged in the validity period of T, so that the interaction efficiency with the target object is improved. During the expiration date, the target object may initiate a single or multiple exchange transactions with the price for the exchange at the long-term exchange rate without extending the expiration date.
FIG. 8 is a flow chart of a method of processing data for resource conversion in one embodiment. Referring to fig. 8, the method includes the steps of:
Step 802, obtaining a historical reference resource conversion rate;
step 804, setting a plurality of different locking durations, and setting a retest interval and a retest day corresponding to each locking duration;
step 806, for each locking duration, determining at least one return time period according to the number of return days;
step 808, starting from the starting time of the return time period, dividing a sub-time period from each interval of the return time period, wherein the duration of each sub-time period is the locking duration;
step 810, for each sub-period, calculating a difference between a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period and a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period; taking the ratio of the difference to the historical reference resource conversion rate of the target resource type pair corresponding to the initial time point as the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period; sequencing the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period according to the sequence from high to low to obtain a sequencing result; taking the historical fluctuation parameter positioned on the target position in the sequencing result as a conversion rate fluctuation parameter of the target resource type to the corresponding locking duration;
Step 812, for each sub-period, calculating a ratio of a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period to a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period; taking the natural logarithm of the ratio as a historical fluctuation parameter of a target resource type pair corresponding to the sub-time period, and determining the total number of the sub-time periods; calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters and the total number of the corresponding target resource type pairs of each sub-time period; and calculating the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration according to the square root and standard deviation of the total number.
Step 814, receiving a resource conversion rate query request of the target object about the target resource type pair, where the resource conversion rate query request includes a locking duration of the resource conversion rate of the target resource type pair;
step 816, inquiring whether there is a long-acting resource conversion rate which corresponds to the target resource type pair and the locking duration and is still in the validity period, and is related to the target object; if so, go to step 818; if not, go to step 820;
step 818, returning the queried long-term resource conversion rate to the target object;
Step 820, inquiring the conversion rate fluctuation parameter of the target resource type corresponding to the locking time length;
step 822, obtaining a real-time resource conversion rate corresponding to the target resource type pair;
step 824, adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-term resource conversion rate with a validity period of a locking duration corresponding to the target object;
step 826, record the correspondence between the target resource type pair, the lock duration and the long-term resource conversion rate.
Step 828, when a resource conversion rate query request corresponding to the lock duration and initiated by the target object with respect to the target resource type pair is received within the validity period, the long-acting resource conversion rate is returned.
In step 830, when a resource conversion request about a target resource type pair initiated by a target object is received within the validity period, resource conversion about the target resource type pair is performed on the target object at a long-acting resource conversion rate.
According to the data processing method for resource conversion, the conversion rate fluctuation parameters corresponding to different locking time periods are provided for the target resource type pairs, the conversion rate fluctuation parameters are determined according to the historical reference resource conversion rate of the target resource type pairs, after a resource conversion rate query request which carries the locking time periods and is related to the target resource type pairs and is sent by the target object is received, if the long-acting resource conversion rate of the target resource type pairs corresponding to the target object is not queried, the real-time resource conversion rate is adjusted according to the conversion rate fluctuation parameters corresponding to the locking time periods and corresponding to the target resource type pairs, the long-acting resource conversion rate related to the target resource type pairs can be accurately provided for the target object in the validity period corresponding to the locking time period, when the resource conversion rate query request of the target object related to the target resource type pairs is received in the validity period later, the long-acting resource conversion rate which is still in the validity period can be rapidly reported to the target object, the long-acting resource conversion rate is not required to be reported to the target object after the background query of a financial institution, interaction efficiency between the long-acting resource conversion rate and the target object is greatly improved, and particularly, and the resource processing performance of the whole resource can be improved when the concurrency of the query request is high is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data processing device for realizing the resource conversion of the data processing method of the resource conversion. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the data processing apparatus for converting one or more resources provided below may refer to the limitation of the data processing method for converting a resource hereinabove, and will not be repeated herein.
In one embodiment, as shown in FIG. 9, there is provided a data processing apparatus 900 for resource conversion, comprising: a receiving module 902, a querying module 904, an obtaining module 906, an adjusting module 908, and a returning module 910;
a receiving module 902, configured to receive a resource conversion rate query request of a target object about a target resource type pair, where the resource conversion rate query request includes a locking duration of a resource conversion rate of the target resource type pair;
the query module 904 is configured to query, when a long-acting resource conversion rate of a target resource type pair corresponding to a target object is not queried, a conversion rate fluctuation parameter of a locking duration corresponding to the target resource type pair, where the conversion rate fluctuation parameter is determined according to a historical reference resource conversion rate of the target resource type pair;
an obtaining module 906, configured to obtain a real-time resource conversion rate corresponding to the target resource type pair;
the adjustment module 908 is configured to adjust the real-time resource conversion rate based on the conversion rate fluctuation parameter, so as to obtain a long-acting resource conversion rate that corresponds to the target object and has a validity period of a locking duration;
a return module 910, configured to return the long-term resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
In one embodiment, the query module 904 is further configured to, when a long-term resource conversion rate that exists in the target object corresponding to the target resource type pair, is of a type that can be converted by multiple times, and is still within the validity period, return the queried long-term resource conversion rate to the target object.
In one embodiment, the resource-converted data processing apparatus 900 further includes: a conversion rate fluctuation parameter determining module;
the conversion rate fluctuation parameter determining module specifically comprises:
the back measurement window determining unit is used for determining a back measurement interval and at least one back measurement time period according to the locking time length; dividing a sub-time period from the starting time of the return time period at each interval of the return time period, wherein the duration of each sub-time period is a locking duration;
the computing unit is used for computing the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period according to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period for each sub-time period;
and the conversion rate fluctuation parameter determining unit is used for determining the conversion rate fluctuation parameter of the target resource type pair corresponding to the locking duration according to the historical fluctuation parameter of the target resource type pair corresponding to each sub-time period.
In one embodiment, the callback window determining unit is configured to determine a target time zone in which the target object is located; determining the number of the return days and the return interval corresponding to the locking time according to the locking time; and determining at least one return time period according to the target time zone and the number of return days.
In one embodiment, the computing unit is configured to compute a difference between a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-period and a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-period; and taking the ratio of the difference to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point as the historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
In one embodiment, the conversion rate fluctuation parameter determining unit is configured to sort the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period in order from high to low, so as to obtain a sorting result; and taking the historical fluctuation parameter positioned on the target allocation in the sequencing result as the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration.
In one embodiment, the calculating unit is configured to calculate a ratio of a historical reference resource conversion rate of the target resource type pair corresponding to an end time point of the sub-time period to a historical reference resource conversion rate of the target resource type pair corresponding to a start time point of the sub-time period; and taking the natural logarithm of the ratio as a historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
In one embodiment, the conversion rate fluctuation parameter determination unit is configured to determine a total number of sub-time periods; calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters and the total number of the corresponding target resource type pairs of each sub-time period; and calculating the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration according to the square root and standard deviation of the total number.
In one embodiment, the resource-converted data processing apparatus 900 further includes:
the long-acting resource conversion rate adjusting module is used for acquiring historical resource conversion data of the target object; determining a resource conversion risk coefficient of the target object according to the historical resource conversion data; according to the resource conversion risk coefficient, the long-acting resource conversion rate is adjusted, and the adjusted long-acting resource conversion rate is obtained;
and the return module is used for returning the adjusted long-acting resource conversion rate to the target object.
In one embodiment, the target resource type pair includes a swap-out resource type and a swap-in resource type; the query module 904 is configured to query a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration when the out-of resource type or the in-of resource type is the target resource type; when the change-out resource type and the change-in resource type are not the target resource type, inquiring a first conversion rate fluctuation parameter of locking duration corresponding to the change-out resource type and the target resource type, inquiring a second conversion rate fluctuation parameter of locking duration corresponding to the change-in resource type and the target resource type, and taking the larger one of the first conversion rate fluctuation parameter and the second conversion rate fluctuation parameter as the conversion rate fluctuation parameter of the target resource type to the corresponding locking duration.
In one embodiment, the resource-converted data processing apparatus 900 further includes:
and the resource conversion module is used for carrying out resource conversion on the target object according to the long-acting resource conversion rate when receiving the resource conversion request on the target resource type pair initiated by the target object within the validity period.
According to the data processing device 900 for converting resources, conversion rate fluctuation parameters corresponding to different locking durations are provided for the target resource type pairs, the conversion rate fluctuation parameters are determined according to historical reference resource conversion rates of the target resource type pairs, after a resource conversion rate query request carrying the locking durations and related to the target resource type pairs sent by a target object is received, if the long-acting resource conversion rate of the target resource type pairs corresponding to the target object is not queried, the real-time resource conversion rate is adjusted according to the conversion rate fluctuation parameters corresponding to the locking durations of the queried target resource type pairs, the long-acting resource conversion rate related to the target resource type pairs can be accurately provided for the target object in an effective period corresponding to the locking durations, and when a resource conversion rate query request of the target object related to the target resource type pairs is received in the effective period later, the long-acting resource conversion rate which is still in the effective period can be rapidly reported to the target object without reporting the long-acting resource conversion rate to the target object after querying the background of a financial institution, so that interaction efficiency between the target object and the target object is greatly improved, and particularly, the resource processing performance of the whole resource can be improved when the query request is high in concurrency.
The various modules in the resource-converted data processing apparatus 900 described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data such as historical resource conversion rate, conversion rate fluctuation parameters, long-acting resource conversion rate and the like. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data processing method of resource conversion.
It will be appreciated by those skilled in the art that the structure shown in FIG. 10 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, including a memory and a processor, where the memory stores a computer program, and the processor implements a data processing method for resource conversion provided by an embodiment of the present application when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements a data processing method for resource conversion provided by an embodiment of the present application.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements a data processing method for resource conversion provided by an embodiment of the present application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A method of data processing for resource conversion, the method comprising:
receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
when the long-acting resource conversion rate of the target object corresponding to the target resource type pair is not queried, querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration; the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
Acquiring a real-time resource conversion rate corresponding to the target resource type pair;
adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
2. The method according to claim 1, wherein the method further comprises:
and when the long-acting resource conversion rate which corresponds to the target object and is of the type capable of converting the resources for a plurality of times and still within the validity period is queried, returning the queried long-acting resource conversion rate to the target object.
3. The method of claim 1, wherein the step of determining the slew rate fluctuation parameter comprises:
determining a return measurement interval and at least one return time period according to the locking duration;
dividing a sub-time period from the starting time of the return time period at each interval of the return time period, wherein the duration of each sub-time period is the locking duration;
For each sub-time period, calculating a historical fluctuation parameter of the sub-time period corresponding to the target resource type pair according to a historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and a historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period;
and determining the conversion rate fluctuation parameter of the target resource type corresponding to the locking duration according to the historical fluctuation parameter of each sub-time period corresponding to the target resource type pair.
4. A method according to claim 3, wherein said determining a back-off interval and at least one back-off period based on said lock-off period comprises:
determining a target time zone in which the target object is located;
determining the number of the return days and the return interval corresponding to the locking time according to the locking time;
and determining at least one time period for callback according to the target time zone and the number of callback days.
5. The method of claim 3, wherein calculating the historical fluctuation parameter for the sub-time period corresponding to the target resource type pair based on the historical reference resource conversion rate for the target resource type pair at the start time point of the sub-time period and the historical reference resource conversion rate for the target resource type pair at the end time point of the sub-time period comprises:
Calculating a difference between a historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period and a historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period;
and taking the ratio of the difference to the historical reference resource conversion rate corresponding to the target resource type pair at the starting time point as the historical fluctuation parameter corresponding to the target resource type pair at the sub-time period.
6. The method of claim 5, wherein determining the slew rate fluctuation parameter for the target resource type corresponding to the lock duration based on the historical fluctuation parameter for the target resource type pair for each sub-time period comprises:
sequencing the historical fluctuation parameters of each sub-time period corresponding to the target resource type pair according to the sequence from high to low to obtain a sequencing result;
and taking the historical fluctuation parameter positioned on the target allocation in the sequencing result as a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration.
7. The method of claim 3, wherein calculating the historical fluctuation parameter for the sub-time period corresponding to the target resource type pair based on the historical reference resource conversion rate for the target resource type pair at the start time point of the sub-time period and the historical reference resource conversion rate for the target resource type pair at the end time point of the sub-time period comprises:
Calculating the ratio of the historical reference resource conversion rate of the target resource type pair corresponding to the ending time point of the sub-time period to the historical reference resource conversion rate of the target resource type pair corresponding to the starting time point of the sub-time period;
and taking the natural logarithm of the ratio as a historical fluctuation parameter of the target resource type pair corresponding to the sub-time period.
8. The method of claim 7, wherein determining the slew rate fluctuation parameter for the target resource type corresponding to the lock duration based on the historical fluctuation parameter for the target resource type pair for each sub-time period comprises:
determining a total number of the sub-time periods;
calculating the standard deviation of the historical fluctuation parameters according to the historical fluctuation parameters of the target resource type pairs corresponding to each sub-time period and the total number;
and calculating a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration according to the square root of the total number and the standard deviation.
9. The method of claim 1, wherein before the returning the persistent resource conversion rate to the target object, the method further comprises:
Acquiring historical resource conversion data of the target object;
determining a resource conversion risk coefficient of the target object according to the historical resource conversion data;
according to the resource conversion risk coefficient, the long-acting resource conversion rate is adjusted, and the adjusted long-acting resource conversion rate is obtained;
the returning the long-acting resource conversion rate to the target object comprises the following steps:
and returning the adjusted long-acting resource conversion rate to the target object.
10. The method of claim 1, wherein the target resource type pair includes a swap-out resource type and a swap-in resource type, and wherein the querying the slew rate fluctuation parameter of the target resource type for the lock duration comprises:
when the swap-out resource type or the swap-in resource type is a target resource type, inquiring a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration;
when the change-out resource type and the change-in resource type are not the target resource type, inquiring a first conversion rate fluctuation parameter of the locking duration corresponding to the change-out resource type and the target resource type, inquiring a second conversion rate fluctuation parameter of the locking duration corresponding to the change-in resource type and the target resource type, and taking the larger one of the first conversion rate fluctuation parameter and the second conversion rate fluctuation parameter as the conversion rate fluctuation parameter of the locking duration corresponding to the target resource type.
11. The method according to any one of claims 1 to 10, further comprising:
and when the resource conversion request about the target resource type pair initiated by the target object is received in the validity period, performing resource conversion about the target resource type pair on the target object according to the long-acting resource conversion rate.
12. A data processing apparatus for resource conversion, the apparatus comprising:
the resource conversion rate query module is used for receiving a resource conversion rate query request of a target object about a target resource type pair, wherein the resource conversion rate query request comprises a locking duration of a resource conversion rate of the target resource type pair;
the query module is used for querying a conversion rate fluctuation parameter of the target resource type corresponding to the locking duration when the long-acting resource conversion rate of the target resource type pair corresponding to the target object is not queried, wherein the conversion rate fluctuation parameter is determined according to the historical reference resource conversion rate of the target resource type pair;
the acquisition module is used for acquiring the real-time resource conversion rate corresponding to the target resource type pair;
the adjustment module is used for adjusting the real-time resource conversion rate based on the conversion rate fluctuation parameter to obtain a long-acting resource conversion rate of which the effective period is the locking duration and the target object corresponds to the target resource type pair;
The return module is used for returning the long-acting resource conversion rate to the target object; the long-acting resource conversion rate is used for the target object to inquire about the resource conversion rate of the target resource type pair in the validity period.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 11 when the computer program is executed.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 11.
CN202211090885.XA 2022-09-07 2022-09-07 Data processing method, apparatus, device, medium and program product for resource conversion Pending CN117010891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211090885.XA CN117010891A (en) 2022-09-07 2022-09-07 Data processing method, apparatus, device, medium and program product for resource conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211090885.XA CN117010891A (en) 2022-09-07 2022-09-07 Data processing method, apparatus, device, medium and program product for resource conversion

Publications (1)

Publication Number Publication Date
CN117010891A true CN117010891A (en) 2023-11-07

Family

ID=88567826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211090885.XA Pending CN117010891A (en) 2022-09-07 2022-09-07 Data processing method, apparatus, device, medium and program product for resource conversion

Country Status (1)

Country Link
CN (1) CN117010891A (en)

Similar Documents

Publication Publication Date Title
CN110134516B (en) Financial data processing method, apparatus, device and computer readable storage medium
KR101136696B1 (en) Stock information providing method and system for displaying firm's life stage and determining the overvaluation/undervaluation of a stock
CN104811344B (en) Network dynamic business monitoring method and device
US20030172017A1 (en) High performance multi-dimensional risk engines for enterprise wide market risk management
US20130304622A1 (en) Methods and systems for computing trading strategies for use in portfolio management and computing associated probability distributions for use in option pricing
US10417622B2 (en) Configurable invoice matching optimization system
CN102496126B (en) Custody asset transaction data monitoring equipment
Gibbs et al. DSGE Reno: Adding a housing block to a small open economy model
CN108765149A (en) A kind of quantization strategy based on cluster returns examining system and its returns survey method
US8924275B2 (en) Hybrid multi-thread and multi-process computer simulation system and method
CN105488163A (en) Information pushing method and apparatus
CN110517142B (en) Method and device for outputting policy evaluation information
CN113298383A (en) Asset assessment method and device and electronic equipment
CN115375413B (en) ERP purchase calculation method and system
CN117010891A (en) Data processing method, apparatus, device, medium and program product for resource conversion
CN113034183A (en) Pricing processing method and device, electronic equipment and storage medium
CN112884591A (en) Investment suggestion method, device, equipment and storage medium for trading products
US20050251466A1 (en) Arrangements and methods for computer based decision support
CN118096362A (en) Transaction service processing method and device
CN112561552A (en) Method and device for adjusting value attribute of article
US7877311B1 (en) System and method for analyzing transactions at an electronic exchange
JP4878973B2 (en) Load distribution processing system, load distribution processing method, and load distribution processing program
US20240221069A1 (en) Determining implied interest rates based on cryptoasset derivative trade data
Gibbs et al. Rdp 2018-04: Dsge reno: Adding a housing block to a small open economy model
CN118296294A (en) Spare part parameter determination method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination