Product contribution degree analysis method and device, equipment and storage medium
By introducing incremental computer system to the product contribution analysis, building an incremental computing matrix and combining cumulative contribution results, the problem of insufficient response speed and real-time in the existing technology is solved, and the response speed and real-time of the analysis results are improved.
Patent Information
- Application Number
- CN202411740390.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-18
AI Technical Summary
When the existing product contribution analysis methods cope with the increasing volume of combined product data, insufficient response speed and real-time performance have become bottlenecks in efficiency issues.
A product contribution analysis method is proposed. When receiving a contribution query request, it determines the current query interval and obtains the combined product data of the current query date, constructs an incremental calculation matrix, solves the matrix to obtain incremental contribution results, and generates the cumulative contribution results of the current interval based on the cumulative contribution results of the previous query interval.
By introducing an incremental computer system, it is avoided to repeatedly calculate the historical data of all query days in the current query interval when receiving a query request, and improve the response speed and real-timeness of the contribution analysis results.
Smart Images

Figure CN119648417A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to a product contribution analysis method, device, equipment and storage medium. Background Art
[0002] In the field of modern portfolio management, performance analysis of asset portfolios is a crucial link. In order to deeply understand the performance of asset portfolios, users often need to analyze the contribution of each product component to the overall return, that is, to determine the contribution of each product in the portfolio.
[0003] However, as the size of the investment portfolio increases, the amount of data that needs to be processed also increases. This leads to an increase in the demand for computing resources and an increase in computing time, which in turn affects the response speed and real-time performance of the analysis results. In practical applications, especially in portfolio post-investment analysis scenarios that require quick decision-making, this efficiency issue has become a significant bottleneck. Therefore, optimizing and improving the existing product contribution analysis process to improve computing efficiency and real-time performance has become an urgent problem to be solved. Summary of the invention
[0004] The main purpose of this application is to provide a product contribution analysis method, device, equipment and storage medium, aiming to solve the technical problems of the existing product contribution analysis methods in dealing with the increasing amount of combined product data, such as insufficient response speed and real-time performance.
[0005] To achieve the above purpose, the present application proposes a product contribution analysis method, which includes:
[0006] Upon receiving a contribution query request, determining a current query interval, where the current query interval is an interval from a start query date to a current query date;
[0007] Acquire the combined product data of the current query day, and construct an incremental calculation matrix according to the combined product data of the current query day;
[0008] Solving the incremental calculation matrix to obtain the incremental contribution result of the current query day;
[0009] The cumulative contribution result of the previous query interval is obtained, and the cumulative contribution result of the current query interval is generated in combination with the incremental contribution result of the current query day, wherein the previous query interval is an interval formed by the query day from the starting query day to the previous query day of the current query day.
[0010] In one embodiment, the step of obtaining the combined product data of the current query day and constructing an incremental calculation matrix according to the combined product data of the current query day includes:
[0011] Acquire the combined product data of the current query day, the combined product data including: market value information of the current product category;
[0012] Obtaining market price information on the current query day, and determining the rate of return of the current product category based on the market price information;
[0013] Obtaining the weight of the current product category according to the market value information of the current product category;
[0014] An incremental calculation matrix is constructed according to the rate of return of the current product category and the weight of the current product category.
[0015] In one embodiment, the step of obtaining the market price information of the current query day and determining the rate of return of the current product category according to the market price information includes:
[0016] Obtaining market price information on the current query day, the market price information including: the adjusted net value and valuation data corresponding to the current query day, and the adjusted net value and valuation data corresponding to the previous query day;
[0017] Determine the ending value of the current product category based on the adjusted net value and valuation data of the current query date, and determine the beginning value of the current product category based on the adjusted net value and valuation data of the previous query date;
[0018] The rate of return of the current product category is determined based on the end-of-period value and the beginning-of-period value.
[0019] In one embodiment, the step of solving the incremental calculation matrix to obtain the incremental contribution result of the current query day includes:
[0020] Obtaining a fitted net value corresponding to the current query day, where the fitted net value corresponding to the current query day is calculated based on the fitted net value corresponding to the previous query day;
[0021] A matrix multiplication operation is performed on the incremental calculation matrix and the fitted net value corresponding to the current query day to obtain the incremental contribution result of the current query day.
[0022] In one embodiment, the combined product data further includes the holding date information of the current product category; the step of obtaining the fitted net value corresponding to the current query date includes:
[0023] Obtain the fitted net value corresponding to the previous query date, and obtain the current market value change information according to the holding date information of the current product category, wherein the current market value change information is the market value change information from the previous query date to the current query date;
[0024] The fitted net value corresponding to the current query day is determined according to the fitted net value corresponding to the previous query day and the current market value change information.
[0025] In one embodiment, before the step of obtaining the cumulative contribution result of the previous query interval and generating the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day, the following steps are included:
[0026] Determining whether the previous query interval is a full query interval;
[0027] If yes, then obtain the combined product data corresponding to each query day from the start query day to the query day before the current query day in the previous query interval;
[0028] Constructing a full calculation matrix based on the combined product data corresponding to each of the query days;
[0029] Solve the full calculation matrix to obtain the cumulative contribution result of the previous query interval.
[0030] In one embodiment, after the step of determining whether the previous query interval is a full query interval, the method further includes:
[0031] If not, obtain the incremental contribution results of each query day in the previous query interval from the starting query day to the previous query day of the current query day, and accumulate the incremental contribution results of each query day to generate the cumulative contribution result of the previous query interval.
[0032] In addition, to achieve the above purpose, the present application also proposes a product contribution analysis device, the device comprising:
[0033] A request receiving module, configured to determine a current query interval upon receiving a revenue contribution query request, wherein the current query interval is an interval formed by a start query date to a current query date;
[0034] An incremental calculation module is used to obtain the combined product data of the current query day, and to construct an incremental calculation matrix according to the combined product data of the current query day; solve the incremental calculation matrix to obtain the incremental contribution result of the current query day;
[0035] A result generation module is used to obtain the cumulative contribution result of the previous query interval, and generate the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day. The previous query interval is the interval formed by the query day from the starting query day to the previous query day of the current query day.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a product contribution analysis device, which includes: a memory, a processor, and a product contribution analysis program stored in the memory and executable on the processor, and the product contribution analysis program is configured to implement the steps of the product contribution analysis method described above.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a product contribution analysis program is stored. When the product contribution analysis program is executed by a processor, the steps of the product contribution analysis method described above are implemented.
[0038] The present application discloses a product contribution analysis method, including: upon receiving a contribution query request, determining the current query interval, the current query interval being an interval formed by the start query date to the current query date; obtaining the combined product data of the current query date, and constructing an incremental calculation matrix based on the combined product data of the current query date; solving the incremental calculation matrix to obtain the incremental contribution result of the current query date; obtaining the cumulative contribution result of the previous query interval, and generating the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query date, the previous query interval being an interval formed by the start query date to the previous query date of the current query date. Since the present application introduces an incremental calculation mechanism, it is possible to construct an incremental calculation matrix based on the combined product data of the current query date to obtain the incremental contribution result, and to generate the cumulative contribution result of the current interval in combination with the cumulative contribution result of the previous query interval, so that there is no need to repeatedly calculate the historical data of all query days in the current query interval when receiving a query request, and when dealing with the increasing amount of combined product data, the response speed and real-time performance of the contribution analysis result are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 This is a flow chart of the first embodiment of the product contribution analysis method of this application;
[0042] Figure 2 This is a flow chart of the second embodiment of the product contribution analysis method of this application;
[0043] Figure 3 This is a flow chart of the third embodiment of the product contribution analysis method of this application;
[0044] Figure 4 It is a calculation logic diagram of the traditional product contribution analysis method;
[0045] Figure 5 A schematic diagram of the calculation logic of the product contribution analysis method of this application;
[0046] Figure 6 This is a schematic diagram of the module structure of the first embodiment of the product contribution analysis device of the present application;
[0047] Figure 7 This is a schematic diagram of the structure of the contribution analysis equipment of the product in this application.
[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0051] This application embodiment provides a product contribution analysis method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the product contribution analysis method of the present application. In this embodiment, the method includes: Steps S10 to S40:
[0052] Step S10: upon receiving a contribution query request, determining a current query interval, wherein the current query interval is an interval from the start query date to the current query date.
[0053] It should be noted that the method of this embodiment can be applied to the process of disassembling the income contribution of asset products of various categories in the investment portfolio. The execution subject of the method of this embodiment can be a computing electronic device with data processing, network communication, and program running, such as: a mobile phone, a tablet, a product analysis server, etc., or other electronic devices that can access the product contribution analysis system. The following takes the product contribution analysis device that can be accessed (hereinafter referred to as "analysis device") as an example to explain the various embodiments of this application.
[0054] It should be understood that the contribution query request may be a query request initiated by the user based on the interactive interface of the analysis device. When the analysis device obtains the query request, it may first perform user identity authentication on the initiator of the query request, and further perform authority verification after the identity authentication is passed, that is, determine whether the asset portfolio requested for query belongs to the queryable authority range of the user.
[0055] It is understandable that after the above-mentioned identity authentication and authority verification are passed, the analysis device can determine the time range required by the user to query according to the query request, and then determine the current query interval. The current query interval is composed of the starting query date to the current query date. For example, if the time range required by the user to query is from the start time of the 1st day to the end time of the 6th day, the current query interval can be expressed as [1, 6], where the 1st day is the starting query date and the 6th day is the current query date.
[0056] Step S20: Acquire the combined product data of the current query day, and construct an incremental calculation matrix according to the combined product data of the current query day.
[0057] It should be understood that the combined product data may be the position data corresponding to the current query date, and the position data may include: the position amount corresponding to each asset category in the user's investment portfolio, the market value information of each asset category, and the position date information of each asset category, etc. When the market value information of a certain asset category is missing, the query or verification may be performed based on the position date of the asset category.
[0058] It is understandable that when the original combination product data is obtained, the original combination product data can be preprocessed: missing values and abnormal values in the original combination product data can be removed, and the formats and units of different source data therein can be unified to ensure the quality and consistency of the data.
[0059] It should be noted that the incremental calculation matrix can be constructed based on the yield of products of each asset category on the current query day. Specifically, the analysis device can first calculate the yield of each asset product on the current query day based on the above-mentioned portfolio product data, then calculate the weight of each asset product in the investment portfolio, and then construct the incremental calculation matrix based on the yield of each asset product and the corresponding weight.
[0060] Step S30: Solve the incremental calculation matrix to obtain the incremental contribution result of the current query day.
[0061] It should be understood that in order to quantify the specific impact of different asset categories on the total return of the investment portfolio so as to conduct more effective asset allocation and risk management in the future, after obtaining the above-mentioned incremental calculation matrix, the incremental contribution result of the current query day can be calculated by performing matrix multiplication with the fitted net value corresponding to the investment portfolio on the current query day.
[0062] It should also be noted that in order to facilitate data reuse of the incremental contribution results in other performance attribution models related to the investment portfolio, the incremental contribution results can be stored in the form of an incremental return matrix, which helps to improve the overall post-investment computing efficiency and resource utilization.
[0063] Step S40: Obtain the cumulative contribution result of the previous query interval, and generate the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day, wherein the previous query interval is the interval formed by the query day from the starting query day to the previous query day of the current query day.
[0064] It should be understood that the previous query interval can be a query interval with the same starting query date as the current query interval, which can be an interval consisting of the query date from the starting query date to the previous query date of the current query date. For example, if the current query interval is [1, 6], the previous query interval can be [1, 5].
[0065] It should be noted that the minimum time range that a user can query can be set to one day, so for each query day in the previous query interval, the analysis device can store the corresponding incremental contribution results, and the incremental contribution results of each query day can be calculated and stored in the analysis device in the same way as the incremental contribution results of the current query day. The incremental contribution results of each query day are accumulated to obtain the cumulative contribution calculation result of the previous query interval.
[0066] Similarly, the cumulative sharing result of the current interval can be obtained by accumulating the cumulative contribution calculation result of the previous query interval and the incremental contribution result of the current query day.
[0067] It should also be noted that the cumulative contribution result of the current query interval can also be saved in the form of a benefit matrix, so as to improve the calculation efficiency of the cumulative contribution result of the next query interval of the current query interval.
[0068] When this embodiment receives a contribution query request, it determines the current query interval, which is the interval formed by the start query date to the current query date; obtains the combined product data of the current query date, and constructs an incremental calculation matrix based on the combined product data of the current query date; solves the incremental calculation matrix to obtain the incremental contribution result of the current query date; obtains the cumulative contribution result of the previous query interval, and generates the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query date, and the previous query interval is the interval formed by the previous query date from the start query date to the current query date. Since this embodiment introduces an incremental calculation mechanism, it is possible to construct an incremental calculation matrix based on the combined product data of the current query date to obtain the incremental contribution result, and to generate the cumulative contribution result of the current interval in combination with the cumulative contribution result of the previous query interval, so that there is no need to repeatedly calculate the historical data of all query days in the current query interval when receiving a query request, and when dealing with the increasing amount of combined product data, the response speed and real-time performance of the contribution analysis results are improved.
[0069] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the product contribution analysis method of the present application.
[0070] In this embodiment, in order to specifically explain how to construct the incremental calculation matrix, step S20 specifically includes: steps S201 to S204:
[0071] Step S201: Acquire the combined product data of the current query day, the combined product data including: market value information of the current product category.
[0072] It should be understood that the current product category can be any asset category available on the current query day, such as AH shares, bonds, public funds, and futures, etc. The market value information of the current product category can be determined by the number of positions and the price per share of each asset category.
[0073] Step S202: Obtain the market price information of the current query day, and determine the rate of return of the current product category according to the market price information.
[0074] It should be understood that the market price information may include: the adjusted net value and valuation data corresponding to each asset category. The market price information on the current query day may include: the adjusted net value and valuation data corresponding to the current query day, and the adjusted net value and valuation data corresponding to the previous query day.
[0075] It should be understood that the yield corresponding to each asset category can be calculated separately according to the yield calculation formula, and the yield calculation formula is: yield = (end value - beginning value) / beginning value.
[0076] In a specific implementation, the end-of-period value of the current product category can be determined based on the adjusted net value and valuation data of the current query date, and the beginning-of-period value of the current product category can be determined based on the adjusted net value and valuation data of the previous query date; and then the end-of-period value and the beginning-of-period value are substituted into the above-mentioned yield calculation formula to calculate the yield of each asset category respectively.
[0077] Step S203: obtaining the weight of the current product category according to the market value information of the current product category.
[0078] It is understood that in an investment portfolio, the weight of each asset class can be determined by its value proportion in the investment portfolio. Specifically, the weight of each asset class can be calculated by dividing the market value of a single asset class by the sum of the market values of all asset classes.
[0079] Step S204: constructing an incremental calculation matrix according to the rate of return of the current product category and the weight of the current product category.
[0080] It is understandable that the incremental calculation matrix can be a one-dimensional array, in which rows represent different asset categories. Each element in the incremental calculation matrix is the weighted rate of return of the corresponding asset category on the current query day.
[0081] Further, after obtaining the incremental calculation matrix, the incremental contribution result of the current query day can be calculated in combination with the fitted net value of the current query day. Therefore, step S30 specifically includes: steps S301 to S302:
[0082] Step S301: Obtain the fitted net value corresponding to the current query day, where the fitted net value corresponding to the current query day is calculated based on the fitted net value corresponding to the previous query day.
[0083] It should be understood that the fitted net value corresponding to the current query day can be calculated based on the daily fitted net value calculation formula, which can be expressed as:
[0084] virtual_nav t =virtual_nav t-1 *(1+virtual_nav_return t-1 )
[0085] Where virtual_nav t is the fitted net value corresponding to the current query day, virtual_navt-1 is the fitted net value corresponding to the previous query day, virtual_nav_return t-1 Fitted net value increase or decrease for the previous query day.
[0086] It should be noted that the aforementioned composite product data may also include the holding date information corresponding to the market value information of each asset category, and then based on the holding date information, the market value change information of each asset category from the previous query date to the current query date, that is, the current market value change information, can be queried to obtain the corresponding numerical value of the fitted net value increase or decrease on the previous query date in the above formula.
[0087] It should be understood that the fitted net value corresponding to the previous query day can also be pre-calculated based on the above-mentioned daily fitted net value calculation formula and stored in the analysis device, so as to obtain the fitted net value corresponding to the current query day by combining the corresponding numerical value of the fitted net value increase or decrease of the above-mentioned previous query day.
[0088] Step S302: Perform matrix multiplication on the incremental calculation matrix and the fitted net value corresponding to the current query day to obtain the incremental contribution result of the current query day.
[0089] It should be understood that the incremental contribution result of the current query day is the return contribution of each asset class on the current query day.
[0090] It should also be noted that the revenue contribution of the current query day is saved. When the cumulative revenue contribution of any interval needs to be calculated, it is only necessary to add up the daily incremental revenue results within the interval. This greatly reduces the amount of calculation and improves the response speed.
[0091] This embodiment obtains the combined product data of the current query day, and the combined product data includes: the market value information of the current product category; obtains the market price information of the current query day, and determines the yield of the current product category according to the market price information; obtains the weight of the current product category according to the market value information of the current product category; constructs an incremental calculation matrix according to the yield of the current product category and the weight of the current product category; and then obtains the fitting net value corresponding to the current query day, which is calculated based on the fitting net value corresponding to the previous query day; performs matrix multiplication operation on the incremental calculation matrix and the fitting net value corresponding to the current query day to obtain the incremental contribution result of the current query day. In this way, the incremental contribution result can be stored. When it is necessary to calculate the cumulative yield contribution of any interval, it is only necessary to add the incremental yield results of each day in the interval, so that users can perform customized queries on different query intervals, so that users can timely understand the performance of each asset category in the investment portfolio and make faster adjustments.
[0092] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 3 , Figure 3 This is a flow chart of the third embodiment of the product contribution analysis method of the present application.
[0093] In this embodiment, considering that the previous query interval of the current query interval can be a full query interval or an incremental query interval, in order to obtain the cumulative contribution result of the previous query interval, before step S40, the following steps are also included:
[0094] Step S01: Determine whether the previous query interval is a full query interval.
[0095] It should be understood that the full query interval is a query interval that requires calculating the rate of return of each asset category in the investment portfolio on each query day at one time.
[0096] It should also be noted that when the previous query interval of the current query interval is the initial query interval, the initial query interval is also the full query interval. At this time, the previous query day of the current query day is the starting query day.
[0097] Step S02: If yes, then obtain the combined product data corresponding to each query day in the previous query interval from the starting query day to the previous query day of the current query day.
[0098] It should be understood that the process of acquiring the combined product data corresponding to each query day can refer to the above step S20, which is not elaborated in this embodiment.
[0099] Step S03: construct a full calculation matrix according to the combined product data corresponding to each query day.
[0100] It is understandable that, different from the above incremental calculation matrix, the incremental calculation matrix can be a two-dimensional array, in which rows represent different asset categories and columns represent query days. Each element in the full calculation matrix is the weighted rate of return of the corresponding asset category on the corresponding query day.
[0101] Step S04: Solve the full calculation matrix to obtain the cumulative contribution result of the previous query interval.
[0102] Similarly, here, the fitted net value corresponding to each query day can be calculated based on the daily fitted net value formula, and a daily fitted net value matrix corresponding to the previous query interval can be constructed. The daily fitted net value matrix can be a one-dimensional array, in which each row represents a different query day. Each element in the daily fitted net value matrix is the fitted net value of the corresponding query day.
[0103] In the specific implementation, matrix multiplication operation is performed on the full calculation matrix and the above-mentioned daily fitted net value matrix to obtain the cumulative shared results of the previous query interval.
[0104] Furthermore, after step S01, the method further includes:
[0105] Step S02': If not, then obtain the incremental contribution results of each query day in the previous query interval from the starting query day to the previous query day of the current query day, and accumulate the incremental contribution results of each query day to generate the cumulative contribution result of the previous query interval.
[0106] It is understandable that the incremental contribution results of each query day can be calculated with reference to the incremental contribution results of the current query day, which will not be elaborated in this embodiment.
[0107] It should also be noted that the cumulative contribution results of the previous query interval can also be directly saved in the form of a combined profit matrix. The combined profit matrix can be composed of the incremental profit matrix of each query day, or it can be an entire full profit matrix, or it can be a combination of the full profit matrix and the incremental profit matrix.
[0108] Further, the product contribution analysis process of the combined assets including assets 1 to 6 can be performed as an example, with the current query date being date 6 and the current query interval being [1, 6]. Figure 4 , 5 The traditional product contribution analysis method is compared with the product contribution analysis method of this application. Figure 4 This is a calculation logic diagram of the traditional product contribution analysis method. Figure 5 This is a schematic diagram of the calculation logic of the product contribution analysis method of this application.
[0109] exist Figure 5 In it, the full calculation matrix and the daily fitted net value matrix corresponding to the current query interval [1, 6] are included. The full calculation matrix is a 6×6 two-dimensional matrix, in which the rows represent different asset categories (asset 1 to asset 6), the columns represent different query dates (date 1 to date 6), and each element in the two-dimensional matrix represents the weighted rate of return w*r of the corresponding asset category on the corresponding query date. The daily fitted net value matrix is a one-dimensional matrix, in which the rows represent the fitted net values corresponding to different query dates, and each element in the one-dimensional matrix represents the fitted net value A on the corresponding query date.
[0110] based on Figure 5In the calculation logic, when performing product contribution analysis, it is necessary to calculate the full calculation matrix of the current query interval [1, 6] at one time, and perform matrix multiplication with the daily fitted net value of all query days in the current query interval. In this way, the calculation data volume of the weighted rate of return is huge, the calculation takes a long time, and the calculation results cannot be reused. When the user changes the query interval, the calculation needs to be repeated.
[0111] exist Figure 6 It includes the full calculation matrix and daily fitted net value matrix corresponding to the previous query interval [1, 5] of the current query interval; it also includes the incremental calculation matrix and unit fitted net value matrix corresponding to the current query day (date 6).
[0112] The incremental calculation matrix is a 6×1 two-dimensional matrix, in which the rows represent different asset categories (asset 1 to asset 6), the columns represent the current query date (date 6), and each element in the two-dimensional matrix represents the weighted rate of return w*r of the corresponding asset category on the current query date. The unit fitted net value matrix is a one-dimensional matrix, in which the rows represent the fitted net value corresponding to the current query date, and an element included in the one-dimensional matrix represents the fitted net value A on the current query date.
[0113] based on Figure 6 According to the calculation logic in , when performing product contribution analysis, the incremental calculation matrix of the current query date (date 6) can be calculated first, and the matrix multiplication with the fitted net value corresponding to the current query date can be performed to obtain the incremental contribution result corresponding to the current query date. Then the cumulative contribution result of the previous query interval [1, 5] is obtained, and the cumulative contribution result of the current query interval [1, 6] is obtained by combining, thereby achieving a rapid response to the product contribution analysis results.
[0114] Depend on Figure 5 , 6 By comparison, the full calculation process of the investment portfolio is split into a daily incremental calculation process, and the daily incremental contribution results are saved. When querying the profit contribution of the current query interval, only the incremental profit results within the current query interval need to be accumulated, which is conducive to improving the response speed of the final result.
[0115] In this embodiment, it is determined whether the previous query interval is a full query interval; if so, the combined product data corresponding to each query day in the previous query interval from the starting query day to the previous query day of the current query day is obtained; a full calculation matrix is constructed according to the combined product data corresponding to each query day; the full calculation matrix is solved to obtain the cumulative contribution result of the previous query interval; or if not, the incremental contribution results of each query day in the previous query interval from the starting query day to the previous query day of the current query day are obtained, and the incremental contribution results of each query day are accumulated to generate the cumulative contribution result of the previous query interval. In this embodiment, the calculation efficiency and the accuracy of the results can be balanced according to the different situations of the previous query interval, which is conducive to better expansion when the investment portfolio scale expands or the amount of data increases, so as to adapt to the growing data processing needs.
[0116] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the product contribution analysis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0117] In addition, the present application also provides a product contribution analysis device, referring to Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the product contribution analysis device of this application; Figure 6 As shown, the device comprises:
[0118] The request receiving module 601 is used to determine the current query interval upon receiving the revenue contribution query request, where the current query interval is the interval from the start query date to the current query date;
[0119] The incremental calculation module 602 is used to obtain the combined product data of the current query day, and construct an incremental calculation matrix according to the combined product data of the current query day; solve the incremental calculation matrix to obtain the incremental contribution result of the current query day;
[0120] The result generation module 603 is used to obtain the cumulative contribution result of the previous query interval, and generate the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day. The previous query interval is the interval formed by the query day from the starting query day to the previous query day of the current query day.
[0121] Furthermore, the incremental calculation module 602 is also used to obtain the combination product data of the current query day, and the combination product data includes: market value information of the current product category; obtaining the market price information of the current query day, and determining the rate of return of the current product category based on the market price information; obtaining the weight of the current product category based on the market value information of the current product category; and constructing an incremental calculation matrix based on the rate of return of the current product category and the weight of the current product category.
[0122] Furthermore, the incremental calculation module 602 is also used to obtain market price information of the current query day, and the market price information includes: the adjusted net value and valuation data corresponding to the current query day, and the adjusted net value and valuation data corresponding to the previous query day; determining the end-of-period value of the current product category based on the adjusted net value and valuation data of the current query day, and determining the beginning-of-period value of the current product category based on the adjusted net value and valuation data of the previous query day; determining the rate of return of the current product category based on the end-of-period value and the beginning-of-period value.
[0123] Furthermore, the result generation module 603 is further used to obtain the fitted net value corresponding to the current query day, the fitted net value corresponding to the current query day is calculated based on the fitted net value corresponding to the previous query day; perform matrix multiplication operation on the incremental calculation matrix and the fitted net value corresponding to the current query day to obtain the incremental contribution result of the current query day. The combined product data also includes the holding date information of the current product category.
[0124] Furthermore, the result generation module 603 is also used to obtain the fitted net value corresponding to the previous query date, and obtain the current market value change information based on the holding date information of the current product category, and the current market value change information is the market value change information from the previous query date to the current query date; the fitted net value corresponding to the current query date is determined based on the fitted net value corresponding to the previous query date and the current market value change information.
[0125] Furthermore, the result generation module 603 is also used to determine whether the previous query interval is a full query interval; if so, obtain the combined product data corresponding to each query day in the previous query interval from the starting query day to the previous query day of the current query day; construct a full calculation matrix based on the combined product data corresponding to each of the query days; solve the full calculation matrix to obtain the cumulative contribution result of the previous query interval.
[0126] Furthermore, the result generation module 603 is also used to, if not, obtain the incremental contribution results of each query day in the previous query interval from the starting query day to the previous query day of the current query day, and accumulate the incremental contribution results of each query day to generate the cumulative contribution result of the previous query interval.
[0127] In this embodiment, an incremental calculation mechanism is introduced, which can construct an incremental calculation matrix according to the combined product data of the current query day to obtain the incremental contribution result, so as to generate the cumulative contribution result of the current interval in combination with the cumulative contribution result of the previous query interval. Therefore, there is no need to repeatedly calculate the historical data of all query days in the current query interval when a query request is received. When dealing with the increasing amount of combined product data, the response speed and real-time performance of the contribution analysis results are improved.
[0128] Other embodiments or specific implementations of the product contribution analysis device described in this application can refer to the above-mentioned method embodiments and will not be repeated here.
[0129] The present application also provides a product contribution analysis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the product contribution analysis method in the above-mentioned embodiment one.
[0130] Reference below Figure 7 , Figure 7 The schematic diagram of the structure of the product contribution analysis device of the present application. The product contribution analysis device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The product contribution analysis device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0131] like Figure 7As shown, the product contribution analysis device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the product contribution analysis device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the product contribution analysis device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a product contribution analysis device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0132] The present application also provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the product contribution analysis method in the above-mentioned embodiment.
[0133] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0134] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other elements in the process, method, article or system including the element.
[0135] The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. They are only some embodiments of the present application and do not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the description and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A product contribution analysis method, characterized in that: The method comprises: Upon receiving a contribution query request, determining a current query interval, where the current query interval is an interval from a start query date to a current query date; Acquire the combined product data of the current query day, and construct an incremental calculation matrix according to the combined product data of the current query day; Solving the incremental calculation matrix to obtain the incremental contribution result of the current query day; The cumulative contribution result of the previous query interval is obtained, and the cumulative contribution result of the current query interval is generated in combination with the incremental contribution result of the current query day, wherein the previous query interval is an interval formed by the query day from the starting query day to the previous query day of the current query day.
2. The method according to claim 1, characterized in that The step of obtaining the combined product data of the current query day and constructing an incremental calculation matrix according to the combined product data of the current query day includes: Acquire the combined product data of the current query day, the combined product data including: market value information of the current product category; Obtaining market price information on the current query day, and determining the rate of return of the current product category based on the market price information; Obtaining the weight of the current product category according to the market value information of the current product category; An incremental calculation matrix is constructed according to the rate of return of the current product category and the weight of the current product category.
3. The method according to claim 2, characterized in that The step of obtaining the market price information of the current query day and determining the rate of return of the current product category according to the market price information includes: Obtaining market price information on the current query day, the market price information including: the adjusted net value and valuation data corresponding to the current query day, and the adjusted net value and valuation data corresponding to the previous query day; Determine the ending value of the current product category based on the adjusted net value and valuation data of the current query date, and determine the beginning value of the current product category based on the adjusted net value and valuation data of the previous query date; The rate of return of the current product category is determined based on the end-of-period value and the beginning-of-period value.
4. The method according to claim 3, characterized in that The step of solving the incremental calculation matrix to obtain the incremental contribution result of the current query day includes: Obtaining a fitted net value corresponding to the current query day, where the fitted net value corresponding to the current query day is calculated based on the fitted net value corresponding to the previous query day; A matrix multiplication operation is performed on the incremental calculation matrix and the fitted net value corresponding to the current query day to obtain the incremental contribution result of the current query day.
5. The method according to claim 4, characterized in that The combined product data also includes the holding date information of the current product category; the step of obtaining the fitted net value corresponding to the current query date includes: Obtain the fitted net value corresponding to the previous query date, and obtain the current market value change information according to the holding date information of the current product category, wherein the current market value change information is the market value change information from the previous query date to the current query date; The fitted net value corresponding to the current query day is determined according to the fitted net value corresponding to the previous query day and the current market value change information.
6. The method according to claim 1, characterized in that Before the step of obtaining the cumulative contribution result of the previous query interval and generating the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day, the step includes: Determining whether the previous query interval is a full query interval; If yes, then obtain the combined product data corresponding to each query day from the start query day to the query day before the current query day in the previous query interval; Constructing a full calculation matrix based on the combined product data corresponding to each of the query days; Solve the full calculation matrix to obtain the cumulative contribution result of the previous query interval.
7. The method according to claim 6, characterized in that After the step of determining whether the previous query interval is a full query interval, the method further includes: If not, obtain the incremental contribution results of each query day in the previous query interval from the starting query day to the previous query day of the current query day, and accumulate the incremental contribution results of each query day to generate the cumulative contribution result of the previous query interval.
8. A product contribution analysis device, characterized in that: The device comprises: A request receiving module, configured to determine a current query interval upon receiving a revenue contribution query request, wherein the current query interval is an interval formed by a start query date to a current query date; An incremental calculation module is used to obtain the combined product data of the current query day, and to construct an incremental calculation matrix according to the combined product data of the current query day; solve the incremental calculation matrix to obtain the incremental contribution result of the current query day; A result generation module is used to obtain the cumulative contribution result of the previous query interval, and generate the cumulative contribution result of the current query interval in combination with the incremental contribution result of the current query day. The previous query interval is the interval formed by the query day from the starting query day to the previous query day of the current query day.
9. A product contribution analysis device, characterized in that: The product contribution analysis device includes: a memory, a processor, and a product contribution analysis program stored in the memory and executable on the processor. When the product contribution analysis program is executed by the processor, the steps of the product contribution analysis method as described in any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium stores a product contribution analysis program, which, when executed by a processor, implements the steps of the product contribution analysis method according to any one of claims 1 to 7.