Inquiry volume price calculation method, device, equipment, storage medium and program product
By structuring the pricing terms of steel contracts into priority rules and combining them with external price data sources, steel prices are automatically calculated, solving the problems of inefficiency and inconsistent results in steel trading and achieving efficient and traceable price calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN BUILDING MATERIALS TRADING GRP CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-06-12
Smart Images

Figure CN122199031A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer and data processing technology, and in particular to methods, apparatus, equipment, storage media and program products for calculating inquiry prices. Background Technology
[0002] In current bulk construction steel trading, core processes such as inquiry, quotation, and settlement still heavily rely on manual experience and offline agreements. While benchmark prices for landscape steel can be obtained from third-party pricing platforms like SteelNet and Lange.com, the pricing rules stipulated in actual business contracts are often extremely complex and diverse. For example, they may require averaging prices across different brands, automatically extending non-working days to the nearest working day, and adopting only the last published price for multiple publication times on the same date. Such "multi-condition, multi-priority" data retrieval logic is difficult to implement using traditional systems.
[0003] Currently, mainstream business systems generally adopt a "manual price selection + manual calculation" model: sales or purchasing personnel manually check prices on third-party platforms based on the information of the inquired materials, then subjectively determine the brand, date, and price source to be used based on the terms in paper or unstructured electronic contracts, and further apply formulas such as floating amount and negative deviation rate to calculate the purchase price and sales price. Finally, they manually compare quotations from multiple suppliers. This process is not only inefficient, especially when processing inquiries containing dozens or even hundreds of materials, but it is also highly susceptible to inconsistencies in pricing results and frequent errors due to human misunderstandings.
[0004] Furthermore, existing technologies have significant shortcomings: first, complex pricing rules in contracts cannot be systematically identified and executed; second, the price retrieval and calculation process lacks transparency and traceability, making it difficult to reconstruct the source path of specific results; and third, they fail to effectively connect with real-time price data from third-party platforms, resulting in delayed price linkage and affecting the timeliness and accuracy of decision-making. Therefore, there is an urgent need for an intelligent steel quantity inquiry and pricing system that can automatically parse contract pricing rules, intelligently match multi-dimensional price conditions, and achieve high consistency, high efficiency, and traceability.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a method, apparatus, equipment, storage medium, and program product for calculating steel prices, aiming to solve the technical problem of how to improve the efficiency, consistency, and traceability of steel price calculation.
[0007] To achieve the above objectives, this application proposes a method for calculating inquiry price, which includes: Obtain the pricing terms from the steel contract and structure the pricing terms into pricing rules with priority order; Based on the pricing rules, price data is obtained from external steel price data sources through a preset benchmark price retrieval algorithm, and multi-dimensional combination calculations are performed to obtain the benchmark price; Based on the benchmark price, floating parameters, and business attribute parameters, the purchase price and sales price are calculated respectively.
[0008] In one embodiment, the step of obtaining price data from an external steel price data source based on the pricing rules, using a preset benchmark price retrieval algorithm, and performing multi-dimensional combination calculations to obtain the benchmark price includes: Execute multiple rule rows according to the rule priority in the pricing rules; For each rule row, based on preset data retrieval dimension parameters, matching price data is queried from external price data sources, and a corresponding candidate benchmark price is generated based on the queried price data; If the candidate benchmark price generated by the current rule row is based on at least one non-empty and non-zero price data, then the corresponding candidate benchmark price is determined as the final benchmark price; If no price data is found in the current rule row, or if the found price data are all empty or zero, then the next rule row will be executed.
[0009] In one embodiment, the data retrieval dimension parameters include brand dimension, specification dimension, material dimension, pricing date dimension, and release time dimension; The steps of querying matching price data from an external price data source based on preset data retrieval dimension parameters, and generating corresponding candidate benchmark prices based on the queried price data, include: At the brand dimension, if configured as a single brand, the price data corresponding to the single brand is queried; if configured as multiple brands, the price data corresponding to each brand is queried and the arithmetic mean or weighted average is calculated. In terms of specifications, based on preset specification priorities, price data that matches the target specification is queried; if no non-empty and non-zero price data is found, the price data corresponding to the largest specification that is smaller than the target specification and the smallest specification that is larger than the target specification is queried. Query price data that matches the target material in the material dimension; In the pricing date dimension, the pricing date is determined based on the base date type in the rule row, and the actual pricing date is determined in combination with the date offset rule, wherein the date offset rule includes: taking the pricing date, the previous working day, or the arithmetic average or weighted average of the two most recent working days; Based on the publication date and time dimension, query the average publication price, initial publication price, and last publication price for that day; When multiple price data are retrieved based on the above-mentioned combination of dimensions, null or zero values in the price data are removed, and the arithmetic mean or weighted average of the remaining price data is calculated as the candidate benchmark price.
[0010] In one embodiment, the business attribute parameters include one or more of the following: procurement measurement method, negative deviation rate, and required quantity; The steps of calculating the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters include: Determine the procurement benchmark price based on the aforementioned benchmark price; The purchase price is calculated based on the benchmark purchase price, the floating parameters in the purchase agreement, the required quantity, the purchase measurement method, and the negative deviation rate; and / or Determine the sales benchmark price based on the aforementioned benchmark price; The sales price is calculated based on the benchmark sales price, the floating parameters in the sales agreement, and the required quantity.
[0011] In one embodiment, after the step of calculating the purchase price and the sales price by combining the benchmark price, the floating parameter, and the business attribute parameter, the method further includes: Write the purchase price and the sales price into the corresponding inquiry details line and feed them back to the inquiry business interface; If any key parameters are missing during the price calculation process, a message indicating the reason for the missing parameters will be generated. In response to user actions, the price calculation path is displayed, which includes one or more of the following: pricing rules, rule priority, combination of benchmark price data dimensions, and missing key parameters.
[0012] In one embodiment, after the step of calculating the purchase price and the sales price by combining the benchmark price, the floating parameter, and the business attribute parameter, the method further includes: The profit for a single inquiry transaction is calculated based on the difference between the sales price and the purchase price, combined with the purchase quantity and whether the purchase measurement method is by weight or by weight. Wherein, when the procurement measurement method is the time measured in pounds, the procurement price includes the influence of the negative deviation rate; When the procurement measurement method is the theoretical time, the procurement price does not include the impact of the negative deviation rate.
[0013] Furthermore, to achieve the above objectives, this application also proposes a quantity inquiry price calculation device, which includes: The rule configuration module is used to obtain the pricing terms in the steel contract and structure the pricing terms into pricing rules with priority order; The benchmark price calculation module is used to perform multi-dimensional combination calculations based on the pricing rules and a preset benchmark price data retrieval algorithm to obtain the benchmark price; The price calculation module is used to calculate the purchase price and the sales price by combining the benchmark price, floating parameters and business attribute parameters.
[0014] In addition, to achieve the above objectives, this application also proposes a quantity inquiry price calculation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the quantity inquiry price calculation method described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the inquiry price calculation method described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the inquiry price calculation method described above.
[0017] This application proposes a method, apparatus, equipment, storage medium, and program product for calculating inquiry prices. The method includes: acquiring pricing terms from steel contracts and structuring these terms into pricing rules with priority order; based on the pricing rules, acquiring price data from external steel price data sources using a preset benchmark price retrieval algorithm, and performing multi-dimensional combination calculations to obtain a benchmark price; and calculating the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters. This solution improves the efficiency of steel price calculation by transforming unstructured contract pricing terms into executable structured rules and automatically linking with external real-time steel price data for multi-dimensional intelligent data retrieval. Furthermore, by employing pricing rules during the inquiry phase and executing rule rows according to priority order, it ensures the consistency of the calculation results and the traceability of the entire process. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the first embodiment of the quantity inquiry and price calculation method in this application. Figure 2 This is a flowchart illustrating the second embodiment of the quantity inquiry and price calculation method in this application. Figure 3 This is a flowchart illustrating the third embodiment of the quantity inquiry and price calculation method in this application. Figure 4 This is a schematic diagram of the module structure of the price calculation device according to an embodiment of this application; Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the inquiry price calculation method in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of this application embodiment is: to obtain the pricing terms in the steel contract and structure the pricing terms into pricing rules with priority order; based on the pricing rules, to obtain price data from external steel price data sources through a preset benchmark price retrieval algorithm and to perform multi-dimensional combination calculations to obtain the benchmark price; and to calculate the purchase price and sales price by combining the benchmark price, floating parameters and business attribute parameters respectively.
[0025] In this embodiment, for ease of description, the following description uses the inquiry price calculation system as the execution subject.
[0026] In the current technology, steel trading companies generally rely on their sales staff to manually check third-party websites to obtain the steel prices of the day during the inquiry stage, and then perform manual calculations based on paper or unstructured contract pricing terms. This results in problems such as low efficiency, susceptibility to errors, inconsistent results from different personnel, and untraceability of historical calculation processes. At the same time, when the contract involves complex conditions such as multiple brands, multiple specifications, working day offsets, negative deviation rates, and measurement methods, manual processing cannot guarantee the completeness and accuracy of rule execution.
[0027] This application provides a solution that enables the system to automatically parse the pricing logic in the contract when a user initiates an inquiry request, match multi-dimensional data retrieval rules according to priority, dynamically obtain valid prices from external price data sources, calculate the benchmark price, and further combine the agreement floating parameters and business attribute parameters to automatically generate purchase prices, sales prices, and profit analysis results, thereby achieving high efficiency, standardization, configurability, and full traceability of steel inquiry price calculation.
[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions. The following description uses a personal computer as an example to illustrate this embodiment and the subsequent embodiments.
[0029] Based on this, the embodiments of this application provide a method for calculating inquiry price, referring to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the price calculation method for quantity in this application.
[0030] In this embodiment, the inquiry price calculation method includes steps S10~S30: Step S10: Obtain the pricing terms in the steel contract and structure the pricing terms into pricing rules with priority order; It should be noted that the pricing terms refer to the stipulations regarding price calculation in the purchase agreement or sales agreement, such as unstructured text like "based on the average price of HPB300Φ12 rebar on the previous working day, plus a float of 20 yuan / ton"; the term "structured" refers to parsing the text and converting it into a set of configuration items that the system can recognize and execute.
[0031] Understandably, since pricing terms in traditional business exist in paper or electronic contracts in the form of natural language, they cannot be directly accessed by information systems. This results in each inquiry requiring manual interpretation and price checking, which is inefficient and prone to errors. Therefore, step S10 avoids manual reliance on unstructured pricing terms and repetitive manual operations, thereby achieving machine-readable, configurable and automated execution of pricing rules.
[0032] In this embodiment, the pricing control in the procurement agreement and sales agreement is configured in a structured manner, including: The type identifiers for calculation rules and settlement rules are used to distinguish whether the rule applies to the inquiry forecasting stage or the order settlement stage; Related company information, including suppliers (for procurement agreements) or customers (for sales agreements). Product attribute dimensions include product category, brand, specifications, and material; The base date type can be selected from system date, order date, delivery date, arrival date, or a fixed date each month; External price data sources, such as third-party steel price platforms like Steel.cn and Lange.com; And rule execution priority, used to determine the processing order when multiple rules are matched.
[0033] When the type is identified as a calculation rule, the system applies the calculation rule during the inquiry phase and forces the base date to be set to the current system date, while the actual pricing date is the previous working day, to ensure that the price forecast is based on the latest available market data.
[0034] Step S20: Based on the pricing rules, price data is obtained from external steel price data sources through a preset benchmark price retrieval algorithm, and multi-dimensional combination calculations are performed to obtain the benchmark price; It should be noted that the benchmark price refers to the basic reference price used for calculating subsequent purchase or sales prices. Its value comes from market data published by third-party steel price platforms (such as Steel.cn, Lange.com, etc.) and is not a fixed value agreed upon in the contract. The multi-dimensional combination calculation refers to performing condition matching and aggregation processing on external price data sources based on the data retrieval dimension parameters configured in the pricing rules (including brand, specifications, material, pricing date, release time, etc.) to generate an effective price that conforms to the business scenario.
[0035] Understandably, steel market prices fluctuate daily, and prices for different brands, specifications, and release times vary on the same day. Manually selecting a price as a benchmark is susceptible to subjective judgment, leading to inconsistent or even significant deviations in calculation results. Therefore, step S20 executes multi-dimensional matching, priority rollback, and data cleaning through a preset benchmark price retrieval algorithm. This avoids operational deviations and inconsistent results caused by relying on manual experience to select prices, thereby achieving objectivity, stability, and repeatability in benchmark price acquisition. This provides a reliable data foundation for subsequent procurement prices, sales prices, and profit calculations.
[0036] In one feasible embodiment, step S20 may include steps S21 to S24: Step S21: Execute multiple rule rows according to the rule priority in the pricing rules; In this embodiment, each pricing rule is configured with multiple rule rows. Each rule row independently defines a complete combination of data retrieval dimensions (including brand, specifications, pricing date, release time, etc.) and is assigned a unique priority number. The system starts execution from the rule row with the highest priority and tries downwards in sequence. All rule rows are executed at most once, without looping, to ensure that the execution path is determined and efficient.
[0037] Step S22: For each of the rule rows, based on the preset data retrieval dimension parameters, query matching price data from the external steel price data source, and generate the corresponding candidate benchmark price based on the price data; In this embodiment, the data dimensionality parameters specifically include: Brand dimension: Supports specifying a single brand, the arithmetic mean of multiple brands, or the average price after excluding specific brands; Specification dimension: Prioritize matching the current specification. If no valid data is available, try the largest available specification smaller than the current specification or the smallest available specification larger than the current specification in turn. Pricing date dimension: The pricing date is determined according to the base date type configured in the rule row, and the actual pricing date is obtained by combining the date offset rules. The offset rules include taking the current pricing date, the previous working day, or the arithmetic average of the two most recent working days. Release time dimension: Select the average release price, first release price, or last release price of the day; The system combines the above dimensions into structured query conditions, sends requests to external price platforms such as SteelNet and LangeNet, and takes the arithmetic mean of the returned multiple price records after removing null and zero values, as the candidate benchmark price for the rule row.
[0038] Step S23: If the candidate benchmark price generated by the current rule row is based on at least one non-empty and non-zero price data, then the corresponding candidate benchmark price is determined as the final benchmark price. In this embodiment, the system performs a validity check before aggregating prices: only when there is at least one non-empty price record with a value greater than zero in the query results is the rule row considered to have successfully hit valid data; at this time, the execution of subsequent rule rows is immediately terminated, and the candidate benchmark price is output as the final benchmark price, ensuring that the result is determined by the valid rule with the highest priority.
[0039] Step S24: If no price data is found in the current rule row, or if the price data found is all null or zero, then execute the next rule row.
[0040] In this embodiment, when it is detected that the current rule row cannot obtain a valid price due to reasons such as no market quote, unpopular rule, brand not covered, or abnormal data source, the system automatically skips the rule row and continues to try the next priority rule row.
[0041] Through the above steps, a rule-based priority mechanism ensures that highly relevant business scenarios are prioritized. A multi-dimensional data retrieval strategy (covering brand, specifications, pricing date, and release time) and fallback logic (such as adjacent specification matching, date offset, and average brand price) significantly improve the success rate of pricing in cases of missing or incomplete market data. Simultaneously, automatic filtering of null and zero values and arithmetic averaging of valid data ensure the objectivity and stability of the benchmark price. The resulting benchmark price can serve as reliable input for the automated calculation of subsequent purchase prices, sales prices, and profits, thereby supporting steel trading companies in achieving rapid response, accurate pricing, and real-time profit prediction during the inquiry process.
[0042] Furthermore, step S22 also includes steps S221 to S226: Step S221: In the brand dimension, if it is configured as a single brand, then query the price data corresponding to the single brand; if it is configured as multiple brands, then query the price data corresponding to each brand and calculate the arithmetic mean or weighted average. It should be noted that the pricing rules in this embodiment include calculation rules and settlement rules. However, due to the fundamental differences between the two in terms of business objectives and usage scenarios—the calculation rules are used for price forecasting and profit simulation during the inquiry phase, emphasizing timeliness and market representativeness; while the settlement rules are used for financial accounting after order fulfillment, emphasizing contract consistency and auditability. Therefore, in step S221 and subsequent data retrieval processes, the system strictly follows the parameters defined by the calculation rules for data querying and processing.
[0043] In this embodiment, the system first reads the brand strategy configured in the current calculation rules. If the strategy is specified as a single brand, only the valid published price of that brand on the target pricing date is extracted from the price data source; if it is configured as multiple brands, the price data corresponding to each brand is queried separately, and after removing null or zero values, the arithmetic mean or weighted average is calculated as the comprehensive price input under the brand dimension. .
[0044] Step S222: On the specification dimension, based on the preset specification priority, query the price data that matches the target specification; if no non-empty and non-zero price data is found, query the price data corresponding to the largest specification that is smaller than the target specification and the smallest specification that is larger than the target specification. In this embodiment, the system matches the precise price data of the target specification according to the specification priority strategy configured in the current calculation rules. If no non-empty and non-zero price is found, the query range is expanded according to preset logic. For example, the system queries the largest available specification smaller than the target specification and the smallest available specification larger than the target specification. If both are valid data, their arithmetic mean or weighted average is taken as the specification dimension price G. If there is only one valid data, that value is used directly.
[0045] Step S223: Query price data that matches the target material in the material dimension; In this embodiment, the target material specified in the order (such as HPB300) is used as the sole filtering condition. The price records of the same material are precisely matched in the price database, and the price is output based on the material dimension. .
[0046] Step S224: On the pricing date dimension, determine the pricing date based on the base date type in the rule row, and determine the actual pricing date in combination with the date offset rule, wherein the date offset rule includes: taking the pricing date, the previous working day, or the arithmetic average or weighted average of the two most recent working days; In this embodiment, the system determines the pricing date (denoted as) according to the base date type defined in the calculation rules. The pricing date is determined by combining the offset rules. Specifically, the pricing date dimension adopts a two-layer structure: the first layer is the base date input parameter, used to determine the initial pricing date, with optional types including: current system date, order date, delivery date, arrival date, and fixed monthly date (used for scenarios such as calculating the average price for the month); the second layer is the date offset rules, used to adjust the above pricing dates to match the market data release rhythm or business management, specifically including: taking the current date, taking the previous working day, and taking the most recent working day; if the most recent working day includes two consecutive working days, then the arithmetic mean or weighted average of the prices corresponding to these two working days is taken.
[0047] Step S225: Query the average release price, first release price, and last release price for the day based on the release date and time dimension; Because third-party platforms typically publish prices on a daily basis, multiple price updates may be published within the same day depending on market changes. For example, price updates may be published during the morning, afternoon, or closing sessions. These price records are distinguished in the system by different "publication times."
[0048] Therefore, for multiple price releases within the same pricing day, the system extracts any one or a combination of the following prices as the time dimension price, based on the release time strategy configured in the calculation rules. : Average daily published price: refers to the arithmetic average of all published prices on that day; Initial price release: refers to the earliest price released on the day, which usually reflects market expectations at the opening or in the early morning session; Last published price: refers to the price updated last time on the day, which is usually closer to the final transaction level of the market on that day.
[0049] This price publication feature directly supports the rule design of the "pricing time dimension" in this embodiment, enabling the system to flexibly select prices corresponding to different publication times according to the contract agreement.
[0050] Step S226: When multiple price data are retrieved based on the above combination of dimensions, null or zero values in the price data are removed, and the arithmetic mean or weighted average of the remaining price data is calculated as the candidate benchmark price.
[0051] Obtaining price based on brand dimension Price based on specifications (G) and price based on materials (G) Price based on pricing date And the price based on the release time dimension. Subsequently, because these records may contain null values or invalid data with a value of 0 due to publication delays, missing information, or anomalies, this embodiment removes invalid price data that contains null values or a value of 0 from the acquired price data, and substitutes the remaining valid price data into the benchmark price calculation model for calculation.
[0052] Specifically, after extracting price data across five dimensions, if a single dimension has multiple valid values (such as multiple brands or multiple dates), the system will generate multiple candidate prices composed of combinations of the five dimensions. ,Right now: G* * *
[0053] In the formula, n represents the nth combination; Price is categorized by brand; G represents price by specification. Price based on material; Price based on the pricing date; Price is based on the time of publication.
[0054] Subsequently, all candidate prices were... Perform a traversal, extract items that are null or have a value of 0, and retain valid prices that are non-null and greater than zero.
[0055] Finally, the arithmetic mean or weighted average of the cleaned effective price set is calculated as the final candidate benchmark price. :
[0056] In the formula, n represents the number of effective prices; These are valid candidate prices.
[0057] Through the above steps, a multi-dimensional (brand, specification, date, time) combined pricing algorithm can accurately and efficiently generate benchmark prices that highly match actual transaction scenarios. This method, while strictly adhering to calculation rules, effectively addresses the problem of missing or incomplete market data by precisely matching target attributes and intelligently mitigating risks (such as adjacent specification substitution, multi-brand average price, working day offset, and bi-day averaging mechanisms), significantly improving pricing continuity and coverage. Simultaneously, it automatically removes null and zero values and performs arithmetic averaging of valid prices from multiple sources, ensuring robust and reliable output results and avoiding interference from abnormal data. The entire process supports flexible configuration, adapting to differentiated pricing needs of different customers, categories, or regions without code adjustments, achieving automated and structured transformation from raw market data to usable benchmark prices. This not only significantly improves the timeliness, representativeness, and business relevance of benchmark prices but also provides high-precision input for subsequent procurement / sales price calculations and single-transaction profit simulation, supporting enterprises in achieving rapid response, precise pricing, and intelligent decision-making, comprehensively enhancing pricing accuracy, system robustness, and operational efficiency in bulk commodity trading.
[0058] Step S30: Calculate the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters.
[0059] It should be noted that the floating parameters refer to external or internal variables that affect price fluctuations, such as: market supply and demand volatility coefficient, raw material price index changes, exchange rate changes, and seasonal adjustment factors. The business attribute parameters include, but are not limited to, procurement measurement method, negative deviation rate, and required quantity; The procurement measurement method refers to the unit of measurement or weighing method used during procurement, such as "pound measurement" (i.e., settlement based on actual weighed weight) or "theoretical measurement" (i.e., calculation based on theoretical weight, usually based on product specifications and density). The negative deviation rate refers to the maximum allowable percentage that the actual weight or dimensions of a product are lower than the nominal value. For example, if the nominal weight of a steel product is 1000 kg and the negative deviation rate is 3%, then the actual delivered weight can be as low as 970 kg. The demand quantity refers to the quantity to be purchased by the buyer or the quantity to be sold by the seller in this transaction. It is used to determine the order size and may affect the pricing strategy.
[0060] Understandably, traditional pricing methods often overlook key factors such as measurement differences, allowable deviations, and order sizes in actual business scenarios, leading to a disconnect between price calculations and actual transaction conditions. Therefore, step S30 dynamically combines the benchmark price with floating parameters and fully incorporates business attribute parameters such as procurement measurement methods, negative deviation rates, and demand quantities for refined calculation. This avoids price distortions, settlement disputes, or profit calculation deviations caused by missing parameters or simplified assumptions, thereby achieving accurate, scenario-based, and automated generation of procurement and sales prices, improving pricing rationality and business collaboration efficiency.
[0061] In one feasible embodiment, step S30 may include steps S31 to S34: Step S31: Determine the procurement benchmark price based on the benchmark price; In this embodiment, based on the benchmark price obtained in the above steps, the system obtains a procurement benchmark price that matches the currently procured material from the price master data or the price calculation engine. .
[0062] Specifically, the system uses the four elements of material category, specifications, material, and supplier in the current procurement item as search criteria to match against a pre-defined price calculation rule base; if a match is found, the base price is calculated based on that rule. For example, a market index plus processing fee model, or a historical average price weighted average, etc. If no matching rule is found, an exception is thrown or the default benchmark price is used.
[0063] For example, when purchasing a hot-rolled coil (Classification: Steel; Specification: 2.0×1250mm; Material: Q235B; Supplier: Company A), the system matches the rule "P = Iron Ore Index × 0.6 + Coke Index × 0.3 + Processing Fee 800 RMB / ton". Substituting the indices for the day, the calculation yields... =4200 yuan / ton.
[0064] Step S32: Calculate the purchase price based on the purchase benchmark price, the floating parameters in the purchase agreement, the required quantity, the purchase measurement method, and the negative deviation rate; This step performs the final calculation of the purchase price, using the following formula: Purchase price = ( + Quantity required (1+i*r) In the formula, This is the benchmark price for procurement; : Read the corresponding floating amount (unit: yuan / ton) from the currently effective purchase agreement. It can be positive (increase) or negative (discount). For example, a discount of -50 yuan / ton is given due to long-term cooperation. i: The purchase measurement method is 1 for pounds and 0 for theoretical time; Negative deviation rate r: Takes the negative deviation rate of the corresponding enabled state maintained by the negative deviation rate maintenance function, and uses material category, specification model, material and supplier as four-dimensional key values to query the negative deviation rate of the currently enabled state (e.g. 0.03 means 3%). Required Quantity: Retrieved from the quantity field in the current purchase requisition or order line.
[0065] Step S33: Determine the sales benchmark price based on the benchmark price; Similar to step S31, but geared towards a sales scenario. Using product category, customer group, specifications, and material from the sales order as query criteria, the system matches corresponding rules in the sales price calculation rule base and calculates the sales benchmark price. The rules may include cost-plus pricing, market competition pricing, customer registration coefficients, etc. For example, if the same hot-rolled coil is sold to customer B, the rule is "cost price × 1.12 + freight subsidy", which is calculated as follows: =4700 yuan / ton.
[0066] Step S34: Calculate the sales price based on the sales benchmark price, the floating parameters in the sales agreement, and the required quantity.
[0067] This step performs the final calculation of the sales price, using the following formula: Selling price = ( + * Quantity required In the formula, This is the benchmark selling price; : Floating amount from the sales agreement (e.g., rebate to major customers -20 yuan / ton, or surcharge for urgent orders +50 yuan / ton); Required quantity: taken from the quantity of the sales order line.
[0068] Through the above steps, the benchmark price is dynamically coupled with floating parameters and business attribute parameters (such as measurement method, negative deviation rate, and required quantity) in the procurement / sales agreement, avoiding price distortion caused by traditional fixed unit prices or rough estimations. At the same time, by structured matching of multi-dimensional attributes such as material classification, specifications, materials, and suppliers (or customers), the corresponding price calculation rules and negative deviation configurations are automatically invoked, reducing manual intervention and operational errors. In addition, different negative deviation handling mechanisms are adopted for "weighing" and "theoretical measurement" to accurately reflect the actual delivery and settlement risks and ensure the authenticity of enterprise cost accounting.
[0069] The above-described methods obtain pricing clauses from steel contracts and structure these clauses into pricing rules with priority order. Based on these pricing rules, price data is retrieved from external steel price data sources using a preset benchmark price retrieval algorithm, and multi-dimensional combination calculations are performed to obtain a benchmark price. Combining the benchmark price, floating parameters, and business attribute parameters, the purchase price and sales price are calculated respectively. This allows for the automatic and rapid calculation of purchase and sales prices during the inquiry phase, significantly reducing the workload of manual price checks, calculations, and verification. Furthermore, all prices are generated based on unified rules and real-time data, effectively avoiding result deviations caused by differences in human interpretation, thereby improving the efficiency of inquiry feedback and the accuracy and consistency of quotation results.
[0070] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 After step S30, the quantity inquiry price calculation method further includes step A1: Step A1: Calculate the profit for a single inquiry transaction based on the difference between the sales price and the purchase price, combined with the purchase quantity and whether the purchase measurement method is by weight or by weight.
[0071] Understandably, traditional profit calculations often rely on static costs and estimated selling prices, without linking to dynamically generated purchase and sales prices in actual transactions. This leads to delayed, distorted, or even misleading profit calculations. Therefore, in this embodiment, profit is calculated directly using actual purchase and sales prices. This avoids the problem of inflated or understated profits caused by using standard costs, planned prices, or manual estimates. As a result, real-time, accurate, and traceable single-order-level profit calculations are achieved, providing reliable data support for dynamic pricing, customer profit and loss analysis, and supply chain optimization.
[0072] In this embodiment, based on the purchase price calculated in step S32 and the sales price calculated in step S34, and combined with the actual transaction parameters in the order, the profit of a single inquiry transaction is calculated using the following profit calculation model:
[0073] In the formula, For profit; This is the benchmark selling price; This is the floating amount in the sales agreement; This is the benchmark price for procurement; This refers to the floating amount in the procurement agreement; The quantity to be purchased is usually a multiple of 32; This refers to the procurement measurement method; r represents the negative deviation rate, which is maintained by the user and accessed through the corresponding function field, and is typically a negative number.
[0074] It should be noted that when the purchase measurement method is "pound", the purchase price has already incorporated the negative deviation rate into its calculation process (step S32), that is, the total purchase price = This is because, under the weighing-based model, the seller issues the invoice based on the theoretical weight, but the actual weighed weight may be less due to negative deviation. The buyer essentially pays for the "missing portion," which is equivalent to an increase in unit purchase cost. Therefore, the purchase price already adjusted for negative deviation is used directly in profit calculations, without any additional processing.
[0075] When the procurement measurement method is "theoretical weight," the procurement price is settled based on the theoretical weight and is not adjusted for actual delivery deviations. Therefore, its calculation does not include the deviation rate factor, i.e., i=0, and the formula simplifies to: At this point, the procurement cost reflects the theoretical value under standard conditions. The risk of negative deviation is usually borne by the supplier or constrained by quality clauses and is not included in the cost. Therefore, the profit calculation also directly uses the unadjusted procurement price.
[0076] By combining key business elements such as sales price, purchase price, purchase quantity, and purchase measurement method (pound / theoretical weight) with the above-described methods, and dynamically determining the inclusion of these elements in the purchase cost calculation based on the purchase measurement method, accurate profit calculation is achieved. This truly reflects the actual profit and loss level under different settlement practices and effectively avoids profit distortion caused by ignoring tolerance risks or using a uniform cost model.
[0077] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 After step S30, the method for calculating the price based on the inquiry quantity further includes steps S301 to S303: Step S301: Write the purchase price and the sales price into the corresponding inquiry details line and feed them back to the inquiry business interface; In this embodiment, when a user triggers a calculation request via the "Price Calculation" button provided in the inquiry hall, the system automatically invokes the aforementioned algorithm for calculating purchase and sales prices based on multi-dimensional benchmark price data, agreement fluctuations, measurement methods, and negative deviation rates to complete the pricing calculation for a single inquiry. Subsequently, the calculated purchase and sales prices are filled back into the detail row corresponding to the current inquiry order in the form of structured fields, and the front-end inquiry interface is refreshed in real time.
[0078] Step S302: If there are missing key parameters in the price calculation process, generate a missing reason prompt message; In this embodiment, if key parameters are missing during price calculation (such as failure to maintain negative deviation rate, lack of corresponding price for brand, material mismatch, or no published data on the pricing date), a structured missing reason prompt message is generated. This prompt message categorizes the source of the problem by dimension, for example: "Brand A has no valid published price on the target date," "Specification Φ7.5mm is missing a price and there are no alternative adjacent specifications," and "Supplier A has not configured a negative deviation rate," facilitating users to quickly locate and correct data breakpoints.
[0079] Step S303: In response to user operation, display the price calculation path, which includes one or more of the following: pricing rules, rule priority, combination of benchmark price data dimensions, and missing key parameters.
[0080] It should be noted that the price calculation path includes, but is not limited to: the name and priority of the pricing rule that is hit, the five-dimensional combination (brand, specifications, material, pricing date, release time) used to obtain the benchmark price, the actual value results of each dimension, whether the nearest substitution or averaging logic is triggered, and the missing key parameters identified in step S302.
[0081] The methods described above not only enable automated and accurate calculation of purchase and sales prices, but also completely record and display the price formation process, including the pricing rules used, rule priorities, pricing dimensions, and any missing key parameters. This "traceable and explainable" pricing mechanism helps business personnel verify results, management conduct risk control reviews, and provides clear technical evidence in the event of price disputes.
[0082] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the inquiry price calculation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0083] This application also provides a quantity inquiry price calculation device, please refer to... Figure 4 The quantity inquiry price calculation device includes: The rule configuration module 10 is used to obtain the pricing terms in the steel contract and structure the pricing terms into pricing rules with priority order; The benchmark price calculation module 20 is used to obtain price data from an external steel price data source based on the pricing rules and through a preset benchmark price data retrieval algorithm, and to perform multi-dimensional combination calculations to obtain the benchmark price. The price calculation module 30 is used to calculate the purchase price and the sales price by combining the benchmark price, floating parameters and business attribute parameters.
[0084] The quantity inquiry price calculation device provided in this application, employing the quantity inquiry price calculation method in the above embodiments, can solve the technical problem of how to improve the efficiency, consistency, and traceability of steel price calculation. Compared with the prior art, the beneficial effects of the quantity inquiry price calculation device provided in this application are the same as those of the quantity inquiry price calculation method provided in the above embodiments, and other technical features in the quantity inquiry price calculation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0085] This application provides a quantity inquiry price calculation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the quantity inquiry price calculation method in the above embodiment 1.
[0086] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing the quantity survey price calculation device in the embodiments of this application. The quantity survey price calculation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The quantity inquiry price calculation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0087] like Figure 5As shown, the quantity survey price calculation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the quantity survey price calculation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the price calculation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows price calculation devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0088] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0089] The quantity survey price calculation device provided in this application, employing the quantity survey price calculation method described in the above embodiments, can solve the technical problem of how to improve the efficiency, consistency, and traceability of steel price calculation. Compared with the prior art, the beneficial effects of the quantity survey price calculation device provided in this application are the same as those of the quantity survey price calculation method provided in the above embodiments, and other technical features of this quantity survey price calculation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0090] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0092] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the inquiry price calculation method in the above embodiments.
[0093] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0094] The aforementioned computer-readable storage medium may be included in the quantity and price calculation device; or it may exist independently and not assembled into the quantity and price calculation device.
[0095] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the price calculation device, the price calculation device performs the following actions: obtains the pricing terms in the steel contract and structures the pricing terms into pricing rules with priority order; based on the pricing rules, obtains price data from an external steel price data source through a preset benchmark price retrieval algorithm and performs multi-dimensional combination calculations to obtain a benchmark price; and calculates the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters.
[0096] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0098] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0099] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described quantity survey price calculation method. This addresses the technical problem of improving the efficiency, consistency, and traceability of steel price calculation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the quantity survey price calculation method provided in the above embodiments, and will not be elaborated upon here.
[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the inquiry price calculation method described above.
[0101] The computer program product provided in this application can solve the technical problem of how to improve the efficiency, consistency, and traceability of steel price calculation. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the quantity-based price calculation method provided in the above embodiments, and will not be repeated here.
[0102] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for calculating inquiry price, characterized in that, The method for calculating the inquiry price includes: Obtain the pricing terms from the steel contract and structure the pricing terms into pricing rules with priority order; Based on the pricing rules, price data is obtained from external steel price data sources through a preset benchmark price retrieval algorithm, and multi-dimensional combination calculations are performed to obtain the benchmark price; Based on the benchmark price, floating parameters, and business attribute parameters, the purchase price and sales price are calculated respectively.
2. The method for calculating inquiry price as described in claim 1, characterized in that, The steps of obtaining the benchmark price based on the pricing rules, by acquiring price data from external steel price data sources through a preset benchmark price retrieval algorithm, and performing multi-dimensional combination calculations, include: Execute multiple rule rows according to the rule priority in the pricing rules; For each of the rule rows, based on preset data retrieval dimension parameters, matching price data is queried from an external steel price data source, and a corresponding candidate benchmark price is generated based on the price data; If the candidate benchmark price generated by the current rule row is based on at least one non-empty and non-zero price data, then the corresponding candidate benchmark price is determined as the final benchmark price; If no price data is found in the current rule row, or if the found price data are all empty or zero, then the next rule row will be executed.
3. The method for calculating inquiry price as described in claim 2, characterized in that, The data retrieval dimensions include brand dimension, specification dimension, material dimension, pricing date dimension, and release time dimension; The steps of querying matching price data from an external price data source based on preset data retrieval dimension parameters, and generating corresponding candidate benchmark prices based on the queried price data, include: At the brand dimension, if configured as a single brand, the price data corresponding to the single brand is queried; if configured as multiple brands, the price data corresponding to each brand is queried and the arithmetic mean or weighted average is calculated. In terms of specifications, based on preset specification priorities, price data that matches the target specification is queried; if no non-empty and non-zero price data is found, the price data corresponding to the largest specification that is smaller than the target specification and the smallest specification that is larger than the target specification is queried. Query price data that matches the target material in the material dimension; In the pricing date dimension, the pricing date is determined based on the base date type in the rule row, and the actual pricing date is determined in combination with the date offset rule, wherein the date offset rule includes: taking the pricing date, the previous working day, or the arithmetic average or weighted average of the two most recent working days; Based on the publication date and time dimension, query the average publication price, initial publication price, and last publication price for that day; When multiple price data are retrieved based on the above-mentioned combination of dimensions, null or zero values in the price data are removed, and the arithmetic mean or weighted average of the remaining price data is calculated as the candidate benchmark price.
4. The method for calculating inquiry price as described in claim 1, characterized in that, The business attribute parameters include one or more of the following: procurement measurement method, negative deviation rate, and required quantity. The steps of calculating the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters include: Determine the procurement benchmark price based on the aforementioned benchmark price; The purchase price is calculated based on the benchmark purchase price, the floating parameters in the purchase agreement, the required quantity, the purchase measurement method, and the negative deviation rate; and / or Determine the sales benchmark price based on the aforementioned benchmark price; The sales price is calculated based on the benchmark sales price, the floating parameters in the sales agreement, and the required quantity.
5. The method for calculating inquiry price as described in claim 1, characterized in that, After the step of calculating the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters, the following steps are included: Write the purchase price and the sales price into the corresponding inquiry details line and feed them back to the inquiry business interface; If any key parameters are missing during the price calculation process, a message indicating the reason for the missing parameters will be generated. In response to user actions, the price calculation path is displayed, which includes one or more of the following: pricing rules, rule priority, combination of benchmark price data dimensions, and missing key parameters.
6. The method for calculating inquiry price as described in claim 1, characterized in that, After the step of calculating the purchase price and sales price by combining the benchmark price, floating parameters, and business attribute parameters, the method further includes: The profit for a single inquiry transaction is calculated based on the difference between the sales price and the purchase price, combined with the purchase quantity and whether the purchase measurement method is by weight or by weight. Wherein, when the procurement measurement method is the time measured in pounds, the procurement price includes the influence of the negative deviation rate; When the procurement measurement method is the theoretical time, the procurement price does not include the impact of the negative deviation rate.
7. A quantity-based price calculation device, characterized in that, The inquiry price calculation device includes: The rule configuration module is used to obtain the pricing terms in the steel contract and structure the pricing terms into pricing rules with priority order; The benchmark price calculation module is used to obtain price data from external steel price data sources based on the pricing rules and through a preset benchmark price data retrieval algorithm, and to perform multi-dimensional combination calculations to obtain the benchmark price; The price calculation module is used to calculate the purchase price and the sales price by combining the benchmark price, floating parameters and business attribute parameters.
8. A quantity-based price calculation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the inquiry price calculation method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the inquiry price calculation method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the inquiry price calculation method as described in any one of claims 1 to 6.