Dynamic cost calculation method
By dynamically adjusting the weight of cost data, using weight functions and reference factors, the problem that traditional cost calculation methods cannot reflect cost changes in time is solved, and more accurate and flexible cost calculation is achieved, and the economic benefits and market competitiveness of the enterprise are improved.
Patent Information
- Application Number
- CN202411497714.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing the rapidly changing market environment and complex enterprise operation conditions, traditional cost calculation methods cannot promptly reflect the latest cost situation, resulting in lag and errors in cost estimation, and cannot effectively capture the trends and laws of cost change.
The dynamic cost calculation method is adopted to dynamically adjust the weight, based on the weight function and reference factor, the weight of the cost data is dynamically adjusted according to the distance and economic indicators of time points and calculate the mobile weighted average cost to ensure the real-time and accuracy of cost calculation.
It significantly improves the accuracy of cost calculations, can promptly reflect the latest changes in costs, provide more accurate cost data, and helps enterprises formulate scientific and reasonable cost management strategies, reduce operating costs, and enhance market competitiveness and sustainable development capabilities.
Smart Images

Figure CN119250871A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of economic model and data processing, in particular to a dynamic cost calculation method. Background Art
[0002] In the traditional field of cost calculation, enterprises generally use fixed time windows or simple average methods to estimate and record costs. These methods work well in an environment where cost changes are relatively stable or predictable, because they are based on an assumption that cost data remains relatively stable or follows a predictable pattern within a fixed period of time. However, with the rapid changes in the market environment and the increasing complexity of corporate operations, this assumption is becoming increasingly difficult to establish.
[0003] The fixed time window method usually sets a fixed time period (such as a month, a quarter, or a year), and then calculates the average of all cost data within the time period as the cost of the period. The problem with this method is that it ignores the dynamic change characteristics of cost data on the time axis, especially when the market fluctuates greatly, the price of raw materials changes frequently, or the production technology innovates rapidly. Therefore, when faced with rapidly changing data, the fixed time window method may not be able to reflect the latest cost situation in a timely manner, resulting in lags and errors in cost estimation.
[0004] The simple average rule is more direct. It simply adds up all available cost data and calculates the average value without considering the time distribution and weight of the data. Although this method is easy to calculate, it also encounters accuracy problems when dealing with cost data that is highly time-sensitive and volatile. This is because it does not distinguish the importance of cost data at different time points and cannot effectively capture the trend and law of cost changes.
[0005] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0006] In view of the defects existing in the prior art, the purpose of the present invention is to provide a dynamic cost calculation method, which can keep up with market changes by dynamically adjusting weights, ensure real-time data, and have high cost calculation efficiency. It has high adaptability and flexibility, can meet the needs of multiple fields, and help enterprises formulate accurate cost management strategies, optimize resource allocation, reduce management costs, and overall improve the economic benefits and market competitiveness of the enterprise.
[0007] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0008] A dynamic cost calculation method, characterized in that it comprises the following steps:
[0009] Get the cost value c and record the data formation time i, recording it as historical cost data c i ;
[0010] Save all historical cost data c within the set time interval T i Form a historical cost data sequence; the upper limit of the time interval T is t1, the lower limit is t2, t2≤i≤t1;
[0011] Set the weight function w(t), and calculate the weight function w(t) for each historical cost data c within the set time interval T. i Assign weight w(ti), t is the current time;
[0012] Calculate each historical cost data c i The weighted sum S, S = Σ(c i *w(ti));
[0013] Add all weights w(ti) within the set time interval T to obtain the total weight W;
[0014] Calculate the moving weighted average cost MWC as the final output cost value, MWC = S / W.
[0015] On the basis of the above technical solutions, it also includes:
[0016] In response to the received application scenario setting instruction, the value of the weight w(ti) is adjusted for the corresponding application scenario based on the weight dynamic correction strategy.
[0017] Based on the above technical solution, the weight dynamic correction strategy defaults to assigning the historical cost data c near the current time t based on the exponential decay function (w(t) = e^{-at}) i Has a higher weight.
[0018] Based on the above technical solutions, the mobile weighted average cost MWC is sorted out and refined to establish a dynamic cost calculation application scenario, including historical cost data c i Storage module, weight w(ti) dynamic adjustment module, mobile weighted average cost MWC display module;
[0019] The mobile weighted average cost MWC display module is based on visualization technology to analyze the historical cost data c i , weights w(ti) and display them centrally.
[0020] Based on the above technical solution, the historical cost data c iThe storage module cleans and standardizes the input cost value c, sorts it according to the data formation time i, and saves it as a historical cost data sequence at the set time interval T.
[0021] On the basis of the above technical solution, the standardization process includes:
[0022] Obtain preset field format information according to the data type, parse the cost value c according to the field format information, and obtain a standardized field corresponding to the data type;
[0023] According to the preset inspection rules, the standardized fields are filtered, the noise data is eliminated, and the data normalization is completed.
[0024] On the basis of the above technical solutions, it also includes:
[0025] A reference factor is introduced into the weight function w(t), and the reference factor is used to introduce economic dimension indicators. By statistically analyzing multi-dimensional economic indicators including storage, transportation, sales volume, and sales revenue, the allocated weight w(ti) is dynamically adjusted.
[0026] On the basis of the above technical solution, a comprehensive reference factor R(t,i) is introduced, which is calculated based on the time point t and the lag time i. The new weight function is expressed as:
[0027] [w(t,i)=e^{-a\cdot R(t,i)\cdot t}].
[0028] Based on the above technical solution, the comprehensive reference factor R(t,i) specifically includes the following steps of calculation:
[0029] Data collection: First, collect economic indicator data such as storage cost, transportation cost, sales volume, and sales at various time points;
[0030] Data preprocessing: Clean and standardize the collected data to ensure data consistency and comparability;
[0031] Indicator synthesis: Based on business needs and algorithm design, these economic indicators are integrated into a single reference factor R(t,i);
[0032] Weight calculation: Substitute R(t,i) into the weight function, and combine it with the original time decay factor e^{-at} to calculate the weight w(t,i) at each time point.
[0033] The dynamic cost calculation method described in the present invention has the following beneficial effects:
[0034] 1. By introducing a weight function and dynamically adjusting the weight of cost data according to the distance of the time point, recent cost data will account for a higher proportion in cost calculation.
[0035] This dynamic adjustment mechanism effectively reduces the errors caused by ignoring the timeliness of data in the traditional fixed time window method and simple averaging method, thereby significantly improving the accuracy of cost calculation.
[0036] 2. Compared with traditional methods, the present invention can reflect the latest changes in costs more timely. As the market environment and business needs continue to change, the algorithm can automatically adjust the calculation parameters to ensure that the cost calculation results are always close to reality, providing strong support for corporate decision-making.
[0037] 3. The algorithm allows users to customize weight functions and parameters according to different application scenarios and needs, such as using an exponential decay function to give a higher weight to recent data. This high degree of adaptability and flexibility enables the algorithm to be widely used in multiple fields such as inventory management and financial market price fluctuation analysis to meet the diverse cost management needs of enterprises.
[0038] 4. By providing more accurate and timely cost data, the present invention helps enterprises to more accurately assess market risks and business opportunities and formulate more scientific and reasonable cost management strategies. This can not only reduce the operating costs of enterprises and improve economic benefits, but also help enhance the market competitiveness and sustainable development capabilities of enterprises.
[0039] The dynamic cost calculation method described in the present invention has beneficial effects in improving the accuracy of cost calculation, enhancing real-time performance, improving adaptability and flexibility, optimizing cost management decisions, and simplifying the calculation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present invention has the following accompanying drawings:
[0041] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0042] Figure 1 A flow chart of embodiment 1 of a dynamic cost calculation method according to the present invention.
[0043] Figure 2 A flow chart of a second embodiment of a dynamic cost calculation method according to the present invention.
[0044] Figure 3 A flowchart of embodiment 3 of a dynamic cost calculation method described in the present invention.
[0045] Figure 4 A flow chart of a fourth embodiment of a dynamic cost calculation method according to the present invention. DETAILED DESCRIPTION
[0046] The present invention is further described in detail below in conjunction with the accompanying drawings. The detailed description is an explanation made in conjunction with the exemplary embodiments of the present invention, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0047] like Figure 1 As shown, a dynamic cost calculation method of the present invention comprises the following steps:
[0048] Get the cost value c and record the data formation time i, recording it as historical cost data c i ; Exemplarily, obtain the cost value c at a certain moment, and record the time i when the cost value is formed, and bind the cost value c and its formation time i to record as the historical cost data item c i ,
[0049] Save all historical cost data c within the set time interval T i Form a historical cost data sequence; the upper limit of the time interval T is t1, the lower limit is t2, t2≤i≤t1; in order to analyze the cost change trend, set a time interval T, and save all historical cost data c within the time interval T i , forming a continuous historical cost data series;
[0050] Set the weight function w(t), and calculate the weight function w(t) for each historical cost data c within the set time interval T. i Assign weight w(ti), t is the current time, and the weight function w(t) is calculated for each historical cost data c according to the time difference (ti) i Assign appropriate weights;
[0051] Calculate each historical cost data c i The weighted sum S, S = Σ(c i *w(ti));
[0052] All weights w(ti) are added together within a set time interval T to obtain the total weight W; that is, W = Σw(ti);
[0053] Calculate the moving weighted average cost MWC as the final output cost value, MWC = S / W.
[0054] This embodiment aims to obtain a more reasonable cost value that reflects recent trends by considering the relative importance (ie, weight) of cost data at different time points, especially when cost data changes frequently, so as to more accurately reflect the cost change trend.
[0055] Based on the above technical solution, Figure 2 As shown, it also includes:
[0056] In response to the received application scenario setting instruction, the value of the weight w(ti) is adjusted for the corresponding application scenario based on the weight dynamic correction strategy.
[0057] This embodiment makes the entire cost calculation method more flexible and adaptable. Different application scenarios may have different requirements on the sensitivity and timeliness of cost data. By dynamically adjusting the value of the weight w(ti) according to the application scenario setting instructions, it can ensure that the cost calculation method can more accurately reflect the cost change trend in different scenarios, thereby improving the accuracy and practicality of the calculation results.
[0058] In practical applications, changes in cost data may be affected by a variety of factors, such as market environment, production conditions, policy adjustments, etc. By introducing a dynamic weight correction strategy, the weight distribution can be adjusted in a timely manner according to actual conditions, so that the cost calculation method can better adapt to changes in the external environment and improve the flexibility and robustness of the calculation.
[0059] Exemplarily, the application scenario setting instruction is issued by the user or the system, and the weight dynamic correction strategy includes considering the timeliness, volatility, importance and other factors of the cost data, and formulating corresponding weight adjustment rules and algorithms accordingly. By adjusting the value of the weight w(ti) for the corresponding application scenario, it can be ensured that the cost calculation method can provide more accurate and reliable cost estimation results in different scenarios.
[0060] Based on the above technical solution, the weight dynamic correction strategy defaults to assigning the historical cost data c near the current time t based on the exponential decay function (w(t) = e^{-at}) i Has a higher weight.
[0061] In this embodiment, w(t) is the weight value at time point t, e is the base of the natural logarithm, -a is a coefficient that determines the weight decay rate, and t represents a time point or a time interval.
[0062] Based on the above technical solution, Figure 3 As shown in the figure, the mobile weighted average cost MWC is sorted and refined to establish a dynamic cost calculation application scenario, including historical cost data c iStorage module, weight w(ti) dynamic adjustment module, mobile weighted average cost MWC display module;
[0063] The mobile weighted average cost MWC display module is based on visualization technology to analyze the historical cost data c i , weights w(ti) and display them centrally.
[0064] In this embodiment, by splitting the dynamic cost calculation process into multiple modules, each module is responsible for a specific function, making the entire system clearer, easier to understand and maintain. This modular design helps to reduce the complexity of the system and improve development efficiency and code quality.
[0065] The existence of the dynamic adjustment module of weight w(ti) enables the system to flexibly adjust the value of weight according to the actual needs and changes in application scenarios, thereby ensuring the accuracy and adaptability of cost calculation.
[0066] The mobile weighted average cost MWC display module uses visualization technology to display historical cost data i , weight w(ti) and mobile weighted average cost MWC are displayed centrally, allowing users to intuitively understand the cost change trend and calculation results. This visual display method helps users better understand the data.
[0067] Based on the above technical solution, the historical cost data c i The storage module cleans and standardizes the input cost value c, sorts it according to the data formation time i, and saves it as a historical cost data sequence at the set time interval T.
[0068] On the basis of the above technical solution, the standardization process includes:
[0069] Obtain preset field format information according to the data type, parse the cost value c according to the field format information, and obtain a standardized field corresponding to the data type;
[0070] According to the preset inspection rules, the standardized fields are filtered, the noise data is eliminated, and the data normalization is completed.
[0071] Based on the above technical solution, Figure 4 As shown, it also includes:
[0072] A reference factor is introduced into the weight function w(t), and the reference factor is used to introduce economic dimension indicators. By statistically analyzing multi-dimensional economic indicators including storage, transportation, sales volume, and sales revenue, the allocated weight w(ti) is dynamically adjusted.
[0073] This embodiment aims to more accurately reflect the economic factors behind cost changes by combining economic dimension indicators. On the basis of the original weight function w(t)=e^{-at}, a reference factor (one or more) is introduced to form a more complex weight calculation formula. The reference factor may include but is not limited to multi-dimensional economic indicators such as storage cost, transportation cost, sales volume, and sales revenue. Through these indicators, the algorithm can capture the economic driving force behind cost changes, thereby more accurately adjusting the weights at each time point.
[0074] For example, a comprehensive reference factor R(t,i) is introduced, which is calculated based on the time point t and the lag time i (i.e., for the time point t, the economic indicators of the previous i time points are considered), and the new weight function can be expressed as:
[0075] [w(t,i)=e^{-a\cdot R(t,i)\cdot t}]
[0076] The comprehensive reference factor R(t,i) is a function that combines multiple economic dimension indicators, and specifically includes the following steps of calculation:
[0077] Data collection: First, collect economic indicator data such as storage cost, transportation cost, sales volume, and sales at various time points;
[0078] Data preprocessing: Clean and standardize the collected data to ensure data consistency and comparability;
[0079] Indicator synthesis: Based on business needs and algorithm design, these economic indicators are integrated into a single reference factor R(t,i); in specific implementation, this can be achieved through weighted summation, principal component analysis, neural network model, etc.
[0080] Weight calculation: Substitute R(t,i) into the weight function, and combine it with the original time decay factor e^{-at} to calculate the weight w(t,i) at each time point.
[0081] By introducing reference factors, the weight function can dynamically adjust the weight distribution at each time point according to the real-time changes in economic dimension indicators. For example, when sales volume rises sharply, recent cost data may become particularly important because they reflect the rapid changes in current market demand. At this time, the algorithm can more accurately reflect the trend of cost changes by increasing the weight of recent data.
[0082] The moving weighted average cost algorithm with the reference factor is particularly useful in the following application scenarios:
[0083] Inventory management: In inventory management, factors such as storage cost, transportation cost and sales volume have a direct impact on inventory cost. By introducing these economic dimension indicators, the algorithm can calculate inventory cost more accurately, helping companies optimize inventory strategies and reduce waste.
[0084] Financial market analysis: In financial market analysis, price fluctuations are often affected by a variety of economic factors. By introducing relevant economic indicators as reference factors, the algorithm can more accurately predict price trends and assess investment risks.
[0085] Supply Chain Management: In supply chain management, cost control is a key link. By introducing economic indicators of each link in the supply chain as reference factors, the algorithm can comprehensively evaluate the supply chain cost and discover potential cost-saving opportunities.
[0086] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
[0087] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by those skilled in the art based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A dynamic cost calculation method, characterized in that: The following steps are involved: Get the cost value c and record the data formation time i, recording it as historical cost data c i ; Save all historical cost data c within the set time interval T i Form a historical cost data sequence; the upper limit of the time interval T is t1, the lower limit is t2, t2≤i≤t1; Set the weight function w(t), and calculate the weight function w(t) for each historical cost data c within the set time interval T. i Assign weight w(ti), t is the current time; Calculate each historical cost data c i The weighted sum S, S = Σ(c i *w(ti)); Add all weights w(ti) within the set time interval T to obtain the total weight W; Calculate the moving weighted average cost MWC as the final output cost value, MWC = S / W.
2. A dynamic cost calculation method as claimed in claim 1, characterized in that: Also includes: In response to the received application scenario setting instruction, the value of the weight w(ti) is adjusted for the corresponding application scenario based on the weight dynamic correction strategy.
3. A dynamic cost calculation method as claimed in claim 2, characterized in that: The weight dynamic modification strategy defaults to assigning historical cost data c near the current time t based on an exponential decay function (w(t) = e^{-at}) i Has a higher weight.
4. A dynamic cost calculation method as claimed in claim 1, characterized in that: Sorting out and refining the mobile weighted average cost MWC, establishing a dynamic cost calculation application scenario, including historical cost data c i Storage module, weight w(ti) dynamic adjustment module, mobile weighted average cost MWC display module; The mobile weighted average cost MWC display module is based on visualization technology to analyze the historical cost data c i , weights w(ti) and display them centrally.
5. A dynamic cost calculation method as claimed in claim 4, characterized in that: The historical cost data c i The storage module cleans and standardizes the input cost value c, sorts it according to the data formation time i, and saves it as a historical cost data sequence at the set time interval T.
6. A dynamic cost calculation method as claimed in claim 5, characterized in that: The standardization process includes: Obtain preset field format information according to the data type, parse the cost value c according to the field format information, and obtain a standardized field corresponding to the data type; According to the preset inspection rules, the standardized fields are filtered, the noise data is eliminated, and the data normalization is completed.
7. A dynamic cost calculation method as claimed in claim 1, characterized in that: Also includes: A reference factor is introduced into the weight function w(t), and the reference factor is used to introduce economic dimension indicators. By statistically analyzing multi-dimensional economic indicators including storage, transportation, sales volume, and sales revenue, the allocated weight w(ti) is dynamically adjusted.
8. A dynamic cost calculation method as claimed in claim 7, characterized in that: Introducing a comprehensive reference factor R(t,i), which is calculated based on time point t and lag time i, the new weight function is expressed as: [w(t,i)=e^{-a\cdot R(t,i)\cdot t}].
9. A dynamic cost calculation method as claimed in claim 8, characterized in that: The calculation of the comprehensive reference factor R(t,i) specifically includes the following steps: Data collection: First, collect economic indicator data such as storage cost, transportation cost, sales volume, and sales at various time points; Data preprocessing: Clean and standardize the collected data to ensure data consistency and comparability; Indicator synthesis: Based on business needs and algorithm design, these economic indicators are integrated into a single reference factor R(t,i); Weight calculation: Substitute R(t,i) into the weight function, and combine it with the original time decay factor e^{-at} to calculate the weight w(t,i) at each time point.
