Attribution method for data indicator fluctuations and related apparatus
Patent Information
- Application Number
- CN202610865015.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,现有技术中仍旧难以准确确定目标指标发生波动的原因
[0010]由上述实施方式可知,本申请多个实施例通过获取针对目标指标于目标期间和基准期间的指标数据以及包括单层归因维度和组合归因维度的归因维度集合,并针对每个归因维度计算各因子对目标指标的指标波动的贡献率,再基于各因子的贡献率分布识别每个归因维度中的异常因子,进而根据异常因子的贡献率绝对值之和以及因子数量生成每个归因维度的归因评分,并根据归因评分确定根因维度,实现了从多个归因维度中结合异常贡献情况和因子数量确定目标指标发生波动的根因维度,达到了提升目标指标的指标波动归因准确性的效果。
Smart Images

Figure CN123014752A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this application relate to the field of computer data processing, and more particularly to a method and apparatus for attributing fluctuations in data indicators. Background Technology
[0002] In the field of metric monitoring, it is typically necessary to compare and analyze the metric data of a target metric over different periods to determine the reasons for fluctuations. For example, in scenarios such as internet healthcare, e-commerce search, or online transactions, metric data such as transaction amount, conversion rate, and click-through rate can be compared between the target period and the baseline period, and broken down according to attribution dimensions such as category, brand, channel, and user type to analyze the impact of different factors on the fluctuations of the target metric.
[0003] However, with existing technologies, it remains difficult to accurately determine the reasons for fluctuations in target indicators. Summary of the Invention
[0004] In view of this, one or more embodiments of this application provide a method and related apparatus for attributing data indicator fluctuations, which can improve the accuracy of attributing the fluctuations of target indicators to a certain extent.
[0005] In a first aspect, one or more embodiments of this application propose an attribution method for data indicator fluctuations, comprising: acquiring indicator data for a target indicator during a target period and a baseline period, and an attribution dimension set; wherein, the attribution dimension set includes attribution dimensions; the attribution dimensions include multiple single-level attribution dimensions and combined attribution dimensions formed by combinations of multiple single-level attribution dimensions; the indicator data included in each attribution dimension is divided into multiple factors; for each attribution dimension, calculating the contribution rate of each factor to the indicator fluctuation of the target indicator based on the indicator data; identifying abnormal factors in each attribution dimension based on the contribution rate distribution of each factor; calculating the sum of the absolute values of the contribution rates of abnormal factors in each attribution dimension as the abnormal contribution percentage; generating an attribution score for each attribution dimension based on the abnormal contribution percentage and the number of factors in each attribution dimension; and determining the root cause dimension from the attribution dimensions included in the attribution dimension set based on the attribution score.
[0006] Secondly, one or more embodiments of this application propose an attribution device for data indicator fluctuations, comprising: an acquisition module, configured to acquire indicator data for a target indicator during a target period and a baseline period, and an attribution dimension set; wherein the attribution dimension set includes attribution dimensions; the attribution dimensions include multiple single-layer attribution dimensions and a combined attribution dimension formed by combining multiple single-layer attribution dimensions; the indicator data included in each attribution dimension is divided into multiple factors; a first calculation module, configured to calculate the contribution rate of each factor to the indicator fluctuation of the target indicator for each attribution dimension based on the indicator data; an identification module, configured to identify abnormal factors in each attribution dimension based on the contribution rate distribution of each factor; a second calculation module, configured to calculate the sum of the absolute values of the contribution rates of abnormal factors in each attribution dimension as the abnormal contribution percentage; a generation module, configured to generate an attribution score for each attribution dimension based on the abnormal contribution percentage and the number of factors in each attribution dimension; and a determination module, configured to determine the root cause dimension from the attribution dimensions included in the attribution dimension set based on the attribution score.
[0007] Thirdly, one or more embodiments of this application provide a computer device including a memory and a processor, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the method as described above.
[0008] Fourthly, one or more embodiments of this application provide a computer program product including computer instructions that, when executed by a processor, implement the method as described above.
[0009] Fifthly, one or more embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method as described above.
[0010] As can be seen from the above embodiments, multiple embodiments of this application obtain indicator data for the target indicator during the target period and the baseline period, as well as an attribution dimension set including single-layer attribution dimensions and combined attribution dimensions. For each attribution dimension, the contribution rate of each factor to the indicator fluctuation of the target indicator is calculated. Then, based on the contribution rate distribution of each factor, abnormal factors in each attribution dimension are identified. Subsequently, attribution scores for each attribution dimension are generated based on the sum of the absolute values of the contribution rates of abnormal factors and the number of factors. The root cause dimension is determined based on the attribution scores. This achieves the effect of determining the root cause dimension of the target indicator fluctuation from multiple attribution dimensions by combining the abnormal contribution situation and the number of factors, thereby improving the accuracy of attribution of the indicator fluctuation of the target indicator. Attached Figure Description
[0011] Figure 1This is a flowchart of a data indicator fluctuation attribution method provided in one embodiment of this application.
[0012] Figure 2 This is a schematic diagram of a data indicator fluctuation attribution device provided in one embodiment of this application.
[0013] Figure 3 This is a schematic diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments.
[0015] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0016] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] In the field of metric monitoring, related technologies typically require comparative analysis of target metric data across different periods to determine the causes of fluctuations. Specifically, this involves acquiring metric data for both the target and baseline periods, and then breaking down the data according to attribution dimensions such as category, brand, channel, and user type. This allows for comparison of changes in the metrics for each factor under different attribution dimensions. For example, in scenarios like internet healthcare, e-commerce search, or online transactions, year-on-year or month-on-month analyses can be performed on target metrics such as transaction amount, conversion rate, and click-through rate. Based on the changes in metrics corresponding to different categories, brands, channels, or user types, it can be determined which factors may have influenced the fluctuations in the target metric.
[0018] While the methods described above can assist in analyzing the causes of fluctuations in target metrics to some extent, in real-world scenarios, these fluctuations are often not caused by a single factor within a single dimension. For example, an increase in transaction volume might appear to originate primarily from a particular category, but upon further breakdown, it could be mainly driven by specific brands within that category. Similarly, while there might be no particularly prominent anomalous factors from a channel perspective, a combined attribution dimension based on the combination of channels and user types could reveal significant anomalous factors. Therefore, relying solely on a single attribution dimension can result in coarse-grained attribution results, making it difficult to accurately pinpoint the specific reasons for fluctuations in target metrics.
[0019] Furthermore, when conducting attribution analysis on target indicators, multiple single-level attribution dimensions can be combined to form a combined attribution dimension to obtain more granular attribution results. However, combined attribution dimensions usually result in a larger number of factors, and the number, contribution level, and contribution rate distribution of factors under different attribution dimensions may vary significantly. If the root cause dimension is determined solely based on the contribution rate of a single factor, or solely based on the contribution of anomalous factors under a single attribution dimension, the impact of differences in the number of factors between different attribution dimensions may be ignored, leading to the selected root cause dimension failing to accurately explain the fluctuations in the target indicator.
[0020] In summary, the relevant technologies still have the problem of being unable to accurately determine the reasons for fluctuations in target indicators, and further improvements are needed.
[0021] In several embodiments provided in this application, the attribution method and related apparatus for data indicator fluctuations can be applied to electronic devices with certain computing and network access capabilities. These electronic devices can be desktop computers, laptops, tablets, smartphones, or servers. Specifically, the electronic device includes a processor, memory, and a network access module for network communication. The server can be an electronic device with strong data processing capabilities; of course, a server can also refer to a server cluster formed by multiple electronic devices, or a quantum server built using a quantum computer.
[0022] One embodiment of this application provides an example of an application scenario for an attribution device for data indicator fluctuations. The attribution device can be applied in scenarios such as internet healthcare, e-commerce search, or online transactions to perform attribution analysis on the fluctuations of a target indicator between a target period and a baseline period, and to determine the root cause dimension most suitable for explaining the fluctuations from multiple attribution dimensions. In some embodiments, the attribution device may include or invoke a period configuration module, a dimension management module, a contribution engine, an anomaly detector, a scoring processor, and an attribution decision-maker. The period configuration module can be used to determine the target period and the baseline period; the dimension management module can be used to generate or manage a set of attribution dimensions; the contribution engine can be used to calculate the contribution rate of each factor to the fluctuations of the target indicator; the anomaly detector can be used to identify anomalous factors in each attribution dimension; the scoring processor can be used to generate an attribution score for each attribution dimension; and the attribution decision-maker can be used to determine the root cause dimension based on the attribution score and output the attribution result.
[0023] In this example scenario, we take the search transaction analysis of an internet healthcare platform as an example. Platform operators discovered that the transaction amount in search scenarios increased significantly during the target period compared to the baseline period, requiring analysis of the main reasons for this increase. Specifically, the target metric can be the transaction amount, the target period can be the current seven days, and the baseline period can be the same period last year. The attribution device can receive the period configuration through the period configuration module and obtain the target metric data for the target period and the baseline period based on the period configuration. For example, if the total transaction amount during the target period is 12.5 million yuan, and the total transaction amount during the baseline period is 11 million yuan, then the overall change in the target metric is 1.5 million yuan. In other scenarios, the period configuration can include absolute dates, relative dates, year-on-year periods, or month-on-month periods. For example, platform operators can configure the target period as December 1, 2025 to December 7, 2025, and the baseline period as December 1, 2024 to December 7, 2024, for year-on-year analysis; or they can configure the target period as the most recent seven days and the baseline period as the seven days prior to the target period for month-on-month analysis. In this way, the attribution mechanism can flexibly determine the target period and baseline period according to different transaction analysis tasks.
[0024] The attribution device can also automatically generate an attribution dimension set based on multiple preset analytical perspectives through the dimension management module. Specifically, the preset multiple analytical perspectives can include category, brand, store type, etc. The attribution device can enumerate all single-layer dimension combinations composed of analytical perspectives to generate single-layer attribution dimensions such as category, brand, and store type; it can also enumerate multi-layer dimension combinations formed by multiple single-layer dimension combinations to generate combined attribution dimensions such as category-brand, category-store type, and brand-store type. In this way, the attribution dimension set includes both single-layer attribution dimensions and combined attribution dimensions, enabling the attribution device to analyze the reasons for the increase in transaction amount from different analytical granularities. In some implementations, the attribution device can also combine transaction prior configuration of the attribution dimension set. For example, platform operators can pre-configure category, store type, and category-brand as the attribution dimension set for this analysis task to reduce dimension combinations with low relevance to the analysis of this transaction.
[0025] After determining the set of attribution dimensions, the dimension management module can generate corresponding data aggregation conditions for each attribution dimension and aggregate indicator data from the transaction database for the target and baseline periods. For example, for the category dimension, the dimension management module can group and aggregate transaction amounts according to the category field; for the store type dimension, the dimension management module can group and aggregate transaction amounts according to the store type field; for the category-brand dimension, the dimension management module can group and aggregate transaction amounts according to both the category and brand fields. In this way, the attribution device can obtain indicator data for each factor under each attribution dimension for the target and baseline periods, providing a data foundation for subsequent calculation of contribution rates.
[0026] After generating the attribution dimension set and completing data aggregation, the attribution device can divide the indicator data included in each attribution dimension into multiple factors. For example, under the category dimension, factors may include medical devices, pharmaceuticals, health supplements, adult products, etc.; under the store type dimension, factors may include flagship stores, specialty stores, franchise stores, regular stores, overseas stores, etc.; under the category-brand dimension, factors may include medical devices-brand A, medical devices-brand B, medical devices-brand C, pharmaceuticals-brand D, etc.
[0027] Since the target metric in this example is transaction amount, which can be directly obtained by summing the transaction amounts of each factor, it is an additive metric. The contribution engine can calculate the contribution rate of each factor to the fluctuation of the target metric based on the proportion of the change in the metric value of each factor between the target period and the baseline period to the total change in the target metric. Specifically, in the additive metric scenario, Y is the summed data of the target metric, and X is the metric obtained by adding and decomposing Y, i.e., Y = X. a +Xb +X c +……, the contribution engine can calculate the contribution rate of factor a according to the following formula: C a =(X a new -X a old ) / (Y new -Y old ) Among them, C a X represents the contribution rate of factor a to the fluctuation of the target indicator. a new X represents the numerical value of factor a during the target period. a old Y represents the index value of factor a during the baseline period. new Y represents the overall value of the target indicator during the target period. old This represents the overall value of the target indicator during the baseline period. Thus, the contribution rate of factor a can be used to characterize the proportion of the change in factor a itself within the overall change in the target indicator.
[0028] For example, at the category level, the transaction amount for medical devices in the target period was 5.25 million yuan, while the transaction amount in the baseline period was 4 million yuan, resulting in a change of 1.25 million yuan in the indicator value. Since the overall change in the target indicator was 1.5 million yuan, the contribution rate for medical devices is the ratio of 1.25 million yuan to 1.5 million yuan, which is 83.33%. As another example, the transaction amount for pharmaceuticals in the target period was 3.05 million yuan, while the transaction amount in the baseline period was 3 million yuan, resulting in a change of 50,000 yuan in the indicator value, corresponding to a contribution rate of 3.33%. Health supplements and adult products each increased by 100,000 yuan, corresponding to contribution rates of 6.67% respectively.
[0029] For the category-brand dimension, the contribution engine can calculate the contribution rate of each factor in the same way. For example, Medical Device Brand A's transaction amount in the target period was 4.46 million yuan, and its transaction amount in the baseline period was 3.76 million yuan, with a change in indicator value of 700,000 yuan, corresponding to a contribution rate of 46.67%. Medical Device Brand B's transaction amount in the target period was 650,000 yuan, and its transaction amount in the baseline period was 150,000 yuan, with a change in indicator value of 500,000 yuan, corresponding to a contribution rate of 33.33%. Medical Device Brand C's transaction amount increased by 50,000 yuan between the target period and the baseline period, corresponding to a contribution rate of 3.33%. The contribution rates of other factors are relatively low.
[0030] After obtaining the contribution rate of each factor under each attribution dimension, the anomaly detector can identify anomalous factors in each attribution dimension based on the contribution rate distribution of each factor. Specifically, for each attribution dimension, the anomaly detector can sort the contribution rate values of all factors under that attribution dimension and calculate the first quartile and the third quartile. The first quartile can be the value located at the 25th percentile of the contribution rate distribution, and the third quartile can be the value located at the 75th percentile of the contribution rate distribution. The anomaly detector can determine the interquartile range (IQM) as the difference between the third quartile and the first quartile.
[0031] Furthermore, the anomaly detector can set the lower limit of the anomaly threshold to the product of the first quartile minus a first specified multiple and the interquartile range, and the upper limit of the anomaly threshold to the product of the third quartile plus a second specified multiple and the interquartile range. For example, the first and second specified multiples can both be 1.5. If the contribution rate of a factor is less than the lower limit of the anomaly threshold or greater than the upper limit of the anomaly threshold, the anomaly detector can mark that factor as an anomaly factor.
[0032] For example, at the category level, the contribution rate of most categories is relatively low, while the contribution rate of medical devices is 83.33%, significantly higher than other categories. The anomaly detector can determine the upper limit of the anomaly threshold based on the contribution rate distribution of each factor at the category level, and mark medical devices as an anomalous factor at the category level if their contribution rate exceeds this upper limit. At the category-brand level, if the contribution rates of Medical Device-A and Medical Device-B are significantly higher than other brand combination factors, the anomaly detector can mark Medical Device-A and Medical Device-B as anomalous factors at the category-brand level. At the store type level, if the contribution rate distribution of each store type is relatively balanced, and no factor has a contribution rate exceeding the upper limit or falling below the lower limit of the anomaly threshold, the anomaly detector can determine that there are no anomalous factors at the store type level.
[0033] In other implementations, anomaly detectors can also employ isolated forests to identify anomalous factors. Isolated forests can be used to identify factors that significantly deviate from the overall distribution from multiple factors. Specifically, the anomaly detector can input the contribution rate of each factor under the same attribution dimension, or data such as the contribution rate and the change in indicator values, into the isolated forest model, and the model outputs the degree of anomalousness for each factor. If the degree of anomalousness of a factor meets specified anomalous conditions, the anomaly detector can mark that factor as an anomalous factor. For example, under the category-brand dimension, if medical device-A and medical device-B are significantly different from other brand combination factors in terms of contribution rate and change in indicator values, the isolated forest model can also identify medical device-A and medical device-B as anomalous factors. Thus, the anomaly detector can select different anomaly detection methods based on the distribution characteristics of the transaction data to identify anomalous factors that have a significant impact on the fluctuation of the target indicator.
[0034] Subsequently, the attribution device can calculate the sum of the absolute values of the contribution rates of the outliers in each attribution dimension as the outlier contribution percentage. For example, under the category dimension, if the outlier is medical devices and its contribution rate is 83.33%, then the outlier contribution percentage for the category dimension can be 83.33%. Under the category-brand dimension, the outliers include medical device-A brand and medical device-B brand, with contribution rates of 46.67% and 33.33% respectively, so the outlier contribution percentage for the category-brand dimension can be 80.00%. Under the store type dimension, since there are no outliers, the outlier contribution percentage for the store type dimension can be 0.
[0035] Furthermore, the scoring processor can generate attribution scores for each attribution dimension based on the proportion of outliers and the number of factors in each attribution dimension. Specifically, the scoring processor can first obtain the average number of factors across all attribution dimensions. For example, the category dimension has 4 factors, the store type dimension has 6 factors, and the category-brand dimension has 15 factors. The scoring processor can calculate the average number of factors based on 4, 6, and 15. The scoring processor can also calculate the standard deviation of the number of factors across all attribution dimensions and use the ratio of this standard deviation to the average number of factors as the degree of dispersion. Furthermore, the scoring processor can dynamically determine a preset index based on the degree of dispersion. If the difference in the number of factors across attribution dimensions is large, the preset index can be correspondingly larger to enhance the impact of the difference in the number of factors on the penalty coefficient; if the difference in the number of factors across attribution dimensions is small, the preset index can be correspondingly smaller to avoid small differences in the number of factors having an excessive impact on the attribution score.
[0036] After determining the average number of factors and the preset index, the scoring processor can, for each attribution dimension, input the number of factors for that attribution dimension into the Softplus function to obtain a first value, and input the average number of factors into the Softplus function to obtain a second value. The Softplus function can be expressed as softplus(x) = ln(1 + e^x). x The scoring processor can calculate the penalty coefficient by raising the ratio of the first value to the second value to a preset exponent. Specifically, the penalty coefficient can be expressed as [softplus(N) / softplus(μ)]. α Where N represents the number of factors in the current attribution dimension, μ represents the average number of factors across all attribution dimensions, and α represents a preset index dynamically determined based on the degree of dispersion. The scoring processor can scale the proportion of outliers based on this penalty coefficient to obtain the attribution score. Accordingly, the attribution score can be expressed as: S=C a ×[(softplus(N) / softplus(μ))] α Where S represents the attribution score for the current attribution dimension, and C a This represents the percentage of outliers in the current attribution dimension, N represents the number of factors in the current attribution dimension, μ represents the average number of factors across all attribution dimensions, and α represents a preset index. Thus, the number of factors can be smoothed using the Softplus function to further consider the analytical granularity of the attribution dimension beyond just the percentage of outliers.
[0037] For example, for the category dimension, with 4 factors and anomaly contribution accounting for 83.33%, the scoring processor can input 4 into the Softplus function to obtain the first value, and input the average number of factors into the Softplus function to obtain the second value. Then, based on the ratio of these two values and a preset index, it obtains the penalty coefficient for the category dimension, and further scales the 83.33% to obtain the attribution score for the category dimension. For the category-brand dimension, with 15 factors and anomaly contribution accounting for 80.00%, the scoring processor can input 15 into the Softplus function to obtain the first value, and input the average number of factors into the Softplus function to obtain the second value. Then, based on the ratio of these two values and a preset index, it obtains the penalty coefficient for the category-brand dimension, and further scales the 80.00% to obtain the attribution score for the category-brand dimension. For the store type dimension, since the aomaly contribution percentage is 0, even if it has a certain number of factors, the attribution score can still be 0.
[0038] In this scenario example, after the preset index and other parameters are determined, the scoring processor can obtain the attribution scores for each attribution dimension. For example, the category-brand dimension has 15 factors and an anomalous contribution rate of 80.00%, corresponding to an attribution score of 1.43; the category dimension has 4 factors and an anomalous contribution rate of 83.33%, corresponding to an attribution score of 0.40; the store type dimension has 6 factors and an anomalous contribution rate of 0, corresponding to an attribution score of 0. It can be seen that although the anomalous contribution rate of the category dimension is higher than that of the category-brand dimension, the category dimension only indicates that the increase in transaction amount mainly comes from medical devices, with a relatively coarse explanatory granularity. The category-brand dimension can further explain that the increase in transaction amount mainly comes from brands A and B under the medical device category, providing a more granular explanatory capability. Based on the attribution score, the attribution decision-maker can determine the category-brand dimension as the root cause dimension from the attribution dimensions included in the attribution dimension set, and identify medical device-A brand and medical device-B brand as key anomalous factors under this root cause dimension.
[0039] Furthermore, the attribution mechanism can generate attribution reports based on root cause dimensions and key anomalies. Attribution reports can include target metrics, target period, baseline period, overall change, root cause dimensions, anomalies, anomaly contribution percentages, and attribution scores. For example, an attribution report might state: "The transaction amount for this search scenario increased by 1.5 million yuan in the past seven days compared to the same period last year, mainly attributable to the category-brand dimension; among which, Medical Devices-A brand contributed approximately 46.67%, and Medical Devices-B brand contributed approximately 33.33%, both constituting the main anomaly factors." Through this attribution report, platform operators can directly understand that the increase in transaction amount is more appropriately explained from the category-brand dimension, rather than simply based on the analysis results at the medical device category level.
[0040] In another scenario, the target metric can also be conversion rate. Conversion rate is a ratio-based metric. When calculating the contribution of each factor to the fluctuation of conversion rate, the attribution device can decompose the contribution of each factor into the contribution of relative numerical index fluctuation and the contribution of structural change. The contribution of relative numerical index fluctuation can correspond to the contribution of efficiency change, used to characterize the impact of changes in the factor's own ratio; the contribution of structural change can characterize the impact of changes in the factor's weight in the overall population.
[0041] Specifically, for any factor 'a', the contribution engine can calculate the relative index fluctuation contribution using the following formula: A a =(R a new -R a old )×(Y aold / ∑Y old ) Among them, A a R represents the relative index fluctuation contribution corresponding to factor a. a new Ra represents the ratio of factor a during the target period. old Y represents the ratio of factor a during the baseline period. a old ∑Y represents the weighted benchmark index value corresponding to factor a during the benchmark period. old This represents the sum of the weighted benchmark metric values for all factors during the benchmark period. For example, in the case of conversion rate, the weighted benchmark metric value could be the number of users accessing the site or the number of impressions.
[0042] The contribution engine can also calculate the contribution of structural changes using the following formula: B a =(Y a new / ∑Y new -Y a old / ∑Y old )×(R a new -R old ) Among them, B a Y represents the contribution of structural change corresponding to factor a. a new ∑Y represents the weighted benchmark index value corresponding to factor a during the target period. new R represents the sum of the weighted benchmark values of all factors during the target period. old This represents the overall ratio of the target indicator during the baseline period. This structural change contribution can be used to characterize the impact of changes in the weighting of factor a in the population on the volatility of the target indicator.
[0043] Furthermore, the contribution engine can calculate the contribution rate of factor a to the index fluctuation of ratio-type indicators using the following formula: C a =(A a +B a ) / (R new -R old ) Among them, C a R represents the contribution rate of factor a to the fluctuation of the target indicator. new R represents the overall ratio of the target indicator during the target period. oldThis represents the overall ratio of the target indicator during the baseline period. In this way, the contribution engine can comprehensively allocate the impact of changes in the factor's own ratio and changes in the factor's structural proportion, thus obtaining the factor's contribution rate to the fluctuation of the overall ratio-type indicator.
[0044] For example, when the attribution dimension is channel, if a channel's conversion rate is 3% during the baseline period and 5% during the target period, the improvement in that channel's conversion rate can be attributed to the relative metric fluctuation A. a This is reflected in the fact that if the proportion of users accessing the platform through this channel also increases from 20% to 35% of the total number of users, then the change in the structural proportion of this channel in the overall picture can contribute to B through structural change. a Reflection. The contribution engine can reflect A. a and B a After adding them together, divide by the overall percentage change of the target indicator between the target period and the baseline period to obtain the contribution rate C of this channel to the overall conversion rate fluctuation. a Subsequently, the attribution device can continue to perform anomaly factor identification, anomaly contribution ratio calculation, attribution score generation, and root cause dimension determination in the aforementioned manner. Thus, the attribution device can be applied to both additive indicators such as transaction amount and ratio indicators such as conversion rate.
[0045] In this scenario example, the attribution device determines the target period and baseline period through the period configuration module, and automatically generates or receives a set of attribution dimensions, including single-layer and combined attribution dimensions, through the dimension management module. It then aggregates the indicator data for each attribution dimension from both the target and baseline periods. The contribution engine calculates the contribution rate of each factor for each attribution dimension. The anomaly detector identifies anomalous factors through contribution rate distribution or isolated forests. The scoring processor generates attribution scores by combining the percentage of anomalous contributions with the number of factors. The attribution decision-maker determines the root cause dimension based on the attribution scores and outputs an attribution report. Thus, the attribution device does not rely solely on the contribution rate of a single factor, nor does it limit itself to a single attribution dimension. Instead, it combines anomalous contributions and analytical granularity from multiple candidate attribution dimensions to determine the root cause dimension most suitable for explaining the fluctuations in the target indicator, thereby improving the accuracy of attributing indicator fluctuations.
[0046] Please see Figure 1 One embodiment of this application provides a method for attributing data metric fluctuations. This method can be applied to an attribution device, which can be applied to the aforementioned electronic device possessing certain computing power and network access capabilities. Of course, in some embodiments, the attribution device can also be software running on the electronic device. The method for attributing data metric fluctuations may include the following steps.
[0047] Step S110: Obtain indicator data for the target indicator during the target period and the baseline period, and a set of attribution dimensions; wherein, the set of attribution dimensions includes attribution dimensions; the attribution dimensions include multiple single-level attribution dimensions and combined attribution dimensions formed by combinations of multiple single-level attribution dimensions; the indicator data included in each attribution dimension is divided into multiple factors.
[0048] Step S120: For each attribution dimension, calculate the contribution rate of each factor to the index fluctuation of the target index based on the index data.
[0049] Step S130: Based on the contribution rate distribution of each factor, identify the abnormal factors in each attribution dimension.
[0050] Step S140: Calculate the sum of the absolute values of the contribution rates of the anomalous factors in each attribution dimension as the anomalous contribution percentage.
[0051] Step S150: Based on the percentage of abnormal contributions and the number of factors in each attribution dimension, generate an attribution score for each attribution dimension.
[0052] Step S160: Determine the root cause dimension from the attribution dimensions included in the attribution dimension set based on the attribution score.
[0053] In this embodiment, the attribution device can be used to compare and analyze the data of a target metric across different periods to determine the reasons for fluctuations in the target metric. The target metric can be a transactional indicator that requires monitoring and attribution analysis, such as transaction amount, conversion rate, click-through rate, order volume, and page views. The target period can be the period during which the reasons for fluctuations in the target metric need to be analyzed, and the baseline period can be the period compared to the target period. For example, the target period can be the current seven days, and the baseline period can be the same period last year (seven days), or the target period can be the current calendar day, and the baseline period can be the previous calendar day.
[0054] In this embodiment, the attribution device can acquire indicator data for the target indicator during the target period and the baseline period, and an attribution dimension set. The indicator data can be used to characterize the indicator values corresponding to the target indicator during the target period and the baseline period, respectively. Specifically, the indicator data may include the overall indicator value of the target indicator during the target period, the overall indicator value of the target indicator during the baseline period, and the indicator values corresponding to each factor obtained under different attribution dimensions. The attribution dimension set can be understood as a set of dimensions used for splitting and attribution analysis of the indicator data of the target indicator. The attribution dimension set includes attribution dimensions, which can be used to characterize the analytical perspective for observing the reasons for fluctuations in the target indicator.
[0055] In this embodiment, the attribution dimensions include multiple single-layer attribution dimensions and combined attribution dimensions formed by combinations of multiple single-layer attribution dimensions. A single-layer attribution dimension can be an attribution dimension formed from a single analytical perspective, such as category, brand, channel, user type, or store type. A combined attribution dimension can be an attribution dimension formed by combining multiple single-layer attribution dimensions, such as a combined attribution dimension formed by category and brand, or a combined attribution dimension formed by channel and user type. Thus, the attribution device can analyze the fluctuations of the target indicator not only from a single analytical perspective, but also from a more granular perspective formed by combining multiple analytical perspectives.
[0056] In this embodiment, the indicator data included in each attribution dimension is divided into multiple factors. A factor can be understood as a specific value object used to carry the indicator data under an attribution dimension. For example, when the attribution dimension is a category, factors may include different categories such as pharmaceuticals, medical devices, and health supplements; when the attribution dimension is a brand, factors may include different brands; when the attribution dimension is a combined attribution dimension formed by a combination of category and brand, factors may include objects formed by combining category values and brand values, such as Medical Device-A brand, Medical Device-B brand, and Pharmaceutical-C brand. By dividing the indicator data included in each attribution dimension into multiple factors, the attribution device can further analyze the impact of different factors on the fluctuations of the target indicator.
[0057] In this embodiment, for each attribution dimension, the attribution device can calculate the contribution rate of each factor to the fluctuation of the target indicator based on the indicator data. The contribution rate can be used to characterize the degree of influence of the corresponding factor on the fluctuation of the target indicator between the target period and the baseline period. Specifically, for each factor under the same attribution dimension, the attribution device can compare the indicator data corresponding to that factor in the target period and the baseline period, and combine this with the overall fluctuation of the target indicator between the target period and the baseline period to calculate the contribution rate of that factor to the fluctuation of the target indicator. For example, when the target indicator is transaction amount, the attribution device can determine the degree of contribution of a factor to the overall change in transaction amount based on the change of a certain factor in transaction amount between the target period and the baseline period.
[0058] In this embodiment, the attribution device can identify anomalous factors in each attribution dimension based on the contribution rate distribution of each factor. The contribution rate distribution can be used to characterize the overall distribution of the contribution rates of multiple factors under the same attribution dimension. An anomalous factor can be understood as a factor whose contribution rate deviates significantly from that of other factors under the corresponding attribution dimension. Specifically, under an attribution dimension, if the contribution rate of a certain factor is significantly higher or lower than the contribution rate of other factors under that attribution dimension, that factor can be identified as an anomalous factor. In this way, the attribution device can identify factors that are more likely to have a major driving or dragging effect on the fluctuation of the target indicator in each attribution dimension, rather than relying solely on human experience to determine the cause of the fluctuation of the target indicator.
[0059] In this embodiment, the attribution device can calculate the sum of the absolute values of the contribution rates of anomalous factors in each attribution dimension as the anomalous contribution ratio. The anomalous contribution ratio can be used to characterize the overall explanatory power of anomalous factors on the fluctuations of the target indicator under the corresponding attribution dimension. Specifically, the attribution device can identify one or more anomalous factors in an attribution dimension and sum the absolute values of the contribution rates corresponding to these anomalous factors to obtain the anomalous contribution ratio corresponding to that attribution dimension. Since the contribution rate may represent a positive pull or a negative drag, by calculating the sum of the absolute values of the contribution rates, the overall influence of anomalous factors on the fluctuations of the target indicator can be characterized more fully.
[0060] In this embodiment, the attribution device can generate an attribution score for each attribution dimension based on the proportion of abnormal contributions and the number of factors in each attribution dimension. The number of factors can be used to characterize the number of factors obtained under the corresponding attribution dimension, or it can be used to reflect the analytical granularity of the corresponding attribution dimension. The attribution score can be understood as a comprehensive score used to evaluate the explanation of the cause of the fluctuation of the target indicator by the corresponding attribution dimension. Specifically, the attribution device can generate an attribution score for each attribution dimension by combining the proportion of abnormal contributions of abnormal factors under that attribution dimension and the analytical granularity represented by the number of factors under that attribution dimension. In this way, when evaluating different attribution dimensions, the attribution device not only considers the contribution of abnormal factors to the fluctuation of the target indicator, but also considers the impact of the difference in the number of factors between different attribution dimensions on the attribution results.
[0061] In this embodiment, the attribution device can determine the root cause dimension from the attribution dimensions included in the attribution dimension set based on the attribution score. The root cause dimension can be understood as the primary attribution dimension in the attribution dimension set used to explain the fluctuations in the target indicator. Specifically, the attribution device can compare the attribution scores corresponding to multiple attribution dimensions and select the attribution dimension whose attribution score meets specified conditions as the root cause dimension based on the comparison results. For example, the attribution device can determine the attribution dimension with the highest attribution score as the root cause dimension. Furthermore, after determining the root cause dimension, the attribution device can also use the outliers in the root cause dimension as key factors explaining the fluctuations in the target indicator, so that users can further understand the specific reasons for the fluctuations in the target indicator.
[0062] In this embodiment, the attribution device acquires indicator data for the target indicator during the target period and the baseline period, as well as an attribution dimension set including single-level attribution dimensions and combined attribution dimensions. For each attribution dimension, it calculates the contribution rate of each factor to the fluctuation of the target indicator, identifies anomalous factors in each attribution dimension based on the contribution rate distribution of each factor, generates an attribution score for each attribution dimension based on the sum of the absolute values of the contribution rates of the anomalous factors and the number of factors, and determines the root cause dimension based on the attribution score. This allows the attribution device to determine the root cause dimension of the fluctuation of the target indicator from multiple attribution dimensions by combining the anomalous contribution and the number of factors, thereby improving the accuracy of attribution of the fluctuation of the target indicator.
[0063] In some implementations, the target indicator may be of additive or ratio types. If the target indicator is additive, the attribution device may calculate the contribution rate based on the proportion of the change in the indicator value of each factor between the target period and the baseline period to the total change in the target indicator. Alternatively, if the target indicator is ratio, the attribution device may decompose the contribution of each factor into efficiency change contribution and structural change contribution, and add the efficiency change contribution and the structural change contribution to obtain the contribution rate of each factor.
[0064] In this embodiment, the target indicator can be of two types: additive indicators and ratio indicators. Additive indicators can be understood as indicators whose overall value can be obtained by directly summing the values of each factor. For example, transaction amount, order volume, click volume, and page views can be additive indicators. Ratio indicators can be understood as indicators represented by the ratio between two related indicators; typically, the overall value cannot be obtained by directly adding the ratios of each factor. For example, conversion rate, click-through rate, and payment rate can be ratio indicators.
[0065] In this embodiment, when the attribution device calculates the contribution rate of each factor to the fluctuation of the target indicator based on the indicator data, it can first identify the indicator type of the target indicator, and then use the corresponding contribution rate calculation method according to the indicator type of the target indicator. In this way, the contribution rate calculation method can be matched with the data structure of the target indicator itself, avoiding the situation where the same calculation method is used for different types of target indicators, which would result in the contribution rate not accurately representing the impact of each factor on the indicator fluctuation.
[0066] In this embodiment, if the target indicator is an additive indicator, the attribution device can calculate the contribution rate based on the proportion of the change in indicator value of each factor during the target period and the baseline period to the total change in the target indicator. Specifically, for any factor under an attribution dimension, the attribution device can calculate the difference between the indicator value of that factor during the target period and the indicator value of that factor during the baseline period to obtain the change in the indicator value of that factor. The attribution device can also calculate the difference between the total indicator value of the target indicator during the target period and the total indicator value of the target indicator during the baseline period to obtain the total change in the target indicator. Further, the attribution device can use the ratio between the change in the indicator value of that factor and the total change in the target indicator as the contribution rate of that factor to the fluctuation of the target indicator.
[0067] For example, if the target metric is transaction amount, and the total transaction amount for the target period is 12.5 million yuan, while the total transaction amount for the baseline period is 11 million yuan, then the total change in the target metric is 1.5 million yuan. When the attribution dimension is a combination of category and brand, if the transaction amount for the factor "Medical Devices - Brand A" is 4.46 million yuan for the target period and 3.76 million yuan for the baseline period, then the change in the factor's metric value is 700,000 yuan. The attribution device can calculate the ratio between 700,000 yuan and 1.5 million yuan, yielding a contribution rate of approximately 46.67% for this factor. Thus, the contribution rate can be used to characterize the extent to which this factor contributes to the increase in transaction amount.
[0068] In this embodiment, if the target metric is a ratio-based metric, the attribution device can decompose the contribution of each factor into an efficiency change contribution and a structural change contribution, and then add the efficiency change contribution and the structural change contribution to obtain the contribution rate of each factor. Ratio-based metrics are typically characterized by the ratio between the numerator and denominator. For example, conversion rate can be characterized by the ratio between the number of users who made a purchase and the number of users who visited the site, and click-through rate can be characterized by the ratio between the number of clicks and the number of impressions. For ratio-based metrics, fluctuations in the target metric may arise from changes in the ratio level of a particular factor itself, or from changes in the proportion of that factor in the overall population.
[0069] In this embodiment, the contribution of efficiency changes can be used to characterize the impact of changes in the ratio level of the corresponding factor on the fluctuation of the target indicator. For example, when the target indicator is the conversion rate, if the conversion rate of a certain channel increases from 3% in the baseline period to 5% in the target period, even if the proportion of users accessing that channel does not change significantly, it may still have a positive impact on the overall conversion rate. The contribution of structural changes can be used to characterize the impact of changes in the structural proportion of the corresponding factor in the overall population on the fluctuation of the target indicator. For example, if the conversion rate of a certain channel itself does not change much, but the proportion of users accessing that channel to all users increases significantly, and that channel itself is a channel with a high conversion rate, then that channel may also affect the overall conversion rate through changes in its structural proportion.
[0070] Specifically, the attribution device can determine the efficiency value and structural proportion of each factor for the target period and the baseline period for ratio-type indicators. The efficiency value can be the ratio-type indicator value corresponding to the factor, and the structural proportion can be the ratio of the denominator indicator value corresponding to the factor to the total denominator indicator value. The attribution device can determine the contribution of efficiency change based on the change in efficiency value of the same factor between the target period and the baseline period; and determine the contribution of structural change based on the change in structural proportion of the same factor between the target period and the baseline period. Further, the attribution device can add the efficiency change contribution and the structural change contribution corresponding to the factor to obtain the contribution rate of the factor to the indicator fluctuation of the target indicator.
[0071] For example, if the target metric is conversion rate, and the attribution dimension is channel, then each factor can correspond to a channel. The attribution device can separately determine the number of users accessing the platform, the number of users making a purchase, and the channel conversion rate for each channel during the target period and the baseline period. On the one hand, if the conversion rate of a certain channel increases, that channel can contribute to the overall conversion rate through changes in efficiency; on the other hand, if the proportion of users accessing the platform to the total number of users accessing the platform changes, that channel can contribute to the overall conversion rate through changes in its structure. After adding the contributions of efficiency change and structural change to the platform, the attribution device can obtain the contribution rate of that channel to the fluctuation of the overall conversion rate. In this way, in the scenario of ratio-based metrics, the impact of changes in the efficiency of the factor itself and changes in the proportion of the factor structure on the fluctuation of the metric can be considered simultaneously, making the contribution rate more consistent with the fluctuation formation mechanism of ratio-based metrics.
[0072] In some implementations, the attribution device can calculate the first and third quartiles of the contribution rates of all factors under each attribution dimension, and determine the difference between the first and third quartiles as the interquartile range; set the lower limit of the anomaly threshold as the product of the first quartile minus a first specified multiple and the interquartile range, and the upper limit of the anomaly threshold as the product of the third quartile plus a second specified multiple and the interquartile range; and mark factors whose contribution rate values are less than the lower limit of the anomaly threshold or greater than the upper limit of the anomaly threshold as anomaly factors.
[0073] In this embodiment, after calculating the contribution rate of each factor to the fluctuation of the target indicator under each attribution dimension, the attribution device can further identify anomalous factors in each attribution dimension based on the contribution rate distribution of each factor. The contribution rate distribution reflects the overall distribution of the influence of each factor on the fluctuation of the target indicator under the same attribution dimension. Correspondingly, anomalous factors can be those whose contribution rate is significantly higher or lower than that of most factors in the contribution rate distribution, used to characterize the factors that primarily drive or drag down the fluctuation of the target indicator under the corresponding attribution dimension.
[0074] In this embodiment, the attribution device can calculate the first and third quartiles of the contribution rates of all factors under each attribution dimension. Specifically, the attribution device can first sort the contribution rate values of all factors under the same attribution dimension, and then determine the first and third quartiles based on the sorted contribution rate values. The first quartile can be a value located at the 25th percentile of the contribution rate distribution, indicating that approximately 25% of the factors have a contribution rate less than or equal to this value. The third quartile can be a value located at the 75th percentile of the contribution rate distribution, indicating that approximately 75% of the factors have a contribution rate less than or equal to this value. Thus, the first and third quartiles can jointly characterize the main distribution range of the contribution rates of most factors under the same attribution dimension.
[0075] In this embodiment, the attribution device can determine the interquartile range (ICM) as the difference between the first quartile and the third quartile. Specifically, the ICM can be understood as the difference between the third quartile and the first quartile, used to characterize the dispersion of the data in the middle part of the contribution rate distribution. That is, the ICM can reflect the span between the 25% and 75% positions in the contribution rate distribution. Compared to directly using the maximum and minimum values to determine the distribution range, the ICM can reduce the influence of extreme contribution rate values on the anomaly judgment range, making the identification of anomaly factors more stable.
[0076] In this embodiment, the attribution device can set the lower limit of the anomaly threshold to the product of the first quartile minus a first specified multiple and the interquartile range, and the upper limit of the anomaly threshold to the product of the third quartile plus a second specified multiple and the interquartile range. The first specified multiple and the second specified multiple can be used to adjust the sensitivity of anomaly identification. For example, both the first specified multiple and the second specified multiple can be set to 1.5, or they can be set according to the sensitivity of anomaly factor identification in different transaction scenarios. In this way, the attribution device can determine the anomaly judgment range matching the current attribution dimension based on its own contribution rate distribution, without having to uniformly set a fixed contribution rate threshold for all attribution dimensions.
[0077] In this embodiment, the attribution device can mark factors with contribution rates lower than the lower limit of the anomaly threshold or higher than the upper limit of the anomaly threshold as anomalous factors. Specifically, if the contribution rate of a factor is higher than the upper limit of the anomaly threshold, it indicates that the factor has a more prominent positive contribution relative to other factors in the same attribution dimension, and the factor can be marked as an anomalous factor. If the contribution rate of a factor is lower than the lower limit of the anomaly threshold, it indicates that the factor has a more prominent negative contribution relative to other factors in the same attribution dimension, and the factor can also be marked as an anomalous factor. In this way, the attribution device can identify factors that mainly drive the rise of the target indicator, as well as factors that mainly affect the fall of the target indicator or offset the rise.
[0078] For example, when the target metric is transaction amount and the attribution dimension is a combination of category and brand, the attribution device can calculate the contribution rate of multiple factors and sort these contribution rate values. If, among the sorted contribution rate values, the contribution rate at the 25th percentile corresponds to the first quartile, and the contribution rate at the 75th percentile corresponds to the third quartile, the attribution device can determine the interquartile range based on the difference between the third quartile and the first quartile. Furthermore, if the contribution rates of most factors are concentrated in a small range, but the contribution rates of "Medical Device - Brand A" and "Medical Device - Brand B" are significantly higher than other factors, the attribution device can determine an upper limit of the anomaly threshold based on the first quartile, the third quartile, and the interquartile range. If the contribution rate values of "Medical Device - Brand A" and "Medical Device - Brand B" exceed the upper limit of the anomaly threshold, they are marked as anomalous factors. In this way, the attribution device can automatically identify factors whose contribution rates significantly deviate from the overall distribution within each attribution dimension, providing a data foundation for subsequent calculation of the anomalous contribution ratio and generation of attribution scores.
[0079] In some implementations, the attribution device can obtain the average number of factors across all attribution dimensions; for each attribution dimension, the ratio of the number of factors in the attribution dimension to the average number of factors is non-linearly mapped using a smoothing increasing function to obtain a penalty coefficient; the attribution score is obtained by scaling the proportion of abnormal contributions based on the penalty coefficient.
[0080] In this embodiment, after calculating the sum of the absolute values of the contribution rates of anomalous factors in each attribution dimension as the anomalous contribution percentage, the attribution device can further generate an attribution score for each attribution dimension based on the anomalous contribution percentage and the number of factors in each attribution dimension. The attribution score can be used to characterize the comprehensiveness of the corresponding attribution dimension in explaining the causes of fluctuations in the target indicator. Specifically, the anomalous contribution percentage can characterize the overall influence of anomalous factors on the fluctuations of the target indicator under the corresponding attribution dimension, and the number of factors can characterize the number of factors that can be separated under the corresponding attribution dimension, and can also reflect the analytical granularity of the corresponding attribution dimension.
[0081] In this embodiment, the attribution device can obtain the average number of factors across all attribution dimensions. The average number of factors can be understood as the average number of factors for each attribution dimension in the attribution dimension set, used as a benchmark to measure the differences in granularity between different attribution dimensions. For example, the attribution dimension set includes category, store type, and combined attribution dimensions formed by category and brand combinations. If the number of factors corresponding to a category is 4, the number of factors corresponding to a store type is 6, and the number of factors corresponding to the combined attribution dimension formed by category and brand combinations is 15, then the attribution device can calculate the average number of factors for all attribution dimensions based on 4, 6, and 15.
[0082] In this embodiment, for each attribution dimension, the attribution device can non-linearly map the ratio of the number of factors in the attribution dimension to the average number of factors using a smoothing increasing function to obtain a penalty coefficient. This ratio can be used to characterize the degree of deviation of the number of factors in the current attribution dimension from the average number of factors across all attribution dimensions. If the ratio is less than 1, it indicates that the number of factors in the current attribution dimension is less than the average number of factors; if the ratio is greater than 1, it indicates that the number of factors in the current attribution dimension is greater than the average number of factors.
[0083] In this embodiment, the smoothing increment function can be a function that smoothly increases the output value as the input value increases, used to convert the difference between the number of factors and the average number of factors into a smoothly changing penalty coefficient. By using the smoothing increment function for non-linear mapping, abrupt changes in attribution scores when the number of factors changes slightly can be avoided, as well as avoiding excessive influence of factor number on the score caused by directly adjusting the attribution score linearly according to the number of factors. The penalty coefficient can be understood as a coefficient used to adjust the proportion of abnormal contributions based on the number of factors in the attribution dimension.
[0084] In this embodiment, the attribution device can scale the percentage of anomalous contributions based on the penalty coefficient to obtain the attribution score. Specifically, the attribution device can multiply the percentage of anomalous contributions for the corresponding attribution dimension by the penalty coefficient to obtain the attribution score for that attribution dimension. Thus, the attribution score is no longer determined solely by the percentage of anomalous contributions, but is simultaneously influenced by the contribution of anomalous factors and the number of factors within the attribution dimension.
[0085] For example, if the target metric is transaction amount, and there is an anomalous factor "medical devices" under the category dimension with a high percentage of anomalous contribution, but the number of factors under the category dimension is small, then while the category dimension can indicate that the increase in transaction amount mainly comes from a certain category, its explanatory granularity is relatively coarse. However, if the combined attribution dimension formed by the category and brand combination contains anomalous factors "medical devices - brand A" and "medical devices - brand B," and this combined attribution dimension has a larger number of factors, then this combined attribution dimension can further explain that the increase in transaction amount mainly comes from specific brands under the medical devices category. The attribution device can generate a penalty coefficient using the average number of factors and a smoothing increment function, and use this penalty coefficient to scale the percentage of anomalous contribution, allowing the attribution score to take into account both the percentage of anomalous contribution and the analytical granularity of the attribution dimension.
[0086] In this implementation, if the root cause dimension is determined solely based on the proportion of abnormal contributions, a single-layer attribution dimension with fewer factors may be preferentially selected, resulting in attribution results that remain at a coarse-grained analytical perspective. By combining the number of factors to generate a penalty coefficient and scaling the proportion of abnormal contributions based on the penalty coefficient, the attribution device can make more reasonable comparisons between different attribution dimensions. This allows the attribution score to more accurately characterize the explanatory power of the corresponding attribution dimension for the cause of fluctuations in the target indicator, providing a more reliable scoring basis for subsequently determining the root cause dimension based on the attribution score.
[0087] In some implementations, the smoothing increment function is a Softplus function; the attribution device can input the number of factors of the attribution dimension into the Softplus function to obtain a first value; input the average number of factors of the attribution dimension into the Softplus function to obtain a second value; and perform a preset exponentiation operation on the ratio of the calculated first value to the second value to obtain the penalty coefficient.
[0088] In this embodiment, the smoothly increasing function can be a Softplus function. A Softplus function is a smoothly increasing non-linear function used to convert an input value into a continuously and smoothly changing output value. For example, a Softplus function can be expressed as softplus(x) = ln(1 + e^x). x ), where x is the input value. By using the Softplus function, the influence of the number of factors on the penalty coefficient can be made to change smoothly, avoiding the direct linear effect of the difference in the number of factors on the attribution score, which would cause the attribution score to change too drastically.
[0089] In this embodiment, for each attribution dimension, the attribution device can input the number of factors for that attribution dimension into the Softplus function to obtain a first value. This first value can be used to characterize the granularity of the number of factors for the current attribution dimension after being mapped by a smoothing incremental function. For example, if the current attribution dimension is a combined attribution dimension formed by a combination of category and brand, and this combined attribution dimension includes 15 factors, then the attribution device can input 15 into the Softplus function to obtain the first value corresponding to this combined attribution dimension.
[0090] In this embodiment, the attribution device can input the average number of factors across all attribution dimensions into the Softplus function to obtain a second value. This second value can be used to characterize the baseline granularity feature of the average number of factors in the attribution dimension set after mapping by a smoothing incremental function. Specifically, if the attribution dimension set includes combined attribution dimensions formed by category, store type, and category and brand combinations, and the corresponding number of factors is 4, 6, and 15 respectively, then the average number of factors across all attribution dimensions can be the average of the aforementioned number of factors. The attribution device can input this average number of factors into the Softplus function to obtain a second value used as a comparison benchmark.
[0091] In this embodiment, the attribution device can obtain the penalty coefficient by performing a preset exponentiation operation on the ratio of the calculated first value to the second value. Specifically, the penalty coefficient can be calculated in the following manner: Penalty coefficient = [softplus(N) / softplus(μ)] α Where N represents the number of factors in the current attribution dimension, μ represents the average number of factors across all attribution dimensions, and α represents a preset index. The first value can correspond to softplus(N), and the second value can correspond to softplus(μ). The preset index can be used to adjust the strength of the impact of the difference between the number of factors and the average number of factors on the penalty coefficient.
[0092] In this embodiment, the attribution device can scale the proportion of the abnormal contribution based on the penalty coefficient to obtain the attribution score. Specifically, the attribution score can be calculated as follows: Attribution score = Percentage of outliers × [softplus(N) / softplus(μ)] α Through the above calculation method, the attribution score can be consistent with the scoring formula based on the Softplus function in the target solution. The anomaly contribution percentage is used to characterize the overall impact of the anomaly factors on the fluctuation of the target indicator under the corresponding attribution dimension, [softplus(N) / softplus(μ)]. α Used to smoothly scale the percentage of outliers based on the number of factors in the current attribution dimension relative to the average number of factors.
[0093] For example, if the target metric is transaction amount, and the attribution dimension set includes category, store type, and a combination of category and brand attribution dimensions, where the number of factors corresponding to each category is 4, the number of factors corresponding to each store type is 6, and the number of factors corresponding to the combination of category and brand attribution dimensions is 15, then the attribution device can first calculate the average number of factors for all attribution dimensions. For the combination of category and brand attribution dimensions, the attribution device can input 15 into the Softplus function to obtain a first value, and input the average number of factors into the Softplus function to obtain a second value. Then, the ratio of the first value to the second value is raised to a preset exponent to obtain the penalty coefficient corresponding to the combination attribution dimension. If the abnormal factors in the combination attribution dimension include "Medical Device - Brand A" and "Medical Device - Brand B", and the abnormal contribution ratios of these two are relatively high, then the attribution device can scale the abnormal contribution ratios according to the penalty coefficient to obtain the attribution score for the combination attribution dimension.
[0094] In this embodiment, by inputting the number of factors for the current attribution dimension and the average number of factors for all attribution dimensions into the Softplus function, and then determining the penalty coefficient based on the ratio of the two and a preset index, the difference between the current attribution dimension and the overall average granularity can be reflected while maintaining the smoothness of score changes. In this way, the attribution device can generate attribution scores according to a scoring method that is related to both the proportion of anomalous contributions and the number of factors, so that when determining the root cause dimension, both the contribution of anomalous factors and the analytical granularity of the attribution dimension can be taken into account.
[0095] In some implementations, the preset index is dynamically determined based on the dispersion of the number of factors across all attribution dimensions, where the dispersion is the ratio of the standard deviation of the number of factors across all attribution dimensions to the average number of factors.
[0096] In this embodiment, the preset index can be dynamically determined based on the dispersion of the number of factors across all attribution dimensions. The preset index can be used to adjust the intensity of the impact of the difference between the number of factors and the average number of factors on the penalty coefficient. That is, when determining the penalty coefficient based on the ratio of the first value to the second value, the larger the preset index, the more significant the impact of the difference between the number of factors in the attribution dimension and the average number of factors on the penalty coefficient; the smaller the preset index, the more gradual the impact of the difference between the number of factors in the attribution dimension and the average number of factors on the penalty coefficient.
[0097] In this embodiment, the degree of dispersion can be the ratio of the standard deviation of the number of factors in all attribution dimensions to the average number of factors. The standard deviation can be used to characterize the deviation of the number of factors in each attribution dimension relative to the average number of factors in the attribution dimension set. Dividing the standard deviation by the average number of factors yields a value characterizing the relative dispersion of the number of factors. This avoids the influence of different average factor sizes when judging dispersion solely based on the size of the standard deviation.
[0098] In this embodiment, the attribution device can first obtain the number of factors corresponding to each attribution dimension, and calculate the average number of factors based on the number of factors for each attribution dimension. Further, the attribution device can calculate the standard deviation of the number of factors for all attribution dimensions based on the difference between the number of factors for each attribution dimension and the average number of factors. Subsequently, the attribution device can use the ratio of the standard deviation to the average number of factors as the degree of dispersion, and dynamically determine the preset index based on the degree of dispersion.
[0099] In this embodiment, the attribution device can pre-set the correspondence between the degree of dispersion and the preset index. For example, when the degree of dispersion is small, it indicates that the number of factors in each attribution dimension in the attribution dimension set is relatively small, and the analytical granularity between different attribution dimensions is relatively close. In this case, the attribution device can set the preset index to a smaller value, so that the scaling of the penalty coefficient on the proportion of abnormal contributions is relatively smooth, avoiding excessive influence of small differences in the number of factors on the attribution score.
[0100] In this embodiment, a high degree of dispersion indicates a significant difference in the number of factors for each attribution dimension within the attribution dimension set, and a noticeable difference in the analytical granularity between different attribution dimensions. In this case, the attribution device can set the preset index to a larger value, allowing the difference in the number of factors for each attribution dimension relative to the average number of factors to more fully influence the penalty coefficient, thereby reflecting the difference in analytical granularity between different attribution dimensions in the attribution score.
[0101] For example, the attribution dimension set includes category, store type, and combined attribution dimensions formed by category and brand combination. Specifically, the number of factors corresponding to a category is 4, the number of factors corresponding to a store type is 6, and the number of factors corresponding to the combined attribution dimension formed by category and brand combination is 15. The attribution device can first calculate the average number of factors based on 4, 6, and 15, then calculate the standard deviation of these three factor counts, and use the ratio of the standard deviation to the average number of factors as the dispersion. If the dispersion is large, it indicates a significant difference in the number of factors between the combined attribution dimension and the single-layer attribution dimension. The attribution device can then increase the preset index accordingly to make the difference in the number of factors more clearly reflected in the penalty coefficient.
[0102] For example, in another analysis task, the attribution dimension set includes attribution dimensions such as channel, user type, and store type, with 5, 6, and 7 factors for each dimension, respectively. In this case, the number of factors for each attribution dimension is relatively close, resulting in less dispersion in the attribution device's calculations. The attribution device can then reduce the preset index accordingly, allowing the attribution score to reflect more the proportion of abnormal contributions itself, rather than over-amplifying small differences in the number of factors.
[0103] In this embodiment, by dynamically determining a preset index based on the dispersion of the number of factors across all attribution dimensions, the attribution device can adaptively adjust the intensity of the penalty coefficient according to the actual granularity distribution of the current attribution dimension set. Thus, even if the number of attribution dimensions and the distribution of factors in the attribution dimension set differ across different analysis tasks, the attribution device can more reasonably generate attribution scores for each attribution dimension, providing a more stable scoring basis for subsequent determination of root cause dimensions.
[0104] In some implementations, the attribution device can automatically generate the attribution dimension set based on multiple preset analysis perspectives by enumerating all single-layer dimension combinations formed by the analysis perspectives and multi-layer dimension combinations formed by multiple single-layer dimension combinations.
[0105] In this embodiment, when the attribution device acquires the indicator data and attribution dimension set for the target indicator during the target period and the baseline period, it can automatically generate the attribution dimension set based on multiple preset analytical perspectives. The analytical perspective can be understood as a transactional perspective used to break down and observe the indicator data of the target indicator. For example, in internet healthcare, e-commerce search, or online transaction scenarios, the analytical perspective may include category, brand, channel, user type, store type, region, search term type, etc. By pre-setting multiple analytical perspectives, the attribution device can determine the source of basic dimensions available for subsequent attribution analysis of the target indicator.
[0106] In this embodiment, the attribution device can generate single-layer attribution dimensions in the attribution dimension set by enumerating all single-layer dimension combinations formed by the aforementioned analytical perspectives. A single-layer dimension combination can be understood as a combination of dimensions formed by a single analytical perspective, corresponding to the aforementioned single-layer attribution dimensions. For example, if the preset analytical perspectives include category, brand, channel, and user type, the attribution device can generate single-layer attribution dimensions for category, brand, channel, and user type, respectively. In this way, the attribution device can perform basic attribution analysis on the fluctuations of the target indicator from a single analytical perspective.
[0107] In this embodiment, the attribution device can also generate combined attribution dimensions in the attribution dimension set by enumerating multi-level dimension combinations formed by multiple single-level dimensions. The multi-level dimension combination can be understood as a combination of dimensions formed by multiple analytical perspectives, corresponding to the aforementioned combined attribution dimensions. For example, when the preset analytical perspectives include category, brand, channel, and user type, the attribution device can generate combined attribution dimensions formed by category and brand, combined attribution dimensions formed by channel and user type, or combined attribution dimensions formed by category, brand, and channel. In this way, the attribution device can perform attribution analysis on the fluctuations of target indicators from a more granular perspective formed by the combination of multiple analytical perspectives.
[0108] In this embodiment, when enumerating the attribution dimension set, the attribution device can determine the required multi-level dimension combinations based on a preset number of combination layers. For example, if the preset number of combination layers is two, the attribution device can enumerate combined attribution dimensions formed by two analytical perspectives, such as category-brand, channel-user type, category-channel, etc. If the preset number of combination layers includes three, the attribution device can also enumerate combined attribution dimensions formed by three analytical perspectives, such as category-brand-channel, category-channel-user type, etc. In this way, the generation range of combined attribution dimensions in the attribution dimension set can be controlled according to the attribution granularity required by the actual transaction scenario, avoiding an excessive number of attribution dimensions due to unconstrained enumeration.
[0109] In this embodiment, after the attribution device automatically generates an attribution dimension set, it can determine multiple factors corresponding to each attribution dimension from the indicator data. For example, when the attribution dimension is a category, the factors can be pharmaceuticals, medical devices, health supplements, etc.; when the attribution dimension is a combined attribution dimension formed by a combination of category and brand, the factors can be medical device-brand A, medical device-brand B, pharmaceutical-brand C, etc. Furthermore, the attribution device can perform processes such as contribution rate calculation, abnormal factor identification, abnormal contribution ratio calculation, and attribution score generation based on the indicator data of each factor under each attribution dimension during the target period and the baseline period.
[0110] For example, the target metric is transaction amount, and the preset analytical perspectives include category, brand, and store type. The attribution device can automatically generate single-level attribution dimensions such as category, brand, and store type, and further generate combined attribution dimensions such as category-brand, category-store type, and brand-store type. Subsequently, the attribution device can calculate the contribution rate of each factor under these attribution dimensions to the fluctuation of transaction amount, and determine the root cause dimension among these single-level and combined attribution dimensions through anomaly factor identification and attribution scoring. If the category dimension only indicates that the increase in transaction amount is mainly due to medical devices, while the category-brand dimension can further indicate that the increase in transaction amount is mainly due to medical device-A brand and medical device-B brand, then the attribution device can combine the attribution score generated by the percentage of anomaly contributions and the number of factors to determine the root cause dimension that is more suitable to explain the fluctuation of transaction amount.
[0111] In this embodiment, by automatically enumerating a set of attribution dimensions based on multiple preset analytical perspectives, the attribution device can reduce the possibility of missing candidate dimensions when manually configuring attribution dimensions, enabling both single-layer and combined attribution dimensions to participate in subsequent attribution analysis. This provides a more complete candidate range for determining root cause dimensions from multiple attribution dimensions, helping to improve the accuracy of attributing fluctuations in target indicators.
[0112] Please see Figure 2 One or more embodiments of this application also provide an attribution device for data indicator fluctuations. The attribution device may include: an acquisition module, a first calculation module, an identification module, a second calculation module, a generation module, and a determination module.
[0113] The acquisition module is used to acquire indicator data for the target indicator during the target period and the baseline period, and an attribution dimension set; wherein, the attribution dimension set includes attribution dimensions; the attribution dimensions include multiple single-level attribution dimensions and combined attribution dimensions formed by combinations of multiple single-level attribution dimensions; the indicator data included in each attribution dimension is divided into multiple factors.
[0114] The first calculation module is used to calculate the contribution rate of each factor to the index fluctuation of the target index for each attribution dimension based on the index data.
[0115] The identification module is used to identify anomalous factors in each attribution dimension based on the contribution rate distribution of each factor.
[0116] The second calculation module is used to calculate the sum of the absolute values of the contribution rates of the anomalous factors in each attribution dimension as the anomalous contribution ratio.
[0117] The generation module is used to generate attribution scores for each attribution dimension based on the proportion of abnormal contributions and the number of factors in each attribution dimension.
[0118] The determination module is used to determine the root cause dimension from the attribution dimensions included in the attribution dimension set based on the attribution score.
[0119] In this embodiment, the function and effect of the data indicator fluctuation attribution device can be explained in comparison with the aforementioned embodiments, and will not be repeated here.
[0120] Please see Figure 3 This application also provides a computer device comprising: a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method described above.
[0121] The memory, processor, and communication interface in the computer device can communicate with each other via the system bus and network communication.
[0122] In this embodiment, the functions and effects implemented by the computer device can be explained by referring to the foregoing embodiments, and will not be repeated here.
[0123] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method as described above.
[0124] The functions and effects achieved in this embodiment can be explained by referring to other embodiments, and will not be repeated here.
[0125] This application also provides a computer program product containing instructions, including a computer program / instructions that, when executed by a processor, implement the method as described above.
[0126] The functions and effects achieved in this embodiment can be explained by referring to other embodiments, and will not be repeated here.
[0127] It is understood that the specific examples in this document are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the invention.
[0128] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0129] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and the implementation methods in this application are not limited in this respect.
[0130] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0131] It is understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0132] It is understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0133] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0137] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0138] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0139] The above description is merely a specific embodiment of this application, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this invention should be determined by the scope of the claims.
Claims
1. An attribution method for data indicator fluctuations, characterized in that, include: Acquire indicator data for the target indicator during the target period and the baseline period, and a set of attribution dimensions; wherein, the set of attribution dimensions includes attribution dimensions; the attribution dimensions include multiple single-level attribution dimensions and combined attribution dimensions formed by combinations of multiple single-level attribution dimensions; the indicator data included in each attribution dimension is divided into multiple factors; For each attribution dimension, the contribution rate of each factor to the index fluctuation of the target index is calculated based on the index data. Based on the contribution rate distribution of each factor, the abnormal factors in each attribution dimension are identified. The sum of the absolute values of the contribution rates of the anomalous factors in each attribution dimension is calculated as the percentage of anomalous contribution. Based on the percentage of abnormal contributions and the number of factors in each attribution dimension, an attribution score is generated for each attribution dimension. Based on the attribution score, the root cause dimension is determined from the attribution dimensions included in the attribution dimension set.
2. The method according to claim 1, characterized in that, The target indicators include additive indicators and ratio indicators. For each attribution dimension, the contribution rate of each factor to the fluctuation of the target indicator is calculated based on the indicator data, including: If the target indicator is an additive indicator, then the contribution rate is calculated based on the proportion of the change in the indicator value of each factor between the target period and the baseline period to the total change in the target indicator; or, If the target indicator is a ratio-type indicator, then the contribution of each factor is decomposed into the contribution of efficiency change and the contribution of structural change, and the contribution rate of each factor is obtained by adding the contribution of efficiency change and the contribution of structural change respectively.
3. The method according to claim 2, characterized in that, Based on the contribution rate distribution of each factor, outlier factors in each attribution dimension were identified, including: Calculate the first and third quartiles of the contribution rates of all factors under each attribution dimension, and determine the difference between the first and third quartiles as the interquartile range. The lower limit of the abnormal threshold is set as the product of the first quartile minus a first specified multiple and the interquartile range, and the upper limit of the abnormal threshold is the product of the third quartile plus a second specified multiple and the interquartile range. Factors whose contribution rate is less than the lower limit of the abnormal threshold or greater than the upper limit of the abnormal threshold are marked as abnormal factors.
4. The method according to claim 3, characterized in that, Based on the percentage of outliers and the number of factors in each attribution dimension, an attribution score is generated for each attribution dimension, including: Obtain the average number of factors across all attribution dimensions; For each attribution dimension, the ratio of the number of factors in the attribution dimension to the average number of factors is non-linearly mapped through a smooth increasing function to obtain the penalty coefficient. The attribution score is obtained by scaling the percentage of abnormal contributions based on the penalty coefficient.
5. The method according to claim 4, characterized in that, The smooth increasing function is the Softplus function; For each attribution dimension, the ratio of the number of factors in that attribution dimension to the average number of factors is non-linearly mapped using a smooth, increasing function to obtain a penalty coefficient, including: The number of factors in the attribution dimension is input into the Softplus function to obtain the first value; The average number of factors for the attribution dimension is input into the Softplus function to obtain a second value; The penalty coefficient is obtained by exponentiation of the calculated ratio of the first value to the second value.
6. The method according to claim 5, characterized in that, The preset index is dynamically determined based on the dispersion of the number of factors across all attribution dimensions, where the dispersion is the ratio of the standard deviation of the number of factors across all attribution dimensions to the average number of factors.
7. The method according to claim 1, characterized in that, Acquire indicator data for the target indicator during the target period and the baseline period, and the attribution dimension set, including: automatically generating the attribution dimension set by enumerating all single-layer dimension combinations composed of the target indicator and multi-layer dimension combinations formed by multiple single-layer dimension combinations based on multiple preset analysis perspectives.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, causes the processor to implement the method as described in any one of claims 1 to 7.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 7.
