A pipe fitting quotation matching method and system based on primary and secondary caliber hierarchical judgment and specification conversion
By using the method of primary and secondary diameter classification and specification transformation, the errors in classifying categories and connection variations in multi-diameter specifications of industrial pipe fittings were resolved, achieving accurate price matching and stable correspondence of inquiry specifications, reducing the risk of mismatch in the position of multiple worksheet rows, and improving the price hit rate.
Patent Information
- Application Number
- CN202611392304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-20
AI Technical Summary
Existing automatic product matching or automatic pricing schemes cannot effectively handle the different functions of main and secondary diameters in multi-diameter specifications of industrial pipe fittings, leading to errors in category and connection variation determination, different ways of writing price list specifications, and easy mismatch of row positions in multiple worksheets.
By using a method based on primary and secondary diameter classification and specification transformation, the pipe fitting demand line is identified, the diameter segment is normalized, the primary diameter parameters and secondary diameter parameters are determined, and specification transformation and price matching are performed in combination with preset connection conditions and product dictionary to ensure that the quotation result corresponds to the original inquiry line. A hierarchical retrieval strategy is adopted to reduce the risk of mismatch.
It reduces errors in product category and connection variations caused by changes in the order of specifications, ensures the accuracy of price matching, reduces the risk of mismatch in row positions across multiple worksheets, improves price hit rate, and maintains a stable correspondence between inquiry specifications and price lists.
Smart Images

Figure CN123141069A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial pipe fitting data processing and computer-aided price inquiry technology, and in particular to a method, system, electronic device, and computer-readable storage medium for parsing multi-diameter pipe fitting specifications from electronic price inquiry documents, determining pipe fitting categories and connection variations based on main and secondary diameters, transforming pipe fitting specifications of different forms, and using the transformed specifications to complete price matching. Background Technology
[0002] Industrial pipe fittings include a variety of products such as elbows, tees, crosses, reducers, mechanical tees, and mechanical crosses, which can be further categorized into grooved, threaded, and welded types. Price lists for different categories do not conform to the same standards in terms of product names, model designations, and specifications. For example, grooved fittings may use a product code and suffix to form the model number, and the outer diameter of the pipe to indicate the specification; threaded fittings can be directly indicated by the product name and nominal diameter; the same reducing tee might be written as "DN32×DN25×DN32" in a quotation document, but only as "32×25" in the price list.
[0003] Pipe fitting specifications also exhibit significant multi-diameter semantics. For fittings with more than two diameter segments, the larger diameter segment typically describes the main pipe diameter, while the smaller diameter segment usually describes the branch or connection port diameter. The main pipe diameter may influence whether the product should be classified as threaded, grooved, or welded, while the branch diameter may influence whether to select a grooved branch variant or a threaded branch variant within the same category. If only the first number in the specification is used, or if matching is based solely on a single keyword in the name, errors in category or connection variant selection can easily occur due to variations in diameter order, different diameter expressions, or complex names such as "grooved threaded mechanical tee."
[0004] Existing automatic product matching or pricing schemes typically use name similarity, standard product libraries, historical prices, parameter models, or general rule bases for processing. While these schemes can perform name association or price calculation for general products, they do not address the different roles of main and auxiliary diameters in multi-diameter pipe fitting specifications, nor do they resolve the continuous dependencies between pipe fitting categories, connection variations, DN to outer diameter conversions, tee or cross diameter folding, and pricing of special mechanical crosses.
[0005] In bulk quotations, spreadsheets may contain multiple worksheets. The same product and specification may correspond to multiple brand or price records, and some rows may not even have prices. If the system does not continuously retain worksheets and original row positions between pre-checking, product matching, price candidate selection, and quotation output, it can easily lead to user selection results being written to other rows, or subsequent quotations being misaligned when no price row exists.
[0006] Therefore, a pricing matching scheme for industrial pipe fittings is needed. This scheme parses multi-diameter specifications into primary and secondary diameter parameters with different decision-making functions. First, the pipe fitting category is determined. Then, within the same category, connection variations are determined. Subsequently, specification transformation and hierarchical price retrieval corresponding to the pipe fitting form are performed. Throughout the process, the correspondence between the pricing results and the original inquiry line is maintained. Summary of the Invention
[0007] The technical problem to be solved by this invention is to provide a method and system for matching pipe fitting quotations based on primary and secondary diameter classification and specification transformation, addressing issues such as inconsistent names, inconsistent specification separators, different functions of multiple diameter sections, interdependence of categories and connection variations, different writing styles of price list specifications, and easy mismatch of row positions in multiple worksheets in pipe fitting quotation information.
[0008] To solve the above-mentioned technical problems, the present invention provides a pipe fitting quotation matching method based on primary and secondary diameter classification and specification change, which is executed by electronic equipment and includes the following steps.
[0009] Obtain the electronic inquiry document, identify the pipe fitting requirement lines in the electronic inquiry document, record the worksheet identifier and row position of each pipe fitting requirement line, and extract the pipe fitting name, pipe fitting specifications, quantity and remarks from each pipe fitting requirement line.
[0010] The diameter prefixes and separators in pipe fitting specifications are normalized to obtain normalized specifications consisting of at least one diameter segment. When a normalized specification includes multiple diameter segments, the diameter segment with the largest value is determined as the primary diameter parameter, and the diameter segment with the smallest value is determined as the secondary diameter parameter. For single-diameter specifications, the primary and secondary diameter parameters are the same. Special specifications containing letters, angle symbols, or other elements that cannot be parsed into a pure numerical diameter segment sequence can be retained in their original form and are not included in the automatic rule determination based on primary and secondary diameters.
[0011] During normalization, the order of appearance and repetition relationship of each caliber segment in the original specification are preserved, forming an ordered caliber segment sequence. The main caliber parameter and the secondary caliber parameter are determination parameters derived from this sequence and do not replace the ordered caliber segment sequence; the subsequent identification of symmetry relationships of tees and crosses, as well as the generation of sorting keys and deduplication folding keys, still use the ordered caliber segment sequence as input.
[0012] The system maintains related but different price matching specifications and display specifications for the same pipe fitting demand. Both are initialized from the ordered diameter segment sequence; subsequent outer diameter mapping, symmetrical folding, sorting, and deduplication only apply to the price matching specifications or their derived search keys according to the corresponding trigger conditions. The display specifications retain the original diameter segment arrangement relationship, or add an outer diameter prefix according to the target category. Price data is retrieved using price matching specifications, and quotation results are displayed for user verification, thus avoiding changes to the query port arrangement information to adapt to the price list.
[0013] The target pipe fitting category is determined based on user confirmation, a single category signal in the fitting name, and preset connection condition rules. Categories or products explicitly selected by the user have higher priority. If only one category signal appears in the fitting name, the category can be directly determined; if no single category signal appears, the main diameter parameter is compared with the diameter boundary in one or more preset connection condition rules. When multiple rules are satisfied simultaneously, the rule with the smallest distance between the diameter boundary and the main diameter parameter is selected; if the distances are the same, the rule ranked first is selected according to its ranking value, thus obtaining a deterministic target pipe fitting category.
[0014] Match the target pipe fitting product in the product dictionary corresponding to the target pipe fitting category. User-configured exact aliases can be matched before the built-in dictionary. When the normalized specification has multiple non-equal diameter segments, combine the pipe fitting name and the number of diameter segments to infer reducing tees, reducing crosses, or reducing pipes, and limit the product search to the target pipe fitting category. If the product dictionary does not match, product names of the same category in the price list can be used for supplementary matching.
[0015] When a target pipe fitting matches a product connection variant rule, the secondary diameter parameter is used to continue the second-level decision-making process. Product connection variant rules can include the product name, rule on / off status, and secondary diameter threshold. When the rule is enabled and the secondary diameter parameter is not greater than the secondary diameter threshold, a threaded connection variant is selected within the same target pipe fitting category; when the secondary diameter parameter is greater than the secondary diameter threshold, a grooved connection variant is selected. Thus, the primary diameter parameter is responsible for the first-level decision-making for the pipe fitting category, and the secondary diameter parameter is responsible for the second-level decision-making for connection variants within the same category.
[0016] After selecting the connection variant, an applicable diameter range verification is performed. If the target fitting product matches and the product connection variant rule is enabled, the applicable range for that product is used to constrain the branch or connection end, and the secondary diameter parameter is selected as the range verification diameter; for other products, the primary diameter parameter is selected as the range verification diameter. Therefore, for mechanical fittings with a large primary diameter but a branch diameter within the applicable range of threaded connection variants, an error alarm will not be generated solely because the primary diameter exceeds the threaded connection range. If the range verification fails, the original fitting requirement line and displayed specifications are retained, and a pending description is written, without generating unexplainable price results.
[0017] Based on the selected target pipe fitting product, category, and diameter segment arrangement, the normalized specifications are transformed. Specification transformation may include mapping from DN diameter to pipe outer diameter, folding of symmetrical diameter segments in four-way fittings, folding of symmetrical diameter segments at the beginning and end of tee fittings, sorting of diameter segments, and deduplication of duplicate diameter segments. Price matching uses the transformed specifications, while the quotation display can retain the original specifications or use specifications with an outer diameter prefix.
[0018] The aforementioned specification transformation does not involve an unconditional rearrangement of diameter segments: the outer diameter mapping is constrained by the target pipe fitting category; the tee folding is constrained by the positional relationship of "the first segment equals the last segment and the middle segment is smaller"; and the cross folding is constrained by the positional relationship of "the first and last segments are equal and the two middle segments are equal". The sorting key and deduplication folding key are only used as subsequent search keys when the exact specification is not matched. Therefore, the specifications on the inquiry side can be converted into stable specification keys in the price data without losing the semantics of port arrangement.
[0019] The price search key is composed of the target pipe fitting category, the corresponding price-matching model, and the price-matching specification. Price data is retrieved in the following order: exact search, normalized search, product family search within the same category and specification, and special pipe fittings with configuration constraints. Based on the worksheet identifier and row position, the retrieved price data is associated with the corresponding pipe fitting demand row to generate a quotation result.
[0020] For mechanical tee fittings with three unequal diameter segments, the three diameter segments can be arranged in descending order to derive large-diameter and small-diameter specifications. Then, the price of the large-diameter specification, the price of the original three-segment specification, or the average price of the large-diameter specification and the small-diameter specification can be selected according to the company's configuration. For mechanical tee fittings that allow fuzzy matching and do not fall under the aforementioned endpoint pricing rules, the candidate specification with the smallest sum of absolute differences among the corresponding diameter segments can be selected from candidate specifications with the same model and number of diameter segments.
[0021] The pricing for the special mechanical four-way connector is the final pricing branch. Upon entering this branch, only the original three-segment specification price or the unique price record of the derived specification specified by the rules is accepted; if any required specification is not matched or multiple records are matched, the original row is retained and marked as having no price, and it will not proceed to product family search or specification distance fuzzy matching. This termination condition allows the quoted price to be traced back to the price record specified by the rules, avoiding substitution by unrelated similar specifications when a derived price is missing.
[0022] This invention also provides a pipe fitting quotation matching system based on primary and secondary diameter classification and specification transformation, including a quotation data processing module, a specification parsing module, a category determination module, a product matching module, a connection variant module, a specification transformation module, a price matching module, and a quotation output module. These modules cooperate to execute the above-described method.
[0023] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.
[0024] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0025] Compared with the prior art, the present invention has at least the following beneficial effects.
[0026] First, the largest and smallest diameter segments in a multi-diameter specification are defined as the main diameter parameter and the secondary diameter parameter, respectively. This allows for the use of different specification semantics for category determination and connection variant determination, which can reduce errors caused by taking only the first diameter or using mixed diameters.
[0027] At the same time, the order and repetition relationship of the original diameter segments are preserved, so that the classification of the maximum and minimum values and the identification of the port arrangement can be used in parallel, avoiding the inability to distinguish the relationship between tee and cross ports after only retaining the maximum and minimum values.
[0028] Second, when multiple category rules are satisfied simultaneously, a deterministic decision is made based on the distance between the main definition and the rule boundary, as well as the rule sorting value, to avoid different categories being output due to different traversal orders when there is overlap in rule entry.
[0029] Third, match products within the target category and use the sub-diameter threshold to switch between threaded or grooved connection variants of the same category, so that fittings such as "grooved body with threaded branch" can maintain the correct category and price model.
[0030] Fourth, based on the type and diameter arrangement of pipe fittings, perform DN to outer diameter conversion, symmetrical folding, sorting or deduplication to ensure that different writing styles in the inquiry specifications and price list can form a stable price matching key, while retaining display specifications suitable for user verification.
[0031] The separation of price matching specifications and display specifications allows the required standardized format of the price index and the original port arrangement of the inquiry end to be saved simultaneously. This enables the index to match two or more outer diameter specifications in the price list and to verify the original three or more specifications in the quotation results.
[0032] Fifth, by adopting a hierarchical strategy that includes precise retrieval, morphological normalization retrieval, product family retrieval, and special mechanical four-way retrieval, and by restricting product families, we can improve the price hit rate and reduce mismatches between different angles, different mechanical structures, or different categories.
[0033] 6. By binding category candidates, price candidates, and final quotes through worksheet identifiers and row positions, the risk of incorrect rows in scenarios with multiple worksheets, multiple price candidates, and no price can be reduced. Attached Figure Description
[0034] Figure 1 This is a block diagram of a pipe fitting quotation matching system based on primary and secondary diameter classification and specification transformation, provided for an embodiment of the present invention.
[0035] Figure 2 The flowchart illustrates a pipe fitting quotation matching method based on primary and secondary diameter classification and specification transformation, as provided in an embodiment of the present invention. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments. The described embodiments are used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention.
[0037] like Figure 1 As shown, the pipe fitting quotation matching system in this embodiment includes a quotation data processing module, a specification parsing module, a category determination module, a product matching module, a connection variant module, a specification transformation module, a price matching module, and a quotation output module. The system may also include a pre-inspection interaction module, a product dictionary, an enterprise rule base, a caliber mapping table, and a price database.
[0038] The inquiry data processing module is used to read electronic inquiry documents. These documents can be spreadsheets containing one or more worksheets, or row-based data converted from document parsing or optical character recognition. Each row can include some or all of the fields for serial number, name, model, specifications, quantity, and remarks. The system identifies the name, specifications, quantity, and remarks columns, using the worksheet name or worksheet number as the worksheet identifier and the row number as the local row position. When summarizing across worksheets, the system can also save the cumulative row positions. Worksheet identifiers and row positions are used throughout subsequent category pre-inspection, product selection, price selection, and quotation output.
[0039] Pipe fitting demand lines can be identified using a pipe fitting name dictionary, a company alias dictionary, pipe fitting category keywords, and product names from the price list. If a pipe fitting specification is empty or only contains a prefix without a valid diameter, the line can be skipped. For expressions like "threaded" or "threaded joint" in mechanical tees or crosses, after determining they belong to mechanical pipe fittings, they can be unified under the semantic meaning of "threaded connection," because these expressions indicate the branch connection method of the grooved body, not that the entire product belongs to the threaded category.
[0040] The specification parsing module first removes DN, dn or other equivalent prefixes from the specification, and then unifies the multiplication sign, the letter X and the letter x into an asterisk or other preset separators.
[0041] The normalized numerical caliber segments are saved in the original order of appearance in the specifications, and duplicate caliber segments are not deleted in this step. For example, "32*25*32" yields an ordered caliber segment sequence [32, 25, 32], from which the primary caliber 32 and secondary caliber 25 are derived. The sequence itself continues to be used to determine the symmetry relationship between the beginning and end, thus differing from the processing of only saving unordered sets. For example, "DN65×50×50", "65X50X50", and "65*50*50" can all be normalized to "65*50*50". The system parses each caliber segment into numbers. The maximum value among multiple caliber segments is used as the primary caliber parameter, and the minimum value is used as the secondary caliber parameter. Even if the inquiring party changes the order of the caliber segments, as long as the set of caliber segments remains unchanged, the primary caliber parameter and the secondary caliber parameter remain unchanged.
[0042] For "65*50*50", the main diameter parameter is 65, and the secondary diameter parameter is 50; for "150*100*80", the main diameter parameter is 150, and the secondary diameter parameter is 80; for a single segment "25", both the main diameter parameter and the secondary diameter parameter are 25. For specifications such as "K11579°" that contain both letters and angle symbols, the system retains the original string and sets the main diameter parameter and the secondary diameter parameter to an invalid state to avoid mistaking angle numbers for diameter boundaries.
[0043] The category determination module first checks if a specific product or category has been confirmed by the user for the current worksheet and row position. If a specific product confirmation result exists, that product and category are used directly. If only a category confirmation result exists, that category is used as the target pipe fitting category, and subsequent product matching is limited to this category.
[0044] If no user confirmation is received, the system checks for precise aliases. Precise aliases are configured by the enterprise and can directly map names with clear business meaning to a specific product and category. For example, an alias can map "threaded mechanical tee" to threaded mechanical tee under the grooved category. When a precise alias is found, the word "threaded" in the name no longer switches the entire product to the threaded category, thus maintaining the core semantic meaning of grooved mechanical fittings.
[0045] When no precise alias is found, the system identifies a single category signal in the fitting name. If it only contains "groove," it is determined to be a grooved product; if it only contains "threaded," it is determined to be a grooved product for ordinary grooved products; if it only contains "threaded" or "galvanized," it is determined to be a threaded product. If the name contains two or more signals, such as "groove threaded mechanical tee," then no single keyword is used as the final category, and the process proceeds to the main caliber rule determination or pre-inspection process.
[0046] The main caliber rule can be configured by the enterprise. Each rule must include at least a condition field, comparison operator, caliber boundary, result category, and sorting value. Comparison operators can be less than, less than or equal to, equal to, greater than or equal to, or greater than. The system collects all rules that satisfy the main caliber condition and calculates the absolute distance between the main caliber parameter and the caliber boundary of each rule, selecting the rule with the smallest distance; if the distances are the same, the rule with the earlier sorting value is selected. For example, rule A is "caliber less than or equal to 50, result is threaded," and rule B is "caliber greater than or equal to 40, result is grooved." When the main caliber is 45, both rules are satisfied; the system compares the distances between 45 and 50, and between 45 and 40; if the distances are the same, the sorting value determines the unique result. If the enterprise has not configured any rules, it can revert to global rules; if the rule master switch is off or the main caliber is invalid, this determination is not performed.
[0047] The product matching module matches the fitting name in the product dictionary corresponding to the target fitting category. Product dictionary entries can include standard name, alias, code, category, and applicable caliber range. When the same basic term exists in multiple categories, category limitation prevents the error of "galvanized 90° elbow" initially matching "grooved elbow" and then incorrectly correcting it.
[0048] When a specification has multiple diameter segments that are not all equal, the product matching module performs semantic inference for different diameters. If the name contains "tee" but not "mechanical," it searches for reducing tees in the target category; if the name contains "cross" but not "mechanical," it searches for reducing crosses; if the name contains "reducer," it searches for reducing pipes. Mechanical tees and mechanical crosses themselves allow multiple diameter expressions and are not replaced by ordinary reducing tees or reducing crosses due to multiple diameter segments. If the product dictionary still does not match, the name can be matched with product names in the already loaded price list, but supplementary matching is still limited by the target category.
[0049] The connection variant module executes the secondary caliper rule after product matching is complete. Secondary caliper rules are configured according to product families; enterprise-specific rules can override global templates. When multiple product names are included, the rule with the longer product name takes precedence; for example, the "mechanical tee" rule takes precedence over the "tee" rule. When the rule switch is enabled and the secondary caliper is valid, the secondary caliper is compared with the rule threshold. If the secondary caliper is not greater than the threshold, the threaded connection variant is selected; if the secondary caliper is greater than the threshold, the grooved connection variant is selected.
[0050] Connection variant switching is completed within the same target fitting category. For example, if a matched product is a "grooved mechanical tee" under the grooved category, and its secondary diameter meets the threaded connection threshold, it is switched to a "threaded mechanical tee" under the same grooved category, instead of changing the entire product to the threaded category. For names that explicitly state "grooved mechanical tee" or "threaded mechanical tee," the single explicit variant can remain unchanged; for reducing products inferred from "reducers," even if the name contains the word "grooved," the secondary diameter rule can continue to be used to determine the specific connection variant.
[0051] When the rule switch is off and the name contains both groove and threaded or threaded connection signals, the pre-inspection interaction module generates category candidates. Category candidates include worksheet identifier, row position, original name, specifications, and candidate category. After the user selects a category, the system resubmits the selection result to the category determination and product matching process based on the worksheet identifier and row position, instead of directly modifying the final quotation text.
[0052] The specification conversion module establishes price-matching specifications based on product and category. For grooved and welded products, a DN-to-outer diameter mapping table can be used to convert each diameter segment to the pipe's outer diameter. For example, when DN65 and DN50 are mapped to outer diameters of 76 and 60 respectively, "65*50*50" is converted to "76*60*60". If a certain DN diameter corresponds to multiple outer diameter values, a preset value can be selected according to the company's price list; if there is no corresponding item in the mapping table, the original diameter segment is retained. For threaded products, the price list typically uses DN numbers, therefore DN-to-outer diameter conversion is not performed.
[0053] Different pipe fitting shapes can also be subjected to the following specification changes.
[0054] First, for the four-section specification of a grooved four-way connector, when the first and fourth sections are equal, the second and third sections are equal, and the sections are not all equal, "65*40*40*65" can be folded into "65*40", and then the mapping from DN to outer diameter can be performed. This transformation retains two effective diameters, the main pipe and the branch pipe, and eliminates the differences caused by the price list not repeatedly recording symmetrical ports.
[0055] Secondly, for the three-section specification of threaded tees, when the first and third sections are equal and the second section is smaller than the first section, "32*25*32" can be folded into the price-matching specification "32*25". At the same time, "32*25*32" is retained in the quotation display to facilitate users to check the original inquiry.
[0056] Third, for threaded tees or crosses, the diameter segments can be arranged in ascending order to form a sequence without key factors.
[0057] When sorting by "no key in sequence," duplicate diameter segments are retained. Only for threaded four-way connectors, a deduplication folding key is generated if duplicate diameter segments exist and at least two different diameters remain after deduplication. Price retrieval stops at the first non-empty result in the order of original specification key, "no key in sequence," and deduplication folding key, thus preventing derived keys from overwriting existing precise port arrangements in the price table. For example, "32*25*32" becomes "25*32*32." When duplicate diameter segments exist and more than two different diameters remain after deduplication, a deduplication folding key "25*32" can also be generated. These keys are only used when precise specifications are not matched, to avoid overwriting original arrangements in the price table that have different meanings.
[0058] The price-matching model also varies depending on the product category. When the target product category is grooved joints, the price-matching model can consist of the product code and the enterprise configuration suffix, while the displayed model can consist of the enterprise configuration prefix, the product code, and the enterprise configuration suffix. For example, if the product code is "3S", the prefix is "XGQT", and the suffix is "-16", the displayed model can be "XGQT3S-16". When the target product category is threaded joints or solder joints, the product name can be used directly as the price-matching model, and the displayed model can be left empty.
[0059] The price matching module creates an index for price data composed of combinations of "category, model, and specification". For each pipe fitting result row, a precise search is first performed using the target category, price-matched model, and price-matched specification. If the precise search fails to find a match, the system retryes using the folded two-section specification for threaded tees that meet specific morphological conditions; if still no match is found, the search is further restricted using family terms such as elbows, tees, crosses, reducers, or mechanical fittings among candidate prices with the same category and precise specification. Family searches should exclude mechanical fittings, angled fittings, or other structures that do not match the family to reduce false positives caused solely by identical specifications.
[0060] When a precise or rollback search finds a unique price record, the price, brand, and remarks from that record are written into the quotation results. When multiple price records are found, price candidates are generated, bound to the worksheet identifier, cumulative row position, and local row position, and the current row is marked as a price to be selected. The row is retained if the user does not select any; if the user selects a price, it is written back to the corresponding pipe fitting demand row according to the position identifier. If no price is found, the current row is marked as having no price, and the row and its original position are also retained.
[0061] For reducing mechanical four-way fittings, the system can execute the endpoint pricing rule. Let the three diameter segments be arranged in descending order of value as A, B, and C, where A is greater than or equal to B, and B is greater than or equal to C. Generate the first derived specification A*B and the second derived specification A*C. When the enterprise is configured with the maximum diameter strategy, the price corresponding to the first derived specification is used as the quote; when the enterprise is configured with the original specification strategy, only the precise prices of the original three specifications are used; when the enterprise is configured with the average strategy, the unique prices of the first and second derived specifications are obtained respectively, and the average of the two is used as the quote. If any required price is missing, the endpoint rule is not exceeded for unconstrained fuzzy matching to avoid generating uninterpretable prices.
[0062] When determining a unique price record, first limit the target fitting category and price-matching model, then limit the derived specifications or the original three-segment specifications. If the number of results is not equal to one, the final pricing status is "failed"; the failure status is directly passed to the quotation output module, instead of being converted to a general search miss status. By distinguishing between final pricing failure and general search miss, it is possible to prevent subsequent rollback logic from overriding special pricing rules.
[0063] For mechanical tees that do not meet the endpoint rules mentioned above, if the company enables fuzzy matching of specifications and the aforementioned searches fail to find a match, it can scan for candidate specifications with the same price, model, and number of diameter segments. The absolute difference between the corresponding diameter segments of the input specification and the candidate specifications is calculated segment by segment, and the sum of these absolute differences is taken as the specification distance. The candidate price with the smallest specification distance is selected. This price is marked as originating from fuzzy matching in the quotation results for manual review.
[0064] like Figure 2 As shown, a specific processing flow includes: S1, obtaining the electronic inquiry document and locating the pipe fitting requirement line; S2, normalizing the pipe fitting name and specifications; S3, parsing the diameter segment and generating the main diameter parameter and secondary diameter parameter; S4, determining whether there is a user confirmation or single category signal; if not, proceeding to S5, using the main diameter parameter and connection condition rules to determine the target pipe fitting category; S6, matching products within the target pipe fitting category and inferring different diameter products; S7, determining whether the connection variant rule is hit; if hit, proceeding to S8, using the secondary diameter parameter to select threaded or grooved variants of the same category; S9, changing the specifications according to the product form and category; S10, constructing the category, model, and specification combination key and performing hierarchical price retrieval; S11, determining whether there are multiple price candidates; if so, proceeding to S12, receiving the price selection bound to the worksheet and row position; S13, generating the quotation result corresponding to the original inquiry line. Example 1
[0065] A quote from a supplier is for a "mechanical tee" with a specification of "DN80×25" and a quantity of 10. The name does not contain a single product category signal. The specification parsing module obtains the normalized specification "80*25", with a main diameter parameter of 80 and a secondary diameter parameter of 25. The category determination module compares the main diameter 80 with the company's connection condition rules, determining the target fitting category to be grooved. The product matching module matches the mechanical tee product within the grooved category.
[0066] The product matches the connection variant rule, with a secondary diameter threshold of 65. Since the secondary diameter of 25 is no greater than 65, the connection variant module selects a threaded mechanical tee within the grooved category. The specification conversion module converts DN80 and DN25 to their corresponding outer diameter segments, for example, to "89*33"; the price matching module uses the grooved category, the product code corresponding to the threaded mechanical tee, and "89*33" as the price search key. In this embodiment, the primary diameter determines the grooved category, and the secondary diameter determines the threaded branch variant; both operate at different decision levels. Example 2
[0067] A quote is for a galvanized tee with a specification of 32*25*32. "Galvanized" is a single-category signal, therefore the target pipe fitting category is determined to be threaded, and the main diameter category rule is not applied. The product matching module determines the target product as a threaded reducing tee based on multiple reducing specifications. Since the first and third segments are equal and the second segment is smaller than the first, the specification conversion module folds the price-matched specification to "32*25" and retains "32*25*32" as the display specification. Even if the price list only records "32*25", the system can still retrieve the corresponding price and simultaneously display the original three-segment specification to the user. Example 3
[0068] A quote is for a "grooved threaded mechanical tee" with a specification of "150*100*80". The specification parsing module obtains a main diameter of 150 and a secondary diameter of 80. Since the name contains both grooved and threaded signals, it is not treated as a single product category signal. The system uses the main diameter rule to determine the target product category and selects the appropriate connection variant based on the connection variant rule and the secondary diameter of 80. If the product is determined to be a reducing mechanical tee, the system arranges the three diameter segments in descending order as 150, 100, and 80, generating the first derived specification "150*100" and the second derived specification "150*80".
[0069] When the enterprise is configured with an average strategy, the system retrieves the unique prices of the two derived specifications separately. For example, if the price of the first derived specification is 200 yuan and the price of the second derived specification is 160 yuan, then the quoted price is 180 yuan. If neither derived specification has a unique price, the row is marked as having no price and is not included in the general mechanical four-way fuzzy matching. This process ensures that special pricing results have a clear data source and are verifiable. Example 4
[0070] An electronic quotation document includes two worksheets: "Fire Protection Fittings" and "Water Supply and Drainage Fittings." Both worksheets contain elbows of the same specifications, and each has two brand prices in its price database. The system saves the worksheet identifier, local row position, and cumulative row position for each fitting's demand row. The price matching module incorporates this position data when generating price candidates. When a user selects the first brand in the "Fire Protection Fittings" worksheet and the second brand in the "Water Supply and Drainage Fittings" worksheet, the quotation output module writes back the data according to the worksheet identifier and local row position, without overwriting each other due to identical specifications. Even if a row has no price yet, the position of subsequent rows remains unchanged. Example 5
[0071] A quote is for a product named "Mechanical Four-Way" with a specification of "150*32". The specification parsing module obtains a main diameter of 150 and a secondary diameter of 32. The target product is selected as a threaded mechanical four-way according to the secondary diameter threshold rule. This product family is matched and the connection variant rule is enabled. Therefore, the secondary diameter of 32 is used for diameter range verification instead of the main diameter of 150. When the secondary diameter of 32 is within the example threaded connection range, no out-of-range statement is generated. If the main diameter verification is incorrectly used for the same specification, the usable threaded branch variant will be excluded. This example illustrates that the main and secondary diameters are not only used for two-level judgment but also for range verification of different product families. Example 6
[0072] A quote is for a galvanized tee with a specification of 32*25*25. Although this specification includes three diameter segments, the first diameter segment is not equal to the third diameter segment, failing to meet the symmetrical condition of "main pipe—branch pipe—main pipe". Therefore, the system does not fold the price-matched specification into "32*25", but instead retains all three price-matched specifications and continues searching sequentially without a key. This scenario, along with Example 2, illustrates that symmetrical folding is constrained by the port position relationship; it does not mean that seeing three diameter segments unconditionally deletes one segment.
[0073] In other embodiments, product dictionaries, connection condition rules, connection variant rules, DN-to-outer diameter mapping, and price data can be stored in relational databases, configuration files, or remote dictionary services; inquiry input can come from spreadsheets, structured interfaces, document parsing, or optical character recognition; user confirmation can be completed through web pages, desktop programs, or application programming interfaces. As long as the technical concept of determining product categories according to the main caliper, determining connection variants of the same category according to the secondary caliper, changing specifications according to pipe fitting form, and hierarchically retrieving prices while maintaining the original row position association is still followed, all can be embodiments of the present invention.
Claims
1. A method for matching pipe fitting prices based on primary and secondary diameter classification and specification transformation, executed by electronic equipment, characterized in that, include: Obtain the electronic inquiry document, identify the pipe fitting requirement line in the electronic inquiry document, establish a row identifier for each pipe fitting requirement line consisting of a worksheet identifier and a row position, and extract the pipe fitting name, pipe fitting specifications and quantity from each pipe fitting requirement line; Normalize the diameter prefix and separator in the pipe fitting specification to obtain an ordered diameter segment sequence arranged in the order of appearance in the original pipe fitting specification and retaining repeated diameter segments. The main diameter parameter is generated from the largest diameter segment in the ordered diameter segment sequence, and the secondary diameter parameter is generated from the smallest diameter segment. The target pipe fitting category is determined based on the user confirmation result, the single category signal in the pipe fitting name, and the preset connection condition rule based on the main diameter parameter. The target pipe fitting product is matched in the product dictionary corresponding to the target pipe fitting category. When the ordered diameter segment sequence includes multiple non-equal diameter segments, the reducing pipe fitting product is determined by combining the pipe fitting name and the number of diameter segments. When the target pipe fitting product matches the product connection variant rule, the secondary diameter parameter is compared with the secondary diameter threshold, and a threaded connection variant or a grooved connection variant is selected within the same target pipe fitting category. For each pipe fitting demand line, a price matching specification and a display specification are established. The display specification retains the original arrangement of the ordered diameter segment sequence, while the price matching specification is generated based on the target pipe fitting category, target pipe fitting product, and the arrangement of the ordered diameter segment sequence. For grooved or welded pipe fittings, each nominal diameter segment in the ordered diameter segment sequence is converted into an outer diameter segment according to a diameter mapping table. For threaded tees, when the ordered diameter segment sequence includes three diameter segments, the first diameter segment is equal to the third diameter segment, and the second diameter segment is smaller than the first diameter segment, the price matching specification is folded into two segments consisting of the first and second diameter segments, while maintaining the original three-segment specification in the display specification. The price search key is constructed using the target pipe fitting category, the price matching model corresponding to the target pipe fitting product, and the price matching specification. Price data is searched in the following order: precise search, morphological normalization key search derived from the ordered diameter segment sequence, and product family search of the same category and specification. The retrieved price data and the displayed specifications are associated with the corresponding pipe fitting demand row according to the row identifier to generate a quotation result.
2. The pipe fitting quotation matching method according to claim 1, characterized in that, The normalization includes: removing the nominal diameter prefix, unifying the multiplication sign, the letter X, and the letter x as preset separators, and extracting the numerical diameter segments separated by the preset separators; when the pipe fitting specification also includes letters or angle symbols and cannot be parsed into a pure numerical diameter segment sequence, the original specification is retained as the display specification, the main diameter parameter and the secondary diameter parameter are set to an invalid state, the original specification is prohibited from participating in the rule determination based on the main diameter parameter and the secondary diameter parameter, and the corresponding pipe fitting requirement line is kept in a pending matching state.
3. The pipe fitting quotation matching method according to claim 1, characterized in that, The preset connection condition rules include the caliber condition field, comparison operator, caliber boundary, result category, and sorting value; Collect all preset connection condition rules that satisfy the comparison operator, calculate the absolute distance between the main caliper parameter and the boundaries of each caliper, select the rule with the smallest absolute distance, and select the rule with the first sorted value when the absolute distances are the same; use the global preset connection condition rules when the enterprise-specific preset connection condition rules do not exist.
4. The pipe fitting quotation matching method according to claim 1, characterized in that, Determining the target pipe fitting product includes: matching the user-configured precise alias with the pipe fitting name; when the precise alias matches, the corresponding target pipe fitting product and target pipe fitting category are directly obtained; when the precise alias does not match, the target pipe fitting product is matched in the product dictionary corresponding to the target pipe fitting category; when the product dictionary does not match, the product name from the price list of the same target pipe fitting category is used for supplementary matching; when the ordered diameter segment sequence includes multiple non-equal diameter segments, if the pipe fitting name contains a tee but not a mechanical one, a reducing tee is determined; if it contains a cross but not a mechanical one, a reducing cross is determined; if it contains a reducer, a reducer is determined; when the precise alias points to the default connection variant inferred from the reducing pipe fitting product, the product connection variant rule is continued to be executed using the sub-diameter parameter; when the precise alias directly points to a non-default connection variant, the non-default connection variant is retained.
5. The pipe fitting quotation matching method according to claim 1, characterized in that, The product connection variant rules include product name, rule switch, and secondary diameter threshold. When a fitting name matches multiple product connection variant rules, the rule with the most characters in the product name is selected. When the rule switch is on and the secondary diameter parameter is valid, if the secondary diameter parameter is not greater than the secondary diameter threshold, the matched grooved connection variant is switched to a threaded connection variant under the same target fitting category; if the secondary diameter parameter is greater than the secondary diameter threshold, the matched threaded connection variant is switched to a grooved connection variant under the same target fitting category. For product families that match and have the product connection variant rules enabled, the secondary diameter parameter is used to verify the applicable diameter range; for other products, the primary diameter parameter is used to verify the applicable diameter range. If the range check fails, retain the corresponding pipe fitting requirement line and write the pending processing description.
6. The pipe fitting quotation matching method according to claim 1, characterized in that, For T-junctions or four-way connectors of the thread type, when the precise specification is not matched, the numerical diameter segments in the ordered diameter segment sequence are sorted in ascending order and duplicate diameter segments are retained, and the generation order is not critical; for four-way connectors of the thread type, when there are duplicate diameter segments in the ordered diameter segment sequence and at least two different diameter segments are still retained after deduplication, the deduplicated diameter segments are sorted in ascending order to generate a deduplicated folding key. The search proceeds according to the original price-matching specifications, order without keywords, and deduplication / folding keys, stopping at the first non-empty search result. If the above search fails to find a match, the product family terms of the target pipe fitting are used to filter price records with the same target pipe fitting category and price-matching specifications. Price records containing mechanical semantics in the name are excluded if the product family terms do not contain mechanical semantics. For other pipe fittings with fuzzy matching enabled, the absolute values of the diameter differences between the input specification and the candidate specifications are calculated segment by segment among the candidate specifications with the same price-matching model and the same number of diameter segments. The candidate specification with the smallest sum of absolute values is then selected.
7. The pipe fitting quotation matching method according to claim 1, characterized in that, When the target pipe fitting product is a mechanical tee, and the ordered diameter segment sequence includes three unequal diameter segments and hits the preset endpoint pricing rule, the three diameter segments are arranged in descending order as the first diameter segment, the second diameter segment, and the third diameter segment, generating a first derived specification composed of the first diameter segment and the second diameter segment, and a second derived specification composed of the first diameter segment and the third diameter segment; the price of the first derived specification, the price of the original three-segment specification, or the average price of the first derived specification and the second derived specification are selected as the quoted price according to the preset endpoint pricing rule; When there is no unique price record for the selected price, the corresponding pipe fitting demand line will be marked as having no price and the product family search and specification fuzzy matching for that pipe fitting demand line will be terminated.
8. A pipe fitting quotation matching system based on primary and secondary diameter classification and specification transformation, characterized in that, include: The inquiry data processing module is used to identify the pipe fitting demand lines and establish a row identifier consisting of a worksheet identifier and a row position; The specification parsing module generates an ordered sequence of diameter segments that retains the original order of appearance and repeating diameter segments, and generates primary diameter parameters and secondary diameter parameters from the largest and smallest diameter segments, respectively; the category and product determination module uses the primary diameter parameters to determine the target pipe fitting category and matches the target pipe fitting product in the corresponding product dictionary; the connection variant and range verification module uses the secondary diameter parameters to select connection variants within the same target pipe fitting category, and performs applicable diameter range verification by selecting either the secondary diameter parameters or the primary diameter parameters based on whether the product matches the product connection variant rules. The specification transformation module is used to generate interrelated price matching specifications and display specifications, and to perform outer diameter mapping or symmetrical diameter segment folding according to the arrangement relationship of the target pipe fitting category, target pipe fitting product and ordered diameter segment sequence; the price matching module is used to retrieve price data according to the order of precise search, morphology normalization key search, product family search and derived specification search controlled by the endpoint pricing rule. And a quotation output module, used to associate price data and display specifications with the corresponding pipe fitting requirement line according to the row identifier.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, which, when executed by the processor, causes the electronic device to perform the pipe fitting quotation matching method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the pipe fitting quotation matching method according to any one of claims 1 to 7.
