A standard part retrieval method based on BM25 recall and parameter constraint rearrangement
By employing the BM25 recall and parameter constraint rearrangement method, the problems of parameter consistency and engineering usability in the standard parts retrieval system were solved, achieving efficient and accurate standard parts retrieval results output, and improving the system's practicality and interactive efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing standard parts retrieval systems, when relying on text relevance, struggle to meet the requirements of parameter consistency and engineering usability, resulting in inaccurate and inefficient retrieval results, especially when users adjust parameters, leading to decreased interaction efficiency.
We adopt a method based on BM25 recall and parameter constraint reordering. By constructing a parameter mapping space and hard constraint gating decision, and combining offline training to optimize model parameters, we achieve multi-dimensional feature fusion and efficient ranking for standard parts retrieval.
It significantly improves the accuracy and stability of standard parts retrieval, ensures the parameter consistency and renderability of retrieval results, reduces network I/O bandwidth overhead and rendering load, and enhances the system's usability and interactive efficiency.
Smart Images

Figure CN122364288A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent retrieval and 3D visualization technology, and in particular to a standard parts retrieval method based on BM25 recall and parameter constraint rearrangement. Background Technology
[0002] Standard parts retrieval systems are key digital tools in industrial design, manufacturing, and maintenance, designed to address the challenges of numerous standard parts, complex specifications, and the inefficiency and error-prone nature of manual searches. Current standard parts retrieval systems commonly employ keyword-based inverted index retrieval schemes, with BM25 being the most common basic model in engineering. BM25's advantages lie in its fast retrieval speed, mature deployment, and high compatibility with existing search engines, thus enjoying widespread application in practical systems.
[0003] However, in standard parts selection scenarios, relying solely on term matching has significant limitations. Standard parts queries typically include not only keywords but also strong constraint parameters such as type, standard number, diameter, and length. Traditional BM25 sorting focuses on textual relevance, making it difficult to directly express the requirements of "parameter consistency" and "engineering usability," and easily leading to the following problems:
[0004] During the selection of standard parts, inconsistent specifications of standard parts matched by text searches prevent direct selection from the initial results. Slight differences in the spelling of standard numbers or types can lead to unstable sorting, meaning that even if a search result is found, it may not be directly rendered, increasing the cost of standard part selection. Furthermore, the system lacks an efficient closed-loop update mechanism when users continuously adjust parameters, resulting in decreased interaction efficiency. Current model optimization still relies on "text relevance," but this alone cannot meet the needs of real-world engineering. Therefore, how to achieve the practical engineering goal of correct and directly usable parameters on the existing foundation is a pressing practical problem that needs to be solved. Summary of the Invention
[0005] In view of the above-mentioned problems in the existing technology, the technical problem to be solved by the present invention is: how to improve the accuracy of standard parts retrieval.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] A standard parts retrieval method based on BM25 recall and parameter constraint rearrangement includes the following steps:
[0008] S1: Select a publicly available standard parts model dataset, which includes several mechanical parts and their corresponding parameter indices. Standardize the field format of all the parameter indices corresponding to the mechanical parts, and then form a standard parts index set C. Each standard parts index sample in C is represented as follows:
[0009]
[0010]
[0011] Where i represents the sample number. This represents the index sample of the i-th standard part. express The diameter, express Length, This represents the total number of standard parts index samples in C. Indicates the name of the i-th standard part; This represents the path to the i-th standard part. This represents the i-th standard part type. This represents the standard number of the i-th standard part;
[0012] S2: Construct a retrieval model PBMR, which includes a BM25 recall module and a parameter constraint reordering module. The BM25 recall module is used to generate a standard parts retrieval candidate set, and the parameter constraint reordering module is used to reorder the retrieval results in the standard parts retrieval candidate set.
[0013] S3: Select User Query ,Will And C input BM25 recall module, calculate The BM25 baseline scores of each sample in C are sorted in descending order, and then the standard parts corresponding to the top K BM25 baseline scores are selected to form the initial candidate set. The BM25 base score The calculation formula is as follows:
[0014]
[0015]
[0016] in, Represents a query statement The individual word items obtained after word segmentation; Indicates terms Inverse document frequency; Indicates terms exist Word frequency in the text; This represents an empirical constant that controls the nonlinear word frequency saturation. This represents the length normalization adjustment parameter; Indicates the first Standard Parts Index Sample Total text length; Represents the complete standard parts index set The average text length of all samples in the dataset; This represents the top candidates selected after sorting by BM25 base score in descending order. The quantity and size of each standard part;
[0017] S4: Constructing the parameter mapping space The The six dimensions of M are represented sequentially. and Perform parameter alignment, and then align the parameters. The parameters of each candidate sample are mapped to M to obtain ;
[0018] S5: From Select the j-th candidate sample ,Will The input parameter constraint rearrangement module calculates the information about... Rearrangement score The calculation formula is as follows:
[0019]
[0020] in, Indicates the first Each parameter weight, Indicates the first One parameter dimension;
[0021] Then to Hard constraint determination is obtained Final score The calculation formula is as follows:
[0022]
[0023]
[0024] in, Indicates the hard constraint gate value. This represents the hard constraint decision function. Indicates the penalty coefficient;
[0025] S6: Use the method described in S5 to traverse... From all candidate samples, obtain the final score set of all candidate samples. ;
[0026] S7: Constructing the loss function of PBMR based on learning ranking loss and L2 regularization term , The expression is as follows:
[0027]
[0028]
[0029] in, This represents the triplet sample data used for offline training, where Indicates historical training query. This represents positively correlated samples that match the query. This represents negatively correlated samples that do not match the query. The regularization coefficient represents the regularization penalty strength. This represents the vector formed by the weight parameters of all dimensions. of Norm square;
[0030] Will As The input is used to train the retrieval model PBMR, and the model parameters of PBMR are updated using gradient descent backpropagation. When the training reaches the maximum number of iterations or Training stops when the model stops changing, resulting in a well-trained retrieval model PBMR'.
[0031] S8: Select the target retrieval dataset C' and the user query Q', input C' and Q' into the trained PBMR', obtain the final scores of all candidate samples, sort all the final scores of candidate samples in descending order and output the sorting result, and use the sorting result as the standard part recommendation retrieval result that matches Q'.
[0032] Preferably, the parameter mapping space is constructed in S4. The content is as follows:
[0033] definition , The six spatial dimensions are expressed as follows:
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040] in, This indicates that a normalization operation is being performed. express type express type express Standard number, express Standard number, express The diameter, express The diameter, express Length, express Length, and Both represent the attenuation hyperparameter.
[0041] Compared with the prior art, the present invention has at least the following advantages:
[0042] This invention proposes a standard parts retrieval and evaluation method based on BM25 recall and multi-dimensional parameter constraint rearrangement. Through preliminary feature recall and parameter dimensionality reduction alignment, combined with hard constraint gating and offline parameter learning, natural language retrieval and engineering physical constraints are deeply coupled. This invention not only significantly improves the retrieval accuracy of mechanical standard parts but also truly establishes a closed loop of "precise retrieval - backend verification - frontend 3D rendering," enabling the system to possess extremely high stability and practicality in scenarios involving the selection of massive amounts of standard parts data. Its specific beneficial effects are reflected in the following three aspects:
[0043] First, by employing feature mapping and a smooth decay rearrangement mechanism, the matching degree between query commands and the physical properties of standard parts is fully quantified. This invention first uses plain text BM25 to generate an initial candidate set, and then constructs a parameter mapping space containing six-dimensional factors. This invention parses unstructured user queries to extract constraints such as type, standard number, diameter, and length, and closely aligns them with candidate samples. Particularly for continuous physical quantities such as length and diameter, this invention introduces a temperature coefficient... The exponential decay function (i.e., based on features) This method calculates feature scores using a specific algorithm. It effectively solves the matching problem of returning a large number of incorrect size specifications when users input composite engineering specifications because the system cannot calculate numerical differences, thus enabling the model to have a flexible tolerance for specification deviations within a certain range. This overcomes the limitations of existing technologies that rely solely on literal word frequency similarity while ignoring entity constraints, and the shortcomings of traditional rule filtering for "non-..." Right now The hard cut-off of "" leads to a low recall rate, which greatly improves the accuracy of retrieval.
[0044] Second, this invention introduces renderable engineering features and hard constraint gating penalties, bringing the verification of 3D visualization forward to the underlying algorithm of model retrieval. In the re-ranking and scoring stage, this invention extracts the model path format of candidate components as an independent feature. Based on this, a hard constraint decision function was designed. With gated state value When it is determined that the candidate model format does not support browser front-end rendering, or that there are serious conflicts in key specification attributes, the indicator function outputs... This directly triggers a huge constant penalty term. The overall score of the candidate sample is drastically downgraded. This mechanism completely solves the problem of frequent front-end white screens, freezes, or errors caused by corrupted source model files or incompatible formats when users click on target standard parts. The configuration and use of this technology effectively overcomes the shortcomings of existing applications that separate "data retrieval" and "graphics rendering" in their architecture, resulting in execution instability and excessive accumulation of invalid requests, and significantly reduces network I / O bandwidth overhead and rendering load.
[0045] Third, a closed-loop offline training network was constructed based on sample sequences and pairwise loss, realizing adaptive data-driven evolution of multi-factor ranking weights. For multi-dimensional feature fusion, this invention employs a supervised offline learning method, constructing training triples that include user historical queries and positive and negative correlation criteria. To calculate the logical sorting loss In practice, the algorithm allocates the proportions of each feature dimension. As learnable parameters, and combined with The regularization penalty term is updated iteratively through multiple rounds using gradient descent, ultimately converging and projecting it to become the feature weights for online retrieval. This method effectively solves the industry management challenge of manually adjusting and dynamically maintaining the weights of each scoring dimension as the standard parts library expands by orders of magnitude. It not only overcomes the shortcomings of traditional retrieval systems, such as poor generalization ability and susceptibility to local overfitting in abnormal queries due to heavy reliance on manual experience to set fixed weights, but also maximizes the interpretable classification boundary between positive and negative samples, effectively improving the retrieval quality of long-tail business terms. Attached Figure Description
[0046] Figure 1 This is a comparison diagram of the PBMR-BM25 architecture of this invention and the architecture of traditional retrieval methods.
[0047] Figure 2 This is a comparison diagram of the input and output of the PBMR-BM25 of this invention and traditional retrieval methods.
[0048] Figure 3 This is a schematic diagram of the standard parts index set format in this invention. Detailed Implementation
[0049] The present invention will now be described in further detail.
[0050] See Figures 1-3 A standard parts retrieval method based on BM25 recall and parameter constraint rearrangement includes the following steps:
[0051] S1: Select a publicly available standard parts model dataset. This dataset includes several mechanical parts and their corresponding parameters. Standard parts model data (e.g., nuts, bolts, etc.) generally includes part name, path, type, standard number, and specification parameters such as diameter (d) and length (l). Standardize the field format of all parameters corresponding to all mechanical parts, and then assemble them into a standard parts index set C. Each standard parts index sample in C is represented as follows:
[0052]
[0053]
[0054] Where i represents the sample number. This represents the index sample of the i-th standard part. express The diameter, express Length, This represents the total number of standard parts index samples in C. Indicates the name of the i-th standard part; This represents the path to the i-th standard part. This represents the i-th standard part type. This represents the standard number of the i-th standard part;
[0055] S2: Construct a retrieval model PBMR, which includes a BM25 recall module and a parameter constraint reordering module. The BM25 recall module is used to generate a standard parts retrieval candidate set, and the parameter constraint reordering module is used to reorder the retrieval results in the standard parts retrieval candidate set. BM25 is an existing technology, and the purpose of using the parameter constraint reordering module here is to achieve accurate ranking guided by engineering availability, so as to achieve the unity of accurate retrieval and engineering availability.
[0056] S3: Select User Query ,Will And C input BM25 recall module, calculate The BM25 baseline scores of each sample in C are sorted in descending order, and then the standard parts corresponding to the top K BM25 baseline scores are selected to form the initial candidate set. The BM25 base score The calculation formula is as follows:
[0057]
[0058]
[0059] in, Represents a query statement The individual word items obtained after word segmentation; Indicates terms Inverse document frequency is used to measure the weighting and discriminative power of terms; Indicates terms exist Word frequency in the text; This represents an empirical constant that controls the nonlinear word frequency saturation. This represents the length normalization adjustment parameter; Indicates the first Standard Parts Index Sample Total text length; Represents the complete standard parts index set The average text length of all samples in the dataset; This represents the top candidates selected after sorting by BM25 base score in descending order. The quantity and size of each standard part;
[0060] S4: Constructing the parameter mapping space The The six dimensions of M are represented sequentially. and Perform parameter alignment, and then align the parameters. The parameters of each candidate sample are mapped to M to obtain The parameter alignment refers to: for unstructured user query statements... Perform structured analysis to extract the engineering specification constraints (including querying part types). Query standard number Query diameter With query length The extracted constraints are then compared with the initial candidate set. The existing attribute fields corresponding to each candidate sample ( , , , The process of establishing one-to-one attribute pairings;
[0061] After the parameter alignment, the candidate samples are mapped to a six-dimensional parameter mapping space. The The specific meanings are as follows: The text relevance feature is obtained by normalizing the BM25 baseline score of the sample calculated in step S3. The type consistency feature is used to characterize the type of the queried part. With candidate sample type Text and category matching scores between them; Indicates the consistency characteristic of the standard number, used to characterize the query standard number. With candidate sample standard number Match score between them; This represents the diameter constraint matching feature, used to characterize the query diameter. With candidate sample diameter Numerical error and penalty score between; This represents a length constraint matching feature used to characterize the query length. With candidate sample length Numerical error and penalty score between; Represents the renderability characteristics of the project, based on the model path of the candidate samples. The file extension type and loading time are evaluated and scored to characterize the engineering usability of the sample when it is successfully rendered in the 3D visualization module.
[0062] The parameter mapping space is constructed in S4. The content is as follows:
[0063] definition , The six spatial dimensions are expressed as follows:
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070] in, This indicates that a normalization operation is being performed. express type express type express Standard number, express Standard number, express The diameter, express The diameter, express Length, express Length, and Both represent the attenuation hyperparameter.
[0071] S5: From Select the j-th candidate sample ,Will The input parameter constraint rearrangement module calculates the information about... Rearrangement score The calculation formula is as follows:
[0072]
[0073] in, Indicates the first Each parameter weight, Indicates the first One parameter dimension;
[0074] Then to Hard constraint determination is obtained Final score The calculation formula is as follows:
[0075]
[0076]
[0077] in, Indicates the hard constraint gate value. This represents the hard constraint decision function. Indicates the penalty coefficient;
[0078] S6: Use the method described in S5 to traverse... From all candidate samples, obtain the final score set of all candidate samples. ;
[0079] S7: Constructing the loss function of PBMR based on learning ranking loss and L2 regularization term The learning ranking loss and L2 regularization term are both existing technologies; The expression is as follows:
[0080]
[0081]
[0082] in, This represents the triplet sample data used for offline training, where Indicates historical training query. This represents positively correlated samples that match the query. This represents negatively correlated samples that do not match the query. The regularization coefficient represents the regularization penalty strength. This represents the vector formed by the weight parameters of all dimensions. of The squared norm is used to suppress overfitting of model parameters;
[0083] Will As The input is used to train the retrieval model PBMR, and the model parameters of PBMR are updated using gradient descent backpropagation. When the training reaches the maximum number of iterations or Training stops when the parameters no longer change, resulting in the trained retrieval model PBMR'; parameters are then updated using gradient descent.
[0084]
[0085] in, Let be the learning rate. To satisfy the nonnegativity and normalization constraints, perform simplex projection on the update results:
[0086]
[0087]
[0088] Iterative training terminates when either of the following conditions is met: 1. The maximum number of iterations Tmax is reached; 2. The loss function meets the convergence condition. 3. If the validation set metrics do not improve for p consecutive rounds, early termination is triggered;
[0089] At this point, the convergence parameters are output: ;in, To rearrange the weights, the above parameters are solidified into an online rearrangement configuration, which is directly loaded and called by the online sorting module, realizing a layered deployment mechanism of "offline training and online inference".
[0090] S8: Select the target retrieval dataset C' and the user query Q', input C' and Q' into the trained PBMR', obtain the final scores of all candidate samples, sort all the final scores of candidate samples in descending order and output the sorting result, and use the sorting result as the standard part recommendation retrieval result that matches Q'.
[0091] Example
[0092] This example demonstrates the complete chain of a single retrieval based on the method of the present invention, illustrating how the algorithm starts from user input and goes through the entire process to obtain the final sorting result.
[0093] The user input is the text: "Hexagonal bolt GB5782M1035". After parsing and alignment, it is transformed into a structured query vector. ,in: , , , , .
[0094] The system starts from the established set of standard parts indexes. China recalled the Top-4 candidate episodes :
[0095] Hex bolt GB5782M10x35, complete and renderable file.
[0096] Hex bolt GB5782M10x30, complete file available for rendering (length parameter deviation 5mm).
[0097] Hex bolt GB5783M10x35, file complete and renderable (standard number not aligned).
[0098] Hex bolt GB5782M10x35, cannot be rendered (file corrupted).
[0099] The BM25 recall process generates initial baseline scores. In this stage, the plain text relevance score for each candidate is calculated:
[0100]
[0101] The parameters selected for this scenario are: The inverse document frequency (IDF) values for the four query terms are as follows: .
[0102] Each document attribute (hit rate and document length) Substituting into the above formula, we can directly obtain the basic score:
[0103] ( (All four words were hit)
[0104] ( , misses "35"):
[0105] ( (GB5782 not matched)
[0106] ( (All four words were hit)
[0107] At this point, the rough sort order is: Unrenderable If ranked first, we need to proceed to the next step of parameter rearrangement.
[0108] Map the candidates to the parameter feature space (f1~f6):
[0109] Candidates With structured queries Perform alignment mapping to obtain multidimensional feature vectors. :
[0110] 1) Text relevance (Normalized BM25): , with the maximum value Normalization. .
[0111] 2) Type consistency : All four categories were hit, with a score of 1 for each.
[0112] 3) Standard Consistency : . The value is 0, and the rest are 1.
[0113] 4) Diameter matching feature (Exponential decay): Attenuation hyperparameter The diameters here are all the same (the difference is 0), and the score for each is 1.
[0114] 5) Length matching feature (Exponential decay): Attenuation hyperparameter . Deviation from query value The score is The rest are unbiased and are all 1.
[0115] 6) Renderability : Loading corruption is 0, all others are 1.
[0116] The parameter constraint rearrangement is performed to obtain the final score. This stage consists of two steps, combining "soft matching" and "hard constraint gating". The preset weight parameters for offline training are... .
[0117] 1) Soft-match weighted score calculate:
[0118]
[0119] Substituting the multidimensional eigenvalues, we obtain:
[0120]
[0121]
[0122]
[0123]
[0124] 2) Introducing hard-constraint gating to determine the final score Combining the "at least one type or standard must be hit" rule of the engineering scenario with the renderable baseline, construct a hard constraint decision function: Gating penalty coefficient The calculation logic is as follows:
[0125] All conditions are met. Final score
[0126] : Meet the bottom line, The soft attenuation parameter is working correctly, and the final score is...
[0127] Trigger the "at least one item hit" tolerance. However, without a standard score, the final score...
[0128] Due to unrenderable conditions This leads to gating The final score will be deducted.
[0129] Recalculate the entire dataset and output the final ranking. After performing the above rearrangement calculation on all samples in the candidate set, proceed as follows: The sorted sequence is output in descending order: the results are as follows .
[0130] The calculation results output to the client / browser are represented as follows:
[0131] [{"name":"Hex bolt GB5782M10x35","type":"Hex bolt","standard":"GB5782","score":0.9866},{"name":"Hex bolt GB5782M10x30","type":"Hex bolt","standard":"GB5782","score":0.8671},{"name":"Hex bolt GB5783M10x35","type":"Hex bolt","standard":"GB5783","score":0.7077},{"name":"Hex bolt GB5782M10x35","type":"Hex bolt","standard":"GB5782","score":0.5300}]
[0132] This example demonstrates that the PBMR model effectively protects correct candidates (…). At the same time, it can rely on exponential decay to compensate for small deviations. Smoothing down the model by using feature weights to address substandard models. The text, though high-quality, was rendered unusable due to the hard-gating judgment, and the text itself was rendered unusable due to the high quality. ( ) obsolete or damaged documents.
[0133] Experimental content and results
[0134] Dataset
[0135] Experiments were conducted on a standard parts retrieval task. Experimental data came from a standard parts model library, with records containing name, path, type, standard, and specification parameters (such as diameter d, length l) obtained from name parsing. Unlike general document retrieval datasets, this experiment used specialized data for engineering selection scenarios to verify the improvements of this invention in "parameter consistency + renderable usability." Queries consisted of a mix of real retrieval logs and manually constructed queries, covering four scenarios: type retrieval, standard number retrieval, specification retrieval, and combined retrieval. The query set was divided into training / development / testing categories. To avoid data leakage, the test and training sets underwent strict deduplication at the standard number, keyword, and synonym rewriting levels. The total number of documents was counted based on the number of standard parts entries.
[0136] Table 1. Statistics of Standard Parts Retrieval Dataset
[0137]
[0138] Evaluation indicators
[0139] Following the mainstream evaluation methods for retrieval tasks and combined with engineering usability objectives, the following metrics are adopted: P@1: First-rank hit rate, measuring whether the first result is the target item; NDCG@10: Ranking quality of the top 10 results; R@100: Coverage of relevant standard items in the top 100 candidate pool after re-ranking, used to measure candidate recall capability; Renderable@10: Proportion of results that can be directly rendered in the top 10 results; Latency (ms): Average response latency.
[0140] The core indicators are defined as follows:
[0141]
[0142]
[0143]
[0144] Implementation details
[0145] The experiment was conducted on a local workstation environment, using a Python retrieval service framework and the Elasticsearch indexing engine. The method of this invention employs a two-stage process of "BM25 recall + parameter constraint rearrangement": the first stage recall candidate number is set to... The second stage involves re-ranking based on multi-factor features, including six features: text relevance, type consistency, standard consistency, diameter matching, length matching, and renderability. The re-ranking score is defined as follows:
[0146]
[0147] The final score after hard constraint gating is:
[0148]
[0149] in: This indicates that a hard constraint is met (at least one type or standard is met). This indicates that the hard constraint was not met; This is the penalty coefficient.
[0150] The main parameters for this experiment are set as follows:
[0151] ; ; .
[0152] Comparative Experiments and Results
[0153] The method of this invention is compared with conventional and improved baselines. See Table 2; the comparison methods include:
[0154] BM25: Single-stage sorting;
[0155] BM25+Rule: BM25+ rule filtering (no rearrangement);
[0156] BM25+ParamRank: BM25+ parameter reordering (excluding renderable features);
[0157] PBMR-BM25 (this invention): BM25 + parameter constraint rearrangement + renderable priority + gating penalty.
[0158] Table 2 Comparison of settings for each method
[0159]
[0160] To ensure the objectivity and stability of the results, the experiment was conducted with 5 repeated sampling evaluations on a fixed test set. The final result was the mean of the 5 results, and the standard deviation was reported when necessary. This invention outperforms the comparison method in P@1, NDCG@10, R@50, R@100, and Renderable@10 metrics. Compared to BM25, the main improvements of this invention are as follows: P@1: +12.1 percentage points (0.706→0.827); NDCG@10: +8.8 percentage points (0.781→0.869); Renderable@10: +17.6 percentage points (0.742→0.918). Although the latency increased by 18ms, it is still within an acceptable engineering range.
[0161] Table 3 Evaluation of Experimental Results for Each Method
[0162]
[0163] Model performance and efficiency evaluation
[0164] From the perspective of retrieval accuracy, this invention significantly improves the problem of "text hit but specification error" through joint modeling of parameter consistency and renderability. From the perspective of engineering usability, this invention moves renderability from post-validation to the sorting stage, making the top results more directly previewable and significantly reducing manual screening costs. From the perspective of efficiency, this invention maintains the BM25 recall structure unchanged, only adding candidate-level linear rearrangement calculations, and the overall complexity can be expressed as:
[0165]
[0166] in To rearrange the feature dimensions (in this experiment) Therefore, additional expenses are controllable.
[0167] The impact of training cycles (iteration rounds) on performance
[0168] Although this invention is a mathematical rearrangement model rather than large-scale neural network training, comparative experiments were still conducted on the parameter update rounds (parameter tuning on the development set and results reported on the test set).
[0169] Table 4. Impact of parameter update rounds on PBMR-BM25 performance
[0170]
[0171] It can be seen that the second round reaches the optimal level, and further iterations offer limited improvement, indicating that the method converges parameters quickly and is suitable for low-cost deployment.
[0172] Based on the above experiments, this invention achieves a balanced improvement in accuracy, usability, and efficiency by using parameter constraint rearrangement and a renderable priority strategy on the BM25 foundation. Experimental results show that this method can significantly improve the retrieval quality of standard parts within an acceptable engineering latency range, demonstrating clear technical effectiveness and application value.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A standard parts retrieval method based on BM25 recall and parameter constraint rearrangement, characterized in that: Includes the following steps: S1: Select a publicly available standard parts model dataset, which includes several mechanical parts and their corresponding parameter indices. Standardize the field format of all the parameter indices corresponding to the mechanical parts, and then form a standard parts index set C. Each standard parts index sample in C is represented as follows: Where i represents the sample number. This represents the index sample of the i-th standard part. express The diameter, express Length, This represents the total number of standard parts index samples in C. Indicates the name of the i-th standard part; This represents the path to the i-th standard part. This represents the i-th standard part type. This represents the standard number of the i-th standard part; S2: Construct a retrieval model PBMR, which includes a BM25 recall module and a parameter constraint reordering module. The BM25 recall module is used to generate a standard parts retrieval candidate set, and the parameter constraint reordering module is used to reorder the retrieval results in the standard parts retrieval candidate set. S3: Select User Query ,Will And C input BM25 recall module, calculate The BM25 baseline scores of each sample in C are sorted in descending order, and then the standard parts corresponding to the top K BM25 baseline scores are selected to form the initial candidate set. The BM25 base score The calculation formula is as follows: in, Represents a query statement The individual word items obtained after word segmentation; Indicates terms Inverse document frequency; Indicates terms exist Word frequency in the text; This represents an empirical constant that controls the nonlinear word frequency saturation. This represents the length normalization adjustment parameter; Indicates the first Standard Parts Index Sample Total text length; Represents the complete standard parts index set The average text length of all samples in the dataset; This represents the top candidates selected after sorting by BM25 base score in descending order. The quantity and size of each standard part; S4: Constructing the parameter mapping space The The six dimensions of M are represented sequentially. and Perform parameter alignment, and then align the parameters. The parameters of each candidate sample are mapped to M to obtain ; S5: From Select the j-th candidate sample ,Will The input parameter constraint rearrangement module calculates the information about... Rearrangement score The calculation formula is as follows: in, Indicates the first Each parameter weight, Indicates the first One parameter dimension; Then to Hard constraint determination is obtained Final score The calculation formula is as follows: in, Indicates the hard constraint gate value. This represents the hard constraint decision function. Indicates the penalty coefficient; S6: Use the method described in S5 to traverse... From all candidate samples, obtain the final score set of all candidate samples. ; S7: Constructing the loss function of PBMR based on learning ranking loss and L2 regularization term , The expression is as follows: in, This represents the triplet sample data used for offline training, where Indicates historical training query. This represents positively correlated samples that match the query. This represents negatively correlated samples that do not match the query. The regularization coefficient represents the regularization penalty strength. This represents the vector formed by the weight parameters of all dimensions. of Norm square; Will As The input is used to train the retrieval model PBMR, and the model parameters of PBMR are updated using gradient descent backpropagation. When the training reaches the maximum number of iterations or Training stops when the model stops changing, resulting in a well-trained retrieval model PBMR'. S8: Select the target retrieval dataset C' and the user query Q', input C' and Q' into the trained PBMR', obtain the final scores of all candidate samples, sort all the final scores of candidate samples in descending order and output the sorting result, and use the sorting result as the standard part recommendation retrieval result that matches Q'.
2. The standard parts retrieval method based on BM25 recall and parameter constraint rearrangement as described in claim 1, characterized in that: The parameter mapping space is constructed in S4. The content is as follows: definition , The six spatial dimensions are expressed as follows: in, This indicates that a normalization operation is being performed. express type express type express Standard number, express Standard number, express The diameter, express The diameter, express Length, express Length, and Both represent the attenuation hyperparameter.