CN118096363A - Resource conversion method, device, apparatus, storage medium, and program product - Google Patents

Resource conversion method, device, apparatus, storage medium, and program product Download PDF

Info

Publication number
CN118096363A
CN118096363A CN202211501085.2A CN202211501085A CN118096363A CN 118096363 A CN118096363 A CN 118096363A CN 202211501085 A CN202211501085 A CN 202211501085A CN 118096363 A CN118096363 A CN 118096363A
Authority
CN
China
Prior art keywords
conversion
target
resource
electronic
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211501085.2A
Other languages
Chinese (zh)
Inventor
邹文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211501085.2A priority Critical patent/CN118096363A/en
Publication of CN118096363A publication Critical patent/CN118096363A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a resource conversion method, a device, equipment, a storage medium and a program product, wherein the method comprises the following steps: acquiring electronic resource information of a target object, wherein the electronic resource information comprises a first target number and a second target number; obtaining conversion ratio information between the target object and the first object, the conversion ratio information including: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time; selecting a target conversion time from the first conversion time and the second conversion time; and at the target conversion time, performing resource conversion processing according to the target conversion ratio, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object. According to the embodiment of the application, the time for converting the electronic resource between the target object and the first object can be flexibly selected, so that the benefit of the target object can be improved.

Description

Resource conversion method, device, apparatus, storage medium, and program product
Technical Field
The present application relates to the field of computer technology, and in particular, to a resource conversion method, a resource conversion device, a computer apparatus, a computer readable storage medium, and a computer program product.
Background
The electronic resource conversion refers to a transaction behavior of converting one type of electronic resource with another type of electronic resource, and is mainly implemented through an electronic network between a target object (i.e., a first resource conversion platform, such as a resource conversion platform corresponding to a third party electronic resource conversion mechanism), a first object (i.e., a second resource conversion platform, such as a resource conversion platform corresponding to a target electronic resource conversion mechanism (e.g., a bank)), and a second object (e.g., a client corresponding to a merchant or a person).
When the second object requests the target object to perform electronic resource conversion at a certain conversion time (such as the day when the request is initiated), the target object acquires the first electronic resources of the second object and transfers a corresponding amount of the second electronic resources to the second object, and the process can be called electronic resource settlement; in order to control the risk, the target object may also perform electronic resource conversion with the first object during the certain conversion time, so as to convert the first electronic resource owned by the target object into the second electronic resource, which may be referred to as an electronic resource flat disc. It can be seen that the time for the resource conversion between the target object and the first object (i.e. the electronic resource flat time) depends on the time for the resource conversion between the target object and the second object (i.e. the electronic resource settlement time), and cannot be flexibly selected, so that the risk of the target object can be controlled to a certain extent, but the benefit of the target object is limited.
Disclosure of Invention
The embodiment of the application provides a resource conversion method, a device, equipment, a storage medium and a program product, which can flexibly select the time for electronic resource conversion between a target object and a first object, thereby being beneficial to improving the benefit of the target object.
In one aspect, an embodiment of the present application provides a resource conversion method, where the method includes:
Acquiring electronic resource information of a target object, wherein the electronic resource information comprises: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
Obtaining conversion ratio information between the target object and a first object, the conversion ratio information including: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
Selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
and performing resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
In one aspect, an embodiment of the present application provides a resource conversion device, where the device includes:
The electronic resource information acquisition unit is used for acquiring the electronic resource information of the target object, and the electronic resource information comprises: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
A processing unit, configured to obtain conversion ratio information between the target object and a first object, where the conversion ratio information includes: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
The processing unit is further configured to select a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
And the processing unit is further used for carrying out resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
In one aspect, an embodiment of the present application provides a computer device, including: the resource conversion method comprises a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are mutually connected, executable program codes are stored in the memory, and the processor is used for calling the executable program codes to realize the resource conversion method provided by the embodiment of the application.
Correspondingly, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions which, when run on a computer, cause the computer to realize the resource conversion method provided by the embodiment of the application.
Accordingly, embodiments of the present application also provide a computer program product comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device realizes the resource conversion method provided by the embodiment of the application.
In the embodiment of the application, according to the conversion ratio of the first electronic resource and the second electronic resource at the first conversion time, the conversion ratio of the first electronic resource and the second electronic resource at the second conversion time, the quantity of the first electronic resource transferred into the target object and the quantity of the second electronic resource transferred out, the target conversion time is selected from the first conversion time and the second conversion time, and the resource conversion processing is carried out on the target conversion time and the first object according to the corresponding conversion ratio, so that all or part of the first electronic resource of the target object is converted into the second electronic resource with the corresponding quantity. By adopting the method, the time for performing electronic resource conversion between the target object and the first object (namely the electronic resource flat-disk time of the target object) can be selected from the first conversion time and the second conversion time, so that flexible selection of the electronic resource conversion time between the target object and the first object is realized.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture to which a resource conversion method according to an embodiment of the present application is applicable;
FIG. 2 is a schematic flow chart of a resource conversion method according to an embodiment of the present application;
FIG. 3 illustrates one method of determining a target transition time;
FIG. 4 is a flowchart illustrating another resource conversion method according to an embodiment of the present application;
FIG. 5a illustrates one method of performing resource conversion;
FIG. 5b illustrates another method of performing resource conversion;
FIG. 5c illustrates yet another method of performing resource conversion;
Fig. 6 is a schematic structural diagram of a resource conversion device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the descriptions of "first," "second," and the like in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a technical feature defining "first", "second" may include at least one such feature, either explicitly or implicitly.
The terms related to the present application are explained as follows:
third party resource conversion mechanism: the electronic resource conversion system is an independent mechanism with a certain strength and credit guarantee, and can directly perform electronic resource conversion with the target electronic resource conversion mechanism and a merchant after signing with the target electronic resource conversion mechanism.
Target electronic resource conversion mechanism: the third resource conversion mechanism is an independent mechanism, such as a bank, capable of converting the electronic resource and integrating the electronic resource.
A merchant: in the electronic resource conversion transaction, a person or an enterprise initiating an electronic resource conversion request can perform electronic resource conversion with a third-party electronic resource conversion mechanism.
Electronic resource conversion: one electronic resource (such as the electronic resource used in the first place transaction) is transferred to a pair of electronic resource combinations at the same time, and the other electronic resource (such as the electronic resource used in the second place transaction) is transferred. Unlike other transaction activities, electronic resource conversion is accomplished through an electronic network between the target electronic resource conversion mechanism, the third party resource conversion mechanism, and the merchant.
Electronic resources are uncovered: in the electronic resource conversion transaction, multiple heads refer to that the number of the transferred electronic resources is larger than that of the transferred electronic resources, and empty heads refer to that the number of the transferred electronic resources is smaller than that of the transferred electronic resources. Such "multiple heads" and "empty heads" are called "electronic resource openings". The electronic resource opening has unstable factors, and may cause loss to a third party electronic resource conversion mechanism.
Electronic resource delivery day: the date of the corresponding number of electronic resources, namely the electronic resource conversion time, is required to be converted when the electronic resource conversion transaction is performed.
The application provides a resource conversion method, which is used for flexibly selecting the conversion time of electronic resources by acquiring the electronic resource information of a target object and the conversion ratio information between the target object and a first object, determining the target conversion time according to the target quantity and the conversion ratio and carrying out resource conversion processing at the target conversion time, thereby being beneficial to maximizing the benefit of the target object.
In a possible embodiment, the resource conversion method provided by the embodiment of the application can be based on Cloud technology (Cloud technology). In particular, it may relate to one or more techniques in cloud computing, cloud databases. For example, when the target object and the first object perform electronic resource conversion, the conversion number of the electronic resources is determined by using cloud computing, and the electronic resources with the corresponding conversion number are obtained from a cloud database.
In a feasible embodiment, the resource conversion method provided by the embodiment of the application can be further based on a blockchain technology, wherein the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The system comprises a series of blocks (blocks) which are mutually connected according to the sequence of the generated time, the new blocks are not removed once being added into a Block chain, and record data submitted by nodes in the Block chain system are recorded in the blocks. Optionally, data (such as the conversion number, conversion ratio, etc. of the electronic resources) generated by executing the resource conversion method may be stored in the blockchain network in a block form, and the conversion number of the electronic resources may also be obtained from the blockchain network and used in other service scenarios. In addition, the device performing the resource conversion method may be a node device in a blockchain network.
Please refer to fig. 1, which is a schematic diagram illustrating a system architecture of a resource conversion system according to an embodiment of the present application. As shown in fig. 1, the resource conversion system includes a first resource conversion platform 101, a client 102, and a second resource conversion platform 103. The first resource conversion platform 101, the client 102 and the second resource conversion platform 103 are connected through a network, so that electronic resource conversion can be performed.
In a possible implementation, the first resource conversion platform 101 is a resource conversion platform corresponding to a third party resource conversion mechanism. The device carrying the first resource conversion platform 101 may be a server. The server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like.
In a possible implementation, the client 102 may be a terminal device, which may be a handheld device (e.g., a smart phone, a tablet computer), a computing device (e.g., a personal computer (Personal Computer, PC), a smart voice interaction device, a wearable device, or other smart appliance, etc., with wireless communication capabilities, but is not limited thereto.
In a possible implementation manner, the second resource conversion platform 103 is a resource conversion platform corresponding to a target electronic resource conversion mechanism, and the target electronic resource conversion mechanism may be a mechanism capable of converting electronic resources, such as a bank.
The resource conversion method provided by the embodiment of the present application may be implemented by the first resource conversion platform 101, including but not limited to the following steps:
The first resource conversion platform 101 acquires electronic resource information including: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; and the first electronic resource of the first target number is matched with the second electronic resource of the second target number; conversion ratio information between the first resource conversion platform 101 and the second resource conversion platform 103 is acquired, the conversion ratio information including: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time; selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number; and at the target conversion time, performing resource conversion processing according to a target conversion ratio matched with the target conversion time, transferring all or part of the first electronic resources of the first resource conversion platform 101 to the second resource conversion platform 103, and acquiring a corresponding amount of second electronic resources transferred from the second resource conversion platform 103 to the first resource conversion platform 101.
According to the resource conversion method provided by the embodiment of the application, the conversion ratio information is obtained, so that a plurality of resource conversion times to be selected are obtained; determining target conversion time (namely the electronic resource flat time of the first resource conversion platform) according to the conversion ratio and the target quantity, so that the target conversion time is reasonably feasible in electronic resource conversion transaction, and the risk of the electronic resource conversion transaction of a target object is effectively controlled; and in the target conversion time, the resource conversion processing is carried out according to the target conversion ratio, so that the flexibility of the electronic resource conversion time is improved, and the benefit of the first resource conversion platform is improved.
It can be understood that the schematic diagram of the system architecture to which the resource conversion method described in the embodiment of the present application is applicable is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. Those of ordinary skill in the art will appreciate that the number of clients 102 in fig. 1 is merely illustrative. Any number of client devices may be configured according to the service implementation needs. Moreover, with the evolution of the system architecture and the appearance of new service scenarios, the resource conversion method provided by the embodiment of the application is also applicable to similar technical problems.
It should be noted that, related data such as electronic resource information and the like related to the embodiment of the present application are all obtained after user authorization, and when the embodiment of the present application is applied to a specific product or technology, related data needs to be licensed by a user, and collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
Referring to fig. 2, fig. 2 is a flow chart of a resource conversion method according to an embodiment of the application. The resource conversion method may be implemented by the first resource conversion platform 101, or may be implemented by other resource conversion platforms. The flow of the resource conversion method provided in the embodiment of the application includes but is not limited to:
S201, acquiring electronic resource information of a target object, wherein the electronic resource information comprises: a first target number of diverted first electronic resources, a second target number of diverted second electronic resources.
In the embodiment of the application, the target object is a first resource conversion platform, and the types of the first electronic resource and the second electronic resource are different. The first electronic resource may be an electronic resource used for a first place transaction, for example: dollars (United States Dollar, USD), euro (EUR), etc., the second electronic resource may be an electronic resource used for a land-based transaction, such as: renminbi (China Yuan, CNY), rubu (RussianRuble, RUB), and the like. The first target number and the second target number are determined according to electronic resource conversion performed by the target object and the second object, and the first electronic resource of the first target number is matched with the second electronic resource of the second target number. The second object is a merchant or individual that performs an electronic resource conversion transaction with the target object (i.e., the first resource conversion platform). In an embodiment, the first target number of the transferred first electronic resource may be 10000, and the second target number of the transferred second electronic resource may be 66895, and then the first target number and the second target number are matched through a conversion ratio between the first electronic resource and the second electronic resource. The method provided by the embodiment of the application is beneficial to the subsequent operation of determining the resource conversion time of the target object by acquiring the electronic resource information of the target object.
In an embodiment, in a certain period of time, when the second object and the third object perform electronic resource conversion with respect to the same group of electronic resources and the target objects, the process of determining the first target number and the second target number may be: the target object receives the first resource conversion request of the second object, determines a third conversion ratio between the second objects, transfers the first electronic resources of the third conversion quantity to the second object according to the first resource conversion request and the third conversion ratio, and acquires the second electronic resources of the fourth conversion quantity matched with the third conversion quantity from the second object. The target object receives a second resource conversion request of the third object, acquires second electronic resources of a fifth conversion quantity according to the second resource conversion request and the third conversion ratio, extracts first electronic resources of a sixth conversion quantity from the first electronic resources of the third conversion quantity, and transfers the first electronic resources of the sixth conversion quantity to the third object, wherein the quantity of the first electronic resources transferred into the target object is a first target quantity, and the quantity of the transferred second electronic resources is a second target quantity. In an embodiment, the first resource conversion request of the second object may be to convert 10000 second electronic resources into first electronic resources, and the second resource conversion request of the third object may be to convert 100 first electronic resources into second electronic resources. The third conversion ratio may be 6.6895. The determination of the first target number and the second target number is performed as shown in table one:
Table one:
In table one, when the transition time is the third transition time, in the initial state of the target object, the number of the transferred first electronic resources is 0, and the number of the transferred second electronic resources is 0. According to the third conversion ratio and the first resource conversion request of the second object, the first electronic resource of 10000/6.6895 = 1494.88 is transferred to the second object, and the second electronic resource is obtained from the second object, so that after the resource conversion is performed with the second object, the number of the first electronic resources of the target object is-1494.88, and the number of the second electronic resources is 10000. And extracting 668.95 the second electronic resource from 10000 second electronic resources according to the third conversion ratio and the second resource conversion request of the third object, transferring the second electronic resource to the third object, and acquiring 100 first electronic resources of the third object. Then after the resource conversion is performed on the third object, the number of the first electronic resources of the target object is-1394.88, and the number of the second electronic resources is 9331.05.
It should be noted that, in a certain conversion time, when three or more objects perform electronic resource conversion with respect to the same group of electronic resources and target objects, the determination process of the first target number and the second target number is similar to that described in the above embodiment.
S202, obtaining conversion ratio information between the target object and a first object, wherein the conversion ratio information comprises the following components: the first electronic resource and the second electronic resource have a first conversion ratio at a first conversion time and a second conversion ratio at a second conversion time.
In the embodiment of the application, the first object is a second resource conversion platform capable of directly carrying out data interaction with the target object. The second transition time may comprise one or more points in time, and the second transition time is later than the first transition time. In an embodiment, the first transition time may be T, and the second transition time may include two time points, t+1 and t+2, respectively. The conversion ratio information between the target object and the first object includes a conversion ratio of the first electronic resource and the second electronic resource at the conversion time T, a conversion ratio of the first electronic resource and the second electronic resource at the conversion time t+1, and a conversion ratio of the first electronic resource and the second electronic resource at the conversion time t+2. In the method provided by the embodiment of the application, the first conversion time and the second conversion time are acquired, and the selectable resource conversion time of the target object is increased, so that the flexibility of the resource conversion time between the target object and the first object is increased.
In an embodiment, a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time may be acquired by the first object.
S203, selecting target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number.
In the embodiment of the present application, the process of selecting the target conversion time from the first conversion time and the second conversion time may be: calculating a first conversion number of second electronic resources obtained by performing resource conversion at a first conversion time according to the first conversion ratio and the first target number, and calculating a second conversion number of second electronic resources obtained by performing resource conversion at a second conversion time according to the second conversion ratio and the first target number; if the second conversion number is larger than the first conversion number, the first conversion number is larger than the second target number, calculating the time interval between the second conversion time and the first conversion time, and calculating the electronic resource loss number generated by the second electronic resource with the second target number according to the time interval; calculating a quantity difference between the second conversion quantity and the electronic resource loss quantity; if the number difference is less than or equal to the first conversion number, the first conversion time is determined as the target conversion time, and if the number difference is greater than the first conversion number, the second conversion time is determined as the target conversion time. The resource conversion method provided by the embodiment of the application can ensure the feasibility of the target conversion time and also ensure that the benefit of the target object is higher when the resource conversion is carried out in the target conversion time by comparing the conversion quantity corresponding to the first conversion time and the second conversion time and determining the target conversion time by the conversion time with large conversion quantity. The electronic resource loss amount is calculated in the process of determining the target conversion time, so that the electronic resource loss of the target object is reduced, and the benefit of the target object is further improved.
In one embodiment, the data related to the first transition time and the second transition time are shown in table two.
And (II) table:
in table two, the first target number of the first electronic resources may be 10000, and the second target number of the second electronic resources may be 66895. The first transition time may be T and the first transition ratio of the first electronic resource to the second electronic resource at the first transition time may be 6.6896. The second transition time may include a time point of t+2, and the second transition ratio of the first electronic resource to the second electronic resource at the second transition time may be 6.6995. The process of selecting the target transition time may be: according to the first conversion ratio and the first target quantity, the first conversion quantity of the second electronic resource obtained by converting the resource at the first conversion time T is calculated to be 66896. Calculating a second conversion number of second electronic resources obtained by resource conversion at a second conversion time T+2 according to the second conversion ratio and the first target number, wherein the second conversion number is 66995; the second conversion number 66995 is greater than the first conversion number 66896, the first conversion number 66896 is greater than the second target number 66895, the time interval between the second conversion time and the first conversion time is calculated to be 2, and the number of electronic resource losses generated by the second electronic resource with the second target number is calculated to be 30 according to the time interval; calculating a number difference between the second conversion number 66995 and the electronic resource loss number as 66965; if the number difference 66965 is greater than the first transition number 66896, the second transition time is determined to be the target transition time, which is t+2.
In one embodiment, the first transition time is determined to be the target transition time if the second transition number is less than or equal to the first transition number and the first transition number is greater than the second target number.
In an embodiment, the method for determining the electronic resource loss amount may be: an electronic resource loss ratio is obtained, and an electronic loss amount is determined based on the electronic resource loss ratio, a time interval between the first transition time and the second transition time, the first target amount, and the second target amount. In an embodiment, the first target number of the first electronic resources may be 10000, the second target number of the second electronic resources may be 66895, and the time interval may be 2. The electronic loss ratio includes an increase ratio (e.g., 0.05%) of the first electronic resource and a loss ratio (e.g., 0.05%) of the borrowed second electronic resource, and the increase data may be calculated as 10 according to the first target number, the increase ratio of the first electronic resource and the time interval, and the loss data may be calculated as 66895×2×0.05% = 66.895 according to the second target number, the loss ratio of the borrowed second electronic resource and the time interval. And obtaining the electronic resource loss quantity 56.895 according to the added data and the loss data. In one embodiment, the number of electronic resource losses may be determined based on the first target number, the second target number, the rate of increase of the first electronic resource and the rate of increase of the second electronic resource.
S204, performing resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
In the embodiment of the application, the target object can transfer all or part of the first electronic resource to the first object. The target transition time may be the first transition time or the second transition time. The method provided by the embodiment of the application enhances the flexibility of the resource conversion time when the target object and the first object are subjected to resource conversion, can convert all or part of the electronic resources of the target object, optimizes the electronic resource conversion strategy of the target object, and improves the reliability of the target object.
In one embodiment, the target transition time is a first transition time. And transferring part of the first electronic resources of the target object to the first object at a specific time in the first conversion time according to the first conversion ratio and the set percentage, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object. In an embodiment, the first target number of first electronic resources may be 10000, the first conversion time may be T, and then at a specific time (e.g. 17:00) in the first conversion time, according to a first conversion ratio (e.g. 6.6896) and a set percentage (e.g. 90%), a portion of the first electronic resources (i.e. 9000) of the target object are transferred to the first object, and a corresponding number of second electronic resources (9000×6.6896= 60206.4) of the first object transferred to the target object are obtained.
In one embodiment, the process of determining the set percentage and the specific time may be: and acquiring an electronic resource management rule of the target object, wherein the electronic resource management rule is used for indicating the conversion strategies of the electronic resources of different categories and the conversion strategies of different service scenes, and determining a set percentage and a specific time according to the electronic resource management rule. The electronic resource management rule can be added, deleted and modified according to actual conditions. In the method provided by the embodiment of the application, the electronic resource conversion is carried out according to the electronic resource management rule, so that the electronic resource conversion strategy of the target object is optimized. In one embodiment, the electronic resource management rules are shown in Table III.
Table three:
in the third table, if the target conversion time is determined to be T by the "cross-border order receiving" service for the first electronic resource and the second electronic resource in the target object, the corresponding set percentage and the specific time may be determined according to the "cross-border order receiving" service in the third table.
In one embodiment, the target transition time is a second transition time. And transferring all the first electronic resources of the target object to the first object according to a second conversion ratio at a second conversion time, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object. In an embodiment, the first target number of the first electronic resources may be 10000, and the second conversion time may be t+2, then at the second conversion time, transferring all the first electronic resources of the target object to the first object according to the second conversion ratio (e.g. 6.6995), and obtaining the corresponding number (66995) of second electronic resources transferred from the first object to the target object.
In an embodiment, the process of performing resource conversion between the target object and the first object may further be: acquiring a first target conversion ratio of the first electronic resource and the third electronic resource at target conversion time and a second target conversion ratio of the third electronic resource and the second electronic resource at target conversion time; transferring all or part of the first electronic resources to the first object by the target object according to the first target conversion ratio at the target conversion time, and acquiring third electronic resources corresponding to the transfer quantity of the first electronic resources from the first object; the target object transfers all the third electronic resources to the first object according to the second target conversion ratio, and acquires the second electronic resources corresponding to the transfer quantity of the third electronic resources from the first object. The method provided by the embodiment of the application can realize the conversion of the first electronic resource, the second electronic resource and the third electronic resource, and is beneficial to improving the benefit of the target object.
Fig. 3 is a flowchart of a method for determining a target transition time according to an embodiment of the application. As shown, the process of determining the target transition time may be:
S1, determining a first conversion number and a second conversion number according to the first conversion ratio, the second conversion ratio, the first target number and the second target number.
In the embodiment of the application, the first target number and the second target number are determined according to the electronic resource conversion performed by the target object and the second object, and the first electronic resource of the first target number is matched with the second electronic resource of the second target number. According to the first conversion ratio and the first target quantity, the first conversion quantity of the second electronic resource obtained by converting the resource at the first conversion time is calculated, and according to the second conversion ratio and the first target quantity, the second conversion quantity of the second electronic resource obtained by converting the resource at the second conversion time is calculated.
S2, calculating whether the second conversion number is larger than the first conversion number or not to obtain a first judgment result; if the first judgment result is negative, executing step S6, and determining the first conversion time as the target conversion time; if the first determination result is yes, step S3 and subsequent steps are performed.
In the embodiment of the application, if the first judgment result is no, it is indicated that the second conversion time corresponding to the second conversion number is not better than the first conversion time corresponding to the first conversion number, and the first conversion time is directly determined as the target conversion time without subsequent calculation. If the first judgment result is yes, subsequent calculation can be performed to determine the target conversion time.
S3, calculating the electronic resource loss quantity, and determining a quantity difference value according to the electronic resource loss quantity and the second conversion quantity.
In the embodiment of the application, the time interval between the second conversion time and the first conversion time is calculated, the quantity of electronic resource loss generated by the second electronic resource with the second target quantity is calculated according to the time interval, and the quantity difference between the second conversion quantity and the quantity of electronic resource loss is calculated.
S4, calculating whether the difference value of the number is larger than the first conversion number, obtaining a second judgment result, if the second judgment result is negative, executing a step S6, and determining the first conversion time as a target conversion time; if the second determination result is yes, go to step S5 and subsequent steps.
In the embodiment of the application, if the second judgment result is no, the second conversion time corresponding to the difference of the number is not better than the first conversion time corresponding to the first conversion number, the first conversion time is determined as the target conversion time, and if the second judgment result is yes, the subsequent calculation can be performed.
S5, determining the second conversion time as the target conversion time.
In the embodiment of the application, the number difference is larger than the first conversion amount, which means that the resource conversion of the target object is beneficial to the benefit of the target object in the second conversion time, so that the second conversion time is determined as the target conversion time.
S6, determining the first conversion time as a target conversion time.
In the embodiment of the application, when the second conversion number is smaller than or equal to the first conversion number, or the number difference is smaller than or equal to the first conversion number, the first conversion time is determined as the target conversion time.
Although the steps in the flowchart of fig. 3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders.
Based on the embodiment, the application has the following beneficial effects: the conversion ratio information between the target object and the first object is obtained, so that the resource conversion time of a plurality of target objects is obtained, the selectable item of the conversion time of the target object and the first object for resource conversion is increased, and the flexibility of the electronic resource flat-disk time of the target object is increased; according to the conversion ratio and the target number, the conversion time with high conversion number is used as the target conversion time, so that the target object has higher benefit when resource leveling is performed at the target conversion time. According to the resource conversion method, when electronic resource conversion is carried out, the problem of electronic resource exposure of a target object is solved, and the safety of the target object is improved; and in the target conversion time (namely, the electronic resource delivery date), the resource conversion processing is carried out according to the target conversion ratio, so that the electronic resource conversion rule of the target object is optimized, and the benefit of the target object is improved.
Please refer to fig. 4, which is a flowchart of another resource conversion method according to an embodiment of the present application. The process of the resource conversion method provided by the embodiment of the application can be but is not limited to:
s401, receiving a first resource conversion request of a second object, and performing resource conversion processing with the second object.
In the embodiment of the application, the second object is a merchant in the electronic resource conversion transaction. The first resource conversion request is for requesting conversion of the first electronic resource into the second electronic resource, the first electronic resource conversion request including a third conversion number of the first electronic resource and a third conversion time. The process of performing the resource conversion processing with the second object may be: determining a third conversion ratio between the target object and the second object, wherein the third conversion ratio is a conversion ratio of the first electronic resource and the second electronic resource at a third conversion time, performing resource conversion processing according to the third conversion ratio at the third conversion time, acquiring a first electronic resource of a third conversion quantity transferred from the second object to the target object, and converting a second electronic resource of a fourth conversion quantity to the second object, wherein the fourth conversion quantity is determined according to the third conversion quantity and the third conversion ratio, the first target quantity is determined according to the third conversion quantity, and the second target quantity is determined according to the fourth conversion quantity.
In one embodiment, the target object is a first resource conversion platform. Referring to fig. 5a, a process of resource conversion between a first resource conversion platform and a second object is shown. The third conversion number of the first electronic resource may be 10000 and the third conversion time may be T. At this time, the electronic resource types and the number thereof held by the first resource conversion platform may be: a first electronic resource (0), a second electronic resource (0). The second object sends a first resource conversion request of the second object to the first resource conversion platform, and the second object needs to exchange resources with the first resource conversion platform to convert 10000 first electronic resources into second electronic resources. Determining a third conversion ratio (e.g., 6.6895) between the first resource conversion platform and the second object, performing resource conversion processing according to the third conversion ratio at a third conversion time, transferring a third conversion number (e.g., 10000) of first electronic resources to the first resource conversion platform by the second object, and transferring a fourth conversion number (10000×6.6895= 66895) of second electronic resources to the second object by the first resource conversion platform. After the resource conversion is carried out with the second object, the electronic resources held by the first resource conversion platform and the number thereof are as follows: a first electronic resource (10000), a second electronic resource (-66895).
In one embodiment, a third object exists, the third object being a merchant in an electronic resource conversion transaction. A second resource conversion request of the third object is received, the second resource conversion request requesting conversion of the second electronic resource into the first electronic resource at a third conversion time, the second resource conversion request including a fifth conversion number of the second electronic resource. Since the second object and the third object are both performed for the first electronic resource and the second electronic resource, that is, the second object and the third object are performed for the same group of electronic resources, the third object and the second object can be combined. And determining a sixth conversion number according to the third conversion ratio and the fifth conversion number, acquiring a fifth conversion number of second electronic resources transferred from the third object to the target object at a third conversion time, extracting a sixth conversion number of first electronic resources from the third conversion number of first electronic resources transferred from the second object to the target object, and transferring the sixth conversion number of first electronic resources to the third object.
In one embodiment, the target object is a first electronic resource platform. Referring to fig. 5b, a process of performing resource conversion with a third object after performing resource conversion with a second object by the first resource conversion platform is shown. The third conversion number of the first electronic resource may be 10000, the third conversion time may be T, and the fourth conversion number may be 66895. At this time, the electronic resources held by the first resource conversion platform may be: a first electronic resource (10000), a second electronic resource (-66895). The third object sends a second resource conversion request of the third object to the first electronic resource management platform, and the third object needs to trade with the target object to convert 33447.5 the second electronic resource into the first electronic resource. The sixth conversion number is determined to be 5000 based on the third conversion ratio (e.g., 6.6895) and the fifth conversion number. And at the third conversion time, transferring the second electronic resources of the fifth conversion quantity 33447.5 to the first resource conversion platform by the third object, extracting 5000 first electronic resources from 10000 first electronic resources transferred from the second object to the target object by the first resource conversion platform, and transferring the first electronic resources of the sixth conversion quantity (5000) to the third object. After the resource conversion processing is performed on the third object, the electronic resources held by the first resource conversion platform and the number thereof are as follows: a first electronic resource (5000), a second electronic resource (-33447.5). The method provided by the embodiment of the application can be used for carrying out merging processing on the objects containing the same group of electronic resources, so that the transaction flow between the target object and different objects is reduced, and the resource conversion processing efficiency of the target object is improved.
In one embodiment, there is a fourth object that is a merchant in the electronic resource conversion transaction. The resource request of the fourth object is to convert the third electronic resource to a fourth electronic resource at a third conversion time. And acquiring a third resource conversion request of the fourth object, wherein the third resource conversion request contains a seventh conversion number of the third electronic resource. Determining an eighth conversion number of the first resource according to a fourth conversion ratio and a seventh conversion number between the first electronic resource and the third electronic resource; and determining a ninth conversion number of the fourth resource according to the fifth conversion ratio and the eighth conversion number between the first electronic resource and the fourth electronic resource. And transferring the fourth electronic resource of the ninth conversion quantity to the fourth object at the third conversion time, and transferring the third electronic resource of the seventh electronic resource to the target object. The method provided by the embodiment of the application can perform resource conversion based on a certain electronic resource, thereby realizing conversion among electronic resources which cannot be directly converted with each other and effectively improving the security of resource conversion in electronic resource conversion transaction.
In an embodiment, the third electronic resource may be an electronic resource used for a third transaction, for example: the fourth electronic resource may be an electronic resource used for a but transaction, for example: british pounds (Great Britain Pound, GBP). For example, the third resource conversion request of the fourth object is for requesting conversion of the third electronic resource into the fourth electronic resource at the third conversion time, and the seventh conversion number of the third electronic resource may be 20000. Determining an eighth transition number of the first resource as 144.08 at a third transition time based on a fourth transition ratio (e.g., 0.007204) and a seventh transition number (20000) between the first electronic resource and the third electronic resource; a ninth transition number of the fourth resource is determined as 119.14 based on the fifth transition ratio (0.8269) and the eighth transition number (144.08) between the first electronic resource and the fourth electronic resource. Transferring the fourth electronic resource of the ninth conversion number (119.14) to the fourth object at the third conversion time and transferring the third electronic resource of the seventh electronic resource (20000) to the target object.
In an embodiment, when the target object is the first resource conversion platform and the second object is the merchant in the electronic resource conversion transaction, the electronic resource conversion transaction information of the merchant may be classified according to the number of the merchant in the electronic resource conversion transaction. And numbering merchants in the electronic resource conversion transaction, and determining the business category of the electronic resource conversion transaction information according to the merchant numbers and the type of the converted electronic resources. In an embodiment, the correspondence between the merchant number and the business category is shown in table four.
Table four:
According to table four, when the merchant with the merchant number of "100001" performs resource conversion with the first resource conversion platform, according to the merchant number and the electronic resource types (the second electronic resource and the third electronic resource), the electronic resource conversion transaction can be classified into the "cross-border order-receiving" service types. In an embodiment, the electronic resource conversion transaction between the merchant and the first resource conversion platform may be further classified according to a business class corresponding to the merchant number. The method provided by the embodiment of the application can classify the electronic resource conversion transactions of the same group of electronic resources, is convenient for the first resource conversion platform to manage the electronic resources, and provides the electronic resource conversion efficiency of the platform.
S402, acquiring electronic resource information of a target object.
In the embodiment of the application, the electronic resource information comprises a first target number of first electronic resources transferred in the target object and a second target number of second electronic resources transferred in the target object, and the first electronic resources of the first target number are matched with the second electronic resources of the second target number. When the second object is present, the first target number is determined from the third number of transitions and the second target number is determined from the fourth number of transitions. When there is a second object and the third object is the first target number is determined from the third conversion number and the sixth conversion number, the second target number is determined from the fourth conversion number and the sixth conversion number.
S403, obtaining conversion ratio information between the target object and the first object.
In the embodiment of the application, the first object is a target resource conversion platform, which can be a mechanism such as a bank. The conversion ratio information includes: the first electronic resource and the second electronic resource have a first conversion ratio at a first conversion time and a second conversion ratio at a second conversion time.
S404, selecting target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number.
In the embodiment of the application, the first conversion time is the same as the third conversion time, and the second conversion time is later than the first conversion time. The process of determining the target transition time may be: calculating a first conversion number of second electronic resources obtained by converting the resources at a first conversion time according to the first conversion ratio and the first target number, and calculating a second conversion number of second electronic resources obtained by converting the resources at a second conversion time according to the second conversion ratio and the first target number; if the second conversion number is larger than the first conversion number, and the first conversion number is larger than the second target number, calculating a time interval between the second conversion time and the first conversion time, and calculating the number of electronic resource losses generated by the second electronic resources with the second target number according to the time interval; calculating a quantity difference between the second conversion quantity and the electronic resource loss quantity; if the number difference is less than or equal to the first conversion number, the first conversion time is determined as the target conversion time, and if the number difference is greater than the first conversion number, the second conversion time is determined as the target conversion time.
In an embodiment, the method for determining the electronic resource loss amount may be: an electronic resource loss ratio is obtained, and an electronic loss amount is determined based on the electronic resource loss ratio, a time interval between the first transition time and the second transition time, the first target amount, and the second target amount.
And S405, performing resource conversion processing according to the target conversion rate matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
In the embodiment of the application, all or part of the first electronic resources of the target object can be transferred to the first object according to the target object conversion rule. The target object transformation rules may vary from application scenario to application scenario. The target transition time may be the first transition time or the second transition time.
In one embodiment, the target transition time is a first transition time. And transferring part of the first electronic resources of the target object to the first object at a specific time in the first conversion time according to the first conversion ratio and the set percentage, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object.
In one embodiment, the untransferred first electronic resource of the target object may be used in response to a fourth resource conversion request of a fifth object, which may be used to request conversion of the fourth electronic resource into the first electronic resource, the fifth object being a merchant in the electronic resource conversion transaction.
In one embodiment, the target object is a first resource conversion platform and the first object is a second resource conversion platform. At this time, the electronic resources and the number thereof held by the first resource conversion platform may be: a first electronic resource (5000), a second electronic resource (-33447.5). Referring to fig. 5c, the process of performing resource conversion by the first resource conversion platform and the second resource conversion platform may be: at the target conversion time, the second resource conversion platform obtains a first conversion ratio (e.g., 6.6896), the first resource conversion platform obtains a set percentage (e.g., 90%), the first resource conversion platform transfers part of the first electronic resources to the second resource conversion platform, i.e., 90% by 5000=4500 of the first electronic resources, and the second resource conversion platform transfers a corresponding amount of the second electronic resources to the first resource conversion platform, i.e., 4500 by 6.6896= 30103.2. At this time, the electronic resources held by the first resource conversion platform and the number thereof are: a first electronic resource (500), a second electronic resource (-3344.3).
In one embodiment, the target transition time is a second transition time. And transferring all or part of the first electronic resources of the target object to the first object according to a second conversion ratio at a second conversion time, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object.
According to the method provided by the embodiment of the application, for different objects of the same group of electronic resources, unified processing can be performed, so that complex electronic resource conversion flow is reduced, and the electronic resource settlement efficiency of the target object and the second object is improved; for a group of electronic resources which cannot be directly converted, indirect conversion can be realized on the basis of a certain electronic resource, so that the flexibility of electronic resource settlement is increased; the method comprises the steps of obtaining a plurality of conversion times, determining target conversion time according to the conversion ratio, improving flexibility of electronic resource flat-plate time of a target object and a first object, and guaranteeing risk of electronic resource conversion transaction of the target object; when the first object is subjected to resource conversion, part or all of the electronic resources can be converted, so that a partial resource conversion strategy of the target object is realized, and the reliability of the target object is enhanced.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a resource conversion device according to an embodiment of the present application, and an image processing device according to an embodiment of the present application includes, but is not limited to:
An obtaining unit 601, configured to obtain electronic resource information of a target object, where the electronic resource information includes: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
A processing unit 602, configured to obtain conversion ratio information between the target object and the first object, where the conversion ratio information includes: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
The processing unit 602 is further configured to select a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
the processing unit 602 is further configured to perform resource conversion processing at the target conversion time according to a target conversion ratio that matches the target conversion time, transfer all or part of the first electronic resources of the target object to the first object, and obtain a corresponding number of second electronic resources transferred from the first object to the target object.
In an embodiment, the processing unit 602 is specifically configured to, when selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number: calculating a first conversion number of second electronic resources obtained by converting the resources at the first conversion time according to the first conversion ratio and the first target number; calculating a second conversion number of a second electronic resource obtained by converting the resource at the second conversion time according to the second conversion ratio and the first target number; and selecting target conversion time from the first conversion time and the second conversion time according to the second target number, the first conversion number and the second conversion number.
In an embodiment, the second conversion time is later than the first conversion time, and the processing unit 602 is specifically configured to, when selecting a target conversion time from the first conversion time and the second conversion time according to the second target number, the first conversion number, and the second conversion number: if the second conversion number is greater than the first conversion number, the first conversion number is greater than the second target number, calculating a time interval between the second conversion time and the first conversion time; according to the time interval, calculating the quantity of electronic resource losses generated by the second electronic resources with the second target quantity; calculating a quantity difference between the second conversion quantity and the electronic resource loss quantity; if the number difference is less than or equal to the first conversion number, determining the first conversion time as a target conversion time; and if the number difference is larger than the first conversion number, determining the second conversion time as a target conversion time.
In an embodiment, the processing unit 602 is further configured to: receiving a first resource conversion request of a second object, wherein the first resource conversion request is used for requesting to convert the first electronic resource into the second electronic resource, and the first resource conversion request comprises a third conversion number and a third conversion time of the first electronic resource; determining a third conversion ratio between the target object and the second object, the third conversion ratio being a conversion ratio of the first electronic resource and the second electronic resource at the third conversion time; performing resource conversion processing according to the third conversion ratio at the third conversion time, acquiring first electronic resources of the third conversion number transferred from the second object to the target object, and transferring second electronic resources of the fourth conversion number to the second object; wherein the fourth number of transitions is determined from the third number of transitions and the third transition ratio; the first target number is determined from the third number of transitions and the second target number is determined from the fourth number of transitions.
In an embodiment, the processing unit 602 is further configured to: receiving a second resource conversion request of a third object, wherein the second resource conversion request is used for requesting to convert the second electronic resource into the first electronic resource at the third conversion time, and the second resource conversion request comprises a fifth conversion quantity of the second electronic resource; determining a sixth conversion number according to the third conversion ratio and the fifth conversion number; acquiring second electronic resources of the fifth conversion number transferred from the third object to the target object at the third conversion time, extracting first electronic resources of the sixth conversion number from first electronic resources of the third conversion number transferred from the second object to the target object, and transferring the first electronic resources of the sixth conversion number to the third object; wherein the first target number is determined from the third number of transitions and the sixth number of transitions, and the second target number is determined from the fourth number of transitions and the sixth number of transitions.
In an embodiment, the first transition time is the same as the third transition time, and the second transition time is later than the third transition time.
In an embodiment, when the processing unit 602 performs resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, and transfers all or part of the first electronic resources of the target object to the first object, and obtains a corresponding number of second electronic resources transferred from the first object to the target object, the processing unit is specifically configured to: if the target conversion time is the first conversion time, transferring part of first electronic resources of the target object to the first object according to the first conversion ratio and the set percentage at a specific time in the first conversion time, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object; the untransferred first electronic resource of the target object is used when responding to a third resource conversion request, wherein the third resource conversion request is used for requesting to convert the third electronic resource into the first electronic resource.
It may be understood that the functions of each functional unit of the resource conversion device in the embodiment of the present application may be specifically implemented according to the resource conversion method in the embodiment of the method, and the specific implementation process may refer to the related description in the embodiment of the method, which is not repeated herein.
According to the method provided by the embodiment of the application, for different objects of the same group of electronic resources, unified processing can be performed, so that complex electronic resource conversion flow is reduced, and the electronic resource settlement efficiency of the target object and the second object is improved; for a group of electronic resources which cannot be directly converted, indirect conversion can be realized on the basis of a certain electronic resource, so that the flexibility of electronic resource settlement is increased; the method comprises the steps of obtaining a plurality of conversion times, determining target conversion time according to the conversion ratio, and improving flexibility of electronic resource flat-disc time of a target object and a first object; when the first object is subjected to resource conversion, part or all of the electronic resources can be converted, so that a partial resource conversion strategy of the target object is realized, and the reliability of the target object is enhanced.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the application. The computer device described in the embodiment of the application comprises: a processor 701, a communication interface 702 and a memory 703. The processor 701, the communication interface 702, and the memory 703 may be connected by a bus or other means, for example, in the embodiment of the present application.
The processor 701 (or CPU (Central Processing Unit, central processing unit)) is a computing core and a control core of the computer device, which can parse various instructions in the computer device and process various data of the computer device, for example: the CPU can be used for analyzing a startup and shutdown instruction sent by a user to the computer equipment and controlling the computer equipment to perform startup and shutdown operation; and the following steps: the CPU may transmit various types of interaction data between internal structures of the computer device, and so on. Communication interface 702 may optionally comprise a standard wired interface, a wireless interface (e.g., wi-Fi, mobile communication interface, etc.), controlled by processor 701 for transceiving data. Memory 703 (Memory) is a Memory device in a computer device for storing programs and data. It will be appreciated that the memory 703 herein may comprise either a built-in memory of the computer device or an extended memory supported by the computer device. The memory 703 provides storage space that stores the operating system of the computer device, which may include, but is not limited to: android systems, iOS systems, windows Phone systems, etc., the application is not limited in this regard.
In an embodiment of the present application, the processor 701 performs the following operations by executing executable program code in the memory 703:
Acquiring electronic resource information of a target object, wherein the electronic resource information comprises: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
Obtaining conversion ratio information between the target object and a first object, the conversion ratio information including: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
Selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
and performing resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
In an embodiment, the processor 701 is specifically configured to, when selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number: calculating a first conversion number of second electronic resources obtained by converting the resources at the first conversion time according to the first conversion ratio and the first target number; calculating a second conversion number of a second electronic resource obtained by converting the resource at the second conversion time according to the second conversion ratio and the first target number; and selecting target conversion time from the first conversion time and the second conversion time according to the second target number, the first conversion number and the second conversion number.
In an embodiment, the second conversion time is later than the first conversion time, and the processor 701 is specifically configured to, when selecting a target conversion time from the first conversion time and the second conversion time according to the second target number, the first conversion number, and the second conversion number: if the second conversion number is greater than the first conversion number, the first conversion number is greater than the second target number, calculating a time interval between the second conversion time and the first conversion time; according to the time interval, calculating the quantity of electronic resource losses generated by the second electronic resources with the second target quantity; calculating a quantity difference between the second conversion quantity and the electronic resource loss quantity; if the number difference is less than or equal to the first conversion number, determining the first conversion time as a target conversion time; and if the number difference is larger than the first conversion number, determining the second conversion time as a target conversion time.
In an embodiment, the processor 701 is further configured to: receiving a first resource conversion request of a second object, wherein the first resource conversion request is used for requesting to convert the first electronic resource into the second electronic resource, and the first resource conversion request comprises a third conversion number and a third conversion time of the first electronic resource; determining a third conversion ratio between the target object and the second object, the third conversion ratio being a conversion ratio of the first electronic resource and the second electronic resource at the third conversion time; performing resource conversion processing according to the third conversion ratio at the third conversion time, acquiring first electronic resources of the third conversion number transferred from the second object to the target object, and transferring second electronic resources of the fourth conversion number to the second object; wherein the fourth number of transitions is determined from the third number of transitions and the third transition ratio; the first target number is determined from the third number of transitions and the second target number is determined from the fourth number of transitions.
In an embodiment, the processor 701 is further configured to: receiving a second resource conversion request of a third object, wherein the second resource conversion request is used for requesting to convert the second electronic resource into the first electronic resource at the third conversion time, and the second resource conversion request comprises a fifth conversion quantity of the second electronic resource; determining a sixth conversion number according to the third conversion ratio and the fifth conversion number; acquiring second electronic resources of the fifth conversion number transferred from the third object to the target object at the third conversion time, extracting first electronic resources of the sixth conversion number from first electronic resources of the third conversion number transferred from the second object to the target object, and transferring the first electronic resources of the sixth conversion number to the third object; wherein the first target number is determined from the third number of transitions and the sixth number of transitions, and the second target number is determined from the fourth number of transitions and the sixth number of transitions.
In an embodiment, the first transition time is the same as the third transition time, and the second transition time is later than the third transition time.
In an embodiment, when the processor 701 performs resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transfers all or part of the first electronic resources of the target object to the first object, and obtains a corresponding number of second electronic resources transferred from the first object to the target object, the processor is specifically configured to: if the target conversion time is the first conversion time, transferring part of first electronic resources of the target object to the first object according to the first conversion ratio and the set percentage at a specific time in the first conversion time, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object; the untransferred first electronic resource of the target object is used when responding to a third resource conversion request, wherein the third resource conversion request is used for requesting to convert the third electronic resource into the first electronic resource.
In a specific implementation, the processor 701, the communication interface 703 and the memory 704 described in the embodiments of the present application may execute an implementation manner of a computer device described in a resource conversion method provided in the embodiments of the present application, or may execute an implementation manner described in a resource conversion device provided in the embodiments of the present application, which is not described herein again.
According to the method provided by the embodiment of the application, for different objects of the same group of electronic resources, unified processing can be performed, so that complex electronic resource conversion flow is reduced, and the electronic resource settlement efficiency of the target object and the second object is improved; for a group of electronic resources which cannot be directly converted, indirect conversion can be realized on the basis of a certain electronic resource, so that the flexibility of electronic resource settlement is increased; the method comprises the steps of obtaining a plurality of conversion times, determining target conversion time according to the conversion ratio, and improving flexibility of electronic resource flat-disc time of a target object and a first object; when the first object is subjected to resource conversion, part or all of the electronic resources can be converted, so that a partial resource conversion strategy of the target object is realized, and the reliability of the target object is enhanced.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program runs on a computer, the computer is caused to execute the resource conversion method according to the embodiment of the application. The specific implementation manner may refer to the foregoing description, and will not be repeated here.
Embodiments of the present application also provide a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the resource conversion method according to the embodiment of the present application. The specific implementation manner may refer to the foregoing description, and will not be repeated here.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of action described, as some steps may be performed in other order or simultaneously according to the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The above disclosure is illustrative only of some embodiments of the application and is not intended to limit the scope of the application, which is defined by the claims and their equivalents.

Claims (11)

1. A method of resource conversion, the method comprising:
Acquiring electronic resource information of a target object, wherein the electronic resource information comprises: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
Obtaining conversion ratio information between the target object and a first object, the conversion ratio information including: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
Selecting a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
and performing resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
2. The method of claim 1, wherein selecting a target transition time from the first transition time and the second transition time based on the first transition ratio, the second transition ratio, the first target number, and the second target number comprises:
Calculating a first conversion number of second electronic resources obtained by converting the resources at the first conversion time according to the first conversion ratio and the first target number;
Calculating a second conversion number of a second electronic resource obtained by converting the resource at the second conversion time according to the second conversion ratio and the first target number;
and selecting target conversion time from the first conversion time and the second conversion time according to the second target number, the first conversion number and the second conversion number.
3. The method of claim 2, wherein the second transition time is later than the first transition time, wherein the selecting a target transition time from the first transition time and the second transition time based on the second target number, the first transition number, and the second transition number comprises:
If the second conversion number is greater than the first conversion number, the first conversion number is greater than the second target number, calculating a time interval between the second conversion time and the first conversion time;
according to the time interval, calculating the quantity of electronic resource losses generated by the second electronic resources with the second target quantity;
calculating a quantity difference between the second conversion quantity and the electronic resource loss quantity;
if the number difference is less than or equal to the first conversion number, determining the first conversion time as a target conversion time;
and if the number difference is larger than the first conversion number, determining the second conversion time as a target conversion time.
4. A method according to any one of claims 1-3, wherein the method further comprises:
Receiving a first resource conversion request of a second object, wherein the first resource conversion request is used for requesting to convert the first electronic resource into the second electronic resource, and the first resource conversion request comprises a third conversion number and a third conversion time of the first electronic resource;
determining a third conversion ratio between the target object and the second object, the third conversion ratio being a conversion ratio of the first electronic resource and the second electronic resource at the third conversion time;
Performing resource conversion processing according to the third conversion ratio at the third conversion time, acquiring first electronic resources of the third conversion number transferred from the second object to the target object, and transferring second electronic resources of the fourth conversion number to the second object;
wherein the fourth number of transitions is determined from the third number of transitions and the third transition ratio; the first target number is determined from the third number of transitions and the second target number is determined from the fourth number of transitions.
5. The method according to claim 4, wherein the method further comprises:
Receiving a second resource conversion request of a third object, wherein the second resource conversion request is used for requesting to convert the second electronic resource into the first electronic resource at the third conversion time, and the second resource conversion request comprises a fifth conversion quantity of the second electronic resource;
Determining a sixth conversion number according to the third conversion ratio and the fifth conversion number;
Acquiring second electronic resources of the fifth conversion number transferred from the third object to the target object at the third conversion time, extracting first electronic resources of the sixth conversion number from first electronic resources of the third conversion number transferred from the second object to the target object, and transferring the first electronic resources of the sixth conversion number to the third object;
wherein the first target number is determined from the third number of transitions and the sixth number of transitions, and the second target number is determined from the fourth number of transitions and the sixth number of transitions.
6. The method of claim 4, wherein the first transition time is the same as the third transition time, and wherein the second transition time is later than the third transition time.
7. The method of claim 6, wherein performing resource conversion processing at the target conversion time according to a target conversion ratio matched with the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding amount of the second electronic resources transferred from the first object to the target object, comprises:
If the target conversion time is the first conversion time, transferring part of first electronic resources of the target object to the first object according to the first conversion ratio and the set percentage at a specific time in the first conversion time, and acquiring a corresponding amount of second electronic resources transferred from the first object to the target object;
The untransferred first electronic resource of the target object is used when responding to a third resource conversion request, wherein the third resource conversion request is used for requesting to convert the third electronic resource into the first electronic resource.
8. A resource conversion device, comprising:
The electronic resource information acquisition unit is used for acquiring the electronic resource information of the target object, and the electronic resource information comprises: a first target number of transferred-in first electronic resources, a second target number of transferred-out second electronic resources; the first electronic resources of the first target number are matched with the second electronic resources of the second target number;
A processing unit, configured to obtain conversion ratio information between the target object and a first object, where the conversion ratio information includes: a first conversion ratio of the first electronic resource and the second electronic resource at a first conversion time and a second conversion ratio at a second conversion time;
The processing unit is further configured to select a target conversion time from the first conversion time and the second conversion time according to the first conversion ratio, the second conversion ratio, the first target number and the second target number;
And the processing unit is further used for carrying out resource conversion processing according to a target conversion ratio matched with the target conversion time at the target conversion time, transferring all or part of the first electronic resources of the target object to the first object, and acquiring a corresponding number of second electronic resources transferred from the first object to the target object.
9. A computer device, comprising: the resource conversion method according to any one of claims 1-7, comprising a processor, a communication interface and a memory, said processor, said communication interface and said memory being interconnected, wherein said memory stores executable program code, said processor being adapted to invoke said executable program code.
10. A computer readable storage medium having stored therein computer instructions which, when run on a computer, cause the computer to implement the resource conversion method of any of claims 1-7.
11. A computer program product, characterized in that the computer program product comprises a computer program or computer instructions which, when executed by a processor, implements the resource conversion method according to any of claims 1-7.
CN202211501085.2A 2022-11-28 2022-11-28 Resource conversion method, device, apparatus, storage medium, and program product Pending CN118096363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211501085.2A CN118096363A (en) 2022-11-28 2022-11-28 Resource conversion method, device, apparatus, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211501085.2A CN118096363A (en) 2022-11-28 2022-11-28 Resource conversion method, device, apparatus, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN118096363A true CN118096363A (en) 2024-05-28

Family

ID=91157985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211501085.2A Pending CN118096363A (en) 2022-11-28 2022-11-28 Resource conversion method, device, apparatus, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN118096363A (en)

Similar Documents

Publication Publication Date Title
CN110443704B (en) Method and device for sending resources in cross-link mode
CN109146490B (en) Block generation method, device and system
CN105389488B (en) Identity identifying method and device
CN110430235B (en) Method, apparatus, storage medium and computing device for cross-chain transmission of authenticatable messages
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN112291305B (en) Code chain construction method and device based on unified identification
CN111639125A (en) Resource circulation method and device based on block chain
CN112070504B (en) Content inspection method and device for blockchain transaction
CN110400217A (en) The regular changing process method and device of intelligent contract
CN112738139A (en) Cross-link access control method and device
CN110660466A (en) Personal health data chaining method and system of Internet of things by combining block chains
CN106296154B (en) Transaction processing method and system
CN114556863A (en) Computer implemented system and method
CN110417742B (en) Method, device and storage medium for cross-link sending, transferring and receiving authenticable message
CN113132459B (en) Distributed storage method, system, storage medium, information data processing terminal
CN112269915B (en) Service processing method, device, equipment and storage medium
CN113762940A (en) Asset management method and device based on block chain and electronic equipment
CN111951112A (en) Intelligent contract execution method based on block chain, terminal equipment and storage medium
CN110059097B (en) Data processing method and device
CN118096363A (en) Resource conversion method, device, apparatus, storage medium, and program product
CN110852744A (en) Method, device, terminal equipment and medium for switching transaction channels
CN112837043B (en) Block chain-based data processing method and device and electronic equipment
CN113987598A (en) Block migration method and device
CN114090604A (en) Request processing method and device
CN113762939A (en) Asset management method and device based on block chain and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication