Material identification method and device, electronic equipment and medium
By generating structured material text and combining it with a large model for material retrieval and filtering, the problem of low efficiency and poor accuracy of manual parsing in MRO material management is solved, achieving efficient and accurate material ordering and supporting dynamic inventory and response to business needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZKH IND SUPERMARKET SHANGHAI
- Filing Date
- 2026-02-02
- Publication Date
- 2026-06-05
AI Technical Summary
In MRO material management, the traditional manual ordering model suffers from low analysis efficiency, poor accuracy, and difficulty in dynamically responding to inventory changes and business needs.
By acquiring the original material text, determining the target material attributes, generating structured material text, and using a large model for material retrieval and filtering, combined with semantic vectors and keyword matching, the material information is automatically processed to generate a high-precision initial material set, and finally the target product is determined.
It enables efficient and automated parsing of material information, reduces labor costs, improves parsing efficiency and accuracy, ensures the accuracy and flexibility of ordering, and supports dynamic response to inventory and business needs.
Smart Images

Figure CN122153027A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of material ordering technology, and in particular to a material ordering method, apparatus, electronic device and medium. Background Technology
[0002] In the field of MRO (Maintenance, Repair and Operations) materials management, the types of materials are complex and the specifications are diverse, making the traditional ordering process highly dependent on manual processing. Typically, the material information provided by customers is mostly unstructured long text descriptions, including product characteristics and technical requirements. Professionals need to extract key attributes such as model and specifications from these descriptions, then compare and filter them one by one in the existing material library, and finally make final recommendations based on experience.
[0003] With the continuous growth of material types in the industrial manufacturing sector, the manual ordering model has the following significant drawbacks: Firstly, processing a single piece of material information can take several hours, resulting in low parsing efficiency. Secondly, subjective biases in understanding technical parameters can easily lead to incorrect or missed material selection, affecting the accuracy of ordering. Furthermore, the rigid optimization logic makes it difficult to dynamically respond to real-time business needs such as inventory changes, cost optimization, and supplier strategies.
[0004] Therefore, how to achieve efficient and accurate MRO material ordering is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of the above, one aspect of this application provides a material ordering method, the method comprising: Obtain the original material text used for order placement; Determine the target material attributes associated with the original material text; Based on the original material text and the target material attributes, a structured material text is generated through a first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes. Based on the original material text, a material search is performed in the material library to obtain an initial material set; Using the structured material text as a filtering condition, select the best materials from the initial material set; Among the selected materials, the target product is determined.
[0006] Optionally, determining the target material attribute associated with the original material text includes: The original material text is preprocessed to obtain the text to be analyzed; the preprocessing includes at least one of special character removal, sentence segmentation, and word segmentation. The target material category to which the text to be analyzed belongs is determined by using the second specified large model; The target material attributes are determined based on the pre-constructed first mapping relationship and the target material category; the first mapping relationship is the correspondence between material categories and material attributes.
[0007] Optionally, the step of retrieving materials from the material library based on the original material text to obtain an initial material set includes: Obtain the material semantic vector of each material stored in the material library; The original material text is converted into a target semantic vector; and the target keywords included in the original material text are extracted. Determine the similarity between the target semantic vector and the material semantic vector; and designate materials with a similarity greater than a similarity threshold as first candidate materials; Based on the target keywords, keyword matching is performed in the material library to recall the second candidate material; Based on the first candidate material and the second candidate material, the initial material set is constructed.
[0008] Optionally, constructing the initial material set based on the first candidate material and the second candidate material includes: Determine the first total quantity of the first candidate materials, the second total quantity of the target keywords, and the number of keyword hits in each of the second candidate materials; Based on the similarity, the first candidate materials are sorted in descending order; and based on the number of hits, the second candidate materials are sorted in descending order. The ratio of the first total quantity to the first ranking value of the first candidate material is taken as the first score of the corresponding first candidate material; The ratio of the second total quantity to the second ranking value of the second candidate material is taken as the second score of the corresponding second candidate material; Based on the first score and the second score, the initial material set is constructed using the first candidate material and the second candidate material.
[0009] Optionally, constructing the initial material set based on the first score and the second score, using the first candidate material and the second candidate material, includes: Find the union of the first candidate material and the second candidate material to obtain the union material set; For each material object in the union of the material sets, perform the following steps: Determine whether the material object belongs to both the first candidate material and the second candidate material; If so, the sum of the first score and the second score corresponding to the material object shall be taken as the target score of the material object; If not, the first score or the second score corresponding to the material object shall be used as the target score; Based on the target score, each material object is sorted in descending order; and the initial material set is formed by the top preset percentage of materials in the sorting results.
[0010] Optionally, using the structured material text as a filtering condition, selected materials are filtered from the initial material set, including: Determine whether there exists a first target material in the initial material set that has the same attributes and content as the target material; If it exists, the first target material will be selected as the preferred material; If it does not exist, proceed with the following steps: From the initial material set, extract a second target material that includes the target material attribute; and from the second target material, extract the attribute content to be matched corresponding to the target material attribute. For each of the target material properties, perform the following steps: If the content of the attribute to be matched is text, determine the text similarity between the content of the attribute to be matched and the content of the target attribute. If the content of the attribute to be matched is a numerical value, determine the difference between the content of the attribute to be matched and the content of the target attribute; Determine whether there exists a second target material in the initial material set whose text similarity is greater than a preset similarity and / or whose difference is within a preset range; If it exists, the second target material will be selected as the preferred material; If it does not exist, return a message indicating that the search was empty.
[0011] Optionally, determining the target order among the selected materials includes: Obtain the user's target attention dimensions for the target product, and the priority among the target attention dimensions; The selected materials are scored based on the pre-constructed second mapping relationship and the target attention dimension to obtain a target score; the second mapping relationship is the correspondence between the attention dimension and the score value. Sort the target scores in descending order; Determine if a unique first-order material exists in the sorting results; If it exists, the first material will be designated as the target product; If it does not exist, the multiple materials with the highest target score are sorted according to their priority until the unique material with the highest priority is obtained; and the unique material with the highest priority is taken as the target product.
[0012] Another aspect of this application provides a material ordering apparatus, the apparatus comprising: The raw material text acquisition module is used to acquire the raw material text used for order placement; The target material attribute determination module is used to determine the target material attributes associated with the original material text; The structured material text generation module is used to generate structured material text based on the original material text and the target material attributes through a first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes; The material retrieval module is used to perform material retrieval in the material library based on the original material text to obtain an initial material set; The material filtering module is used to filter selected materials from the initial material set using the structured material text as the filtering condition; The target product determination module allows the user to determine the target product from among the selected materials.
[0013] Another aspect of this application provides an electronic device including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the computer program to implement the steps of the material ordering method of the claim.
[0014] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the material ordering method of the claim.
[0015] The material selection method, apparatus, electronic device, and medium provided in this application offer the following advantages: Automated deep analysis of original material text is performed without manual intervention, reducing labor costs while improving text analysis efficiency and accuracy. High-precision structured material text is generated by combining a large model, and this accurate structured material text is used as a screening criterion to filter the initial material set, thereby obtaining highly reliable selected materials. Furthermore, the target material selection is determined from the selected materials, achieving efficient and accurate MRO material selection. Attached Figure Description
[0016] Figure 1 A schematic flowchart illustrating a material ordering method provided in an embodiment of this application; Figure 2A schematic diagram illustrating the principle of a material ordering method provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the principle of a material ordering method provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of a material ordering device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0017] The attached diagram is labeled as follows: 40 is the raw material text acquisition module, 41 is the target material attribute determination module, 42 is the structured material text generation module, 43 is the material retrieval module, 44 is the material screening module, 45 is the target product determination module, 50 is the memory, 51 is the processor, 52 is the display screen, 53 is the input / output interface, 54 is the communication interface, 55 is the power supply, 56 is the communication bus, 501 is the computer program, 502 is the operating system, and 503 is the data. Detailed Implementation
[0018] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0019] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0020] Figure 1 This is a schematic flowchart of a material ordering method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes: S10: Obtain the original material text used for order placement; Figure 2 This is a schematic diagram illustrating the principle of a material ordering method provided in an embodiment of this application, as shown below. Figure 2As shown, in a specific embodiment, it is first necessary to parse the user's original requirements. Specifically, the original material text input by the user is obtained. This text can be a long description of the material, or it can be a text composed of phrases, words, etc. The original material text can include, but is not limited to, Chinese characters, English characters, numbers, and characters. This application does not limit the specific content in the original material text.
[0021] In addition, the original material text can be text automatically converted from voice input by the user, or it can be an uploaded Excel file or data collected from an external material information interface. This application does not limit the format or collection method of the original material text.
[0022] S11: Determine the target material attributes associated with the original material text; To quickly and accurately obtain users' order requirements, it is necessary to parse the original material text to determine the target material attributes associated with it. It is understood that different materials correspond to different attributes. For example, for materials in the motor category, the associated material attributes may include, but are not limited to, rated power, rated voltage, number of poles, and installation method. For materials in the sensor category, the associated material attributes may include, but are not limited to, measurement range, output signal, accuracy, and media compatibility.
[0023] In one optional embodiment, the target material attribute associated with the original material text can be determined by analyzing a large model, or by pre-constructing an attribute database and determining the attribute associated with the original material text in the attribute database based on keyword matching or other methods. This application does not limit the method for determining the target material attribute.
[0024] It is understood that, in specific embodiments, the original material text is a long text, and the target material attribute associated with the original material text can be one or multiple, and this application does not limit this.
[0025] S12: Generate structured material text based on the original material text and the target material attributes using the first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes. In specific embodiments, different target material attributes correspond to different target attribute contents. For example, the rated power is 1.5 kilowatts (kW), where the target material attribute is the rated power, and 1.5 kilowatts is the attribute content.
[0026] It is understandable that the original material text may include target attribute content corresponding to each target material attribute, or it may be missing some target attribute content, or it may contain incorrect target attribute content. Therefore, in order to ensure the accuracy of subsequent product ordering, in specific embodiments, it is necessary to perform operations such as completion, verification, and correction on the target material attributes and target attribute content in order to generate accurate target material attributes and target attribute content. For ease of understanding, examples will be given below.
[0027] For example, after inputting the original material text and target material attributes into the first specified large model, the model outputs ambiguous descriptions including "Voltage 220V or 380V, applicable scenario needs to be clarified," and missing attributes including "reasonable speculation or annotation to be confirmed." The final output structured material text is "Rated power is 1.5kW, voltage is 380V."
[0028] Specifically, in one alternative embodiment, see [link to documentation]. Figure 2 The system can pre-build a prompt word project and process the original material text and target material attributes through a first specified large model to generate structured material text. This structured material text consists of data pairs, each pair comprising the target material attribute and its corresponding target attribute content.
[0029] For prompt word engineering, for example, for the target material attributes associated with a motor, the constructed prompt word engineering may include "Extract the model, rated power and applicable voltage of the following materials. Wherein, [material text] is...", so as to guide the first specified large model to output results including material type, core parameters and application scenarios.
[0030] Depend on Figure 2 It is known that by inputting the original material text and the target material attributes into the first specified large model for processing, a structured material text can be generated. This text can quickly and accurately obtain the relevant attributes and attribute content of the original material text, which can provide accurate directional guidance for subsequent material retrieval in the material library.
[0031] It should be noted that since the target material attributes can be diverse, such as voltage or installation method, the corresponding target attribute content can be text, numbers, or a combination of multiple types.
[0032] In addition, it should be noted that the first specified large model may include, but is not limited to, the GPT (Generative Pre-trained Transformer) series, the BERT model, large models based on the Transformer architecture, LLaMA (Large Language Model Meta AI), and Tongyi Qianwen. This application does not limit the target large model.
[0033] S13: Based on the original material text, perform material retrieval in the material library to obtain the initial material set; Furthermore, in a specific embodiment, see [link to specific embodiment]. Figure 2 By searching the material database based on the original material text, a set of highly similar materials can be retrieved as the initial material set. In specific embodiments, searches can be performed based on keywords or vectors; this application does not limit the search method.
[0034] S14: Select selected materials from the initial material set using structured material text as the filtering criteria; S15: Among the selected materials, determine the target product.
[0035] Understandably, the initial material set retrieved based on the original material description may have missing information, resulting in low accuracy and the possibility of many materials not meeting user expectations. Therefore, after obtaining the initial material set, further filtering is needed to obtain a more refined selection of materials that better meet user expectations.
[0036] Since the structured material text is an accurate data pair processed and optimized by a first specified large model, therefore, in an optional embodiment, see [link to relevant documentation]. Figure 2 The structured material text can be used as a filtering condition to select premium materials from the initial material set. Specifically, to ensure accurate product selection, in one optional embodiment, materials that are completely identical in terms of target material attributes and corresponding target attribute content can be selected from the initial material set as premium materials.
[0037] Furthermore, such as Figure 2 As shown, when multiple selected materials exist, further filtering can be performed to provide the final target products to the customer. Specifically, this can be done by sorting based on user-focused dimensions, and then providing one or more target products to the customer. These user-focused dimensions can include, but are not limited to, material inventory and material price.
[0038] Therefore, the material selection method provided in this application performs automated deep parsing of the original material text, and the parsing process requires no manual intervention, reducing labor costs while improving text parsing efficiency and accuracy. It combines a large model to generate high-precision structured material text, and uses this accurate structured material text as a filtering criterion to filter the initial material set, thereby obtaining highly reliable selected materials. Furthermore, it determines the target material selection from the selected materials, achieving efficient and accurate MRO material selection.
[0039] In one alternative embodiment, determining the target material attributes associated with the original material text includes: The original material text is preprocessed to obtain the text to be analyzed; the preprocessing includes at least one of the following: removal of special characters, sentence segmentation, and word segmentation. The target material category to which the text to be analyzed belongs is determined by using the second specified large model; The target material attributes are determined based on the pre-constructed first mapping relationship and the target material category; the first mapping relationship is the correspondence between material categories and material attributes.
[0040] In a specific embodiment, to ensure the parsing accuracy of the original material text and avoid special characters or other content affecting the parsing results, the original material text can be preprocessed. Specifically, preprocessing may include, but is not limited to, removing special characters, performing text segmentation, and word segmentation.
[0041] Furthermore, in order to accurately and quickly determine the target material attributes associated with the original material text, the material category described in the original material text can be determined first, thereby providing a guiding direction for the material category and improving the accuracy of subsequent determination of target material attributes.
[0042] Specifically, the original material text can be input into a second specified large model to determine the material category of the original material text. For example, the target material category output for the original material text might be a three-phase asynchronous motor or a diffused silicon pressure sensor. This enables rapid classification of material categories, providing a basis for determining subsequent attributes.
[0043] It should be noted that the second designated large model can be a large model pre-trained based on data of materials in a designated domain, and the second designated large model and the first designated large model can be the same model or different models, which is not limited in this application.
[0044] In one optional embodiment, a correspondence between material categories and material attributes is pre-established to obtain a first mapping relationship. For example, when the material category is a sensor, the corresponding material attributes may include, but are not limited to, measurement range, output signal, and accuracy. In specific embodiments, the first mapping relationship may be stored in the form of tables, text, etc., and this application does not limit this.
[0045] Therefore, based on the first mapping relationship, after the second specified large model outputs the target material category, it retrieves the target material attributes corresponding to the original material text from the first mapping relationship, thereby providing the direction of material attributes for the analysis of the first specified large model.
[0046] It is evident that by using large-scale model analysis, the automated processing of long material information can be achieved, reducing the analysis time for a single piece of material information from several hours in the traditional manual process to minutes. Moreover, the analysis process does not require manual intervention, effectively reducing the manpower input of enterprises in the material ordering process and lowering labor costs.
[0047] In one optional embodiment, based on the original material text, a material retrieval is performed in the material library to obtain an initial material set, including: Obtain the material semantic vector of each material stored in the material library; The original material text is transformed into a target semantic vector; and the target keywords included in the original material text are extracted. Determine the similarity between the target semantic vector and the material semantic vector; and select materials with a similarity greater than a similarity threshold as the first candidate materials; Based on the target keywords, keyword matching is performed in the material library to recall the second candidate material; Based on the first and second candidate materials, an initial material set is constructed.
[0048] Understandably, to ensure accuracy, the accuracy of the initial material set selected from the material library is crucial. Therefore, the initial material set determination method provided in this application embodiment is based on multi-path retrieval.
[0049] Specifically, semantic vector retrieval and keyword retrieval are combined. In the semantic vector retrieval embodiment, the semantic text of the materials stored in the material library is converted into material semantic vectors in advance. Therefore, during the retrieval, the original material text is first converted into the target semantic vector, and then the similarity between the target semantic vector and the material semantic vector is calculated.
[0050] In one optional embodiment, the similarity calculation can be a cosine similarity calculation, which is not limited in this application. Similarity is used to characterize the degree of similarity between the semantic text of the materials stored in the material library and the original material text; the higher the similarity, the higher the degree of similarity. That is, similarity and degree of similarity are positively correlated.
[0051] Based on the above analysis, materials with similarity greater than a similarity threshold are extracted from the material library, and these extracted materials are used as the first candidate materials. The first candidate materials refer to materials that may be considered as target products. It should be noted that, in an optional embodiment, when converting text to vectors, the conversion can be performed using a Word2Vec or BERT model; the specific conversion method is not limited in this application.
[0052] Simultaneously, keyword retrieval is performed. Specifically, target keywords are extracted from the original material text, and keyword matching is performed in the material database based on these target keywords to recall second candidate materials. As an optional implementation, a full-text search index of the material database can be built using Elastic Search to perform target keyword matching on the original material text and recall the matched second candidate materials.
[0053] It should be noted that the extracted target keyword can be one or multiple; this application does not limit this. Furthermore, the target keyword can be a word, a phrase, or even English words or numbers; this application also does not limit this.
[0054] Therefore, a first batch of candidate materials is obtained through vector retrieval paths, and a second batch of candidate materials is obtained through keyword retrieval paths. It is understandable that the first and second candidate materials may overlap or contain materials with low confidence. Therefore, the two batches of materials are deduplicated and merged to obtain an initial set of materials that is accurate at both the semantic and keyword levels.
[0055] Based on the above embodiments, as an optional embodiment, an initial material set is constructed based on the first candidate material and the second candidate material, including: Determine the first total quantity of the first candidate materials, the second total quantity of the target keywords, and the number of keyword hits in each second candidate material; Based on similarity, the first candidate materials are sorted in descending order; and based on the number of hits, the second candidate materials are sorted in descending order. The ratio of the first total quantity to the first ranking value of the first candidate material is taken as the first score of the corresponding first candidate material; The ratio of the second total quantity to the second ranking value of the second candidate material is taken as the second score of the corresponding second candidate material; Based on the first score and the second score, an initial material set is constructed using the first candidate material and the second candidate material.
[0056] In a specific embodiment, in order to accurately deduplicate and merge the first candidate material and the second candidate material, in an optional embodiment, the first candidate material and the second candidate material are scored and sorted respectively.
[0057] Specifically, for the first candidate materials selected based on similarity, they are sorted in descending order of similarity. For the second candidate materials obtained through keyword matching, they are sorted in descending order based on the number of keyword matches. In other words, the higher the similarity, the higher the ranking; the more keyword matches, the higher the ranking. Here, the number of matches refers to the number of second candidate materials retrieved that match the target keyword when searching based on the target keyword.
[0058] When calculating scores, for the first candidate material, the ratio of the first total quantity to the first ranking value is used as the first score for the first candidate material. For example, for the first candidate material A, the first total quantity is 30, and the first ranking value is 1, then the first score for the first candidate material A is 30 / 1 = 30 points. Similarly, for the second candidate material, the ratio of the second total quantity to the second ranking value is used as the second score for the second candidate material.
[0059] Understandably, the first score and the second score reflect the confidence level of the first and second candidate materials in the recall process. Based on this, all materials can be processed to construct an initial material set. For example, in an optional embodiment, the first score and the second score are sorted in descending order, and the materials in the top preset percentage of each sort result are used as materials in the initial material set. This application does not limit how the initial material set is constructed based on the first score and the second score, as long as the materials in the initial material set are those with high confidence after screening.
[0060] Based on the above embodiments, as an optional embodiment, an initial material set is constructed using a first candidate material and a second candidate material according to the first score and the second score, including: Find the union of the first and second candidate materials to obtain the union set of materials. For each material object in the union of material sets, perform the following steps: Determine whether the material object belongs to both the first candidate material and the second candidate material; If so, the sum of the first score and the second score corresponding to the material object shall be used as the target score of the material object; If not, the first or second score corresponding to the material object will be used as the target score; Based on the target score, each material object is sorted in descending order; and the materials in the top preset percentage of the sorted results form the initial material set.
[0061] In a specific embodiment, to ensure that materials do not appear repeatedly, thus affecting subsequent target product orders and improving ordering efficiency, a union can be performed on the first candidate material and the second candidate material. That is, for identical first and second candidate materials, only one material is retained, thereby obtaining the unioned material set.
[0062] For material objects in the union of material sets, further filtering is performed based on the first score and the second score to extract materials with the required confidence level. Specifically, for each material object, it is determined whether it belongs to both the first and second candidate materials. If so, it indicates that the currently judged material object has been retrieved not only through semantic vector retrieval but also through keyword matching. That is, the material object has been retrieved through both retrieval paths, indicating high confidence. In this case, when calculating the target score for the material object, the sum of the corresponding first score and the second score is used as the target score. If the material object belongs only to the first candidate material or only to the first candidate material, then the corresponding first score or the corresponding second score is used as the target score.
[0063] It is understandable that if a material object belongs to both the first and second candidate materials, it indicates that the material can be retrieved through multiple search paths, and that the material has a high confidence level as a target product. Therefore, in another optional embodiment, based on the above embodiment, as an optional embodiment, for material objects belonging to two candidate materials, a pre-set target coefficient greater than 1 can be introduced when calculating the target score.
[0064] Specifically, the target score for the material object is calculated by multiplying the target coefficient by the sum of the first score and the second score. It should be noted that the target coefficient can be set according to actual business needs, and this application does not limit its specific value. In one optional embodiment, the target coefficient ranges from 1 to 2.
[0065] For example, for a given material, which belongs to both the first and second candidate materials, the first candidate material scores 15 points, the second candidate material scores 5 points, and the target coefficient is 1.2. Therefore, the sum of the first and second scores is 20 points. After multiplying this by the target coefficient, the target score is 24 points.
[0066] After obtaining the target score, the scores are further sorted in descending order, so that materials with higher scores are ranked higher. At this point, the top 30% of materials in the sorted results can be used as the initial material set.
[0067] Of course, in another optional embodiment, the materials at the first preset number of positions in the sorting results can also be used as the materials in the initial material set, for example, the first 30 materials can be used as the materials in the initial material set. This application does not limit the method for selecting materials in the initial material set based on the target score.
[0068] As can be seen, the data retrieval and filtering engine adopts a dual retrieval mode of "keywords + vector similarity" and combines text pixel points and core parameter differences within a preset range to improve retrieval accuracy and avoid problems such as equipment maintenance delays and procurement cost waste caused by incorrect material selection.
[0069] Figure 3 This is a schematic diagram illustrating the principle of a material ordering method provided in another embodiment of this application. In one optional embodiment, structured material text is used as a filtering condition to select preferred materials from an initial material set, including: Determine whether there exists a first target material in the initial material set that has the same attributes and content as the target material. If it exists, the first target material will be selected as the preferred material; If it does not exist, proceed with the following steps: Extract a second target material from the initial material set, including the target material attributes; and extract the matching attribute content corresponding to the target material attributes from the second target material. For each target material property, perform the following steps: If the content of the attribute to be matched is text, determine the text similarity between the content of the attribute to be matched and the content of the target attribute. If the content of the attribute to be matched is a number, determine the difference between the content of the attribute to be matched and the content of the target attribute; Determine whether there is a second target material in the initial material set whose text similarity is greater than a preset similarity and / or whose difference is within a preset range; If it exists, the second target material will be selected as the preferred material; If it does not exist, return a message indicating that the search was empty.
[0070] Based on the above construction of the initial material set, see [link to relevant documentation]. Figure 3 The provided schematic diagram illustrates how materials in the initial material set are further filtered to obtain more accurate and refined materials. Specifically, this means that the structured material text includes all target material attributes related to the original material text, as well as the corresponding target attribute content.
[0071] This can be understood as the structured material text containing more accurate information about the original material text. Therefore, by using the structured material text as a filtering condition, high-precision selected materials can be filtered out from the initial material set.
[0072] In an optional embodiment, to ensure the accuracy of the target product and user satisfaction, see [reference needed]. Figure 3In the initial material set, materials that completely match the structured material text are prioritized for screening. Specifically, it is determined whether there are materials in the initial material set that match all target material attributes and target attribute content. If so, the first target material is selected as the first selected material.
[0073] If it does not exist, in order to ensure a good user experience, the user needs to be returned with materials of decent quality. In other words, if there is no first target material that perfectly matches the structured material text, then the second target material with higher accuracy is selected as the preferred material.
[0074] For details, see Figure 3 First, filter the initial material set to find second target materials that include the attributes of the target material, and then extract the corresponding attribute content to be matched from the second target material. It's understandable that the attribute content to be matched could be text or a specific numerical value. Therefore, as... Figure 3 As shown, different processing logic is applied to different types of attribute content to be matched.
[0075] When the attribute content to be matched is text, calculate the text similarity between the attribute content to be matched and the target attribute content. When the attribute content to be matched is a number, calculate the difference between the attribute content to be matched and the target attribute.
[0076] Furthermore, materials with text similarity greater than a preset similarity and / or differences within a preset range are selected as premium materials. In another optional embodiment, if both similarity and difference fail to meet the judgment criteria, the requirements cannot be lowered further for screening, lest the accuracy of the product ordering fails to meet user needs and results in a poor product ordering experience. In this case, a prompt signal indicating that no corresponding content can be retrieved can be generated at the terminal, allowing the user to check whether the original material text entered is accurate, so that the ordering process can be corrected and restarted.
[0077] In one alternative embodiment, among the selected materials, determining the target order includes: Obtain the user's target focus dimensions for the target product, and the priority among these target focus dimensions; Based on the pre-constructed second mapping relationship and the target focus dimension, the selected materials are scored to obtain the target score; the second mapping relationship is the correspondence between the focus dimension and the score value; Sort the target scores in descending order; Determine if a unique first-order material exists in the sorting results; If it exists, the first material will be designated as the target order. If none exists, sort the multiple materials with the highest target score according to priority until the unique material with the highest priority is obtained; and take the unique material with the highest priority as the target product.
[0078] Building upon the above embodiments, to further improve the accuracy of product selection, after obtaining the selected materials, the selected materials are further filtered according to the dimensions that the user actually focuses on. Specifically, the target dimensions that the user focuses on for the current product selection are obtained, where target dimensions include, but are not limited to, material inventory, material price, material brand, and material delivery time. It should be noted that in specific embodiments, when there are multiple target dimensions, it is also necessary to obtain the priority among different target dimensions.
[0079] In one optional embodiment, a correspondence between focus dimensions and scores is first established to obtain a second mapping relationship. In this second mapping relationship, the more material inventory there is, the higher the corresponding score. The lower the material price, the higher the corresponding score. Different brands have corresponding score settings, and the shorter the material delivery time, the higher the corresponding score.
[0080] Furthermore, since inventory, price, and delivery time values fluctuate significantly, corresponding score values can be assigned to different value ranges to avoid the second mapping relationship consuming excessive storage resources. This application does not limit the division of value ranges or the specific score values corresponding to different ranges.
[0081] Therefore, based on the second mapping relationship and the user's input of the target focus dimension, each selected material can be scored. That is, based on the actual inventory, price and other conditions of the selected materials, the total score is calculated according to the second mapping relationship to obtain the target score.
[0082] Furthermore, the target scores are sorted in descending order. If a unique material with the highest priority exists in the sorted results, that material is selected as the target product. Otherwise, the material is sorted again in descending order according to the user-input priority, until the unique material with the highest priority is found.
[0083] It's important to note that when there's only one target focus dimension and no first-ranked material exists, the first preset number of materials (e.g., the top 5 materials) can be transmitted to the terminal, allowing the user to select the final material. Conversely, if a first-ranked material exists, in addition to the first-ranked material, the first preset number of materials can also be retrieved and transmitted to the terminal for the user to choose from.
[0084] In another optional embodiment, the selected materials can be sorted in descending order according to the different target focus dimensions input by the user, and the sorting results can be displayed on the terminal for the user to select. This application does not limit the method for determining the final target store order from the selected materials. To facilitate understanding of the technical solution provided in this application, the material ordering method of this application will be illustrated below with examples.
[0085] For example, taking OEM fasteners in the MRO field as an example, in a specific embodiment, the user's description of the OEM fastener, i.e., the original material document, is: "Hexagonal head bolt (full thread)_GB5783_M8X65_Stainless steel 304_A2-70_S".
[0086] Based on the first mapping relationship, the target material attributes corresponding to the OEM fasteners are determined. After processing the original material text and target material attributes through the first designated large model, a structured material text is generated as "Execution Standard: GB5783, Material: Stainless Steel 304, Grade A2-70, Surface Treatment: Natural Color, Specification: M8X65". Simultaneously, after parsing the original material text through the second designated large model, the target material category described in the text is determined to be OEM fasteners.
[0087] Furthermore, based on the original material text, an initial material set is retrieved and constructed using both keyword and vector retrieval paths. The materials in this initial set are then traversed, and compared with the parsed structured material text. Materials that perfectly match the structured material text are retained as selected materials. Finally, based on the target focus dimension, a unique target product is selected from the selected materials according to a second mapping relationship.
[0088] Therefore, based on dynamic optimization decision-making, it supports users to customize the focus dimensions and priorities, and can flexibly adjust the optimization strategy according to different business scenarios such as inventory clearance, cost priority and fast delivery. Compared with the traditional fixed optimization logic, it improves business adaptability and can quickly respond to dynamic business goals such as enterprise inventory management, cost control and supply chain efficiency.
[0089] The above embodiments have described the material ordering method in detail. This application also provides an embodiment of a material ordering device.
[0090] Figure 4 This is a schematic diagram of the structure of a material ordering device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device includes: The raw material text acquisition module 40 is used to acquire the raw material text used for ordering. The target material attribute determination module 41 is used to determine the target material attributes associated with the original material text. The structured material text generation module 42 is used to generate structured material text based on the original material text and the target material attributes through a first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes; Material retrieval module 43 is used to retrieve materials from the material library based on the original material text to obtain an initial material set; The material filtering module 44 is used to filter selected materials from the initial material set using structured material text as the filtering condition. The target product determination module 45 allows users to determine the target product from among the selected materials.
[0091] Furthermore, the material ordering device provided in this application embodiment also includes: The text preprocessing module is used to preprocess the original material text to obtain the text to be analyzed; the preprocessing includes at least one of the following: removal of special characters, sentence segmentation, and word segmentation. The material category determination module is used to determine the target material category to which the text to be analyzed belongs by using the second specified large model; The mapping relationship calling module is used to determine the target material attributes based on the pre-built first mapping relationship and the target material category; the first mapping relationship is the correspondence between material categories and material attributes.
[0092] The semantic vector acquisition module is used to acquire the material semantic vectors of each material stored in the material library; The raw material text processing module is used to convert raw material text into target semantic vectors and extract target keywords included in the raw material text. The first candidate material determination module is used to determine the similarity between the target semantic vector and the material semantic vector; and to select materials with a similarity greater than a similarity threshold as the first candidate materials. The second candidate material determination module is used to perform keyword matching in the material library based on the target keywords in order to recall the second candidate materials. The initial material set construction module is used to construct an initial material set based on the first candidate material and the second candidate material.
[0093] The quantity determination module is used to determine the first total quantity of the first candidate material, the second total quantity of the target keywords, and the number of keyword hits in each second candidate material; The scoring and sorting module is used to sort the first candidate materials in descending order based on similarity and to sort the second candidate materials in descending order based on the number of hits. The first score determination module is used to take the ratio of the first total quantity to the first ranking value of the first candidate material as the first score of the corresponding first candidate material. The second score determination module is used to take the ratio of the second total quantity to the second ranking value of the second candidate material as the second score of the corresponding second candidate material. The first processing module is used to construct an initial material set based on the first score and the second score, using the first candidate material and the second candidate material.
[0094] The material union processing module is used to find the union of the first candidate material and the second candidate material to obtain the union material set. For each material object in the union of material sets, call the following module: The target score determination module is used to determine whether a material object belongs to both the first candidate material and the second candidate material. If so, the sum of the first score and the second score corresponding to the material object is used as the target score of the material object. If not, either the first score or the second score corresponding to the material object is used as the target score.
[0095] The second processing module is used to sort each material object in descending order based on the target score; and to form an initial material set with the materials in the first preset percentage of the sorted results.
[0096] The attribute content determination module is used to determine whether there is a first target material in the initial material set that is identical to the target material in terms of both the target material's attributes and the target material's attribute content. If it exists, call the first selected material determination module, which is used to select the first target material as the selected material; If it does not exist, call the following module: The module for extracting the content of the attribute to be matched is used to extract a second target material, which includes the attribute of the target material, from the initial material set; and to extract the content of the attribute to be matched corresponding to the attribute of the target material from the second target material. For each target material attribute, call the following module: The similarity determination module is used to determine the text similarity between the content of the attribute to be matched and the content of the target attribute when the content of the attribute to be matched is text. The difference determination module is used to determine the difference between the content of the attribute to be matched and the content of the target attribute when the content of the attribute to be matched is a number. The second selected material determination module is used to determine whether there is a second target material in the initial material set whose text similarity is greater than the preset similarity and / or whose difference is within the preset range; if it exists, the second target material is selected as the selected material; if it does not exist, a prompt signal indicating that the search is empty is returned.
[0097] The attention dimension acquisition module is used to acquire the user's target attention dimensions for the target product, as well as the priority among the target attention dimensions; The scoring module is used to score selected materials based on a pre-built second mapping relationship and target attention dimensions to obtain a target score; the second mapping relationship is the correspondence between attention dimensions and score values; The target score sorting module is used to sort the target scores in descending order. The target filtering module is used to determine whether there is a unique first-rank material in the sorting results. If it exists, the first-rank material is taken as the target product. If it does not exist, the multiple materials with the highest target scores are sorted according to priority until the unique material with the highest priority is obtained. The unique material with the highest priority is then taken as the target product.
[0098] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 5 As shown, the electronic device includes: a memory 50 for storing computer programs; The processor 51 is used to execute a computer program to implement the steps of the material ordering method as described in the above embodiments.
[0099] The electronic devices provided in this embodiment may include, but are not limited to, smartphones, tablets, laptops, or desktop computers.
[0100] The processor 51 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 51 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 51 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 51 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 51 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0101] The memory 50 may include one or more computer-readable storage media, which may be non-transitory. The memory 50 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 50 is used to store at least the following computer program 501, which, after being loaded and executed by the processor 51, is capable of implementing the relevant steps of the material ordering method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 50 may also include an operating system 502 and data 503, and the storage method may be temporary or permanent storage. The operating system 502 may include Windows, Unix, Linux, etc. The data 503 may include, but is not limited to, relevant data involved in the material ordering method.
[0102] In some embodiments, the electronic device may further include a display screen 52, an input / output interface 53, a communication interface 54, a power supply 55, and a communication bus 56.
[0103] Those skilled in the art will understand that Figure 5 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0104] The electronic device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the material ordering method described in the above embodiments.
[0105] It should be noted that although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Claims
1. A method for ordering materials, characterized in that, The method includes: Obtain the original material text used for order placement; Determine the target material attributes associated with the original material text; Based on the original material text and the target material attributes, a structured material text is generated through a first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes. Based on the original material text, a material retrieval is performed in the material library to obtain an initial material set; Using the structured material text as a filtering condition, select high-quality materials are filtered from the initial material set; Among the selected materials, the target product is determined.
2. The material ordering method as described in claim 1, characterized in that, Determining the target material attribute associated with the original material text includes: The original material text is preprocessed to obtain the text to be analyzed; the preprocessing includes at least one of special character removal, sentence segmentation, and word segmentation. The target material category to which the text to be analyzed belongs is determined by using the second specified large model; The target material attributes are determined based on the pre-constructed first mapping relationship and the target material category; the first mapping relationship is the correspondence between material categories and material attributes.
3. The material ordering method as described in claim 1, characterized in that, The step of retrieving materials from the material database based on the original material text to obtain an initial material set includes: Obtain the material semantic vector of each material stored in the material library; The original material text is converted into a target semantic vector; and the target keywords included in the original material text are extracted. Determine the similarity between the target semantic vector and the material semantic vector; and designate materials with a similarity greater than a similarity threshold as first candidate materials; Based on the target keywords, keyword matching is performed in the material library to recall the second candidate material; Based on the first candidate material and the second candidate material, the initial material set is constructed.
4. The material ordering method as described in claim 3, characterized in that, The step of constructing the initial material set based on the first candidate material and the second candidate material includes: Determine the first total quantity of the first candidate materials, the second total quantity of the target keywords, and the number of keyword hits in each of the second candidate materials; Based on the similarity, the first candidate materials are sorted in descending order; and based on the number of hits, the second candidate materials are sorted in descending order. The ratio of the first total quantity to the first ranking value of the first candidate material is taken as the first score of the corresponding first candidate material; The ratio of the second total quantity to the second ranking value of the second candidate material is taken as the second score of the corresponding second candidate material; Based on the first score and the second score, the initial material set is constructed using the first candidate material and the second candidate material.
5. The material ordering method as described in claim 4, characterized in that, The step of constructing the initial material set based on the first score and the second score, using the first candidate material and the second candidate material, includes: Find the union of the first candidate material and the second candidate material to obtain the union material set; For each material object in the union of the material sets, perform the following steps: Determine whether the material object belongs to both the first candidate material and the second candidate material; If so, the sum of the first score and the second score corresponding to the material object shall be taken as the target score of the material object; If not, the first score or the second score corresponding to the material object shall be used as the target score; Based on the target score, each material object is sorted in descending order; and the initial material set is formed by the top preset percentage of materials in the sorting results.
6. The material ordering method as described in claim 1, characterized in that, Using the structured material text as a filtering condition, select premium materials are filtered from the initial material set, including: Determine whether there exists a first target material in the initial material set that has the same attributes and content as the target material; If it exists, the first target material will be selected as the preferred material; If it does not exist, proceed with the following steps: From the initial material set, extract a second target material that includes the target material attribute; and from the second target material, extract the attribute content to be matched corresponding to the target material attribute. For each of the target material properties, perform the following steps: If the content of the attribute to be matched is text, determine the text similarity between the content of the attribute to be matched and the content of the target attribute; If the content of the attribute to be matched is a numerical value, determine the difference between the content of the attribute to be matched and the content of the target attribute; Determine whether there exists a second target material in the initial material set whose text similarity is greater than a preset similarity and / or whose difference is within a preset range; If it exists, the second target material will be selected as the preferred material; If it does not exist, return a message indicating that the search was empty.
7. The material ordering method as described in claim 1, characterized in that, The determination of the target product among the selected materials includes: Obtain the user's target attention dimensions for the target product, and the priority among the target attention dimensions; The selected materials are scored based on the pre-constructed second mapping relationship and the target attention dimension to obtain a target score; the second mapping relationship is the correspondence between the attention dimension and the score value. Sort the target scores in descending order; Determine if a unique first-order material exists in the sorting results; If it exists, the first material will be designated as the target product; If it does not exist, the multiple materials with the highest target score are sorted according to their priority until the unique material with the highest priority is obtained; and the unique material with the highest priority is taken as the target product.
8. A material ordering device, characterized in that, The device includes: The raw material text acquisition module is used to acquire the raw material text used for order placement; The target material attribute determination module is used to determine the target material attributes associated with the original material text; The structured material text generation module is used to generate structured material text based on the original material text and the target material attributes through a first specified large model; the structured material text consists of the target material attributes and the target attribute content corresponding to the target material attributes; The material retrieval module is used to perform material retrieval in the material library based on the original material text to obtain an initial material set; The material filtering module is used to filter selected materials from the initial material set using the structured material text as the filtering condition; The target product determination module allows the user to determine the target product from among the selected materials.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the material ordering 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 program is executed by the processor, it implements the steps of the material ordering method according to any one of claims 1 to 7.