Resource quantity threshold adjustment method and device, computer equipment and storage medium
By adjusting the resource amount threshold, the number of resource conversions between the resource conversion agent platform and the target platform is reduced according to the correlation between the ratio real-time volatility and the reference volatility, the problem of excessive resource conversions between the resource conversion agent platform and the target platform is solved, and energy and computing resources are saved.
Patent Information
- Application Number
- CN202410011179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
The number of resource conversions between the resource conversion agent platform and the target resource conversion platform is too high, resulting in an increase in energy consumption.
By determining the ratio real-time volatility at the current time point and the ratio reference volatility of the historical time period, the resource amount threshold is adjusted to trigger the reduction of exposure when the resource conversion accumulation reaches the adjusted threshold and reduce the number of resource conversion times with the target resource conversion platform.
While maintaining the timeliness and stability of resource conversion, reduce the number of resource conversion times with the target resource conversion platform and save energy and computer computing resources.
Smart Images

Figure CN120256080A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and in particular, to a method and apparatus for adjusting a resource quantity threshold, a computer device, and a storage medium. Background Art
[0002] With the development of science and technology, in order to ensure the security of a target resource conversion platform and avoid direct resource conversion between a resource conversion requester and the target resource conversion platform, a resource conversion proxy platform has emerged. The resource conversion proxy platform acts as an agent for the target resource conversion platform. The resource conversion requester can first perform resource conversion with the resource conversion proxy platform, and then the resource conversion proxy platform performs resource conversion with the target resource platform. For example, a resource conversion requester A can request to perform resource conversion with the resource conversion proxy platform to exchange resources of a first resource type with a certain resource quantity belonging to the resource conversion requester A for resources of a second resource type belonging to the resource conversion proxy platform. Subsequently, the resource conversion proxy platform can exchange resources of the second resource type of the target resource platform by using the resources of the first resource type with a certain resource quantity received from the resource conversion requester A.
[0003] Currently, after the resource conversion proxy platform performs resource conversion with the resource conversion requester once, the resource conversion proxy platform needs to perform resource conversion with the target resource conversion platform once, which greatly increases the number of resource conversions between the resource conversion proxy platform and the target resource conversion platform, and further increases the energy such as electricity consumed during resource conversion with the target resource conversion platform. Summary of the Invention
[0004] Based on this, it is necessary to provide a method and apparatus for adjusting a resource quantity threshold, a computer device, a computer-readable storage medium, and a computer program product that can save energy for the above technical problems.
[0005] In a first aspect, this application provides a method for adjusting a resource quantity threshold, and the method includes:
[0006] Determine the current time period in which the current time point is located, and determine the ratio real-time volatility according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is the ratio used for resource conversion between a specified pair of resource types; the pair of resource types includes a first resource type;
[0007] Determine a plurality of historical time periods corresponding to the current time point;
[0008] For each historical time period among the plurality of historical time periods, determine the ratio historical volatility of the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period;
[0009] Determine a ratio reference volatility based on the respective ratio historical volatilities of the multiple historical time periods.
[0010] Adjust the resource quantity threshold corresponding to the resource type pair according to the correlation between the ratio real-time volatility and the ratio reference volatility; the adjusted resource quantity threshold is used to trigger a reduction of the exposure when the exposure of the first resource type accumulated by resource conversion based on the resources of the resource type pair reaches the adjusted resource quantity threshold.
[0011] In a second aspect, the present application also provides a device for adjusting a resource quantity threshold, the device comprising:
[0012] A ratio real-time volatility determination module, configured to determine the current time period in which the current time point is located, and determine the ratio real-time volatility according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is a ratio used for resource conversion between a specified resource type pair; the resource type pair includes a first resource type.
[0013] A ratio reference volatility determination module, configured to determine a plurality of historical time periods corresponding to the current time point; for each historical time period in the plurality of historical time periods, determine the ratio historical volatility of the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period; determine the ratio reference volatility according to the respective ratio historical volatilities of the plurality of historical time periods.
[0014] An adjustment module, configured to adjust the resource quantity threshold corresponding to the resource type pair according to the correlation between the ratio real-time volatility and the ratio reference volatility; the adjusted resource quantity threshold is used to trigger a reduction of the exposure when the exposure of the first resource type accumulated by resource conversion based on the resources of the resource type pair reaches the adjusted resource quantity threshold.
[0015] In one embodiment, the current time period includes a first start time point and a first end time point; the resource conversion ratio belonging to the current time period includes the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point; the ratio real-time volatility determination module is further configured to obtain the resource conversion ratio at the first end time point; obtain the resource conversion ratio at the first start time point; determine the ratio real-time volatility according to the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point.
[0016] In one embodiment, the ratio real-time volatility determination module is further configured to receive, through a streaming data receiving service, the resource conversion ratio newly sent by the target resource conversion platform; the streaming data receiving service is a service for receiving the streaming data sent by the target resource conversion platform according to a preset sending frequency; and use the resource conversion ratio newly sent by the target resource conversion platform as the resource conversion ratio at the first ending time point.
[0017] In one embodiment, the ratio real-time volatility determination module is further configured to divide the resource conversion ratio at the first ending time point by the resource conversion ratio at the first starting time point to obtain a first division ratio; subtract 1 from the first division ratio to obtain a first subtraction ratio; and use the absolute value of the first subtraction ratio as the ratio real-time volatility.
[0018] In one embodiment, the ratio reference volatility determination module is further configured to determine a previous time point according to a preset duration and the current time point; determine a time period with the previous time point as the starting time point and the current time point as the ending time point; and divide the time period with the previous time point as the starting time point and the current time point as the ending time point into multiple historical time periods according to a preset time window length and time window moving step size.
[0019] In one embodiment, the targeted historical time period includes a second ending time point and a second starting time point; the resource conversion ratios belonging to the targeted historical time period include the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point; the ratio reference volatility determination module is further configured to obtain the resource conversion ratio at the second ending time point from the resource conversion ratio cache library; obtain the resource conversion ratio at the second starting time point from the resource conversion ratio cache library; and determine the ratio historical volatility of the targeted historical time period according to the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point.
[0020] In one embodiment, the ratio reference volatility determination module is further configured to divide the resource conversion ratio at the second ending time point by the resource conversion ratio at the second starting time point to obtain a second division ratio; subtract 1 from the second division ratio to obtain a second subtraction ratio; and use the absolute value of the second subtraction ratio as the ratio historical volatility of the targeted historical time period.
[0021] In one embodiment, the ratio reference volatility determination module is further configured to determine a ratio historical volatility cache library; using the targeted historical time period as a retrieval index, to check whether the ratio historical volatility of the targeted historical time period is already stored in the ratio historical volatility cache library; if the ratio historical volatility of the targeted historical time period is stored in the ratio historical volatility cache library, then extract the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library.
[0022] In one embodiment, the ratio reference volatility determination module is further configured to superimpose the ratio historical volatilities corresponding to the respective multiple historical time periods to obtain a ratio historical superimposed volatility; determine the number of time periods of the multiple historical time periods, and divide the ratio historical superimposed volatility by the number of time periods of the multiple historical time periods to obtain a ratio reference volatility.
[0023] In one embodiment, the adjustment module is further configured to determine the correlation between the ratio real-time volatility and the ratio reference volatility; according to the correlation between the ratio real-time volatility and the ratio reference volatility, determine the current resource conversion ratio fluctuation state; according to a first corresponding relationship between the preset resource conversion ratio fluctuation state and a threshold, determine the threshold corresponding to the current resource conversion ratio fluctuation state; use the threshold corresponding to the current resource conversion ratio fluctuation state as the adjusted resource quantity threshold corresponding to the resource type pair.
[0024] In one embodiment, the adjustment module is further configured to obtain a plurality of correlation determination conditions; each correlation determination condition includes a first form parameter representing the ratio real-time volatility and a second form parameter representing the ratio reference volatility; traverse the plurality of correlation determination conditions, replace the first form parameter in the traversed correlation determination condition with the ratio real-time volatility, and replace the second form parameter in the traversed correlation determination condition with the ratio reference volatility to obtain a target correlation determination condition; when the target correlation determination condition holds, stop traversing, and use the correlation indicated by the target correlation determination condition as the correlation between the ratio real-time volatility and the ratio reference volatility.
[0025] In one embodiment, the adjustment module is further configured to obtain a second corresponding relationship between the preset correlation and the fluctuation state; according to the second corresponding relationship, determine the fluctuation state corresponding to the correlation between the ratio real-time volatility and the ratio reference volatility; according to the fluctuation state corresponding to the correlation between the ratio real-time volatility and the ratio reference volatility, determine the current resource conversion ratio fluctuation state.
[0026] In one embodiment, the resource quantity threshold adjustment device further includes a resource conversion module, configured to obtain, from the information storage database of the resource conversion agent platform, resource conversion information corresponding to the resource type pair for historical resource conversion on the resource conversion agent platform; determine, according to the resource conversion information, the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform; when the exposure reaches the adjusted resource quantity threshold, determine the inter-platform resource conversion quantity for the resource conversion agent platform and the specified target resource conversion platform according to the exposure; and trigger resource conversion between the resource conversion agent platform and the target resource conversion platform based on the inter-platform resource conversion quantity to reduce the exposure.
[0027] In a third aspect, the present application further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in any one of the resource quantity threshold adjustment methods provided by the embodiments of the present application are implemented.
[0028] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the resource quantity threshold adjustment methods provided by the embodiments of the present application are implemented.
[0029] In a fifth aspect, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the resource quantity threshold adjustment methods provided by the embodiments of the present application are implemented.
[0030] The above resource quantity threshold adjustment method, device, computer device, storage medium, and computer program product can determine the real-time volatility ratio of the current time period in which the current time point is located by determining the current time point; by determining the current time point, multiple historical time periods corresponding to the current time point can be determined, and thus, based on the historical volatility ratios of the ratios corresponding to the respective historical time periods, a reference volatility ratio for reference can be determined. By determining the reference volatility ratio of the ratio and the real-time volatility ratio of the ratio, an adjusted resource quantity threshold can be determined based on the correlation between the reference volatility ratio of the ratio and the real-time volatility ratio of the ratio, so that when the exposure of the first resource type obtained by cumulatively performing resource conversion on the resources based on the resource type pair reaches the adjusted resource quantity threshold, resource conversion with the target resource conversion platform is triggered to reduce the exposure. Since the resource quantity threshold corresponding to the resource type pair is adjusted based on the correlation between the real-time volatility ratio of the ratio and the reference volatility ratio of the ratio, it can achieve a dynamic balance between "reducing the number of resource conversions with the target resource conversion platform" and "promptly performing resource conversion with the target resource conversion platform based on the resource conversion ratio", and on the premise of promptly performing resource conversion with the target resource conversion platform based on the fluctuating resource conversion ratio as much as possible, reduce the number of resource conversions with the target resource conversion platform, thereby achieving the purpose of saving energy such as electricity and computer computing resources consumed during resource conversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is an application environment diagram of the resource quantity threshold adjustment method in an embodiment;
[0032] Figure 2 It is a schematic flowchart of the resource quantity threshold adjustment method in an embodiment;
[0033] Figure 3 It is a schematic overall flowchart of the resource quantity threshold adjustment in an embodiment;
[0034] Figure 4 It is a schematic diagram of resource conversion in an embodiment;
[0035] Figure 5 It is a schematic diagram for determining the current time period in an embodiment;
[0036] Figure 6 It is a schematic diagram for determining the real-time volatility ratio of the ratio in an embodiment;
[0037] Figure 7 It is a schematic diagram for determining the historical time period in an embodiment;
[0038] Figure 8 It is a schematic overall determination flowchart of the reference volatility ratio of the ratio in an embodiment;
[0039] Figure 9 Schematic diagram for extracting the ratio historical volatility in an embodiment
[0040] Figure 10 Schematic diagram for determining the adjusted resource volume threshold in an embodiment
[0041] Figure 11 Schematic diagram for reducing exposure in an embodiment
[0042] Figure 12 Schematic flow diagram of the resource volume threshold adjustment method in a specific embodiment
[0043] Figure 13 Structural block diagram of the resource volume threshold adjustment device in an embodiment
[0044] Figure 14 Internal structure diagram of a computer device in an embodiment
[0045] Figure 15 Internal structure diagram of a computer device in an embodiment Detailed implementation manners
[0046] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The resource volume threshold adjustment method provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, computer device 102 communicates with computer device 104 through a network. The data storage system can store the data that computer device 102 needs to process. The data storage system can be integrated on computer device 104, or placed in the cloud or on other servers. A resource conversion agent platform can be deployed on computer device 102, and a resource conversion requester can perform resource conversion with the resource conversion agent platform. A target resource conversion platform is deployed on computer device 104. The target resource conversion platform can send the resource conversion ratio at each time point to the resource conversion agent platform in the form of streaming data in real time, so that the resource conversion agent platform stores the received resource conversion ratio in the database. The resource conversion agent platform can adjust the resource quantity threshold corresponding to the preset resource type according to the resource conversion ratio received at the current moment and the resource conversion ratio at the historical moment stored in the database. Both computer device 102 and computer device 104 can be terminals or servers. Among them, the terminal can be, but is not limited to, various desktop computers, laptop computers, intelligent voice interaction devices, smart phones, smart home appliances, vehicle-mounted terminals, aircraft, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented by an independent server or a server cluster composed of multiple servers, or a cloud server.
[0048] This application also relates to artificial intelligence. For example, artificial intelligence is used to determine the exposure of resources. Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.
[0049] It should be noted that the "first", "second", and similar terms used in this application do not represent any order, quantity, or importance, but are only used to distinguish different components. Unless the context clearly indicates otherwise, the singular forms "a", "an", or "the" and similar terms do not represent a quantity limitation, but indicate the existence of at least one. The quantity referred to by "multiple" or "multiple copies" and the like mentioned in the embodiments of this application all refer to the quantity of "at least two". For example, "multiple" means "at least two", and "multiple copies" means "at least two copies".
[0050] In one embodiment, as Figure 2 shown, a method for adjusting a resource quantity threshold is provided. Taking the computer device 102 in Figure 1 as an example, the method includes the following steps:
[0051] Step 202, determine the current time period in which the current time point is located, and determine the real-time volatility ratio according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is the ratio used for resource conversion between specified resource type pairs; the resource type pairs include the first resource type.
[0052] Among them, a resource conversion proxy platform is deployed in the computer device 102. The resource conversion proxy platform can be an agent of the target resource conversion platform. The target resource conversion platform can be a resource conversion platform with relatively high security requirements. Therefore, in order to improve the security of the target resource conversion platform, a resource conversion proxy platform can be constructed to reduce the direct resource conversion between the resource conversion requester and the target resource conversion platform. The resource conversion proxy platform can be a resource transfer platform between the resource conversion requester and the target resource conversion platform. That is, the resource conversion requester can convert its own resources with the resources of the target resource conversion platform through the resource conversion proxy platform. The resource can be computer resources or currency, etc. The computer resources can include CPU resources, time slice resources, GPU resources, etc.
[0053] The resource conversion ratio refers to the ratio for resource conversion between specified resource type pairs. For example, the specified resource type pairs can include the first resource type and the second resource type, and the resource conversion ratio can be 1:7, which means that 1 unit of the resource of the first resource type can be converted into 7 units of the resource of the second resource type.
[0054] Specifically, the resource conversion proxy platform determines the current time point and determines the current time period in which the current time point is located. Among them, the current time period in which the current time point is located refers to a period of time including the current time point. For example, the current time period can be a period of time ending with the current time point. After determining the current time period, the resource conversion proxy platform can determine the resource conversion ratio belonging to the current time period. The resource conversion ratio belonging to the current time period is the resource conversion ratio used for resource conversion in the current time period.
[0055] Further, after determining the resource conversion ratio belonging to the current time period, the resource conversion agent platform can determine the real-time volatility of the ratio according to the resource conversion ratio belonging to the current time period. The ratio implementation volatility refers to the degree of fluctuation of the resource conversion ratio within the current time period. The greater the volatility, the greater the degree of change of the resource conversion ratio within the current time period, and the more unstable the resource conversion ratio; the smaller the volatility, the smaller the degree of change of the resource conversion ratio within the current time period, and the more stable the resource conversion ratio.
[0056] In one embodiment, the target resource conversion platform can provide the resource conversion ratio for resource conversion. The target resource conversion platform can determine the resource conversion ratio at a preset time interval and send the determined resource conversion ratio to the resource conversion agent platform. For example, the target resource conversion platform can determine the resource conversion ratio per second and send the resource conversion ratio per second to the resource conversion agent platform. For example, the target resource conversion platform can determine the ratio 1:7 for resource conversion between specified resource type pairs at 12:00:01, and generate a key-value pair "12:00:01 - 1:7" based on the time and the resource conversion ratio, and send the key-value pair to the resource conversion agent platform in real time. The target resource conversion platform can also determine the ratio 1:7.1 for resource conversion between specified resource type pairs at 12:00:02, and generate a key-value pair "12:00:01 - 1:7.1" based on the time and the resource conversion ratio, and send the key-value pair to the resource conversion agent platform in real time. And so on. The resource conversion agent platform can determine the resource conversion ratio belonging to the current time period according to the key in the received key-value pair. For example, when the current time period is 12:00:00 - 12:00:15, the values whose keys are within 12:00:00 - 12:00:15 are all used as the resource conversion ratios belonging to the current time period. The target resource conversion platform refers to the platform for resource conversion. To ensure the security of the target resource conversion platform, a resource conversion agent platform can be set up to isolate the resource conversion requester from directly performing resource conversion with the target resource conversion platform, and the conversion is carried out through the resource conversion agent platform that has passed the security detection to perform resource conversion with the target resource conversion platform.
[0057] In one embodiment, since the target resource conversion platform can send the resource conversion ratio to the resource conversion agent platform in real time, the resource conversion agent platform can generate key-value pairs based on the received resource conversion ratio and the time point when the resource conversion ratio is received. For example, if the resource conversion agent platform receives the resource conversion ratio of 1:7 at 12:00:01, at this time, the resource conversion agent platform can generate the key-value pair "12:00:01 - 1:7". After determining the current time period, the resource conversion agent platform can use the value of the key within the current time period as the resource conversion ratio belonging to the current time period. The resource conversion ratio refers to the conversion rate between two resources. For example, the resource conversion ratio can indicate the amount of the second type of resource that can be exchanged for 1 unit of the first type of resource.
[0058] In one embodiment, since there are multiple resource conversion ratios belonging to the current time period, the degree of fluctuation of each resource conversion ratio belonging to the current time period can be determined, and the real-time ratio volatility can be determined based on the degree of change between the resource conversion ratios belonging to the current time period.
[0059] Step 204, determine multiple historical time periods corresponding to the current time point.
[0060] Specifically, after the resource conversion agent platform determines the current time point, it can also determine multiple historical time periods corresponding to the current time point according to the preset historical time period determination method. The historical time period refers to the time period before the current time period.
[0061] In one embodiment, each 15 seconds can be divided into a time period, and the resource conversion agent platform can use the first preset number of time periods before the current time period as the multiple historical time periods corresponding to the current time point. The preset number can be freely set according to requirements, and this embodiment does not make a limitation here.
[0062] In one embodiment, each 15 seconds can be divided into a time period. The resource conversion agent platform determines the preset number of days before the current time point. For example, it determines the three days before the current time point, and uses the time periods within the preset number of days before as the historical time periods corresponding to the current time point. Among them, the preset number of days before can be freely set according to requirements, and this embodiment does not make a limitation here.
[0063] Step 206, for each historical time period among the multiple historical time periods, determine the historical ratio volatility of the historical time period according to the resource conversion ratio belonging to the targeted historical time period.
[0064] Specifically, after multiple historical time periods are determined, for each historical time period, the resource conversion agent platform performs the following steps. The resource conversion agent platform determines the resource conversion ratio belonging to the targeted historical time period, and determines the historical volatility of the ratio of the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period. Among them, the historical volatility of the ratio of the targeted historical time period refers to the degree of fluctuation of the resource conversion ratio within the targeted historical time period. The greater the volatility, the greater the fluctuation of the resource conversion ratio within the corresponding historical time period, and the more unstable the resource conversion ratio; the smaller the volatility, the smaller the fluctuation of the resource conversion ratio within the corresponding historical time period, and the more stable the resource conversion ratio.
[0065] In one embodiment, since the target resource conversion platform continuously sends resource conversion ratios to the resource conversion agent platform, the resource conversion agent platform can store the received resource conversion ratios in the resource conversion ratio cache library. Thus, after the targeted historical time period is determined, the target resource conversion platform can extract the resource conversion ratios belonging to the targeted historical time period from the resource conversion ratio cache library, and determine the historical volatility of the ratio of the targeted historical time period according to the extracted resource conversion ratios.
[0066] In one embodiment, since there are multiple resource conversion ratios belonging to the targeted historical time period, therefore, the degree of fluctuation of each resource conversion ratio belonging to the targeted historical time period can be determined, and the historical volatility of the ratio of the targeted historical time period can be determined according to the degree of fluctuation between the resource conversion ratios belonging to the targeted historical time period.
[0067] Step 208, determine the reference volatility of the ratio according to the historical volatility of the ratio of each of the multiple historical time periods.
[0068] Specifically, since a historical volatility of the ratio is determined for each historical time period, therefore, after the historical volatilities of the ratios corresponding to each of the multiple historical time periods are determined, the resource conversion agent platform can determine the reference volatility of the ratio according to the historical volatilities of the ratios corresponding to each of the multiple historical time periods. For example, the resource conversion agent platform can count the number of each historical volatility of the ratio, and use the historical volatility of the ratio with the largest number as the reference volatility of the ratio. Alternatively, the resource conversion agent platform performs a weighted sum of the historical volatilities of the ratios to obtain the reference volatility of the ratio. Among them, the reference volatility of the ratio refers to the volatility for reference. The real-time volatility of the ratio can be compared with the reference volatility of the ratio to determine the real fluctuation situation of the current resource conversion ratio.
[0069] Step 210: Adjust the resource quantity threshold corresponding to the resource type pair according to the correlation between the ratio real-time volatility and the ratio reference volatility. The adjusted resource quantity threshold is used to trigger the reduction of the exposure when the exposure of the first resource type accumulated by resource conversion based on the resource type pair reaches the adjusted resource quantity threshold.
[0070] Specifically, the resource conversion agent platform can determine the correlation between the ratio real-time volatility and the ratio reference volatility. For example, it can determine whether the ratio real-time volatility is greater than or less than the ratio reference volatility. After determining the correlation between the ratio real-time volatility and the ratio reference volatility, the resource conversion agent platform can adjust the resource quantity threshold of the specified resource type pair according to this correlation. For example, when the ratio real-time volatility is less than the ratio reference volatility, it is considered that the true fluctuation degree of the resource conversion ratio is small in the current situation, and at this time, the resource quantity threshold of the specified resource type pair can be increased. When the ratio real-time volatility is greater than or equal to the ratio reference volatility, it is considered that the true fluctuation degree of the resource conversion ratio is large in the current situation, and at this time, the resource quantity threshold of the specified resource type pair can be decreased.
[0071] Among them, the resource quantity threshold is the threshold of the resource quantity used to trigger the exposure adjustment. For example, after adjusting the resource quantity threshold of the resource type pair to obtain the adjusted resource quantity threshold, the resource conversion agent platform can determine the exposure of the first resource type accumulated by resource conversion with the resource conversion requester based on the resource type pair, and judge whether the exposure reaches the adjusted resource quantity threshold. If it reaches the adjusted resource quantity threshold, it will conduct resource conversion with the target resource conversion platform to reduce the exposure.
[0072] Among them, the exposure represents the resource quantity difference between the resource quantity transferred in and the resource quantity transferred out within a period of time. For example, the exposure of the first resource type belonging to the resource conversion agent platform represents the difference between the resource quantity of the first resource type transferred into the resource conversion agent platform and the resource quantity of the first resource type transferred out of the resource conversion agent platform within a period of time. Exemplarily, from 8 am until the current time point, when the resource quantity of the first resource type transferred into the resource conversion agent platform is 100 and the resource quantity of the first resource type transferred out of the resource conversion agent platform is 50, the exposure of the first resource type belonging to the resource conversion agent platform is 100 - 50 = 50.
[0073] In one embodiment, when the exposure of the first resource type belonging to the resource conversion agent platform reaches the adjusted resource quantity threshold, the resource conversion agent platform generates a resource conversion request based on the exposure and sends the resource conversion request to the target resource conversion platform, so as to perform resource conversion between the resources of the first resource type and the resources of the second resource type through the resource conversion request between the resource conversion agent platform and the target resource conversion platform, and reduce the exposure of the first resource type belonging to the resource conversion agent platform. For example, in the above example, when the adjusted resource quantity threshold is 50, the exposure of the first resource type belonging to the resource conversion agent platform reaches the adjusted resource quantity threshold. At this time, the resource conversion agent platform needs to generate a resource conversion request and send the resource conversion request to the target resource conversion platform to transfer 50 resources of the first resource type to the target resource conversion platform and obtain the resources of the second resource type with the corresponding resource quantity of the target resource conversion platform. Since the resource conversion agent platform transfers 50 resources of the first resource type to the target resource conversion platform again, the quantity of the resources of the first resource type transferred into the resource conversion agent platform from 8:00 am to the current time point is 100, and the quantity of the resources of the first resource type transferred out of the resource conversion agent platform is also 100. At this time, the exposure of the first resource type belonging to the resource conversion agent platform is 0, and compared with the previous exposure of 50, the resource conversion agent platform reduces the exposure of the first resource type.
[0074] In one embodiment, to better understand the above embodiment, the overall process of the above embodiment is described below. Refer to Figure 3 , the resource conversion agent platform is provided with an exposure management system and a streaming data receiving service. The streaming data receiving service can receive the resource conversion ratio pushed by the target resource conversion platform in real time, so that the exposure management system can determine the real-time volatility of the ratio according to the real-time resource conversion ratio pushed by the target resource conversion platform. The resource conversion agent platform is also provided with a resource conversion ratio cache library. After the exposure management system determines multiple historical time periods, the exposure management system can extract the resource conversion ratios corresponding to each historical time period from the resource conversion ratio cache library and determine the reference volatility of the ratio according to each resource conversion ratio. The exposure management system can obtain the preset association relationship determination condition, determine the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio according to the preset association relationship determination condition, and adjust the resource quantity threshold of the resource conversion type pair according to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio. Figure 3 Fig. shows the overall process schematic diagram of the resource quantity threshold adjustment in one embodiment.
[0075] Since the resource conversion proxy platform is actually a resource transfer platform between the resource conversion requester and the target resource conversion platform, in the traditional method, after each resource conversion between the resource conversion proxy platform and the resource conversion requester, the resource conversion proxy platform needs to perform a resource conversion with the target resource conversion platform to make the exposure of the first resource type as close to zero as possible. For example, referring to Figure 4 , when the resource conversion requester exchanges 100 resources of the first resource type of its own for the corresponding amount of resources of the second resource type of the first resource conversion proxy platform, the resource conversion platform needs to transfer the 100 resources of the first resource type obtained from the resource conversion requester to the target resource conversion platform to exchange for the corresponding amount of resources of the second resource type of the target resource conversion platform; when the resource conversion requester exchanges a certain amount of resources of the second resource type of its own for 200 resources of the first resource type of the resource conversion proxy platform, the resource conversion platform needs to transfer the certain amount of resources of the second resource type obtained from the resource conversion requester to the target resource conversion platform to exchange for 200 resources of the first resource type of the target resource conversion platform. However, performing a resource conversion with the target resource conversion platform every time after a resource conversion with the resource conversion requester greatly increases the number of resource conversions with the target resource conversion platform, resulting in a waste of energy such as electricity used for resource conversion. Figure 4 FIG. shows a schematic diagram of resource conversion in an embodiment.
[0076] Over a period of time, a resource conversion requester may conduct multiple resource conversions with a resource conversion agent platform. For example, from 8 o'clock today until the current time point, the resource conversion agent platform has received 3 resource conversion requests. Resource conversion request 1: The resource conversion requester A exchanges 100 portions of resources of the first resource type of its own for the corresponding amount of resources of the second resource type from the resource conversion agent platform. Resource conversion request 2: The resource conversion requester B exchanges the corresponding amount of resources of the second resource type of its own for 100 portions of resources of the first resource type from the resource conversion agent platform. Resource conversion request 3: The resource conversion requester C exchanges 200 portions of resources of the first resource type of its own for the corresponding amount of resources of the second resource type from the resource conversion agent platform. Among them, the corresponding amount of resources is the amount of resources calculated according to the resource conversion rate. Since the resource conversion requester A transfers 100 portions of resources of the first resource type of its own to the resource conversion agent platform, and the resource conversion requester B requests to obtain 100 portions of resources of the first resource type from the resource conversion agent platform, therefore, for the resource conversion agent platform, resource conversion request 1 and resource conversion request 2 can be internalized and offset. That is, the resource conversion agent platform can transfer the 100 portions of resources of the first resource type obtained from the resource conversion requester A to the resource requester B, without having to conduct a resource conversion with the target resource conversion platform after conducting a resource conversion with the resource conversion requester A to transfer the resources of the first resource type obtained from the resource conversion requester A to the target resource conversion platform; and without having to conduct a resource conversion with the target resource conversion platform after conducting a resource conversion with the resource conversion requester B to obtain the resources of the first resource type advanced to the resource conversion requester B from the target resource conversion platform. Among them, the unit of the amount of resources is "portion".
[0077] Therefore, the actual amount of resources that the resource conversion agent platform needs to conduct a resource conversion with the target resource conversion platform is the "200 portions of resources of the first resource type" in resource conversion request 3. And this "200 portions of resources of the first resource type" is the exposure of the first resource type accumulated through resource conversion based on the resources of the first resource type as described above. Therefore, this exposure of the first resource type is the actual amount of resources that needs to be converted with the target resource conversion platform. After determining the actual amount of resources that needs to be converted with the target resource conversion platform in this application, and then conducting a resource conversion with the target resource conversion platform, compared with the traditional method of conducting a resource conversion with the target resource conversion platform every time a resource conversion is conducted with a resource conversion requester, this application can reduce the number of resource conversions with the target resource conversion platform, thereby saving energy such as electricity consumed during the resource conversion with the target resource conversion platform.
[0078] In addition, this application adjusts the resource quantity threshold according to the correlation between the ratio real-time volatility and the ratio reference volatility, and when the exposure of the first resource type reaches the adjusted resource quantity threshold, the conversion of the resources of the first resource type is carried out with the target resource conversion platform. Among them, when it is determined that the resource conversion ratio fluctuates violently under the current circumstances based on the correlation between the ratio real-time volatility and the ratio reference volatility, the resource quantity threshold is reduced; when it is determined that the resource conversion ratio fluctuates smoothly under the current circumstances based on the correlation between the ratio real-time volatility and the ratio reference volatility, the resource quantity threshold is increased. Therefore, the smaller the resource quantity threshold is, the less time is required for the exposure to reach the resource quantity threshold. When the resource conversion ratio fluctuates violently under the current circumstances, by reducing the resource quantity threshold, the interval period for resource conversion between the resource conversion agent platform and the target resource conversion platform can be reduced, enabling the resource conversion agent platform to carry out resource conversion with the target resource conversion platform in a timely manner through the continuously fluctuating resource conversion ratio.
[0079] When the resource conversion ratio fluctuates smoothly, by increasing the resource quantity threshold, the time to reach the resource quantity threshold can be increased. And the longer the time is, the more resource conversion requests for resource conversion with the resource requester are received. When more resource conversion requests are received, the number of internalization netting between resource conversion requests is more. Compared with the traditional method of carrying out resource conversion with the target resource conversion platform every time after carrying out resource conversion with the resource conversion requester, when the number of internalization netting between resource conversion requests is more, the number of times of resource conversion between the resource conversion agent platform and the target resource conversion platform is less, thus saving energy such as electricity and computer operation resources consumed during resource conversion with the target resource conversion platform. Moreover, when the number of internalization netting between resource conversion requests is more, the resource quantity of resource conversion between the resource conversion agent platform and the target resource conversion platform is less, saving the computer operation resources consumed during a large amount of resource conversion.
[0080] In summary, in the above resource volume threshold adjustment method, by determining the current time point, the real-time volatility ratio of the current time period in which the current time point is located can be determined; by determining the current time point, multiple historical time periods corresponding to the current time point can be determined, so as to determine the reference volatility ratio for reference based on the historical volatility ratios of the respective historical time periods. By determining the reference volatility ratio and the real-time volatility ratio, the adjusted resource volume threshold can be determined based on the correlation between the reference volatility ratio and the real-time volatility ratio, so that when the exposure of the first resource type obtained by accumulating the resources based on the resource type pair reaches the adjusted resource volume threshold, a resource conversion with the target resource conversion platform is triggered to reduce the exposure. Since the resource volume threshold corresponding to the resource type pair is adjusted through the correlation between the real-time volatility ratio and the reference volatility ratio, a dynamic balance can be achieved between "reducing the number of resource conversions with the target resource conversion platform" and "promptly performing resource conversions with the target resource conversion platform based on the resource conversion ratio". On the premise of promptly performing resource conversions with the target resource conversion platform based on the fluctuating resource conversion ratio as much as possible, the number of resource conversions with the target resource conversion platform is reduced, thereby achieving the purpose of saving energy such as electricity and computer computing resources consumed during resource conversion.
[0081] In one embodiment, the current time period includes a first start time point and a first end time point; the resource conversion ratio belonging to the current time period includes the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point; the above method further includes: obtaining the resource conversion ratio at the first end time point; obtaining the resource conversion ratio at the first start time point; determining the real-time volatility ratio according to the resource conversion ratio belonging to the current time period, including: determining the real-time volatility ratio according to the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point.
[0082] Specifically, the current time period includes a start time point and an end time point. For the convenience of description, the start time point of the current time period is hereinafter referred to as the first start time point, and the end time point of the current time period is hereinafter referred to as the first end time point. Refer to Figure 5 , after determining the current time point, the resource conversion agent platform takes the current time point as the first end time point, and determines a preset first duration. According to the preset first duration and the first end time point, the first start time point is determined. According to the first end time point and the first start time point, the current time period is determined. For example, the preset first duration can be 15 seconds. When the current time point is 12:00:15, the resource conversion agent platform can determine the first start time point as 12:00:00, and the current time period as 12:00:00 - 12:00:15. Figure 5Shows a schematic diagram of the determination of the current time period in one embodiment.
[0083] Further, after determining the current time period, the resource conversion agent platform can determine the resource conversion ratio belonging to the current time period. For example, the resource conversion agent platform can use the resource conversion ratio received at the current time point as the resource conversion ratio at the first end time point sent by the resource platform; and, the resource conversion agent platform can extract the resource conversion ratio received at the first start time point from the resource conversion ratio cache library, and use the extracted resource conversion ratio as the resource conversion ratio at the first start time point sent by the resource platform. Further, the resource conversion agent platform takes the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point together as the resource conversion ratio belonging to the current time period, and then determines the ratio real-time volatility based on the resource conversion ratio belonging to the current time period.
[0084] In one embodiment, the resource conversion ratio at the first start time point can also be the ratio used for resource conversion at the first start time point, or the resource conversion ratio sent by the target resource conversion platform at the first start time point, or the resource conversion ratio received by the resource conversion agent platform at the first start time point. Correspondingly, the resource conversion ratio at the first end time point can be the ratio used for resource conversion at the first end time point, or the resource conversion ratio sent by the target resource conversion platform at the first end time point, or the resource conversion ratio received by the resource conversion agent platform at the first end time point.
[0085] In the above embodiment, compared with determining the ratio real-time volatility by more than two resource conversion ratios, in this embodiment, by obtaining two resource conversion ratios at the head and the tail, the ratio real-time volatility can be quickly determined based on the two resource conversion ratios, thereby improving the determination efficiency of the ratio real-time volatility.
[0086] In one embodiment, obtaining the resource conversion ratio at the first end time point sent by the target resource conversion platform includes: receiving the latest resource conversion ratio sent by the target resource conversion platform through the streaming data receiving service; the streaming data receiving service is a service for receiving the streaming data sent by the target resource conversion platform at a preset sending frequency; and using the latest sent resource conversion ratio as the resource conversion ratio at the first end time point.
[0087] Specifically, a streaming data receiving service is deployed in the resource conversion agent platform, and streaming data can be received through the streaming data receiving service. Since the target resource conversion platform continuously sends the resource conversion ratio to the resource conversion agent platform, the target resource conversion platform can convert the resource conversion ratio into a streaming data format and send the resource conversion ratio in the streaming data format to the resource conversion agent platform through the streaming channel established with the resource conversion agent platform. Then, the resource conversion agent platform can receive the resource conversion ratio in the streaming data format sent by the target resource conversion platform through the streaming data receiving service.
[0088] Furthermore, the resource conversion agent platform can use the resource conversion ratio newly received by the streaming data receiving service as the resource conversion ratio at the first ending time point. For example, when the current time point is 12:00:15 and the current time period is 12:00:00 - 12:00:15, 12:00:00 is the first starting time point, 12:00:15 is the first ending time point, and the resource conversion ratio at 12:00:15 is the resource conversion ratio at the first ending time point.
[0089] In one embodiment, refer to Figure 6 , before the target resource conversion agent platform sends the resource conversion ratio, a streaming channel can be established with the resource conversion agent platform through an information exchange protocol, and then the latest resource conversion ratio can be actively and continuously pushed to the resource conversion agent platform through the streaming channel. It is easy to understand that when the resource conversion agent platform receives the resource conversion ratio through the streaming data receiving service, the streaming data receiving service can store the resource conversion ratio in the resource conversion ratio cache library. The streaming data receiving service extracts the resource conversion ratio at the first starting time point from the resource conversion ratio cache library and calculates the ratio real-time volatility based on the newly received resource conversion ratio and the resource conversion ratio at the first starting time point. Figure 6 Shows a schematic diagram of the determination of the ratio real-time volatility in one embodiment.
[0090] In the above embodiment, compared with the resource conversion agent platform obtaining the latest resource conversion ratio from the target resource conversion platform by means of inquiry, the streaming data is more frequent and timely. Therefore, by deploying the streaming data receiving service, the resource conversion ratio that is high-frequency and timely can be received through the streaming data receiving service.
[0091] In one embodiment, determining the real-time volatility of the ratio based on the resource conversion ratio at the first ending time point and the resource conversion ratio at the first starting time point includes: dividing the resource conversion ratio at the first ending time point by the resource conversion ratio at the first starting time point to obtain a first division ratio; subtracting 1 from the first division ratio to obtain a first subtraction ratio; and taking the absolute value of the first subtraction ratio as the real-time volatility of the ratio.
[0092] Specifically, when the resource conversion agent platform determines the resource conversion ratio at the first ending time point and the resource conversion ratio at the first starting time point, the resource conversion agent platform can divide the resource conversion ratio at the first ending time point by the resource conversion ratio at the first starting time point to obtain a division result, and refer to this division result as the first division ratio. Further, the resource conversion agent platform subtracts 1 from the first division ratio to obtain a subtraction result, and refers to this subtraction result as the first subtraction ratio. The resource conversion agent platform determines the absolute value of the first subtraction ratio and takes the absolute value of the first subtraction ratio as the real-time volatility of the ratio.
[0093] In one embodiment, the resource conversion agent platform determines the real-time volatility of the ratio through the following formula: Volatility_now = |(rate_now_close / rate_now_open) - 1|, where rate_now_close is the resource conversion ratio at the first ending time point and rate_now_open is the resource conversion ratio at the first starting time point.
[0094] In one embodiment, the resource conversion agent platform can also subtract the resource conversion ratio at the first starting time point from the resource conversion ratio at the first ending time point to obtain a third subtraction ratio, divide the third subtraction ratio by the resource conversion ratio at the first starting time point to obtain a third division result, and take the absolute value of the third division result as the real-time volatility of the ratio.
[0095] In one embodiment, the resource conversion agent platform determines the real-time volatility of the ratio through the following formula: Volatility_now = |(rate_now_close - rate_now_open) / rate_now_open|, where rate_now_close is the resource conversion ratio at the first ending time point and rate_now_open is the resource conversion ratio at the first starting time point.
[0096] In the above embodiments, by presetting the real-time volatility calculation formula of the ratio, the real-time volatility of the ratio can be accurately determined based on the real-time volatility calculation formula of the ratio.
[0097] In one embodiment, determining a plurality of historical time periods corresponding to the current time point includes: determining a previous time point according to a preset duration and the current time point; determining a time period with the previous time point as the start time point and the current time point as the end time point; and dividing the time period with the previous time point as the start time point and the current time point as the end time point into a plurality of historical time periods according to a preset time window length and a time window moving step size.
[0098] Specifically, the resource conversion agent platform can determine a preset duration. For the convenience of description, the following will refer to this duration as the second duration, and determine the previous time point according to the preset second duration and the current time point. For example, the second duration can be three days. The resource conversion agent platform can push back three days based on the current time point to obtain the previous time point. Further, the resource conversion agent platform determines a period of time with the previous time point as the start time point and the current time point as the end time point, and refers to the period of time with the previous time point as the start time point and the current time point as the end time point as the previous time period. That is, when the second duration is three days, the resource conversion agent platform can use the previous three days as the previous time period.
[0099] Further, when the previous time period is determined, the resource conversion agent platform can divide the previous time period to obtain a plurality of historical time periods. For example, referring to Figure 7 , the resource conversion agent platform can determine a preset time window length and a time window moving step size, move the time window in the previous time period according to the time moving step size, and use the time period selected by the time window as the historical time period. Figure 7 FIG. shows a schematic diagram of determining historical time periods in one embodiment.
[0100] In one embodiment, the second duration is greater than the first duration, and the first duration can be consistent with the length of the time window. For example, the second duration can be three days and the first duration is 15 seconds. Thus, the resource conversion agent platform can use each 15 - second period in the previous three days as a historical time period.
[0101] In the above - mentioned embodiment, by setting the time window, the previous time period can be smoothly divided into a plurality of historical time periods based on the time window, thereby improving the stability of the division of historical time periods.
[0102] In one embodiment, the targeted historical time period includes a second end time point and a second start time point; the resource conversion ratios belonging to the targeted historical time period include the resource conversion ratio at the second end time point and the resource conversion ratio at the second start time point; the above method further includes: obtaining the resource conversion ratio at the second end time point from the resource conversion ratio cache library; obtaining the resource conversion ratio at the second start time point from the resource conversion ratio cache library; determining the historical volatility of the ratio of the targeted historical time period according to the resource conversion ratios belonging to the targeted historical time period, including: determining the historical volatility of the ratio of the targeted historical time period according to the resource conversion ratio at the second end time point and the resource conversion ratio at the second start time point.
[0103] Specifically, the end time point of the targeted historical time period is called the second end time point, and the start time point of the targeted historical time period is called the second start time point. Further, the resource conversion agent platform can obtain the resource conversion ratio at the second end time point from the resource conversion ratio cache library, and obtain the resource conversion ratio at the second start time point, and determine the historical volatility of the ratio of the targeted historical time period according to the resource conversion ratio at the second end time point and the resource conversion ratio at the second start time point.
[0104] In one embodiment, the data cached in the resource conversion ratio cache library is in the form of key-value pairs. Among them, the key in the key-value pair can be a time point, and the value can be a resource conversion ratio. When it is necessary to find the resource conversion ratio at the second end time point, the resource conversion agent platform can use the second end time point as the retrieval index to check whether there is a key-value pair with the second end time point as the key stored in the resource conversion ratio cache library. If there is a key-value pair with the second end time point as the key, the value in the key-value pair is used as the resource conversion ratio at the second end time point. Correspondingly, the resource conversion agent platform can use the second start time point as the retrieval index to check whether there is a key-value pair with the second start time point as the key stored in the resource conversion ratio cache library. If there is a key-value pair with the second start time point as the key, the value in the key-value pair is used as the resource conversion ratio at the second start time point.
[0105] In the above embodiment, by setting up the resource conversion ratio cache library, the continuously received resource conversion ratios can be cached in the resource conversion ratio cache library. Thus, in the subsequent process of determining the historical volatility of the ratio, the required resource conversion ratios can be directly extracted from the resource conversion ratio cache library. Compared with obtaining the required resource conversion ratios from the target resource conversion platform again, this embodiment greatly improves the acquisition efficiency of the resource conversion ratios.
[0106] In one embodiment, determining the ratio historical volatility of the targeted historical period based on the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point includes: dividing the resource conversion ratio at the second ending time point by the resource conversion ratio at the second starting time point to obtain a second division ratio; subtracting 1 from the second division ratio to obtain a second subtraction ratio; taking the absolute value of the second subtraction ratio as the ratio historical volatility of the targeted historical period.
[0107] Specifically, when the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point are determined, the resource conversion agent platform divides the resource conversion ratio at the second ending time point by the resource conversion ratio at the second starting time point, and refers to the division result as the second division ratio. Further, the resource conversion agent platform subtracts 1 from the second division ratio to obtain a subtraction result, and refers to the subtraction result as the second subtraction ratio. The resource conversion agent platform takes the absolute value of the second subtraction ratio as the ratio historical volatility of the targeted historical period.
[0108] In one embodiment, the resource conversion agent platform determines the ratio historical volatility of the targeted historical period through the following formula: Volatility = |(rate_close / rate_open) - 1|, where rate_close is the resource conversion ratio at the second ending time point and rate_open is the resource conversion ratio at the second starting time point.
[0109] In one embodiment, the resource conversion agent platform may also subtract the resource conversion ratio at the second starting time point from the resource conversion ratio at the second ending time point to obtain a fourth subtraction ratio, divide the fourth subtraction ratio by the resource conversion ratio at the second starting time point to obtain a fourth division result, and take the absolute value of the fourth division result as the ratio historical volatility of the targeted historical period.
[0110] In one embodiment, the resource conversion agent platform determines the ratio historical volatility of the targeted historical period through the following formula: Volatility = |(rate_close - rate_open) / rate_open|, where rate_close is the resource conversion ratio at the second ending time point and rate_open is the resource conversion ratio at the second starting time point.
[0111] In the above embodiments, compared with determining the ratio historical volatility through more than two resource conversion ratios, in this embodiment, the ratio historical volatility is determined through two resource conversion ratios, which can reduce the calculation complexity of the ratio historical volatility and improve the determination efficiency of the ratio historical volatility.
[0112] In one embodiment, referring to Figure 8 , the resource conversion agent platform may store the historical resource conversion ratios in the resource conversion ratio cache library according to the resource type pair and time information. When calculating the ratio reference volatility, the resource conversion agent platform extracts the resource conversion ratios of the last three days from the resource conversion ratio cache library and sorts them according to time. The resource conversion agent platform divides the time window by three more days, takes each 15-second time period as a historical time period, and calculates the ratio historical volatility of the historical time period based on the resource conversion ratios in the historical time period. The resource conversion agent platform stores the calculated ratio historical volatility in the ratio historical volatility cache library and determines the ratio reference volatility based on the calculated ratio historical volatility. Figure 8 FIG. shows a schematic diagram of the overall determination process of the ratio reference volatility in one embodiment.
[0113] In one embodiment, the above method further includes: determining a ratio historical volatility cache library; using the targeted historical time period as a retrieval index to check whether the ratio historical volatility of the targeted historical time period is stored in the ratio historical volatility cache library; if the ratio historical volatility of the targeted historical time period is stored in the ratio historical volatility cache library, extracting the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library.
[0114] Specifically, the resource conversion agent platform may be provided with a ratio historical volatility cache library. The ratio historical volatility cache library stores ratio historical volatilities. When calculating the ratio real-time volatility of the current time period based on the resource conversion ratios belonging to the current time period, the resource conversion agent platform may store the ratio real-time volatility in the ratio historical volatility cache library. In this way, the ratio real-time volatility stored in the ratio historical volatility cache library can be directly used as the ratio historical volatility of a certain historical time period in the future. For example, referring to Figure 9, when the current time period is 12:00:00 - 12:00:15, the resource conversion agent platform can calculate the ratio volatility of 12:00:00 - 12:00:15 and store the ratio volatility of 12:00:00 - 12:00:15 in the ratio historical volatility cache library. It is easy to understand that since the current time is 12:00:15, the ratio volatility of 12:00:00 - 12:00:15 can be called the ratio real-time volatility. When entering the next time period, for example, when entering 12:00:15 - 12:00:30, the resource conversion agent platform can directly extract the ratio volatility of 12:00:00 - 12:00:15 from the ratio historical volatility cache library. Since the current time is 12:00:30, the ratio volatility of 12:00:00 - 12:00:15 extracted from the ratio historical volatility cache library is the ratio historical volatility. Figure 9 Shows a schematic diagram of the extraction of the ratio historical volatility in an embodiment.
[0115] In one embodiment, when it is necessary to extract the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library, the resource conversion agent platform can use the targeted historical time period as a retrieval index and search for the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library through the retrieval index. When the ratio historical volatility of the targeted historical time period is found, the ratio historical volatility is extracted from the ratio historical volatility cache library. If the ratio historical volatility of the targeted historical time period is not found, the ratio historical volatility of the targeted historical time period is calculated based on the resource conversion ratio belonging to the targeted historical time period.
[0116] In the above embodiment, by directly extracting the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library, the acquisition efficiency of the ratio historical volatility can be improved, and further the determination efficiency of the ratio reference volatility can be improved.
[0117] In one embodiment, determining the ratio reference volatility according to the ratio historical volatilities of multiple historical time periods includes: superimposing the ratio historical volatilities corresponding to multiple historical time periods to obtain a ratio historical superimposed volatility; determining the number of time periods of multiple historical time periods, and dividing the ratio historical superimposed volatility by the number of time periods of multiple historical time periods to obtain the ratio reference volatility.
[0118] Specifically, when obtaining the ratio historical volatilities corresponding to multiple historical time periods, the resource conversion agent platform can superimpose the ratio historical volatilities corresponding to multiple historical time periods to obtain a superimposed result, and refer to this superimposed result as the ratio historical superimposed volatility. Further, the resource conversion agent platform determines the number of multiple historical time periods, and refers to this number as the time period number. The resource conversion agent platform divides the ratio historical superimposed volatility by the time period number to obtain a division result, and this division result is the ratio reference volatility. That is to say, the resource conversion agent platform takes the average value of the ratio historical volatilities corresponding to multiple historical time periods as the ratio reference volatility.
[0119] In this embodiment, by taking the average value of the ratio historical volatilities of multiple historical time periods as the ratio reference volatility, the ratio reference volatility can objectively reflect the basic situation of the ratio volatility over a long historical time period. For example, the ratio reference volatility can objectively reflect the change situation of the resource conversion ratio in the previous three days. Since the ratio reference volatility can objectively reflect the basic situation of the ratio volatility over a long historical time period, the ratio reference volatility can be used as the ratio volatility for reference. Subsequently, the ratio real-time volatility can be compared with the ratio reference volatility to determine the fluctuation state of the resource conversion ratio under the current situation.
[0120] In one embodiment, according to the correlation between the ratio real-time volatility and the ratio reference volatility, adjusting the resource quantity threshold corresponding to the resource type pair includes: determining the correlation between the ratio real-time volatility and the ratio reference volatility; determining the current fluctuation state of the resource conversion ratio according to the correlation between the ratio real-time volatility and the ratio reference volatility; determining the threshold corresponding to the current fluctuation state of the resource conversion ratio according to the first correspondence between the resource conversion ratio fluctuation state and the threshold; and taking the threshold corresponding to the current fluctuation state of the resource conversion ratio as the adjusted resource quantity threshold corresponding to the resource type pair.
[0121] Specifically, the resource conversion agent platform can determine the correlation between the ratio real-time volatility and the ratio reference volatility. For example, it can determine whether the ratio real-time volatility is greater than or less than the ratio reference volatility. Further, the resource conversion agent platform determines the current fluctuation state of the resource conversion ratio according to the correlation between the ratio real-time volatility and the ratio reference volatility. The resource conversion ratio fluctuation state reflects the fluctuation state of the resource conversion ratio. For example, the resource conversion ratio fluctuation state can be a stable fluctuation state, a large fluctuation amplitude state, a violent fluctuation state, and so on.
[0122] Further, the resource conversion agent platform may be pre-set with a first correspondence between the resource conversion ratio fluctuation state and the threshold. When the current resource conversion ratio fluctuation state is determined, the resource conversion agent platform can, based on the first correspondence, determine the threshold corresponding to the current resource conversion ratio fluctuation state, and this threshold is the adjusted resource quantity threshold corresponding to the resource type pair.
[0123] In one embodiment, the resource conversion agent platform may store the first correspondence in the form of a table. When the current resource conversion ratio fluctuation state is determined, the resource conversion agent platform searches in the table for the resource conversion ratio fluctuation state that is the same as the current resource conversion ratio fluctuation state, and takes the resource conversion ratio fluctuation state that is the same as the current resource conversion ratio fluctuation state as the target resource conversion ratio fluctuation state. The resource conversion agent platform searches in the table for the threshold corresponding to the target resource conversion ratio fluctuation state, and takes the found threshold as the adjusted resource quantity threshold corresponding to the resource type pair.
[0124] In one embodiment, referring to Figure 10 , in the case where the real-time ratio volatility is less than the reference ratio volatility, the greater the difference between the real-time ratio volatility and the reference ratio volatility, the more likely the current resource conversion ratio fluctuation state is a stable fluctuation state. In the case where the current resource conversion ratio fluctuation state is more likely to be a stable fluctuation state, the adjusted resource quantity threshold can be larger. In the case where the real-time ratio volatility is greater than or equal to the reference ratio volatility, the greater the difference between the real-time ratio volatility and the reference ratio volatility, the more likely the current resource conversion ratio fluctuation state is a violently fluctuating state. In the case where the current resource conversion ratio fluctuation state is more likely to be a violently fluctuating state, the adjusted resource quantity threshold is smaller. In this way, a dynamic balance can be achieved between "reducing the number of resource conversions with the target resource conversion platform" and "performing resource conversions with the target resource conversion platform in a timely manner based on the resource conversion ratio". On the premise of performing resource conversions with the target resource conversion platform in a timely manner based on the fluctuating resource conversion ratio as much as possible, the number of resource conversions with the target resource conversion platform is reduced, achieving the purpose of saving energy such as electricity and computer computing resources consumed during resource conversion. Figure 10 FIG. shows a schematic diagram for determining the adjusted resource quantity threshold in one embodiment.
[0125] In the above embodiment, by comparing the real-time ratio volatility with the average ratio volatility over a long period of historical time, the fluctuation state of the resource conversion ratio in the current situation can be accurately determined according to the comparison result, and then the adjusted resource quantity threshold can be accurately determined based on the accurately determined fluctuation state.
[0126] In one embodiment, determining the correlation between the real-time ratio volatility and the reference ratio volatility includes: obtaining a plurality of correlation determination conditions; each correlation determination condition includes a first formal parameter representing the real-time ratio volatility and a second formal parameter representing the reference ratio volatility; traversing the plurality of correlation determination conditions, replacing the first formal parameter in the traversed correlation determination condition with the real-time ratio volatility, and replacing the second formal parameter in the traversed correlation determination condition with the reference ratio volatility, to obtain a target correlation determination condition; when the target correlation determination condition holds, stop traversing, and use the correlation indicated by the target correlation determination condition as the correlation between the real-time ratio volatility and the reference ratio volatility.
[0127] Specifically, the resource conversion agent platform may be pre-set with a plurality of correlation determination conditions, where each correlation determination condition may include a first formal parameter representing the real-time ratio volatility and a second formal parameter representing the reference volatility. For example, the correlation determination condition may be Volatility_now <= 0.3Volatility, where Volatility_now is the first formal parameter representing the real-time ratio volatility and Volatility is the second formal parameter representing the reference ratio volatility.
[0128] Further, the resource conversion agent platform traverses the plurality of correlation determination conditions. For the traversed correlation determination condition, the resource conversion agent platform replaces the first formal parameter in the traversed correlation determination condition with the real-time ratio volatility and replaces the second formal parameter in the traversed correlation determination condition with the reference ratio volatility to obtain a target correlation determination condition. For example, when the real-time ratio volatility is 0.1, the reference ratio volatility is 0.6, and the traversed correlation determination condition is Volatility_now <= 0.3Volatility, 0.1 can be used to replace Volatility_now and 0.6 can be used to replace Volatility, to obtain the target correlation determination condition 0.1 <= 0.3 * 0.6.
[0129] Further, the resource conversion agent platform determines whether the target correlation relationship determination condition holds. For example, it determines whether 0.1 <= 0.3 * 0.6 holds. If it holds, the traversal stops, and the correlation relationship indicated by the target correlation relationship determination condition is taken as the correlation relationship between the real-time ratio volatility and the reference ratio volatility. For example, when the target correlation relationship determination condition is 0.1 <= 0.3 * 0.6, since 0.1 <= 0.3 * 0.6 holds, the correlation relationship indicated by the target correlation relationship determination condition at this time is that the real-time ratio volatility is less than 0.6 times the reference ratio volatility. It is easy to understand that if the target correlation relationship determination condition does not hold, the traversal continues to determine the next traversed correlation relationship determination condition, and the correlation relationship between the real-time ratio volatility and the reference ratio volatility is determined based on the next traversed correlation relationship determination condition.
[0130] In one embodiment, according to the correlation relationship between the real-time ratio volatility and the reference ratio volatility, the current resource conversion ratio fluctuation state is determined, including: obtaining a second correspondence between the preset correlation relationship and the fluctuation state; according to the second correspondence, determining the fluctuation state corresponding to the correlation relationship between the real-time ratio volatility and the reference ratio volatility; and determining the current resource conversion ratio fluctuation state according to the fluctuation state corresponding to the correlation relationship between the real-time ratio volatility and the reference ratio volatility.
[0131] Specifically, each correlation relationship determination condition is preset with a corresponding fluctuation state. Since each correlation relationship determination condition uniquely specifies a correlation relationship, the correspondence between the correlation relationship determination condition and the fluctuation state is the correspondence between the correlation relationship and the fluctuation state. For the sake of convenient description, the correspondence between the correlation relationship and the fluctuation state is hereinafter referred to as the second correspondence.
[0132] When the target correlation relationship determination condition holds, since the target correlation relationship determination condition is generated by the traversed correlation relationship determination condition, the resource conversion agent platform can determine the fluctuation state corresponding to the traversed correlation relationship determination condition through the second correspondence. The resource conversion agent platform takes the fluctuation state corresponding to the traversed correlation relationship determination condition as the fluctuation state corresponding to the correlation relationship between the real-time ratio volatility and the reference ratio volatility. Further, the resource conversion agent platform determines the current resource conversion ratio fluctuation state according to the fluctuation state corresponding to the correlation relationship between the real-time ratio volatility and the reference ratio volatility. For example, the resource conversion agent platform directly takes the fluctuation state corresponding to the correlation relationship between the real-time ratio volatility and the reference ratio volatility as the current resource conversion ratio fluctuation state.
[0133] For example, since the determination condition for the target association relationship is 0.1 <= 0.3 * 0.6, and 0.1 <= 0.3 * 0.6 holds, the resource conversion agent platform can obtain the fluctuation state corresponding to Volatility_now <= 0.3Volatility as the stable fluctuation state, and use the stable fluctuation state as the fluctuation state corresponding to the association relationship between the ratio real-time volatility and the ratio reference volatility. When it is determined that the fluctuation state corresponding to the association relationship between the ratio real-time volatility and the ratio reference volatility is the stable fluctuation state, it can also be determined that the current resource conversion ratio fluctuation state is also the stable fluctuation state.
[0134] In one embodiment, for a specified pair of resource types, an association relationship determination condition table can be set up, so as to determine the current resource conversion ratio fluctuation state according to the association relationship determination condition table. The association relationship determination table is shown in Table 1:
[0135] Table 1 Association Relationship Determination Table
[0136]
[0137]
[0138] Table 1 records multiple association relationship determination conditions, and records the corresponding relationship between the association relationship determination conditions and the fluctuation states. The resource conversion agent platform can screen out the association relationship determination conditions satisfied by the ratio real-time volatility and the ratio reference volatility from the multiple association relationship determination conditions in Table 1, and use the fluctuation state corresponding to the satisfied association relationship determination condition as the current resource conversion ratio fluctuation state, and use the threshold value corresponding to the current resource conversion ratio fluctuation state as the adjusted resource quantity threshold value.
[0139] In the above embodiment, by presetting the association relationship determination conditions, the current resource conversion ratio fluctuation state can be quickly determined through the preset association relationship determination conditions.
[0140] In one embodiment, the above method further includes: obtaining, from the information storage database of the resource conversion agent platform, the resource conversion information corresponding to the pair of resource types for historical resource conversion on the resource conversion agent platform; determining, according to the resource conversion information, the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform; when the exposure reaches the adjusted resource quantity threshold value, determining the inter-platform resource conversion quantity between the resource conversion agent platform and the specified target resource conversion platform according to the exposure; triggering resource conversion between the resource conversion agent platform and the target resource conversion platform based on the inter-platform resource conversion quantity to reduce the exposure.
[0141] Specifically, refer toFigure 11 In a resource conversion agent platform, an information storage database can be set up. The information storage database stores relevant information on resource conversion between a resource conversion requester and the resource conversion agent platform. For example, when a resource conversion requester initiates a resource conversion request to the resource conversion agent platform, the resource conversion agent platform can extract the request information carried in the resource conversion request and generate resource conversion information based on this request information, and store the resource conversion information in the information storage database. For example, the resource conversion requester requests to exchange 100 resources of the first resource type of its own for 700 resources of the second resource type of the resource conversion platform. Then the request information can be "the resource conversion requester transfers out 100 resources of the first resource type and obtains 700 resources of the second resource type", and the resource conversion information generated based on this request information can be "resource type pair: the first resource type - the second resource type; the amount of resources of the first resource type: +100; the amount of resources of the second resource type: -700".
[0142] Furthermore, the resource conversion agent platform can extract resource conversion information corresponding to a specified resource type pair from the information storage database, that is, extract resource conversion information including "the first resource type - the second resource type". The resource conversion agent platform determines the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform according to the extracted resource conversion information. For example, the resource conversion agent platform adds up the amounts of resources of the first resource type in each resource conversion information to obtain the exposure of the first resource type, and this exposure is also the above-mentioned exposure of the first resource type belonging to the resource conversion agent platform. The resource conversion agent platform determines whether the exposure of the first resource type reaches the adjusted resource amount threshold. If it reaches the adjusted resource amount threshold, it triggers resource conversion between the resource conversion agent platform and the target resource conversion platform to reduce the exposure of the first resource type. Figure 11 Shows a schematic diagram of exposure reduction in an embodiment.
[0143] In one embodiment, when the exposure is reduced, the resource conversion information corresponding to the specified resource type pair in the information storage database is deleted, or the resource conversion information corresponding to the specified resource type pair is stored in another database.
[0144] In one embodiment, the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform can be directly stored in the information storage database, that is, the extracted resource conversion information can include the exposure of the first resource type.
[0145] In the above embodiments, after the exposure reaches the adjusted resource volume threshold, resource conversion is carried out with the target resource conversion platform, which can reduce the number of times of resource conversion with the target resource conversion platform, thereby saving the energy consumed by resource conversion.
[0146] In one embodiment, in addition to pulling the resource conversion ratios of each historical time period, synchronous data can also be pulled in at the same time. For example, the resource conversion ratio on the same day in the same period last year. The ratio reference volatility is calculated through the resource conversion ratios of each historical time period and the synchronous data.
[0147] In one embodiment, the window sizes of the corresponding time windows for different resource types can be different. For some resource types with slower changes in the resource conversion ratio of this application, a larger time window can be set, so as to divide a longer historical time period.
[0148] In one embodiment, in addition to changing the resource volume threshold, the frequency of exposure reduction can also be changed.
[0149] In one embodiment, when the resource threshold changes, especially when changing from a stable fluctuation state to a violently fluctuating state, the exposure can be actively triggered to be reduced.
[0150] In the above embodiments, the exposure management system no longer uses a fixed threshold as the judgment condition for whether to reduce the exposure, but relies on the real-time change information of the resource conversion ratio determined by the resource conversion agent platform, and judges the current fluctuation state of the resource conversion ratio through an algorithm model, and dynamically decides the maximum threshold of the current allowable exposure. The judgment of the resource conversion ratio fluctuation state is not only calculated based on the latest and most real-time resource conversion ratio at present, but also fully refers to the fluctuation of the resource conversion ratio of this resource type in the recent past period of time, so as to more accurately reflect the mutation of the resource conversion ratio of this resource type. And the resource conversion agent platform can set the resource volume threshold in different gears in its different fluctuation states, so that the exposure management of the resource conversion agent platform is more flexible and can better face different fluctuation states. In this way, when the resource conversion agent platform is in a stable fluctuation state, the held exposure can be expanded as much as possible, so as to increase the opportunity of internalized netting; and when the fluctuation changes more violently, the held exposure is smaller or even not held, so as to timely carry out resource conversion with the target resource conversion platform based on the latest resource conversion ratio.
[0151] In one specific embodiment, refer to Figure 12 , Figure 12 shows a method for adjusting the resource volume threshold in an embodiment, including:
[0152] Step 1202, the computer device determines the current time period in which the current time point is located. The current time period includes a first start time point and a first end time point.
[0153] Step 1204, the computer device receives the latest resource conversion ratio sent by the target resource conversion platform through the streaming data receiving service, and uses the latest sent resource conversion ratio as the resource conversion ratio at the first end time point. The streaming data receiving service is a service used to receive the streaming data sent by the target resource conversion platform according to a preset sending frequency.
[0154] Step 1206, the computer device obtains the resource conversion ratio at the first start time point from the resource conversion ratio cache library. The resource conversion ratio is a ratio used for resource conversion between specified resource type pairs. The resource type pairs include a first resource type.
[0155] Step 1208, the computer device divides the resource conversion ratio at the first end time point by the resource conversion ratio at the first start time point to obtain a first division ratio; subtracts 1 from the first division ratio to obtain a first subtraction ratio; and takes the absolute value of the first subtraction ratio as the ratio real-time volatility.
[0156] Step 1210, the computer device determines a previous time point according to a preset duration and the current time point; determines a time period with the previous time point as the start time point and the current time point as the end time point; and divides the time period with the previous time point as the start time point and the current time point as the end time point into multiple historical time periods according to a preset time window length and time window moving step.
[0157] Step 1212, for each historical time period among the multiple historical time periods, the computer device obtains the resource conversion ratio at the second end time point of the targeted historical time period from the resource conversion ratio cache library, and obtains the resource conversion ratio at the second start time point of the targeted historical time period from the resource conversion ratio cache library.
[0158] Step 1214, the computer device divides the resource conversion ratio at the second end time point by the resource conversion ratio at the second start time point to obtain a second division ratio; subtracts 1 from the second division ratio to obtain a second subtraction ratio; and takes the absolute value of the second subtraction ratio as the ratio historical volatility of the targeted historical time period.
[0159] Step 1216, the computer device superimposes the ratio historical volatilities corresponding to the multiple historical time periods to obtain a ratio historical superimposed volatility; determines the number of time periods of the multiple historical time periods, and divides the ratio historical superimposed volatility by the number of time periods of the multiple historical time periods to obtain a ratio reference volatility.
[0160] Step 1218, the computer device obtains multiple association relationship determination conditions; each association relationship determination condition includes a first form parameter representing the real-time volatility of the ratio and a second form parameter representing the reference volatility of the ratio.
[0161] Step 1220, the computer device traverses multiple association relationship determination conditions, replaces the first form parameter in the traversed association relationship determination condition with the real-time volatility of the ratio, and replaces the second form parameter in the traversed association relationship determination condition with the reference volatility of the ratio, to obtain a target association relationship determination condition; when the target association relationship determination condition holds, the traversal stops, and the association relationship indicated by the target association relationship determination condition is used as the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio.
[0162] Step 1222, the computer device obtains a second correspondence between the preset association relationship and the fluctuation state; according to the second correspondence, determines the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio; according to the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio, determines the current resource conversion ratio fluctuation state.
[0163] Step 1224, the computer device determines the threshold corresponding to the current resource conversion ratio fluctuation state according to the first correspondence between the resource conversion ratio fluctuation state and the threshold; uses the threshold corresponding to the current resource conversion ratio fluctuation state as the adjusted resource quantity threshold corresponding to the resource type pair.
[0164] Step 1226, the computer device obtains the resource conversion information corresponding to the resource type pair for historical resource conversion on the resource conversion agent platform from the information storage database of the resource conversion agent platform; according to the resource conversion information, determines the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform.
[0165] Step 1228, when the exposure reaches the adjusted resource quantity threshold, the computer device determines the inter-platform resource conversion quantity for the resource conversion agent platform and the specified target resource conversion platform according to the exposure; based on the inter-platform resource conversion quantity, triggers resource conversion between the resource conversion agent platform and the target resource conversion platform to reduce the exposure.
[0166] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0167] The present application also provides an application scenario, which applies the above resource amount threshold adjustment method. Specifically, the application of the resource amount threshold adjustment method in this application scenario is as follows:
[0168] The resource is specifically memory; the resource conversion requestor is specifically a memory requestor that applies for memory to store the traffic volume; the resource conversion proxy platform is specifically a third-party memory pool, and the target resource conversion platform is specifically a target memory pool. The resource of the first resource type is free memory, and the resource of the second resource type is a memory application voucher for applying for memory. The resource conversion requestor can send its own memory application voucher to the resource conversion proxy platform, so that the resource conversion proxy platform can allocate free memory to the resource conversion requestor. It is easy to understand that the memory application vouchers possessed by the resource conversion requestor are limited. Whenever the resource conversion requestor applies for a portion of memory, the number of thread application vouchers possessed by the resource conversion requestor is decreased by one. When the resource conversion requestor does not have a memory application voucher, the resource conversion requestor cannot apply for memory anymore. When the resource conversion requestor releases memory to the resource conversion proxy platform, the resource conversion proxy platform returns the memory application voucher to the resource conversion requestor. The memory of the resource conversion proxy platform is also obtained by the resource conversion proxy platform applying for it from the target resource conversion platform through a memory application voucher. Whenever the resource conversion proxy platform applies for a portion of memory, the number of memory application vouchers possessed by the resource conversion proxy platform is decreased by one. The amount of memory that can be applied for with one memory application voucher will change, that is, the conversion ratio between the memory application voucher and the memory amount will change. When the memory possessed by the target resource conversion platform decreases, in order to control the amount of memory application, the amount of memory that can be applied for with one memory application voucher can be reduced; when the memory possessed by the target resource conversion platform increases, the amount of memory that can be applied for with one memory application voucher can be increased.
[0169] In this scenario, each resource conversion agent platform can perform the conversion of memory application vouchers and memory through the above method, adjust the resource volume threshold of the first resource type, so that the resource conversion agent platform becomes a memory transfer platform between the resource conversion requester and the target resource conversion platform, and the resource conversion agent platform can reduce the exposure when the exposure of the first resource type reaches the adjusted resource volume threshold.
[0170] This application also provides another application scenario, which applies the above resource volume threshold adjustment method. Specifically, the application of the resource volume threshold adjustment method in this application scenario is as follows:
[0171] The resource conversion requester is specifically a merchant, the resource is specifically currency, the second resource type is specifically currency that is commonly used within a specified area, the first resource type and the second resource type are different types of currency, the resource conversion agent platform is specifically a third-party bank within the corresponding area, the target resource conversion platform is specifically the inter-bank market, and the resource conversion ratio is the exchange rate. The third-party bank can adjust the resource volume threshold of the first type of currency through the above resource volume threshold adjustment method, so as to clear the exposure of its own first type of currency when the exposure of the first type of currency reaches the adjusted resource volume threshold.
[0172] The above application scenario is only for illustrative purposes. It can be understood that the application of the resource volume threshold adjustment method provided by each embodiment of this application is not limited to the above scenario.
[0173] Based on the same inventive concept, the embodiments of this application also provide a resource volume threshold adjustment device for implementing the above-mentioned resource volume threshold adjustment method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the resource volume threshold adjustment device provided below can refer to the limitations on the resource volume threshold adjustment method in the above text, and will not be repeated here.
[0174] In one embodiment, as Figure 13 shown, a resource volume threshold adjustment device 1300 is provided, including: a ratio real-time volatility determination module 1302, a ratio reference volatility determination module 1304, and an adjustment module 1306, where:
[0175] The ratio real-time volatility determination module 1302 is used to determine the current time period in which the current time point is located, and determine the ratio real-time volatility according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is the ratio used for resource conversion between specified resource type pairs; the resource type pair includes the first resource type;
[0176] The ratio reference volatility determination module 1304 is configured to determine a plurality of historical time periods corresponding to the current time point; for each of the plurality of historical time periods, determine the ratio historical volatility of the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period; and determine the ratio reference volatility according to the ratio historical volatilities of the plurality of historical time periods respectively.
[0177] The adjustment module 1306 is configured to adjust the resource quantity threshold corresponding to the resource type pair according to the correlation between the ratio real-time volatility and the ratio reference volatility; the adjusted resource quantity threshold is used to trigger a reduction in the exposure when the exposure of the first resource type obtained by cumulatively converting the resources of the resource type pair reaches the adjusted resource quantity threshold.
[0178] In one embodiment, the current time period includes a first start time point and a first end time point; the resource conversion ratio belonging to the current time period includes the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point; the ratio real-time volatility determination module is further configured to obtain the resource conversion ratio at the first end time point; obtain the resource conversion ratio at the first start time point; and determine the ratio real-time volatility according to the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point.
[0179] In one embodiment, the ratio real-time volatility determination module is further configured to receive the resource conversion ratio newly sent by the target resource conversion platform through a streaming data receiving service; the streaming data receiving service is a service for receiving the streaming data sent by the target resource conversion platform at a preset sending frequency; and use the resource conversion ratio newly sent by the target resource conversion platform as the resource conversion ratio at the first end time point.
[0180] In one embodiment, the ratio real-time volatility determination module is further configured to divide the resource conversion ratio at the first end time point by the resource conversion ratio at the first start time point to obtain a first division ratio; subtract 1 from the first division ratio to obtain a first subtraction ratio; and use the absolute value of the first subtraction ratio as the ratio real-time volatility.
[0181] In one embodiment, the ratio reference volatility determination module is further configured to determine a previous time point according to a preset duration and the current time point; determine a time period starting from the previous time point and ending at the current time point; and divide the time period starting from the previous time point and ending at the current time point into a plurality of historical time periods according to a preset time window length and time window moving step size.
[0182] In one embodiment, the historical time period targeted includes a second end time point and a second start time point; the resource conversion ratios belonging to the targeted historical time period include the resource conversion ratio at the second end time point and the resource conversion ratio at the second start time point; the ratio reference volatility determination module is further configured to obtain the resource conversion ratio at the second end time point from the resource conversion ratio cache library; obtain the resource conversion ratio at the second start time point from the resource conversion ratio cache library; and determine the ratio historical volatility of the targeted historical time period according to the resource conversion ratio at the second end time point and the resource conversion ratio at the second start time point.
[0183] In one embodiment, the ratio reference volatility determination module is further configured to divide the resource conversion ratio at the second end time point by the resource conversion ratio at the second start time point to obtain a second division ratio; subtract 1 from the second division ratio to obtain a second subtraction ratio; and use the absolute value of the second subtraction ratio as the ratio historical volatility of the targeted historical time period.
[0184] In one embodiment, the ratio reference volatility determination module is further configured to determine a ratio historical volatility cache library; use the targeted historical time period as a retrieval index to check whether the ratio historical volatility of the targeted historical time period is already stored in the ratio historical volatility cache library; and if the ratio historical volatility of the targeted historical time period is stored in the ratio historical volatility cache library, extract the ratio historical volatility of the targeted historical time period from the ratio historical volatility cache library.
[0185] In one embodiment, the ratio reference volatility determination module is further configured to superimpose the ratio historical volatilities corresponding to the respective multiple historical time periods to obtain a ratio historical superimposed volatility; determine the number of the multiple historical time periods, and divide the ratio historical superimposed volatility by the number of the multiple historical time periods to obtain a ratio reference volatility.
[0186] In one embodiment, the adjustment module is further configured to determine the correlation between the ratio real-time volatility and the ratio reference volatility; determine the current resource conversion ratio fluctuation state according to the correlation between the ratio real-time volatility and the ratio reference volatility; determine the threshold corresponding to the current resource conversion ratio fluctuation state according to a first correspondence between the preset resource conversion ratio fluctuation state and the threshold; and use the threshold corresponding to the current resource conversion ratio fluctuation state as the adjusted resource quantity threshold corresponding to the resource type pair.
[0187] In one embodiment, the adjustment module is further configured to obtain a plurality of association relationship determination conditions; each association relationship determination condition includes a first formal parameter representing the real-time volatility of a ratio and a second formal parameter representing the reference volatility of the ratio; traverse the plurality of association relationship determination conditions, replace the first formal parameter in the association relationship determination condition being traversed with the real-time volatility of the ratio, and replace the second formal parameter in the association relationship determination condition being traversed with the reference volatility of the ratio to obtain a target association relationship determination condition; when the target association relationship determination condition is satisfied, stop traversing, and use the association relationship indicated by the target association relationship determination condition as the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio.
[0188] In one embodiment, the adjustment module is further configured to obtain a second correspondence between a preset association relationship and a fluctuation state; according to the second correspondence, determine the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio; according to the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio, determine the current resource conversion ratio fluctuation state.
[0189] In one embodiment, the resource amount threshold adjustment device further includes a resource conversion module, configured to obtain, from the information storage database of the resource conversion agent platform, resource conversion information corresponding to the resource type pair for historical resource conversion on the resource conversion agent platform; according to the resource conversion information, determine the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform; when the exposure reaches the adjusted resource amount threshold, determine the inter-platform resource conversion amount for the resource conversion agent platform and a specified target resource conversion platform according to the exposure; based on the inter-platform resource conversion amount, trigger resource conversion between the resource conversion agent platform and the target resource conversion platform to reduce the exposure.
[0190] Each module in the above resource amount threshold adjustment device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.
[0191] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 14As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource quantity threshold adjustment data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a resource quantity threshold adjustment method.
[0192] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 15 shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a resource quantity threshold adjustment method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0193] Those skilled in the art can understand that Figures 14 to 15The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0194] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0195] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0196] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are 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 executes the steps in the above method embodiments.
[0197] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0198] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAMs), magnetoresistive random access memories (MRAMs), ferroelectric random access memories (FRAMs), phase change memories (PCMs), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the various embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0199] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope described in this specification.
[0200] The above embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for adjusting a resource quantity threshold, characterized in that The method includes: Determine the current time period in which the current time point is located, and determine the real-time volatility of the ratio according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is the ratio used for resource conversion between specified resource type pairs; the resource type pairs include the first resource type; Determine multiple historical time periods corresponding to the current time point; For each historical time period among the multiple historical time periods, determine the historical volatility of the ratio for the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period; Determine the reference volatility of the ratio according to the historical volatility of the ratio of each of the multiple historical time periods; Adjust the resource quantity threshold corresponding to the resource type pair according to the correlation between the real-time volatility of the ratio and the reference volatility of the ratio; the adjusted resource quantity threshold is used to trigger a reduction in the exposure when the exposure of the first resource type accumulated by resource conversion based on the resources of the resource type pair reaches the adjusted resource quantity threshold.
2. The method according to claim 1, wherein The current time period includes a first start time point and a first end time point; the resource conversion ratio belonging to the current time period includes the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point; the method further includes: Obtain the resource conversion ratio at the first end time point; Obtain the resource conversion ratio at the first start time point; The determining the real-time volatility of the ratio according to the resource conversion ratio belonging to the current time period includes: Determine the real-time volatility of the ratio according to the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point.
3. The method according to claim 2, characterized in that, The obtaining the resource conversion ratio at the first end time point includes: Receive the resource conversion ratio newly sent by the target resource conversion platform through a streaming data receiving service; the streaming data receiving service is a service used to receive the streaming data sent by the target resource conversion platform at a preset sending frequency; Use the resource conversion ratio newly sent by the target resource conversion platform as the resource conversion ratio at the first end time point.
4. The method according to claim 2, wherein The determining the real-time volatility of the ratio according to the resource conversion ratio at the first end time point and the resource conversion ratio at the first start time point includes: Divide the resource conversion ratio at the first end time point by the resource conversion ratio at the first start time point to obtain a first division ratio; Subtract 1 from the first division ratio to obtain a first subtraction ratio; Use the absolute value of the first subtraction ratio as the real-time volatility of the ratio.
5. The method according to claim 1, characterized in that, The determining the multiple historical time periods corresponding to the current time point includes: Determine a previous time point according to a preset duration and the current time point; Determine the time period with the previous time point as the start time point and the current time point as the end time point; Divide the time period with the previous time point as the start time point and the current time point as the end time point into multiple historical time periods according to a preset time window length and time window moving step size.
6. The method according to claim 1, wherein The targeted historical time period includes a second ending time point and a second starting time point; the resource conversion ratios belonging to the targeted historical time period include the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point; the method further includes: Obtaining the resource conversion ratio at the second ending time point from the resource conversion ratio cache library; Obtaining the resource conversion ratio at the second starting time point from the resource conversion ratio cache library; The determining the historical ratio volatility of the targeted historical time period according to the resource conversion ratios belonging to the targeted historical time period includes: Determining the historical ratio volatility of the targeted historical time period according to the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point.
7. The method according to claim 6, characterized in that, The determining the historical ratio volatility of the targeted historical time period according to the resource conversion ratio at the second ending time point and the resource conversion ratio at the second starting time point includes: Dividing the resource conversion ratio at the second ending time point by the resource conversion ratio at the second starting time point to obtain a second division ratio; Subtracting 1 from the second division ratio to obtain a second subtraction ratio; Taking the absolute value of the second subtraction ratio as the historical ratio volatility of the targeted historical time period.
8. The method according to claim 1, characterized in that, The method further includes: Determining a historical ratio volatility cache library; Using the targeted historical time period as a retrieval index to check whether the historical ratio volatility of the targeted historical time period is already stored in the historical ratio volatility cache library; If the historical ratio volatility of the targeted historical time period is stored in the historical ratio volatility cache library, extracting the historical ratio volatility of the targeted historical time period from the historical ratio volatility cache library.
9. The method according to claim 1, characterized in that, The determining the reference ratio volatility according to the historical ratio volatilities of the respective multiple historical time periods includes: Adding up the historical ratio volatilities corresponding to the respective multiple historical time periods to obtain a historical ratio superposition volatility; Determining the number of time periods of the multiple historical time periods, and dividing the historical ratio superposition volatility by the number of time periods of the multiple historical time periods to obtain a reference ratio volatility.
10. The method according to claim 1, characterized in that, The adjusting the resource quantity threshold corresponding to the resource type pair according to the correlation between the real-time ratio volatility and the reference ratio volatility includes: Determining the correlation between the real-time ratio volatility and the reference ratio volatility; Determining the current resource conversion ratio fluctuation state according to the correlation between the real-time ratio volatility and the reference ratio volatility; Determining the threshold corresponding to the current resource conversion ratio fluctuation state according to a first correspondence between the preset resource conversion ratio fluctuation state and the threshold; Taking the threshold corresponding to the current resource conversion ratio fluctuation state as the adjusted resource quantity threshold corresponding to the resource type pair.
11. The method according to claim 10, characterized in that, The determining the correlation between the real-time ratio volatility and the reference ratio volatility includes: Obtain multiple association relationship determination conditions; each association relationship determination condition includes a first formal parameter representing the real-time volatility of a ratio and a second formal parameter representing the reference volatility of the ratio; Traverse the multiple association relationship determination conditions, replace the first formal parameter in the traversed association relationship determination condition with the real-time volatility of the ratio, and replace the second formal parameter in the traversed association relationship determination condition with the reference volatility of the ratio to obtain a target association relationship determination condition; When the target association relationship determination condition holds, stop traversing, and use the association relationship indicated by the target association relationship determination condition as the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio.
12. The method according to claim 10, characterized in that, Determining the current resource conversion ratio fluctuation state according to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio includes: Obtain a second correspondence between the preset association relationship and the fluctuation state; According to the second correspondence, determine the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio; According to the fluctuation state corresponding to the association relationship between the real-time volatility of the ratio and the reference volatility of the ratio, determine the current resource conversion ratio fluctuation state.
13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: Obtain, from the information storage database of the resource conversion agent platform, the resource conversion information corresponding to the resource type pair for historical resource conversion on the resource conversion agent platform; According to the resource conversion information, determine the exposure accumulated by resource conversion based on the resources of the first resource type on the resource conversion agent platform; When the exposure reaches the adjusted resource quantity threshold, determine the inter-platform resource conversion quantity for the resource conversion agent platform and the specified target resource conversion platform according to the exposure; Based on the inter-platform resource conversion quantity, trigger resource conversion between the resource conversion agent platform and the target resource conversion platform to reduce the exposure.
14. A resource quantity threshold adjustment device, characterized in that, The device includes: A real-time ratio volatility determination module, configured to determine the current time period in which the current time point is located, and determine the real-time ratio volatility according to the resource conversion ratio belonging to the current time period; the resource conversion ratio is a ratio used for resource conversion between a specified resource type pair; the resource type pair includes a first resource type; A reference ratio volatility determination module, configured to determine multiple historical time periods corresponding to the current time point; for each historical time period among the multiple historical time periods, determine the historical ratio volatility of the targeted historical time period according to the resource conversion ratio belonging to the targeted historical time period; determine the reference ratio volatility according to the historical ratio volatilities of the multiple historical time periods; An adjustment module, configured to adjust a resource quantity threshold corresponding to the resource type pair according to the correlation between the real-time volatility of the ratio and the reference volatility of the ratio; the adjusted resource quantity threshold is used to trigger a reduction of the exposure when the exposure of the first resource type accumulated by resource conversion based on the resources of the resource type pair reaches the adjusted resource quantity threshold.
15. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Cited By
Control method for inspection robot in narrow space of power station
CN121635323A