Data processing method and device, equipment, medium and product
By constructing a dual mapping relationship and comprehensively analyzing the permutation rate index under different target dates, combined with the target interest calculation method, the accuracy problem caused by the resource replacement system reliance on a single reference source in the existing technology is solved, and the accuracy of the basic permutation rate is significantly improved. sex.
Patent Information
- Application Number
- CN202411373713.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
When determining the basic permutation rate, existing resource permutation systems rely on a single reference source, resulting in poor accuracy and inability to support multi-dimensional configuration.
By constructing a dual mapping relationship, including the correspondence between resource type and date type and the correspondence between resource type and permutation rate index, flexibly trace back to the target date of working day type based on the number of days to comprehensively consider the target permutation rate under different target dates The index and the target interest calculation method are used to calculate the basic replacement rate.
It significantly improves the accuracy of the basic permutation rate, avoids errors caused by fluctuations in data of a single reference source, and realizes a comprehensive analysis method of multi-dimensional and multi-data sources.
Smart Images

Figure CN119273465A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of big data processing technology, and in particular, relates to a data processing method, device, equipment, medium and product. Background Art
[0002] In the context of the current adjustment of the global financial market structure, the existing resource replacement system is often limited to obtaining the latest basic replacement rate directly from a single benchmark source, and fails to fully support the multi-dimensional configuration after the risk-free benchmark is replaced. As a result, the accuracy of the basic replacement rate determined by the existing resource replacement system is poor. Summary of the invention
[0003] The embodiments of the present application provide a data processing method, apparatus, device, medium and product, which can improve the accuracy of determining the basic replacement rate.
[0004] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0005] Receive a resource replacement request, which includes the target resource type, the number of lookback days, and the target interest calculation method;
[0006] In response to the replacement request, obtaining at least one target date corresponding to the target resource type under the number of days before the current date from the pre-acquired first mapping relationship, wherein the date type of the target date is a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types under multiple dates respectively;
[0007] From the pre-acquired second mapping relationship, acquiring at least one target replacement rate index corresponding to the target resource type on each target date, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates;
[0008] According to at least one target replacement rate index and a target interest calculation method, a basic replacement rate corresponding to the resource replacement request is determined, and the basic replacement rate is output.
[0009] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:
[0010] A receiving module, configured to receive a resource replacement request, wherein the resource replacement request includes a target resource type, a lookback number of days, and a target interest calculation method;
[0011] A first acquisition module is used to, in response to the replacement request, acquire, from a pre-acquired first mapping relationship, at least one target date corresponding to the target resource type under the number of days before the current date, wherein the date type of the target date is a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types under multiple dates respectively;
[0012] A second acquisition module is used to acquire at least one target replacement rate index corresponding to the target resource type on each target date from a pre-acquired second mapping relationship, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates;
[0013] A determination module is used to determine a basic replacement rate corresponding to the resource replacement request according to the at least one target replacement rate index and the target interest calculation method, and output the basic replacement rate.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0015] When the processor executes the computer program instructions, the processor implements any possible implementation method of the first aspect described above.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements a method in any possible implementation method of the first aspect described above.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method as any possible implementation method in the first aspect above.
[0018] In the data processing method, device, equipment, medium and product provided in the embodiments of the present application, a dual mapping relationship is constructed and applied, namely, the correspondence between resource type and date type (first mapping relationship) and the correspondence between resource type and replacement rate index (second mapping relationship). In response to the problem that the traditional resource replacement system relies only on a single reference source, the present application flexibly traces back to at least one target date of the working day type within the look-back days according to the look-back days, thereby being able to comprehensively consider these target replacement rate indices under different target dates, and combining the target interest calculation method, it is possible to calculate the basic replacement rate corresponding to the resource replacement request. This multi-dimensional, multi-data source comprehensive analysis method effectively avoids or reduces the errors caused by fluctuations in a single reference source data, thereby significantly improving the accuracy of the determination of the basic replacement rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 This is one of the flow charts of a data processing method provided in an embodiment of the present application;
[0021] Figure 2 This is a second flow chart of a data processing method provided in an embodiment of the present application;
[0022] Figure 3 This is a third flow chart of a data processing method provided in an embodiment of the present application;
[0023] Figure 4 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0024] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0027] In addition, the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0028] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0029] Thus, in order to solve the problems of the prior art, the embodiments of the present application provide a data processing method, apparatus, device, medium and product.
[0030] The following first introduces the data processing method provided in the embodiment of the present application.
[0031] Figure 1 FIG. 1 is a flow chart of a data processing method provided by an embodiment of the present application. Figure 1 As shown, the data processing method provided in the embodiment of the present application includes the following steps:
[0032] S100, receiving a resource replacement request, wherein the resource replacement request includes a target resource type, a lookback number of days, and a target interest calculation method.
[0033] In the embodiment of the present application, a resource replacement request refers to a specific instruction issued by a user or a system, and the resource replacement request is intended to request an evaluation or conversion operation of a certain resource value.
[0034] The target resource type refers to the resource type that the user wishes to perform a replacement operation on, which can be any asset or resource that has market value and can be traded or converted.
[0035] The number of lookback days is a time parameter that specifies how many dates of a specific type the system should trace back to collect historical data related to the target resource type. This parameter is used to help users or systems evaluate the changing trend of the value of the resources corresponding to the target resource type over a period of time in the past, so as to more accurately determine the current replacement base value. The number of lookback days provides a window for reviewing and analyzing past market dynamics.
[0036] The target interest calculation method (which can be called the value calculation rule) refers to the calculation method or strategy used to determine the results of the replacement operation. The target interest calculation method can be based on a specific mathematical model, historical data analysis or market practice, and is used to convert the collected target replacement rate index into the final basic replacement rate. The choice of the target interest calculation method directly affects the accuracy and fairness of the replacement operation. It defines how to adjust the basic replacement rate according to changes in market conditions.
[0037] In a feasible implementation method of the present application, first, a user-friendly interface can be provided for business personnel to enter the specific information of the resource replacement request. The business personnel enter the code or name of the target resource type through the form on the page, select or enter the value of the look-back days, and select the target interest calculation method from the predefined options. This information can be used as the key parameters of the resource replacement request. After being submitted by the business personnel, the system will encapsulate them into data packets and pass them to the background business logic layer through the internal communication mechanism. At the business logic layer, the system first verifies the legitimacy and integrity of the input data. After confirmation, the data is used as parameters to prepare for subsequent processing procedures.
[0038] S200, in response to the replacement request, obtain at least one target date corresponding to the target resource type in the number of days before the current date from a pre-acquired first mapping relationship, the date type of the target date being a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types on multiple dates respectively.
[0039] In a feasible implementation of the present application, first, a pre-built and maintained mapping relationship (i.e., a resource type-date type mapping table or simply referred to as a first mapping relationship) can be queried according to the target resource type and the specified number of days to look back in the received resource replacement request. This mapping table can be a work calendar table, but it is more general and can cover a variety of resource types and their working status on different dates. The system retrieves all working day dates within the specified number of days to look back before the current date under the target resource type in the mapping table by matching the parameters of the target resource type and the number of days to look back. The working day dates here are determined according to the calendar rules specific to the resource type, excluding non-working days (such as weekends and holidays) under the target resource type, and only retaining those dates that are deemed to be suitable for business operations or evaluations under the target resource type. After the retrieval is completed, the system returns these working day dates as target dates, which will serve as the basis for querying the replacement rate index in subsequent steps. In this way, step S200 effectively extracts the working day dates that match the target resource type and the number of days to look back from the first mapping relationship, providing the necessary date information for the subsequent data processing process.
[0040] S300, obtaining at least one target replacement rate index corresponding to the target resource type on each target date from a pre-acquired second mapping relationship, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates.
[0041] In the embodiments of the present application, the replacement rate index is a key indicator for quantitatively evaluating the value conversion or exchange ratio of the target resource at different time points. This index reflects the change in the value of the target resource relative to a certain benchmark or reference point on a specific date. It may be calculated based on various factors such as historical data, market trends, supply and demand relationships, etc., to help determine the reasonable value ratio when resources are replaced. In summary, the replacement rate index is a dynamically changing value, which represents the value ratio standard that needs to be followed when the target resource is replaced or converted at different time points.
[0042] In a feasible implementation of the present application, the corresponding replacement rate index information can be retrieved from the second mapping relationship that is pre-constructed and maintained according to at least one target date (all of which are working day types) determined in S200. This second mapping relationship can be called a "resource type-replacement rate index mapping table", and the second mapping relationship records in detail the replacement rate indexes of various resource types on different dates. The system searches for the corresponding replacement rate index in the mapping table by matching the target resource type and each target date. The retrieval result will be a set of replacement rate indexes that correspond one-to-one to the target resource type and the target date, and these indexes will serve as an important basis for the subsequent calculation of the basic replacement rate. In this way, S300 effectively extracts the replacement rate index that matches the target resource type and each target date from the second mapping relationship, providing key data support for the final determination of the basic replacement rate of the resource replacement request.
[0043] S400, determining a basic replacement rate corresponding to the resource replacement request according to the at least one target replacement rate index and the target interest calculation method, and outputting the basic replacement rate.
[0044] In the embodiment of the present application, the basic replacement rate is a value calculated after combining multiple factors, and the basic replacement rate represents the basic conversion ratio or value conversion benchmark of the resource replacement request under specific conditions. This basic replacement rate is determined based on at least one target replacement rate index obtained in step S300 and the target interest calculation method. The calculation of the basic replacement rate may involve a weighted average of multiple target replacement rate indices, selecting the highest / lowest value, or other more complex mathematical or statistical methods, depending on the design of the target interest calculation method.
[0045] Compared with the replacement rate index, the basic replacement rate is a more comprehensive and specific value. The replacement rate index is calculated separately for the target resource type on a specific date, and the replacement rate index reflects the conversion ratio or value assessment of the resource at that moment. The basic replacement rate is the result of integrating these individual replacement rate indices according to certain rules. It takes into account time (through lookback days and target dates) and specific calculation methods (target interest calculation methods), providing a unified and comprehensive value conversion benchmark for resource replacement requests. In summary, the replacement rate index is the conversion ratio at a single point in time, while the basic replacement rate is the overall conversion benchmark obtained by comprehensively considering multiple replacement rate indices and specific calculation methods.
[0046] In a feasible implementation of the present application, a series of complex calculation logics are executed to determine the basic replacement rate according to at least one target replacement rate index obtained from S300 and the target interest calculation method specified in the resource replacement request. The target interest calculation method here determines how to integrate the replacement rate index (i.e., the target replacement rate index) at multiple time points into a single basic replacement rate value. This calculation process may include weighted averaging, selecting the best / worst value under specific conditions, or complex mathematical operations based on business rules.
[0047] Specifically, the system first analyzes the rules of the target interest calculation method, and then processes the target replacement rate index according to these rules, and finally obtains a basic replacement rate that can reflect the resource replacement request under comprehensive consideration of time factors and specific calculation logic. This basic replacement rate is a comprehensive value that represents the reasonable conversion ratio or value assessment benchmark of the resource replacement request under given conditions. After the calculation is completed, the system will use this basic replacement rate as the output result for subsequent processes or display to users.
[0048] In the data processing method, device, equipment, medium and product provided in the embodiments of the present application, a dual mapping relationship is constructed and applied, namely, the correspondence between resource type and date type (first mapping relationship) and the correspondence between resource type and replacement rate index (second mapping relationship). In response to the problem that the traditional resource replacement system relies only on a single reference source, the present application flexibly traces back to at least one target date of the working day type within the look-back days according to the look-back days, thereby being able to comprehensively consider these target replacement rate indices under different target dates, and combining the target interest calculation method, it is possible to calculate the basic replacement rate corresponding to the resource replacement request. This multi-dimensional, multi-data source comprehensive analysis method effectively avoids or reduces the errors caused by fluctuations in a single reference source data, thereby significantly improving the accuracy of the determination of the basic replacement rate.
[0049] In one embodiment, if Figure 2 As shown, the review days include a range of days;
[0050] The above step 200 may specifically perform the following steps:
[0051] S210, determining the first day from the range of days according to the target interest calculation method;
[0052] S220: Obtain, from the first mapping relationship, at least one target date corresponding to the first day before the current date of the target resource type.
[0053] Optionally, in a feasible implementation of the present application, in order to determine the first day, a series of evaluation criteria and logic can be first defined, which are closely related to the requirements of the target interest calculation method. Specifically, the evaluation criteria can be defined by considering aspects such as market trend fit, historical data integrity, business logic and strategy matching, etc.
[0054] Market trend fit: Maintain a market trend analysis module that can capture market data in real time or periodically and calculate market fluctuations, trend trends and other indicators within a specific number of days. The system will compare the fit between market trends on different days and the market conditions expected by the target interest calculation method.
[0055] Historical data completeness: For each possible day, it is possible to check whether the historical data covers the period completely and assess the accuracy and reliability of the data. Incomplete or unreliable data may be excluded or have their weight reduced.
[0056] Business logic and policy matching: Based on predefined business rules or policies, you can evaluate the matching degree of different days with these rules or policies. For example, some days may not be suitable as the first day due to busy business, holidays, etc.
[0057] For each day within the range of the number of days, it can be calculated and scored according to the above evaluation criteria. During the evaluation process, different evaluation criteria can be given different weights to reflect their importance in determining the first day. After the evaluation, a comprehensive score or ranking for each possible day can be obtained.
[0058] Subsequently, the day with the highest score or the highest ranking can be selected as the first day, which can be considered as the choice that best meets the requirements of the target interest calculation method. Once the first day is determined, the system will output it and use it for subsequent replacement rate queries and basic replacement rate calculations. In subsequent processing, the corresponding target date can be retrieved from the first mapping relationship based on the first day, and the replacement rate index under these dates can be obtained from the second mapping relationship.
[0059] In these optional embodiments, by setting the value range of the lookback days and intelligently determining the specific first day based on the target interest calculation method, at least one target date of the target resource type under the number of days before the current date is accurately extracted from the preset first mapping relationship. This method effectively improves the flexibility and accuracy of data processing, ensures that the selection of the target date is both in line with business logic and close to actual needs, and has a significant beneficial effect on optimizing resource allocation and improving decision-making efficiency.
[0060] In one embodiment, if Figure 3 As shown, the above step 220 can specifically perform the following steps:
[0061] S221, obtaining, from the first mapping relationship, the date type of each first date within the first number of the target resource type before the current date, the number of the first dates being equal to the first number;
[0062] S222, if the second date exists in the first date, obtain a fourth date in the third date that is farthest from the current date, wherein the second date is a date in the first date whose date type is not a working day type, and the third date is a date in the first date whose date type is a working day type;
[0063] S223, obtaining a fifth date of the working day type that is the closest second day before the fourth date, wherein the second day is equal to the number of the second date;
[0064] S224, determining the fifth date and the third date as target dates.
[0065] Optionally, in a feasible implementation of the present application, first, the date type of each date of the target resource type before the current date and within the first number range can be retrieved from the pre-stored first mapping relationship according to the current date and the first number. The date types here may include working days (such as Monday to Friday) and non-working days (such as weekends, statutory holidays, etc.). Assuming that there are N dates in this range (N is the number of first numbers), these dates are called "first dates", and each first date is assigned its corresponding date type.
[0066] Next, all non-working days can be filtered out from these first dates, which are called "second dates". If all dates are working days, there is no subsequent process. In the case of a second date, a working day with the farthest interval from the current date can be found from the remaining working days (i.e., the date after the second date is removed from the first date, which is called the "third date"), and this date is called the "fourth date".
[0067] Then, assuming that the number of days before the second date is 2 (that is, there are two non-working days), we can go back and find the two closest working days before the fourth date. These two dates are called the "fifth date". It should be noted that the "closest" here refers to the two working days immediately before the fourth date in the working day sequence, and the number is equal to the number of the second date. Finally, the determined third date and fifth date can be combined to determine the final target date.
[0068] In these optional embodiments, by intelligently filtering working days, the date gaps caused by non-working days are effectively made up, ensuring the continuity and validity of the target date. Within the first day number range, non-working days are first identified and the farthest working day is determined as a benchmark, and then an equal number of working days are selected to fill the gaps. The target date finally formed not only conforms to the business logic, but also facilitates subsequent calculation and processing, thereby improving the accuracy and efficiency of data processing.
[0069] In one embodiment, the target interest calculation method includes one of the following:
[0070] Risk-free interest calculation method, look-back window method, deferred payment method, back-shifting method, and previous period reset method.
[0071] Optionally, the risk-free interest calculation method is based on a retrospective evaluation mechanism of transaction results, which focuses on the "value benchmark" of a certain day that can only be clearly known after the transaction is completed. This mechanism reflects the real supply and demand dynamics in the market by counting the actual amount of real trading activities that have occurred in the past period of time (such as every other day, half a month, every other month, etc.) and are difficult to be manipulated artificially as a benchmark. Therefore, the risk-free interest calculation method is not based on a certain preset replacement rate standard, but directly maps the results of the natural trading behavior of market participants without external risk interference. Under the risk-free interest calculation method, it can be compared to the measurement of "historical replacement rate", that is, examining the efficiency and stability of the free flow and exchange of resources or value units in the market over the past period of time. The risk-free interest calculation method provides a relatively objective reference framework that is not manipulated by a single entity for evaluating or planning future trading activities.
[0072] The review window method refers to determining a certain cost or benefit standard for the current or future by looking at the data or performance over a period of time in the past. This is similar to the decision-making process of first reviewing and analyzing the market performance, performance data, etc. over a period of time in the past, and then formulating the current strategy or plan based on this information.
[0073] Deferred payment refers to a transaction or cooperation in which both parties agree to postpone the payment of fees or costs that should have been paid immediately to a certain point in the future. This method allows one party to temporarily retain the right to use funds for a period of time, which is equivalent to obtaining a short-term advantage in capital utilization.
[0074] In one embodiment, the resource replacement request further includes a target replacement type;
[0075] The determining, according to the at least one target replacement rate index and the target interest calculation method, a basic replacement rate corresponding to the resource replacement request includes:
[0076] When the target interest calculation method is the look-back window method, the at least one target replacement rate index is calculated according to the change range of the historical replacement rate of the target replacement type within a preset date range to obtain the basic replacement rate.
[0077] Optionally, in a feasible implementation of the present application, the resource replacement request can be parsed first to extract the target replacement category information. The target replacement category refers to different financial products for resource replacement. Subsequently, the historical replacement rate data of the target replacement category within a preset date range can be retrieved. These data can be stored in a database or obtained through an external data source. Specifically, all historical replacement rate records of the target replacement category within a specified date range can be retrieved by querying the database or calling an external API.
[0078] Subsequently, the retrieved historical replacement rate data, in particular their range of change, can be analyzed. The range of change can reflect the dynamic changes in market supply and demand, and is of great significance for determining the basic replacement rate. Specifically, the average value, standard deviation, maximum and minimum values of the historical replacement rate and other statistics can be calculated to evaluate its range of change. In other embodiments, more complex data analysis methods, such as time series analysis, trend prediction, etc., can also be used to evaluate its range of change.
[0079] After analyzing the historical replacement rate change range, the basic replacement rate can be calculated based on the analysis results of at least one target replacement rate index and the change range. The specific calculation method may involve operations such as weighted average of historical replacement rate data and application of adjustment factors. The target replacement rate index can be used as a weight or adjustment coefficient to adjust the calculation result of the basic replacement rate. Finally, the calculated basic replacement rate is output as a response to the initiator of the resource replacement request.
[0080] In these optional embodiments, by introducing the target replacement type and the lookback window interest calculation method, the basic replacement rate can be flexibly calculated based on the change range of the historical replacement rate of the target replacement type within the preset date range. This method not only improves the pertinence and accuracy of resource replacement, but also enhances the system's ability to adapt to market fluctuations, helps reduce the uncertainty risks caused by market changes, and provides a more scientific and reasonable decision-making basis for resource replacement.
[0081] In one embodiment, the step of calculating the at least one target replacement rate index according to the change range of the historical replacement rate of the target replacement type within a preset date range to obtain the basic replacement rate includes:
[0082] When the change amplitude is greater than a first preset threshold, determining the replacement rate index corresponding to the maximum value of the at least one target replacement rate index as the basic replacement rate;
[0083] When the variation range is smaller than a second preset threshold, the average value between the at least one target replacement rate index is determined as the basic replacement rate.
[0084] Optionally, in a feasible implementation of the present application, the change range of the historical replacement rate data is first calculated. Specifically, this can be done by calculating the standard deviation or range (the difference between the maximum and minimum values). Among them, the standard deviation is a measure of data volatility and can reflect the degree of dispersion of the replacement rate data.
[0085] Subsequently, two preset thresholds may be defined: the first preset threshold is used to determine whether the change range is large, and the second preset threshold is used to determine whether the change range is small. The two thresholds may be set based on historical data, business experience, or expert advice.
[0086] The calculated change is then compared to two preset thresholds: If the change is greater than the first preset threshold, the market is considered to be highly volatile and subject to high uncertainty. If the change is less than the second preset threshold, the market is considered to be relatively stable and less volatile. If the change is in between, further analysis or other methods may be needed to determine the base replacement rate.
[0087] The basic replacement rate is then calculated:
[0088] Large variation: In this case, in order to reflect the highest possible cost or value in the market, the maximum value in at least one target replacement rate index can be selected as the base replacement rate. This means that a more conservative strategy is preferred to cope with market uncertainty.
[0089] Small fluctuation range: In this case, the market is relatively stable, and the average value between at least one target replacement rate index can be selected as the base replacement rate. This reflects the average cost or value of the market and is suitable for a market environment with less volatility.
[0090] Middle range: If the range is in the middle, the basic replacement rate can be determined by combining other factors (such as historical trends, expert opinions, market demand, etc.). This requires a more complex analysis and decision-making process.
[0091] In these optional embodiments, by setting a threshold value for the change range, the calculation method of the basic replacement rate is flexibly selected according to the fluctuation of the historical replacement rate. When the fluctuation is large, the maximum value is used to deal with uncertainty; when the fluctuation is small, the average value is used to ensure stability. This strategy improves the flexibility and adaptability of the basic replacement rate calculation, helps to more accurately reflect market conditions and customer needs, and provides more reasonable and reliable decision support for resource replacement.
[0092] Based on the data processing method provided in the above embodiment, the present application also provides a specific implementation of a data processing device. Please refer to the following embodiment.
[0093] like Figure 4 As shown, the data processing device provided in the embodiment of the present application includes the following modules:
[0094] The receiving module 401 is used to receive a resource replacement request, wherein the resource replacement request includes a target resource type, a lookback number of days, and a target interest calculation method;
[0095] A first acquisition module 402 is used to, in response to the replacement request, acquire, from a pre-acquired first mapping relationship, at least one target date corresponding to the target resource type in the number of days before the current date, where the date type of the target date is a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types under multiple dates respectively;
[0096] The second acquisition module 403 is used to acquire at least one target replacement rate index corresponding to the target resource type on each target date from the pre-acquired second mapping relationship, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates;
[0097] The determination module 404 is used to determine the basic replacement rate corresponding to the resource replacement request according to the at least one target replacement rate index and the target interest calculation method, and output the basic replacement rate.
[0098] In one embodiment, the number of review days includes a range of day values; the first acquisition module 402 may include:
[0099] A first determination submodule, configured to determine the first day from the range of days according to the target interest calculation method;
[0100] A first acquisition submodule is configured to acquire, from the first mapping relationship, at least one target date corresponding to the target resource type within the first number of days before the current date.
[0101] In one embodiment, the first acquisition submodule may include:
[0102] A first acquisition unit is used to acquire, from the first mapping relationship, the date type of each first date of the target resource type within the first number of days before the current date, the number of the first dates being equal to the first number of days;
[0103] A second acquisition unit is configured to acquire, if there is a second date in the first dates, a fourth date in the third dates which is farthest from the current date, wherein the second date is a date in the first dates whose date type is not a working day type, and the third date is a date in the first dates whose date type is a working day type;
[0104] A third acquiring unit is used to acquire a fifth date of the working day type that is the closest second date before the fourth date, wherein the second date is equal to the number of the second date;
[0105] The first determining unit is configured to determine the fifth date and the third date as the target date.
[0106] In one embodiment, the resource replacement request further includes a target replacement type; the determination module 404 may include:
[0107] The second determination submodule is used to calculate the at least one target replacement rate index according to the change range of the historical replacement rate of the target replacement type within a preset date range to obtain the basic replacement rate when the target interest calculation method is the look-back window method.
[0108] In one embodiment, the second determining submodule may include:
[0109] a second determining unit, configured to determine, when the variation amplitude is greater than a first preset threshold, a replacement rate index corresponding to a maximum value of the at least one target replacement rate index as the basic replacement rate;
[0110] The third determining unit is used to determine the average value between the at least one target replacement rate index as the basic replacement rate when the change amplitude is less than a second preset threshold.
[0111] In one embodiment, the target interest calculation method includes one of the following:
[0112] Risk-free interest calculation method, look-back window method, deferred payment method, back-shifting method, and previous period reset method.
[0113] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned battery thermal runaway warning method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.
[0114] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0115] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0116] The device may include a processor 501 and a memory 502 storing program instructions.
[0117] When the processor 501 executes the program, the steps in any of the above method embodiments are implemented.
[0118] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 502, and executed by the processor 501 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0119] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0120] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0121] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0122] The processor 501 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 502 .
[0123] In one example, the electronic device may further include a communication interface 503 and a bus 510. The processor 501, the memory 502, and the communication interface 503 are connected via the bus 510 and communicate with each other.
[0124] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0125] Bus 510 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0126] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0127] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0128] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0129] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0130] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0131] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0132] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0133] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0134] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data processing method, characterized in that: The method comprises: receiving a resource replacement request, wherein the resource replacement request includes a target resource type, a lookback number of days, and a target interest calculation method; In response to the replacement request, obtaining, from a pre-acquired first mapping relationship, at least one target date corresponding to the target resource type in the number of days before the current date, the date type of the target date is a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types under multiple dates respectively; Acquire at least one target replacement rate index corresponding to the target resource type on each target date from the pre-acquired second mapping relationship, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates; According to the at least one target replacement rate index and the target interest calculation method, a basic replacement rate corresponding to the resource replacement request is determined, and the basic replacement rate is output.
2. The method according to claim 1, characterized in that The number of days to look back includes a range of days; The step of obtaining, from the pre-acquired first mapping relationship, at least one target date corresponding to the target resource type in the number of days before the current date includes: According to the target interest calculation method, determine the first day from the range of days; At least one target date corresponding to the target resource type within the first number of days before the current date is obtained from the first mapping relationship.
3. The method according to claim 2, characterized in that The acquiring, from the first mapping relationship, at least one target date corresponding to the target resource type in the first number of days before the current date comprises: From the first mapping relationship, obtain the date type of each first date of the target resource type within the first number of days before the current date, the number of the first dates being equal to the first number of days; In the case that there is a second date in the first date, obtaining a fourth date in the third date that is farthest from the current date, wherein the second date is a date in the first date whose date type is not a working day type, and the third date is a date in the first date whose date type is a working day type; Get a fifth date of the working day type that is the closest second day before the fourth date, wherein the second day is equal to the number of the second date; The fifth date and the third date are determined as the target dates.
4. The method according to claim 1, characterized in that: The resource replacement request also includes a target replacement type; The determining, according to the at least one target replacement rate index and the target interest calculation method, a basic replacement rate corresponding to the resource replacement request includes: When the target interest calculation method is the look-back window method, the at least one target replacement rate index is calculated according to the change range of the historical replacement rate of the target replacement type within a preset date range to obtain the basic replacement rate.
5. The method according to claim 4, characterized in that The step of calculating the at least one target replacement rate index according to the change range of the historical replacement rate of the target replacement type within a preset date range to obtain the basic replacement rate includes: When the change amplitude is greater than a first preset threshold, determining the replacement rate index corresponding to the maximum value of the at least one target replacement rate index as the basic replacement rate; When the variation range is smaller than a second preset threshold, the average value between the at least one target replacement rate index is determined as the basic replacement rate.
6. The method according to any one of claims 1 to 5, characterized in that: The target interest calculation method includes one of the following: Risk-free interest calculation method, look-back window method, deferred payment method, back-shifting method, and previous period reset method.
7. A data processing device, characterized in that: The device comprises: A receiving module, configured to receive a resource replacement request, wherein the resource replacement request includes a target resource type, a lookback number of days, and a target interest calculation method; A first acquisition module is used to, in response to the replacement request, acquire, from a pre-acquired first mapping relationship, at least one target date corresponding to the target resource type under the number of days before the current date, wherein the date type of the target date is a working day type, wherein the first mapping relationship includes date types corresponding to multiple resource types under multiple dates respectively; A second acquisition module is used to acquire at least one target replacement rate index corresponding to the target resource type on each target date from a pre-acquired second mapping relationship, wherein the second mapping relationship includes replacement rate indexes corresponding to multiple resource types on multiple dates; A determination module is used to determine a basic replacement rate corresponding to the resource replacement request according to the at least one target replacement rate index and the target interest calculation method, and output the basic replacement rate.
8. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the data processing method according to any one of claims 1 to 6.