Resource conversion rate processing method and device, electronic equipment and storage medium

By preconfiguring the conversion rate processing structure and establishing associations for each business scenario, the problem of increasing the difficulty of development of exchange rate quotations for each business scenario is solved, and the flexibility and reusability of resource conversion rate processing is achieved, reducing the risk of inaccurate exchange rate quotations.

CN120198217APending Publication Date: 2025-06-24TENPAY PAID TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510221731.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

With the increase in business scenarios and the evolution and superposition of exchange rate quotation strategies, individual exchange rate quotation for each business scenario increases the difficulty of development and reduces the reuse rate of exchange rate quotation strategies.

Method used

A resource conversion rate processing method is provided, and flexible processing of different business scenarios is achieved by preconfiguring the conversion rate processing structure for each service and establishing an association relationship between the service identification and the conversion rate processing structure. The method includes receiving a conversion rate query request, obtaining a corresponding conversion rate processing structure, performing series processing of resource pairs based on processing strategies, and sending a target conversion rate.

Benefits of technology

It reduces development difficulty, saves development costs, improves the reusability and flexibility of conversion rate processing strategies, and avoids the risk of inaccurate exchange rate quotations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198217A_ABST
    Figure CN120198217A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, provides a resource conversion rate processing method and device, electronic equipment and a storage medium, and can be applied to foreign exchange transaction scenes. According to the method, the conversion rate processing structure is pre-configured for each service, the association relationship between the service identifier of each service and each conversion rate processing structure is established, the conversion rate of the resource pair can be directly processed subsequently based on the conversion rate structure associated with each service, processing logic does not need to be independently developed for each service, the development difficulty is reduced, and the development efficiency is improved. According to the technical scheme, the development cost is saved, and the conversion rate processing structures of the services share the same conversion rate processing strategy pool, so that each conversion rate processing strategy can be used by different services, and the reusability of the conversion rate processing strategies is improved. Besides, when a certain service changes, only at least one conversion rate processing strategy in the corresponding conversion rate structure needs to be recombined, redevelopment is not needed, and the flexibility and maintainability of conversion rate processing are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The resource conversion rate refers to the ratio or parity of exchange between two resources. Among them, the exchange rate (also known as foreign exchange rate, foreign exchange rate) involves the exchange between the currency pairs of two different countries, which is a relatively common form of exchange in the resource conversion rate and plays a huge role in today's economic activities.

[0003] A third-party payment institution refers to an independent institution other than banks that has businesses such as exchange rate management, payment settlement, and foreign exchange transactions. In cross-border trade, as a participant in foreign exchange transactions, a third-party payment institution needs to obtain the exchange rates of different currency pairs from the contracting bank and process and quote the exchange rates of different currency pairs to the trading parties of foreign exchange transactions.

[0004] Currently, third-party payment institutions generally introduce streaming exchange rates through the Financial Information Exchange (FIX) protocol to obtain the most timely and optimal exchange rates from the contracting bank. Since different business scenarios have different exchange rate quotation strategies, when third-party payment institutions quote the exchange rates of currency pairs in different business scenarios, they will, respectively, based on the exchange rate quotation strategies of each business scenario, process the exchange rates of the corresponding currency pairs in the obtained business scenarios and then quote them to the trading parties of the corresponding business scenarios. Since the quotation of currency pairs is obtained based on the exchange rate quotation strategies of the corresponding business scenarios, the exchange rate quotations provided by third-party payment institutions are adapted to the business scenarios, thereby improving the competitiveness of the exchange rate quotations of third-party payment institutions while avoiding the risk of inaccurate exchange rate quotations.

[0005] However, with the increase in the number of business scenarios, the evolution and superposition of exchange rate quotation strategies in business scenarios, quoting exchange rates separately for each business scenario not only increases the development difficulty but also reduces the reuse rate of various exchange rate quotation strategies in each business scenario.

[0006] Therefore, providing a flexible processing solution for resource conversion rates is of great research significance for third-party payment institutions. Summary of the Invention

[0007] The embodiments of the present application provide a resource conversion rate processing method, device, electronic device, and storage medium for improving the flexibility of resource conversion processing.

[0008] On the one hand, the embodiments of the present application provide a resource conversion rate processing method, including:

[0009] Receiving a conversion rate query request sent by a terminal device based on a first service, where the conversion rate query request carries a first service identifier of the first service and a first resource pair under the first service;

[0010] Based on a preset association relationship between each service identifier and each conversion rate processing structure, obtain a first conversion rate processing structure set corresponding to the first service identifier; each of the conversion rate processing structures shares the same conversion rate processing policy pool, and each conversion rate processing policy in the conversion rate processing policy pool includes a processing logic for the conversion rate.

[0011] Based on the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure, perform a series connection process on at least one target data source of the first resource pair under the first service respectively, to obtain at least one target conversion rate of the first resource pair.

[0012] Send the at least one target conversion rate to the terminal device.

[0013] On the other hand, an embodiment of the present application provides a resource conversion rate processing device, including:

[0014] A receiving module, configured to receive a conversion rate query request sent by a terminal device based on a first service, where the conversion rate query request carries a first service identifier of the first service and a first resource pair under the first service.

[0015] An obtaining module, configured to obtain a first conversion rate processing structure set corresponding to the first service identifier based on a preset association relationship between each service identifier and each conversion rate processing structure; each of the conversion rate processing structures shares the same conversion rate processing policy pool, and each conversion rate processing policy in the conversion rate processing policy pool includes a processing logic for the conversion rate.

[0016] A conversion rate processing module, configured to perform a series connection process on at least one target data source of the first resource pair respectively based on the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure, to obtain at least one target conversion rate of the first resource pair.

[0017] A sending module, configured to send the at least one target conversion rate to the terminal device.

[0018] Optionally, the conversion rate processing module is specifically configured to:

[0019] Obtain the series connection order of the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure.

[0020] For at least one type of target data source of the first resource pair, perform respectively: based on the series connection order, use the output of one type of target data source in the previous processing logic as the input of the next processing logic, until at least one type of processing logic is iterated to obtain a target conversion rate of the first resource pair.

[0021] Optionally, when the first service identifier of the first service is associated with multiple first conversion rate processing structures, an effective period is set for each first conversion rate processing structure, and the conversion rate processing module is specifically configured to:

[0022] Obtain the reception time of the conversion rate query request;

[0023] Based on the effective period to which the reception time belongs, select a target conversion rate processing structure from the multiple first conversion rate processing structures;

[0024] Based on the processing logic included in at least one conversion rate processing policy in the target conversion rate processing structure, perform a series connection process on at least one target data source of the first resource pair respectively to obtain at least one target conversion rate of the first resource pair.

[0025] Optionally, the sending module is specifically configured to:

[0026] Based on the resource pair type of the first resource pair, select a target security policy from a preset multiple security policies;

[0027] Based on the target security policy, perform a numerical verification on the at least one target conversion rate;

[0028] Send the target conversion rate with successful numerical verification to the terminal device.

[0029] Optionally, the receiving module is further configured to:

[0030] Receive the candidate conversion rates of at least one data source type corresponding to the first resource pair sent by each conversion rate provider respectively;

[0031] For each candidate conversion rate of the same data source type, perform the following respectively: screen out at least one initial data source from the candidate conversion rates, and fuse the at least one initial data source based on a preset service rule to obtain a target data source of one data source type of the first resource pair.

[0032] Optionally, the obtaining module is specifically configured to:

[0033] For each of the candidate exchange rates, perform an operation respectively:

[0034] Obtain the push time of the candidate conversion rate;

[0035] If the push time is within a preset time limit, use the candidate conversion rate as an initial data source.

[0036] Optionally, when there are at least one first data sources for which the acquisition fails among at least one target data sources of the first resource pair, the acquisition module is further configured to:

[0037] For each first data source, perform respectively: Obtain the first data source of the first resource pair based on multiple other resource pairs, where the concatenated combination of the multiple other resource pairs covers the first resource pair.

[0038] Optionally, the obtaining module is specifically configured to:

[0039] Classify each conversion rate processing structure to obtain a first category, and classify each service to obtain a second category;

[0040] For each first category, perform respectively: Associate the exchange rate processing structure of the first category with the service identifiers of each service under the same second category.

[0041] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the steps of any of the above resource conversion rate processing methods are implemented.

[0042] On the other hand, an embodiment of the present application provides a computer-readable storage medium, on which computer-executable instructions are stored, and when the computer-executable instructions are executed by an electronic device, the steps of any of the above resource conversion rate processing methods are implemented.

[0043] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by an electronic device, the steps of any of the above resource conversion rate processing methods are implemented.

[0044] The beneficial effects of the resource conversion rate processing method, device, electronic device, and storage medium provided by the embodiments of the present application are as follows:

[0045] For each service, pre-configure an exchange rate processing structure respectively, and establish an association relationship between the service identifier of each service and each exchange rate processing structure. In this way, when receiving a conversion rate query request for a first service sent by a terminal device, the corresponding first conversion rate processing structure can be obtained based on the first service identifier. Since the first conversion rate processing structure includes at least one conversion rate processing policy, and each conversion rate processing policy includes a processing logic for the conversion rate, therefore, there is no need to develop a conversion rate processing task separately for the first service, and at least one target data source of the first resource pair requested by the conversion rate query request can be automatically processed in series based on at least one processing logic included in the first conversion rate processing structure, thereby reducing the development difficulty and saving the development cost.

[0046] On the other hand, since the conversion rate processing structures of each service share the same conversion rate processing policy pool, each conversion rate processing policy can be used by different services, thereby improving the reusability of the conversion rate processing policy. In addition, when a certain service changes, only at least one conversion rate processing policy in its corresponding conversion rate processing structure needs to be reorganized, without the need for re-development, effectively improving the flexibility of conversion rate processing.

[0047] Other features and advantages of the present application will be described in the following specification, and will, in part, be obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0049] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0050] Figure 2 It is a system structure diagram of the resource conversion rate processing method provided by an embodiment of the present application;

[0051] Figure 3 It is a functional schematic diagram of the conversion rate processing policy provided by an embodiment of the present application;

[0052] Figure 4 It is a schematic diagram of configuring a conversion rate processing structure for each service provided by an embodiment of the present application;

[0053] Figure 5 It is a schematic diagram of the association relationship between a service and a conversion rate processing structure provided by an embodiment of the present application;

[0054] Figure 6 It is a schematic diagram of a pipeline mode provided by an embodiment of the present application;

[0055] Figure 7 It is a schematic diagram of the adjustment method of the conversion rate processing structure provided by an embodiment of the present application;

[0056] Figure 8 It is a flowchart of a resource conversion rate processing method provided by an embodiment of the present application;

[0057] Figure 9Schematic diagram of the data source acquisition process of the conversion rate provided in the embodiments of the present application;

[0058] Figure 10 Schematic diagram of a data source series processing method of the conversion rate provided in the embodiments of the present application;

[0059] Figure 11 Flowchart of the data source series processing method of the conversion rate provided in the embodiments of the present application;

[0060] Figure 12 Schematic diagram of another data source series processing method of the conversion rate provided in the embodiments of the present application;

[0061] Figure 13 Flowchart of the sending method of the resource conversion rate provided in the embodiments of the present application;

[0062] Figure 14 Structural diagram of a resource conversion rate processing device provided in the embodiments of the present application;

[0063] Figure 15 Structural diagram of the electronic device provided in the embodiments of the present application. Detailed implementation manners

[0064] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solutions of the present application, rather than all the embodiments. Based on the embodiments recorded in this application document, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the technical solutions of the present application.

[0065] For the convenience of understanding, the terms involved in the embodiments of the present application are explained below.

[0066] Exchange rate: It refers to the ratio or parity of the exchange between two currencies (currencies of two different countries).

[0067] Foreign exchange transaction: It is to buy one currency in a currency pair and sell another currency at the same time, which is the exchange of one country's currency for another country's currency. Different from other financial markets, the foreign exchange market has no specific location and no central exchange, but conducts transactions through the electronic network among banks, enterprises and individuals.

[0068] Currency Pair: It is the foreign exchange trading rate composed of two currencies, represented by two International Organization for Standardization (ISO) codes plus a separator, that is, Currency Code 1 / Currency Code 2, where the first currency code represents the "base currency" and the other currency code represents the "secondary currency".

[0069] Third-Party Payment: It refers to an independent institution with certain strength and credibility guarantee. It adopts the method of signing contracts with major banks to provide a network payment mode of a transaction payment platform with a settlement interface to the bank payment system. In the third-party payment mode, after the buyer selects the goods, the buyer uses the account provided by the third-party payment institution to pay the purchase price (pay to the third-party payment institution), and the third-party payment institution notifies the seller that the payment has arrived and requests the seller to ship the goods; after the buyer receives the goods, inspects the goods, and confirms, the buyer then notifies the third-party payment institution to make the payment; the third-party payment institution then transfers the funds to the seller's account.

[0070] Reference Exchange Rate: It refers to the foreign exchange rate publicly announced by a bank or financial institution, including the reference prices for buying and selling. It cannot be directly traded, does not carry trading volume, and has a relatively lagging update frequency.

[0071] Transaction-Able Exchange Rate: It refers to the foreign exchange rate provided by a bank or financial institution to customers that can be used for direct transactions, including the buying and selling prices. Generally, it carries tradable volume, has a high update frequency, and has a clear timeliness.

[0072] Streaming Exchange Rate: The exchange rate provider (usually a bank or financial institution, etc.) actively and continuously pushes the latest exchange rate information to the third-party payment institution through the Financial Information Exchange (FIX) protocol. Compared with the traditional way that the third-party payment institution asks the exchange rate provider for the exchange rate, the exchange rate is more frequent, timely, and the data volume is also huge.

[0073] FIX Protocol: It is an open protocol provided by the International FIX Association. Its purpose is to promote the process of international trade electronization and establish a real-time electronic communication protocol among various participants, including investment managers, brokers, buyers, and sellers.

[0074] Basis Points (BPS): A commonly used measurement unit for exchange rates and other percentages in finance. One basis point is equal to 1 / 100 of 1% or 0.01%, and is used to represent percentage changes. The relationship between percentage changes and basis points can be summarized as: 1% change = 100 basis points, 0.01% = 1 basis point.

[0075] Distributed publish-subscribe messaging system: The publisher generates data and sends it to the message center. Subscribers subscribe to the messages they are interested in. The message center, based on the subscription status of the subscribers, sends relevant messages or data to the corresponding subscribers. The specific process is that the message center inserts the data produced by the publisher into the message queues it owns, that is, enqueuing. Each message queue has the same topic. Then, the message center, according to the topics subscribed by the subscribers, retrieves messages from the corresponding topic's message queue one by one and delivers them to the subscribers, completing the dequeuing.

[0076] Event Driven Architecture (EDA): An event-based architectural pattern that connects the various components of an application (such as microservices, applications, external systems, etc.) and enables communication and collaboration through events. In an event-driven architecture, each component can publish events, and other components can subscribe to these events and perform corresponding operations.

[0077] The following provides an overview of the design concept of the embodiments of this application.

[0078] Generally, different business resource pair conversion rate handling strategies (such as product strategies, risk control strategies, etc.) exist. Therefore, after a third-party payment institution introduces the data source of the resource pair conversion rate from the inter-bank market, it usually develops the conversion rate processing logic separately according to the conversion rate handling strategy of each business. With the development of business, the number of business scenarios increases, and the conversion rate handling strategies of each business continue to evolve and overlap, increasing the complexity of developing the conversion rate processing logic. Moreover, due to the overlap of the conversion rate handling strategies of different businesses, separate development based on business units requires reprocessing for overlapping strategies, making the same conversion rate handling strategy unable to be reused in different businesses.

[0079] For example, taking the foreign exchange trading scenario as an example, the resource handling strategy for Business 1 is that the tradable time is 1 hour, and a time-sensitive exchange rate processing solution is developed for the currency pairs of Business 1. The resource handling strategy for Business 2 is that the original exchange rate can be refunded within 1 year after the transaction, and a time-sensitive and low-risk exchange rate processing solution is developed for the currency pairs of Business 2. The time-sensitive parts in the two exchange rate processing solutions need to be developed separately.

[0080] In view of this, the embodiments of the present application provide a resource conversion rate processing method, which is used to improve the flexibility of resource conversion rate processing and reduce the development cost of resource conversion rate processing. For each service, a conversion rate processing structure is pre-configured respectively, and an association relationship is established between the service identifier of each service and each conversion rate processing structure. In this way, when a conversion rate query request for the first service sent by the terminal device is received, the corresponding first conversion rate processing structure can be obtained based on the first service identifier. Since each conversion rate processing structure includes: under one service, a set of conversion rate processing strategies used for at least one target data source of the resource pair, and each conversion rate processing strategy includes a processing logic for the conversion rate. Therefore, there is no need to develop the conversion rate processing for the first service separately, and the at least one target data source of the first resource pair requested by the conversion rate query request can be automatically processed in series based on at least one processing logic included in the first conversion rate processing structure, reducing the development difficulty and saving the development cost.

[0081] On the other hand, since the conversion rate processing structures of each service share the same conversion rate processing strategy pool, in this way, each conversion rate processing strategy can be used by different services, thereby improving the reusability of the conversion rate processing strategy. In addition, when a certain service changes, only at least one conversion rate processing strategy in its corresponding conversion rate processing structure needs to be reorganized, without re-development, effectively improving the flexibility of the conversion rate processing.

[0082] It can be understood that the resources in the embodiments of the present application include but are not limited to: stocks, funds, securities, currencies, gold bars, game coins, etc.

[0083] For example, the solution provided by the embodiments of the present application can be applied to resource exchange in a game scenario, such as the exchange of two virtual resources (such as: game coin exchange for equipment), the exchange between virtual resources and real resources (such as: game coin exchange for currency).

[0084] For another example, the solution provided by the embodiments of the present application can also be applied to various scenarios that require foreign exchange transactions, such as paying for study abroad tuition fees, paying for travel expenses, import and export shopping, overseas project investment, etc.

[0085] It can be understood that in the specific implementation manner of the present application, for the conversion rate of the resource pair involved, when it is applied to the methods or products of the following embodiments of the present application, the permission or consent of each bank owner has been obtained, and the collection, use, and processing of relevant data comply with the laws, regulations, and standards of relevant countries and regions.

[0086] Next, a brief introduction to the technical solutions of the embodiments of the present application will be given. It should be noted that the application scenarios described below are only used to illustrate the embodiments of the present application rather than to limit them. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0087] Refer to Figure 1 As shown, it is a schematic diagram of an application scenario provided by an embodiment of the present application. In this scenario, it may include a terminal device 101 and a server 102.

[0088] In one implementation, the terminal device 101 may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart vehicle-mounted device, a smart wearable device, etc. The terminal device 101 may be installed with a payment application. The payment application may be a software client of a third-party payment institution, or may also be a client such as a web page or a small program. The server 102 is the background server of the third-party payment institution, and the specific type of the client is not limited.

[0089] The server 102 may be an independent physical server, or may be a server cluster or a distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms, but is not limited thereto.

[0090] In one implementation, the server 102 may include one or more processors, a memory, and an I / O interface for interacting with the terminal, etc. In addition, the server 102 may also be configured with a database, which may be used to store conversion rates pushed by various conversion rate providers, etc. Among them, program instructions of the resource conversion rate processing method provided by the embodiment of the present application may also be stored in the memory of the server 102. When these program instructions are executed by the processor, they can be used to implement the steps of the resource conversion rate processing method provided by the embodiment of the present application to provide a competitive target conversion rate.

[0091] In one implementation, the resource conversion rate processing method may be executed by the server 102 to quickly implement the conversion rate processing process by using the computing resources of the server 102, and the conversion rate processing process may involve the participation of the terminal device 101. For example, the terminal device 101 sends a conversion rate query request to the server 102. After the server 102 performs a series of processing according to the conversion rate query request, it returns the target conversion rate of the requested resource pair to the terminal device 101.

[0092] A direct or indirect communication connection can be established between the terminal device 101 and the server 102 through one or more networks. The network can be a wired network or a wireless network. For example, the wireless network can be a mobile cellular network or a Wireless-Fidelity (WIFI) network. Of course, it can also be other possible networks, and the embodiments of the present invention do not limit this.

[0093] It should be noted that in the embodiments of the present application, the number of terminal devices 101 can be one or multiple. Similarly, the number of servers 102 can also be one or multiple. That is to say, the number of terminal devices 101 or servers 102 is not limited.

[0094] In the embodiments of the present application, when the number of servers is multiple, the multiple servers can form a blockchain, and the servers are nodes on the blockchain; for example, in the resource conversion rate processing method disclosed in the embodiments of the present application, the relevant data involved can be stored on the blockchain, such as the conversion rate, the association relationship between the service identifier and the conversion rate processing structure, the conversion rate processing strategy, etc.

[0095] Next, in combination with the above-described application scenarios, the resource conversion rate processing method provided by the exemplary embodiments of the present application will be described with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard.

[0096] Of course, the method provided by the embodiments of the present application is not limited to Figure 1 the application scenarios shown, and can also be used in other possible application scenarios, which are not limited by the embodiments of the present application. The functions that can be realized by each device in Figure 1 the shown application scenarios will be described together in the subsequent method embodiments, and will not be elaborated here.

[0097] See Figure 2, which is the system structure diagram of the resource conversion rate processing method provided by the embodiments of this application, mainly includes three parts: a conversion rate processing strategy pool, a target data source, and business configuration. Among them, the conversion rate processing strategy pool contains all conversion rate processing strategies for each business. Each conversion rate processing strategy contains a processing logic for the conversion rate. Each conversion rate processing strategy is independently implemented, independently operated, and has standardized input and output. The target data source is the conversion rate of the third-party payment institution's own resources obtained after processing the conversion rate of the resource pair obtained from the resource market, and it contains the conversion rates of various resource pairs under all businesses. The business configuration configures a conversion rate processing structure for each business. Each conversion rate processing structure contains: at least one set of conversion rate processing strategies used by the target data source of the resource pair under one business, so as to implement the conversion rate processing process of the resource pair under the corresponding business based on at least one processing logic included in each conversion rate processing structure.

[0098] In one embodiment, the three parts of the conversion rate processing strategy pool, the target data source, and the business configuration can communicate and cooperate using an event-driven architecture.

[0099] In one embodiment, each conversion rate processing strategy in the conversion rate processing strategy pool can exist in the form of a plug-in. Each plug-in implements the processing logic code of a conversion rate processing strategy. The input is the target data source of a resource pair, and the output is the target conversion rate of the resource pair that can be provided for the corresponding business. Since the plug-in has the characteristics of being independently pluggable, it can be selected by different businesses as needed.

[0100] In one embodiment, the third-party payment institution introduces the initial data source of the latest conversion rate through the resource market and forms the institution's own target data source through rapid processing.

[0101] In one embodiment, the conversion rate processing structure associated with each business can adopt the pipeline mode. In this way, a pipeline can be maintained for each business, and at least one plug-in can be selected and combined from the conversion rate processing strategy pool as needed. Since each pipeline contains the target data source of the resource pair and the plug-ins of at least one conversion rate processing strategy, the conversion rate processing process of the resource pair under a certain business is as follows: the target data source of the corresponding resource pair is sequentially processed in series by the plug-ins in a pipeline associated with the business to obtain the final conversion rate for customers.

[0102] Based on the strategy plug-in of the pipeline mode for conversion rate processing, third-party payment institutions can select and combine strategy plug-ins based on the needs of different services to form the pipelines of their own services, so as to provide accurate resource pair conversion rates based on the pipelines of the services. In this way, when the service is adjusted, only by changing the strategy plug-ins in its own pipeline can the conversion rate be quickly adjusted, with higher efficiency. Moreover, each strategy plug-in only needs to focus on the internal processing logic of the corresponding conversion rate processing strategy and does not need to care about which services use the conversion rate processing strategy. Therefore, the conversion rate processing strategy itself is reusable rather than just for a certain service, thus improving the reuse rate of the conversion rate processing strategy while meeting the flexible combination of strategies.

[0103] Based on Figure 2 For the system architecture shown, in the development stage before conversion rate processing, to adapt to the development of each service, the conversion rate processing strategies were summarized, and a conversion rate processing strategy pool was pre-generated.

[0104] In one implementation, each conversion rate processing strategy in the conversion rate processing strategy pool is independently implemented and runs independently. As Figure 3 shown, each conversion rate processing strategy contains a processing logic for the conversion rate. Based on a given standardized input conversion rate, after adding or discounting the input conversion rate according to its own internal processing logic, a standardized output conversion rate is obtained.

[0105] Taking the foreign exchange trading scenario as an example, several common conversion rate processing strategies are given below:

[0106] (1) Weekend strategy

[0107] When the conversion rate processing strategy is the weekend strategy, since most weekends are non-working days and are special times for foreign exchange trading, third-party payment institutions need to bear additional risks when quoting exchange rates on weekends. Therefore, the weekend strategy generally adds a certain risk premium on the basis of the ordinary exchange rate.

[0108] In one embodiment, when the weekend strategy adds a premium, it can add a premium based on the risk type, where the premium logic for the same risk type is the same.

[0109] In one embodiment, when the weekend strategy adds a premium, it can add a premium based on the risk level, where the higher the risk level, the greater the premium amount.

[0110] (2) Exposure offset strategy

[0111] When the conversion rate processing strategy is the exposure offset strategy, the exposure offset strategy will adjust the exchange rate based on the current trading volume of the third-party payment institution itself.

[0112] In one embodiment, when performing exchange rate adjustment, the open position offset strategy can adjust the exchange rate based on the existing historical trading volume.

[0113] For example, in the foreign exchange transactions in the past month, the trading volume of using the currency of Country A is the largest. Therefore, the currency of Country A is given preferential treatment to increase the exchange rate of the domestic currency against the currency of Country A.

[0114] In one embodiment, when performing exchange rate adjustment, the open position offset strategy can adjust the exchange rate based on the expected future trading volume.

[0115] For example, in the next year, Country B becomes one of the most popular tourist countries. Therefore, the currency of Country B is given preferential treatment to increase the exchange rate of the domestic currency against the currency of Country B.

[0116] (3) Market volatility strategy

[0117] When the conversion rate processing strategy is the market volatility strategy, it will judge whether the current exchange rate market is in a state of severe price volatility. If so, the market volatility strategy will add an extra price on the basis of the ordinary exchange rate for risk control.

[0118] (4) Original exchange rate refund strategy

[0119] When the conversion rate processing strategy is the original exchange rate refund strategy, when it is evaluated that the foreign exchange transaction needs to use the original exchange rate to complete the refund behavior in a future period of time, the foreign exchange risk to be borne increases. Therefore, the original exchange rate refund strategy will add a certain amount of risk premium on the basis of the original exchange rate.

[0120] In one embodiment, the risk premium process of the original exchange rate refund strategy is similar to the risk premium process in the weekend strategy, which will not be elaborated here, but the two can use different premium algorithm models.

[0121] It should be noted that the above several strategies are not restrictive descriptions of the conversion rate processing strategy pool. In addition to the above several strategies, it can also include locked price strategies, financial event strategies, etc. with different durations.

[0122] In one embodiment, in the foreign exchange trading scenario, when processing the exchange rate based on the conversion rate processing strategy, the unit of exchange rate change can use basis points.

[0123] In one embodiment, due to the independent and pluggable characteristics of the plug-in, each conversion rate processing strategy in the conversion rate processing strategy pool can be encapsulated as a plug-in, each plug-in has a unique plug-in identifier, and each plug-in can be retrieved by the business as needed through a unified call interface.

[0124] Optionally, the plugin identifier can be text (e.g., policy name), or a number (e.g., Arabic numerals, hash values, etc.), or a letter (e.g., the abbreviation of the first letter of the policy name), or a combination of at least one of text, number, and letter.

[0125] In one embodiment, the conversion rate processing policy pool can be a function library, and each conversion rate processing policy can be encapsulated as a function in the function library.

[0126] Generally, the conversion rate processing policy pool contains the conversion rate processing policies used by most services. Therefore, based on the generated conversion rate processing policy pool, the conversion rate processing policies used by each service can be pre-configured.

[0127] In one embodiment, for each service, based on selecting at least one conversion rate processing policy from the conversion rate processing policy pool, a conversion rate processing policy set is generated, and by sequentially arranging at least one conversion rate processing policy in the conversion rate processing policy set, a conversion rate processing structure is generated and configured for the corresponding service. In this way, each conversion rate processing structure includes: in one service, the conversion rate processing policy set used for at least one target data source of the resource pair. And since the conversion rate processing policy sets used by each service are selected from the conversion rate processing policy pool, each conversion rate processing structure shares the same conversion rate processing policy pool.

[0128] In one embodiment, each service can be uniquely represented by a service identifier. Therefore, by configuring a conversion rate processing structure for each service, the association relationship between each service identifier and each conversion rate processing structure can be pre-established.

[0129] Taking the foreign exchange trading scenario as an example, such as Figure 4As shown in the figure, it is a schematic diagram of the conversion rate processing structure configured for each service. Assume that the service identifiers of Service A, Service B, and Service C are 1, 2, and 3 respectively. In the conversion rate processing policy set A of Service A, it includes the original exchange rate refund policy and the exposure offset policy selected from the conversion rate processing policy pool. After sequencing the original exchange rate refund policy and the exposure offset policy in the conversion rate processing policy set A, the conversion rate processing structure A corresponding to the conversion rate processing policy set A is obtained, and the service identifier 1 of Service A is associated with the conversion rate processing structure A; in the conversion rate processing policy set B of Service B, it includes the original exchange rate refund policy, the exposure offset policy, and the weekend policy selected from the conversion rate processing policy pool. After sequencing the original exchange rate refund policy, the exposure offset policy, and the weekend refund policy in the conversion rate processing policy set B, the conversion rate processing structure B corresponding to the conversion rate processing policy set B is obtained, and the service identifier 2 of Service B is associated with the conversion rate processing structure B; in the conversion rate processing policy set C of Service C, it includes the exposure offset policy and the market volatility policy selected from the conversion rate processing policy pool. After sequencing the exposure offset policy and the market volatility policy in the conversion rate processing policy set C, the conversion rate processing structure C corresponding to the conversion rate processing policy set C is obtained, and the service identifier 3 of Service C is associated with the conversion rate processing structure C.

[0130] In one embodiment, each service can be associated with multiple conversion rate processing structures, but each conversion rate processing structure is set with an effective period to ensure that only one conversion rate processing structure is associated with a service at the current moment.

[0131] Still taking the foreign exchange trading scenario as an example, as Figure 5 shown, assume that the service identifier 1 of Service A is associated with two conversion rate processing structures, denoted as conversion rate processing structure A1 and conversion rate processing structure A2 respectively. Among them, the effective time of the conversion rate processing structure A1 is during the day (e.g., from 7 am to 7 pm), and the effective time of the conversion rate processing structure A2 is at night (e.g., from 7 pm to 7 am). In this way, Service A can use different conversion rate processing structures for exchange rate processing during the day and at night respectively.

[0132] By setting the effective period, a service is associated with multiple conversion rate processing structures. In this way, for the same service, the corresponding conversion rate processing structure can be selected according to the period for conversion rate processing, thereby improving the accuracy of conversion rate processing.

[0133] In one embodiment, the association relationship between the conversion rate processing structures and the services can be established by classifying the conversion rate processing structures and the services.

[0134] During specific implementation: classify each conversion rate processing structure to obtain a first category, and classify each service to obtain a second category; for each first category, perform the following respectively: associate the conversion rate processing structure of the first category with the service identifiers of each service under the same second category.

[0135] For example, assume that each conversion rate processing structure is divided into two categories: ToB (enterprise-oriented) and TOC (consumer-oriented). Service A and Service B are enterprise services, and Service C is a personal service. Then, configure Service A to use the ToB conversion rate processing structure, configure Service B to also use the ToB conversion rate processing structure, and configure Service C to use the TOC conversion rate processing structure.

[0136] By classifying each conversion rate processing structure, different services can be directly associated with the corresponding conversion rate processing structures of their categories, eliminating the need for separate configuration for each service and effectively improving the association efficiency between services and conversion rate processing structures.

[0137] In one embodiment, the order of at least one conversion rate processing policy in the conversion rate processing policy set included in each conversion rate processing structure can be designed using the pipeline mode.

[0138] As Figure 6 shown, in the pipeline mode, the pipeline acts as an assembly line, enabling the serial processing of at least one conversion rate processing policy in the corresponding conversion rate processing policy set. After the conversion rate is processed by one conversion rate processing policy, it is then passed to the next conversion rate processing policy for processing.

[0139] Taking the pipeline mode as an example, Figure 4 the association relationship between each service identifier and each conversion rate processing structure is shown in Table 1. At least one target data source of Currency Pair 1 of Service 1 is processed successively by the exposure offset policy and the original exchange rate refund policy. At least one target data source of Currency Pair 2 of Service 2 is processed successively by the weekend policy, the exposure cheap policy, and the original exchange rate refund policy. At least one target data source of Currency Pair 3 of Service 3 is processed successively by the exposure offset policy and the market volatility policy.

[0140] Table 1 (Association relationship between each service identifier and each conversion rate processing structure)

[0141]

[0142]

[0143] In one embodiment, at the last plug-in position of each pipeline, a plug-in for the corresponding resource to the preset security policy can be added. This plug-in is used to ensure that at least one target data source of the resource pair remains within a reasonable range after being processed in series by at least one conversion rate processing policy plug-in in the pipeline.

[0144] Taking the foreign exchange trading scenario as an example, the security policy corresponding to currency pair 1 is: the exchange rate is between 6.5 and 7.5.

[0145] After adding the plug-in for the security policy in the pipeline, the association relationships between each service identifier and each conversion rate processing structure are shown in Table 2.

[0146] Table 2 (Association relationships between each service identifier and each conversion rate processing structure)

[0147]

[0148] By adding the plug-in for the security policy, numerical verification is performed on the conversion rate after being processed in series in the pipeline, thereby improving the security of resource conversion rate processing.

[0149] In one embodiment, there can be multiple resource pairs under one service, and multiple resource pairs use the same conversion rate processing structure.

[0150] Taking the foreign exchange trading scenario as an example, as shown in Table 3, the currency pairs under Service A are currency pair 1 and currency pair 4, and at least one target data source of each of these two currency pairs uses the conversion rate processing structure A associated with Service A. Similarly, the currency pairs under Service B are currency pair 2 and currency pair 5, and at least one target data source of each of these two currency pairs uses the conversion rate processing structure B associated with Service B; the currency pairs under Service C are currency pair 3 and currency pair 6, and at least one target data source of each of these two currency pairs uses the conversion rate processing structure C associated with Service C.

[0151] Table 3 (Association relationships between each currency pair and the conversion rate processing structure under one service identifier)

[0152]

[0153] By using the pipeline mode, at least one conversion rate processing policy in the conversion rate processing policy set of each service is connected in series. In this way, at least one target data source of the resource pair under each service can be processed in series by at least one conversion rate processing policy in the corresponding conversion rate processing policy set in a certain order, so that the conversion rate output by the third-party payment structure for each service meets the multiple requirements of the corresponding service, improving the accuracy of conversion rate processing.

[0154] In one embodiment, the concatenation order of at least one conversion rate processing policy in each conversion rate processing structure can be designed using the composite pattern.

[0155] During specific implementation, for each conversion rate processing structure, at least one conversion rate processing policy in the corresponding conversion rate processing policy set is represented by a tree, and the order of the nodes flowing through the tree is identified by an additional order identifier.

[0156] In one embodiment, since each conversion rate processing policy is independent of the business itself and exists independently in the conversion rate processing policy pool, when the business changes, at least one conversion rate processing policy can be reselected and combined from the conversion rate processing policy pool as needed to update the conversion rate processing structure of the corresponding business, without the need to re-develop the resource conversion rate processing, which has stronger flexibility and maintainability.

[0157] Take Figure 4 the foreign exchange trading scenario as an example. As Figure 7 shown, the original conversion rate processing structure of Business A is: the currency pair of Business A is processed sequentially through the exposure offset policy and the original exchange rate refund policy. However, most of the foreign exchange trading time of Business A is on weekends recently. Therefore, the conversion rate processing structure of Business A is updated to: the currency pair of Business A is processed sequentially through the exposure offset policy, the original exchange rate refund policy, and the weekend policy.

[0158] For another example, as Figure 7 shown, for the new Business D undertaken by a third-party independent structure, according to the requirements of Business D, the original exchange rate refund policy and the weekend policy are selected from the conversion rate processing policy pool, and the reorganized conversion rate processing structure D of Business D is: the currency pair of Business D is processed sequentially through the weekend policy and the original exchange rate refund policy.

[0159] In the embodiments of the present application, considering that the conversion rate processing strategy itself is not generated for a specific business, but these conversion rate processing strategies are used by certain businesses, the conversion rate processing strategy itself exists independently and can be flexibly selected and combined. Therefore, the conversion rate processing strategies of each business are aggregated into a conversion rate processing strategy pool, and for each business, at least one conversion rate processing strategy is selected from the conversion rate processing strategy pool to combine and generate a conversion rate processing structure, thereby reducing the development process of separately performing conversion rate processing for each business, reducing the development difficulty, and saving the development cost. Moreover, since the conversion rate processing structures of each business share the same conversion rate processing strategy pool, in this way, each conversion rate processing strategy can be used by different businesses instead of being limited to a certain business, thereby improving the reusability and maintainability of the conversion rate processing strategy. In addition, when a certain business changes, only at least one conversion rate processing strategy in its corresponding conversion rate processing structure needs to be reorganized, without re-development, effectively improving the flexibility of resource conversion rate processing.

[0160] Taking any one of the businesses (denoted as the first business) in each business as an example, based on the above-mentioned association relationship, refer to Figure 8 As shown, it is a schematic flowchart of a resource conversion rate processing method provided in the embodiments of the present application. This method is applied to the server of a third-party payment institution, and the specific process is as follows:

[0161] S801: The server receives a conversion rate query request sent by the terminal device based on the first business.

[0162] Among them, the conversion rate query request carries the first business identifier of the first business, and the first resource pair under the first business.

[0163] It should be noted that the embodiments of the present application do not limit the number of resource pairs carried in each conversion rate query request. It can be one resource pair under a business or multiple resource pairs.

[0164] Taking the foreign exchange trading scenario as an example, the first resource pair is a currency pair. Each currency pair represents two currency types for exchange rate conversion, including but not limited to RMB, US dollar, euro, Japanese yen, etc. A currency pair is composed of two currency types and can be expressed in the following form: Currency 1 / Currency 2, where Currency 1 and Currency 2 are used to represent currency types.

[0165] S802: The server obtains the first conversion rate processing structure set corresponding to the first business identifier based on the preset association relationship between each business identifier and each conversion rate processing structure.

[0166] For the conversion rate query request of the first service sent by the terminal device, using the preset association relationship, based on the first service identifier of the first service, obtain the first conversion rate processing structure associated with the first service.

[0167] Among them, each conversion rate processing structure shares the same conversion rate processing policy pool. Each conversion rate processing structure includes: under a certain service, a set of conversion rate processing policies used for at least one target data source of the resource pair. Each conversion rate processing policy includes a processing logic for the conversion rate. For the process of pre - establishing the association relationship between each service identifier and each conversion rate processing structure, refer to the foregoing embodiments and will not be elaborated here.

[0168] S803: The server performs a series connection process on at least one target data source of the first resource pair respectively based on the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure, and obtains at least one target conversion rate of the first resource pair.

[0169] In one embodiment, the third - party payment institution obtains the data sources of the latest conversion rates of the resource pairs pushed by each conversion rate provider (such as banks, financial institutions, etc.) in the resource market, and on this basis, quickly processes them according to general business rules to generate the data sources of the third - party payment institution itself for each service to use.

[0170] Taking the first resource pair as an example, the process of obtaining its at least one target data source includes:

[0171] First, receive the candidate conversion rates of at least one data source type corresponding to the first resource pair sent by each conversion rate provider respectively.

[0172] In one embodiment, the third - party payment institution can adopt a distributed publish - subscribe message system to obtain the data sources of the conversion rates from each conversion rate provider.

[0173] In the foreign exchange trading scenario, the conversion rate of the resource pair is the exchange rate of the currency pair. As Figure 9 shown, the third - party payment institution provides front - end machine services for each conversion rate provider in the region where the foreign exchange business is located. Each front - end machine service is used to access one conversion rate provider in the corresponding region. Based on the distributed publish - subscribe message system, each conversion rate provider introduces streaming exchange rates through the FIX protocol and pushes the candidate exchange rates of at least one data source type of the first currency pair subscribed by the third - party payment institution.

[0174] In one embodiment, each conversion rate provider can push the candidate conversion rates of one data source type of the first resource pair each time, or can also push the candidate conversion rates of multiple data source types of the first resource pair at the same time.

[0175] Taking the foreign exchange trading scenario as an example, the candidate conversion rates of at least one data source type include, but are not limited to, executable exchange rates, reference exchange rates, etc.

[0176] Then, for each candidate conversion rate of the same data source type, the following operations are respectively performed: at least one initial data source is screened out from each candidate exchange rate.

[0177] During specific implementation, for each candidate conversion rate under the same data source type, the following operations are respectively performed: obtain the push time of a candidate conversion rate, and if the push time is within the preset time limit, then use this candidate conversion rate as an initial data source.

[0178] In the foreign exchange trading scenario, since exchange rates are dynamically changing, therefore, for the exchange rates of each data source type, such as Figure 9 As shown, after the front-end service of the third-party payment institution receives each candidate exchange rate of this type of the first currency pair pushed by each conversion rate provider, it screens based on the timeliness of each candidate exchange rate, and sends the screened initial price source to the message system of the third-party payment structure, so as to ensure that the third-party payment structure obtains the data source of the latest exchange rate.

[0179] For example, taking the data source type as the reference exchange rate as an example, assuming that the timeliness setting of the reference exchange rate is one minute, at this time, if the time of the candidate reference exchange rate of the first currency pair pushed by the exchange rate provider is one minute ago, then discard this candidate reference exchange rate, and if the time of the candidate reference exchange rate of the first currency pair pushed by the exchange rate provider is within one minute, then retain this candidate reference exchange rate as an initial data source.

[0180] Finally, for at least one initial data source of the same data source type, the following operations are respectively performed: based on the preset business rules, fuse at least one initial data source to obtain the target data source of one data source type of the first resource pair.

[0181] Such as Figure 9 As shown, by fusing at least one initial data source of the first currency pair retained in the message system, the target data source of each data source type is obtained.

[0182] Optionally, the business rules include, but are not limited to, the data source averaging rule.

[0183] Taking the data source type as the reference exchange rate as an example, calculate the average value of at least one initial data source of the reference exchange rate in the message system, and use this average value as the target data source of the reference exchange rate of the first currency pair.

[0184] In one embodiment, the averaging can be performed in the receiving order of at least one initial data source, so as to ensure that the initially received data source is fused first.

[0185] For example, if a third-party payment institution first receives a first initial data source, then receives a second initial data source, and finally receives a third initial data source, it first averages the first initial data source and the second initial data source, and then averages the average of the first initial data source and the second initial data source with the third initial data source.

[0186] In one embodiment, at least one initial data source can be averaged according to a set period.

[0187] Taking the data source type as the reference exchange rate as an example, the at least one initial data source of the reference exchange rate within a period is summed and then averaged.

[0188] Optionally, the business rules include but are not limited to the data source weighting rule.

[0189] In specific implementation, different weights are set for each conversion rate provider, so that at least one initial data source of the same data source type of the first resource pair is weighted according to the weights of each conversion rate provider, thereby enhancing the influence of the data sources provided by some major conversion rate providers on the target data source.

[0190] In the embodiments of the present application, for the same data source type of each resource pair, by screening each candidate conversion rate of the corresponding type pushed by each conversion rate provider, it is ensured that the third-party payment institution obtains the data source of the latest conversion rate, and thus the effectiveness of the target data source provided for subsequent business use is ensured.

[0191] In one embodiment, when there is at least one first data source for which the acquisition fails among at least one target data source of the first resource pair, at this time, for each first data source, the following is respectively executed: obtaining the first data source of the first resource pair based on the first data sources of multiple other resource pairs, where the concatenated combination of the multiple other resource pairs covers the first resource pair.

[0192] Taking the first resource pair as a currency pair as an example, when the available transaction exchange rate of currency pair 7 (including the first currency and the second currency) fails to be obtained, the available transaction exchange rates of other currency pair 8 (including the first currency and the third currency) and currency pair 9 (including the third currency and the second currency) can be concatenated and combined, so as to indirectly obtain the available transaction exchange rate of currency pair 7.

[0193] By concatenating and combining the target data sources of multiple other resource pairs, the acquisition success rate of the target data source of the first resource pair is improved, and thus the stability of the conversion rate provided for the first resource pair is improved.

[0194] After the server obtains at least one target data source of the first resource pair requested by the conversion rate query request of the first service, it processes the conversion rate based on the first conversion rate processing structure associated with the first service.

[0195] In one embodiment, the process of processing the conversion rate is as follows: obtain the concatenation order of the processing logics included in at least one conversion rate processing policy in the first conversion rate processing structure, and for at least one target data source of the first resource pair, respectively execute: based on the concatenation order, use the output of one target data source in the previous processing logic as the input of the next processing logic, until at least one processing logic is iterated to obtain a target conversion rate of the first resource pair.

[0196] In the foreign exchange trading scenario, taking the target data source as the available transaction exchange rate as an example, as Figure 10 shown, for Figure 4 business A in

[0197] Assume that the first resource pair is currency pair 1, the available transaction exchange rate of currency pair 1 is 7.2936. After the processing logic of the exposure offset strategy adds a price to the available transaction exchange rate, it becomes 7.2938. After the processing logic of the original exchange rate refund strategy adds a price to 7.2938, the obtained target conversion rate is 7.2987.

[0198] In an embodiment of the present application, at least one processing logic included in the conversion rate processing structure is used to perform concatenated processing on the target data source of the resource pair. In this way, the finally obtained target conversion rate synthesizes at least one conversion rate processing strategy of the corresponding service, making the conversion rate of the resource pair provided by the third-party payment institution adapt to the corresponding service, improving the accuracy of conversion rate processing, and effectively avoiding the impact of inaccurate conversion rate quotes on the income of the third-party payment institution.

[0198] In one embodiment, the service identifier of each service can be associated with multiple conversion rate processing structures, and each conversion rate processing structure is set with an effective period. At this time, the concatenated processing process of step S803 is as Figure 11 shown, mainly including the following steps:

[0199] S8031: Obtain the reception time of the conversion rate query request.

[0200] In the foreign exchange trading scenario, transactions can occur at any time, and the same service uses different conversion rate processing structures at different time periods. Therefore, when performing exchange rate processing, the reception time of the conversion rate query request can be obtained, so as to determine a unique conversion rate processing structure for exchange rate processing according to the reception time.

[0201] S8032: Based on the effective period to which the reception time belongs, select a target conversion rate processing structure from multiple first conversion rate processing structures.

[0202] Taking the first service asFigure 5 Taking the business A shown as an example, when the receiving time of the conversion rate query request is 9:00 am, which belongs to the daytime period from 7:00 am to 7:00 pm, therefore, the conversion rate processing structure A1 for the daytime period is selected as the target conversion rate processing structure; when the receiving time of the conversion rate query request is 8:00 pm, which belongs to the night period from 7:00 pm to 7:00 am, therefore, the conversion rate processing structure A2 for the daytime period is selected as the target conversion rate processing structure.

[0203] S8033: Based on the processing logics included in at least one conversion rate processing strategy in the target conversion rate processing structure, perform series processing on at least one target data source of the first resource pair respectively to obtain at least one target conversion rate of the first resource pair.

[0204] The target conversion rate processing structure includes the processing logics included in at least one conversion rate processing strategy, and at least one processing logic has a certain series order. Therefore, the process of performing series processing on at least one target data source of the first resource pair includes:

[0205] S8033_1: Obtain the series order of the processing logics included in at least one conversion rate processing strategy in the target conversion rate processing structure.

[0206] S8033_2: For at least one target data source of the first resource pair, perform respectively: Based on the series order, use the output of one target data source in the previous processing logic as the input of the next processing logic until at least one processing logic is iterated to obtain a target conversion rate of the first resource pair.

[0207] Still taking the first business as Figure 5 the business A shown as an example, as Figure 12 shown, assuming the first resource pair is currency pair 1 and the target data source is the reference exchange rate. When the receiving time of the conversion rate query request is 9:00 am, the reference exchange rate is 7.2936. After being processed by the processing logic of the exposure offset strategy in the conversion rate processing structure A1 corresponding to the daytime period and marked up, it becomes 7.2938. Then, after being marked up by the processing logic of the original exchange rate refund strategy for 7.2938, the obtained target conversion rate is 7.2987. When the receiving time of the conversion rate query request is 8:00 pm, the reference exchange rate is 7.2843. After being processed by the processing logic of the exposure offset strategy in the conversion rate processing structure A2 corresponding to the night period and marked up, it becomes 7.2856. Then, after being marked up by the processing logic of the original exchange rate refund strategy for 7.2856, it becomes 7.2889. Finally, after being discounted by the processing logic of the market volatility strategy for 7.2889, the obtained target conversion rate is 7.2867.

[0208] By associating the service identifier of each service with multiple conversion rate processing structures according to the effective period, it is possible to select a target conversion rate processing structure that matches the request reception time based on the reception time of the conversion rate query request for conversion rate processing, improving the refinement of resource conversion rate processing and thus the accuracy of resource conversion rate processing.

[0209] S804: The server sends at least one target conversion rate to the terminal device.

[0210] Since at least one target conversion rate of the first resource pair is processed by the first conversion rate processing structure, to reduce the quotation risk of the third-party payment institution, the target conversion rate can be sent to the terminal device under the first service after verification.

[0211] For the specific verification process, see Figure 13 , which mainly includes the following steps:

[0212] S8041: Based on the resource pair type of the first resource pair, select a target security policy from multiple preset security policies.

[0213] In one embodiment, when the conversion rate processing structure is in pipeline mode, the selected target security policy can be concatenated in the form of a plug-in at the last position of the pipeline.

[0214] Among them, the security policies corresponding to different resource pairs are different.

[0215] S8042: Based on the target security policy, perform numerical verification on at least one target conversion rate.

[0216] In one embodiment, the target security policy defines the price range of the corresponding resource pair. By determining whether at least one target conversion rate after concatenated processing is within the price range, the numerical verification process of the resource conversion rate is realized.

[0217] S8043: Send the target conversion rate with successful numerical verification to the terminal device.

[0218] By performing numerical verification on at least one target conversion rate after concatenated processing, it is ensured that the target conversion rate provided by the third-party payment institution to the first service is within a reasonable price range, improving the accuracy of resource conversion rate quotation and reducing the risk brought by inaccurate resource conversion rate quotation.

[0219] The third-party payment institution provides more conversion rate references for the first service by sending at least one target conversion rate of the first resource pair to the terminal device, so that the first service can flexibly select according to business needs.

[0220] For example, taking at least one target conversion rate of the first resource pair as the transactionable exchange rate and the reference exchange rate, after the third-party payment institution sends these two target conversion rates to the terminal device under the first service, when the service requirement of the first service is cross-border consumption, the transactionable exchange rate provided by the third-party payment institution can be used; when the service requirement of the first service is to obtain the trend of exchange rate changes, the reference exchange rate provided by the third-party payment institution can be used.

[0221] In the embodiments of the present application, a conversion rate processing structure is pre-configured for each service respectively, and an association relationship is established between the service identifier of each service and each conversion rate processing structure. In this way, when receiving a conversion rate query request of the first service sent by the terminal device, the corresponding first conversion rate processing structure can be obtained based on the first service identifier. Since each conversion rate processing structure includes: under one service, a set of conversion rate processing strategies used for at least one target data source of the resource pair, and each conversion rate processing strategy includes a processing logic for the conversion rate. Therefore, there is no need to develop a resource conversion rate processing task separately for the first service. Instead, based on at least one processing logic included in the first conversion rate processing structure, the at least one target data source of the first resource pair requested by the conversion rate query request can be processed in series automatically, reducing the development difficulty of the conversion rate processing and saving the development cost. Moreover, the conversion rate processing structures of each service share the same conversion rate processing strategy pool. In this way, each conversion rate processing strategy can be used by different services, thereby improving the reusability of the conversion rate processing strategy. In this way, when a certain service changes, only at least one conversion rate processing strategy in its corresponding conversion rate processing structure needs to be reorganized, without the need for re-development, effectively improving the flexibility of the resource conversion rate processing.

[0222] Based on the same technical concept, the embodiments of the present application provide a resource conversion rate processing device, which can implement the above resource conversion rate processing method and achieve the same technical effect.

[0223] See Figure 14 , the structure of this processing device includes a receiving module 1401, an obtaining module 1402, a conversion rate processing module 1403, and a sending module 1404; where:

[0224] The receiving module 1401 is configured to receive a conversion rate query request sent by the terminal device based on the first service. The conversion rate query request carries the first service identifier of the first service and the first resource pair under the first service.

[0225] An acquisition module 1402, configured to acquire a first conversion rate processing structure set for a corresponding first service identifier based on a preset association relationship between each service identifier and each conversion rate processing structure; each conversion rate processing structure shares the same conversion rate processing policy pool, and each conversion rate processing policy in the conversion rate processing policy pool includes a processing logic for the conversion rate;

[0226] A conversion rate processing module 1403, configured to perform a series connection process on at least one target data source of the first resource pair respectively based on the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure, to obtain at least one target conversion rate of the first resource pair;

[0227] A sending module 1404, configured to send at least one target conversion rate to a terminal device.

[0228] Optionally, the conversion rate processing module 1403 is specifically configured to:

[0229] Obtain the series connection order of the processing logic included in at least one conversion rate processing policy in the first conversion rate processing structure;

[0230] For at least one type of target data source of the first resource pair, respectively perform: based on the series connection order, use the output of one type of target data source in the previous processing logic as the input of the next processing logic, until at least one processing logic is iterated to obtain a target conversion rate of the first resource pair.

[0231] Optionally, when the first service identifier of the first service is associated with multiple first conversion rate processing structures, a valid period is set for each first conversion rate processing structure, and the conversion rate processing module 1403 is specifically configured to:

[0232] Obtain the reception time of the conversion rate query request;

[0233] Based on the valid period to which the reception time belongs, select a target conversion rate processing structure from multiple first conversion rate processing structures;

[0234] Based on the processing logic included in at least one conversion rate processing policy in the target conversion rate processing structure, perform a series connection process on at least one type of target data source of the first resource pair respectively, to obtain at least one target conversion rate of the first resource pair.

[0235] Optionally, the sending module 1404 is specifically configured to:

[0236] Based on the resource pair type of the first resource pair, select a target security policy from a preset multiple security policies;

[0237] Based on the target security policy, perform a numerical verification on at least one target conversion rate;

[0238] Send the target conversion rate with successful numerical verification to the terminal device.

[0239] Optionally, the receiving module 1401 is further configured to:

[0240] Receive the candidate conversion rates of at least one data source type corresponding to the first resources sent by each conversion rate provider.

[0241] The obtaining module 1402 is further configured to:

[0242] For each candidate conversion rate of the same data source type, respectively perform: screen out at least one initial data source from each candidate conversion rate, and fuse the at least one initial data source based on a preset business rule to obtain a target data source of one data source type of the first resource pair.

[0243] Optionally, the obtaining module 1402 is specifically configured to:

[0244] For each candidate exchange rate, respectively perform an operation:

[0245] Obtain the push time of the candidate conversion rate.

[0246] If the push time is within the preset time limit, use the candidate conversion rate as an initial data source.

[0247] Optionally, when there is at least one first data source for which the acquisition fails among the at least one target data source of the first resource pair, the obtaining module 1402 is further configured to:

[0248] For each first data source, respectively perform: obtain the first data source of the first resource pair based on the first data sources of multiple other resource pairs, where the concatenated combination of the multiple other resource pairs covers the first resource pair.

[0249] Optionally, the obtaining module 1402 is specifically configured to:

[0250] Classify each conversion rate processing structure to obtain a first category, and classify each business to obtain a second category;

[0251] For each first category, respectively perform: associate the exchange rate processing structure of the first category with the business identifiers of each business under the same second category.

[0252] In the above resource conversion rate processing device, an exchange rate processing structure is pre-configured for each service respectively, and an association relationship is established between the service identifier of each service and each exchange rate processing structure. In this way, when a conversion rate query request of the first service sent by the terminal device is received, the corresponding first conversion rate processing structure can be obtained based on the first service identifier. Since the first conversion rate processing structure includes at least one conversion rate processing strategy, and each conversion rate processing strategy includes a processing logic for the conversion rate, therefore, there is no need to develop a conversion rate processing task for the first service separately. Instead, at least one processing logic included in the first conversion rate processing structure can be directly used to automatically perform a series processing on at least one target data source of the first resource pair requested by the conversion rate query request, thereby reducing the development difficulty and saving the development cost.

[0253] On the other hand, since the conversion rate processing structures of each service share the same conversion rate processing strategy pool, in this way, each conversion rate processing strategy can be used by different services, thereby improving the reusability of the conversion rate processing strategy. In addition, when a certain service changes, only at least one conversion rate processing strategy in its corresponding conversion rate processing structure needs to be reorganized, without re-development, effectively improving the flexibility of the conversion rate processing.

[0254] For the convenience of description, the above parts are divided into each module (or unit) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0255] Those skilled in the art of the technical field to which this application belongs can understand that various aspects of this application can be implemented as a system, a method, or a program product. Therefore, various aspects of this application can be specifically implemented in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module" or "system" here.

[0256] After introducing the resource conversion rate processing method and the resource conversion rate processing device of the exemplary embodiment of this application, next, an electronic device according to another exemplary embodiment of this application is introduced.

[0257] In one embodiment, the electronic device can be Figure 1 the server in. As Figure 15 shown, the structure of the electronic device can include a memory 1501, a communication module 1503, and one or more processors 1502.

[0258] A memory 1501 for storing computer programs executed by a processor 1502. The memory 1501 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and an operation instruction set, etc.

[0259] The memory 1501 may be a volatile memory, such as a random-access memory (RAM); the memory 1501 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or the memory 1501 is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1501 may be a combination of the above memories.

[0260] The processor 1502 may include one or more central processing units (CPUs) or be a digital processing unit, etc. The processor 1502 is used to implement the above resource conversion rate processing method when calling the computer program stored in the memory 1701.

[0261] A communication module 1503 is used to communicate with a mobile terminal and other devices.

[0262] In the embodiments of the present application, the specific connection medium between the above-mentioned memory 1501, communication module 1503, and processor 1502 is not limited. In the embodiments of the present application Figure 15 it is described that the memory 1501 and the processor 1502 are connected through a bus 1504, and the bus 1504 is described in thick lines in Figure 15 The connection manners between other components are only for illustrative purposes and are not to be taken as limiting. The bus 1504 may be divided into an address bus, a data bus, a control bus, etc. For the convenience of description, Figure 15 only a thick line is used to describe it in

[0263] The memory 1501 stores a computer storage medium, and the computer storage medium stores computer-executable instructions for implementing the resource conversion rate processing method of the embodiments of the present application. The processor 1502 is used to execute the steps of the above resource conversion rate processing method.

[0264] In some possible embodiments, various aspects of the resource conversion rate processing method provided in this application can also be implemented in the form of a program product, which includes a computer program. When the program product runs on an electronic device, the computer program is used to cause the electronic device to execute the steps in the resource conversion rate processing method according to various exemplary embodiments of this application described above in this specification. For example, the electronic device can execute the steps as shown in Figure 8 shown.

[0265] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0266] The program product of the embodiments of this application can adopt a portable compact disk read-only memory and include a computer program, and can run on an electronic device. However, the program product of this application is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with a command execution system, apparatus, or device.

[0267] The readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0268] The computer program included on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0269] The computer program for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The computer program can be executed entirely on the user's computing device, partially on the user's computing device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any kind of network including a local area network or a wide area network, or can be connected to an external computing device.

[0270] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable computer programs.

[0271] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.

[0272] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A method for processing resource conversion rate, characterized in that: The method comprises: Receiving a conversion rate query request sent by a terminal device based on a first service, wherein the conversion rate query request carries a first service identifier of the first service and a first resource pair under the first service; Based on the preset association relationship between each service identifier and each conversion rate processing structure, a first conversion rate processing structure set corresponding to the first service identifier is obtained; each conversion rate processing structure shares the same conversion rate processing strategy pool, and each conversion rate processing strategy in the conversion rate processing strategy pool includes a processing logic for the conversion rate; Based on the processing logic included in at least one conversion rate processing strategy in the first conversion rate processing structure, respectively perform serial processing on at least one target data source of the first resource pair under the first service to obtain at least one target conversion rate of the first resource pair; The at least one target conversion rate is sent to the terminal device.

2. The method according to claim 1, characterized in that The processing logic included in at least one conversion rate processing strategy based on the first conversion rate processing structure is used to perform serial processing on at least one target data source of the first resource pair under the first service to obtain at least one target conversion rate of the first resource pair, including: Obtaining a serial order of processing logics included in at least one conversion rate processing strategy in the first conversion rate processing structure; For at least one target data source of the first resource pair, respectively execute: based on the series sequence, use the output of a target data source in the previous processing logic as the input of the next processing logic, until at least one processing logic is iterated to obtain a target conversion rate of the first resource pair.

3. The method according to claim 1, characterized in that When the first service identifier of the first service is associated with a plurality of first conversion rate processing structures, an effective period is set corresponding to each first conversion rate processing structure; Based on the processing logic included in at least one conversion rate processing strategy in the first conversion rate processing structure, at least one target data source of the first resource pair under the first service is processed in series to obtain at least one target conversion rate of the first resource pair, including: Obtaining the reception time of the conversion rate query request; Selecting a target conversion rate processing structure from the plurality of first conversion rate processing structures based on the effective time period to which the receiving time belongs; Based on the processing logic included in at least one conversion rate processing strategy in the target conversion rate processing structure, at least one target data source of the first resource pair is processed in series to obtain at least one target conversion rate of the first resource pair.

4. The method according to claim 1, characterized in that The sending the at least one target conversion rate to the terminal device comprises: Based on the resource pair type of the first resource pair, selecting a target security policy from a plurality of preset security policies; Based on the target security policy, performing a numerical check on the at least one target conversion rate; The target conversion rate whose numerical value has been successfully verified is sent to the terminal device.

5. The method according to any one of claims 1 to 4, characterized in that At least one target data source of the first resource pair is obtained in the following manner: Receive candidate conversion rates of at least one data source type corresponding to the first resource pair sent by each conversion rate provider; For each candidate conversion rate of the same data source type, respectively perform: select at least one initial data source from each candidate conversion rate, and fuse the at least one initial data source based on preset business rules to obtain a target data source of a data source type of the first resource pair.

6. The method according to claim 5, characterized in that The step of selecting at least one initial data source from the candidate conversion rates includes: For each candidate conversion rate, the following operations are performed respectively: Obtaining the push time of the candidate conversion rate; If the push time is within the preset time limit, the candidate conversion rate is used as an initial data source.

7. The method according to claim 5, characterized in that When at least one first data source fails to be acquired among at least one target data source of the first resource pair, the method further includes: For each first data source, respectively perform: based on the first data sources of multiple other resource pairs, obtain the first data source of the first resource pair, wherein the serial combination of the multiple other resource pairs covers the first resource pair.

8. The method according to any one of claims 1 to 4, characterized in that The preset association relationship between each service identifier and each conversion rate processing structure is obtained in the following manner: Classifying each conversion rate processing structure to obtain a first category, and classifying each business to obtain a second category; For each first category, respectively executing: associating the conversion rate processing structure of the first category with the service identifier of each service under the same second category.

9. A resource conversion rate processing device, characterized in that: include: A receiving module, configured to receive a conversion rate query request sent by a terminal device based on a first service, wherein the conversion rate query request carries a first service identifier of the first service and a first resource pair under the first service; an acquisition module, configured to acquire a first conversion rate processing structure corresponding to the first service identifier based on a preset association relationship between each service identifier and each conversion rate processing structure; each conversion rate processing structure shares the same conversion rate processing strategy pool, and each conversion rate processing strategy in the conversion rate processing strategy pool includes a processing logic for a conversion rate; a conversion rate processing module, configured to perform serial processing on at least one target data source of the first resource pair based on the processing logic included in at least one conversion rate processing strategy in the first conversion rate processing structure, so as to obtain at least one target conversion rate of the first resource pair; A sending module is used to send the at least one target conversion rate to the terminal device.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1-8.

11. A computer-readable storage medium, characterized in that: It comprises a computer program. When the computer program is run on an electronic device, the computer program is used to make the electronic device execute the steps of any one of the methods of claims 1-8.

12. A computer program product, characterized in that The method comprises a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of any one of the methods described in claims 1-8.