Industrial product selection question answering method, device, computer program product, and storage medium
By classifying and rewriting user questions into sub-questions, and combining databases and models for matching and weighted scoring, the problems of low accuracy and efficiency in industrial product selection are solved, achieving efficient and accurate industrial product recommendations.
Patent Information
- Application Number
- CN202510429696.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In the field of industrial information, general-purpose large models have difficulty accurately understanding and recommending specific models of industrial products, resulting in low efficiency and accuracy in product selection and problem-solving.
By classifying user questions, rewriting them into multiple vector sub-questions, and matching them in a series of descriptions, options, and classification vector databases, and combining market characteristics and pre-trained models to perform weighted scoring, the product code is determined and the optimal product code is output.
It improves the accuracy and efficiency of industrial product selection and solves the problems of inaccurate manual selection and understanding of general large models in existing technologies.
Smart Images

Figure CN120316223B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application generally relate to the technical field of industrial information and data processing, and more particularly, to an industrial product selection question and answer method, device, computer program product and storage medium. BACKGROUND
[0002] In the field of industrial information, the selection and purchase of industrial products is generally more complex than the selection and purchase of goods directly facing the consumer market end (C end). Customers usually have only one physical object or only know the use scenario and do not know what to buy specifically, and need to seek pre-sales or technician consultation.
[0003] Customer questions are, for example: "Which magnetic switch should be selected for XXX-XXX cylinder? The cylinder is to be installed on a 6-axis robot"; "Hello, I need a vacuum gauge with the same specifications and model as XXX-XX-X, but without analog signal output. I need it to output a 24V level alarm signal when the vacuum value exceeds the set threshold. Can you help me select it?"; "What is the difference between oil mist separation and micro-fog separation? Which one is suitable for a suction dryer?"; "What is the difference between oil mist separation and micro-fog separation? Which one is suitable for a suction dryer?"
[0004] When a general large model does not know the specific type of a product, or when recommending a product, it often misunderstands the customer's question due to lack of understanding of the specific type of industrial product industry, and cannot recommend the accurate type when recommending the product. SUMMARY
[0005] To solve the above problems in the prior art, in a first aspect, embodiments of the present application provide an industrial product selection question and answer method, the method comprising: S110. classifying a user question, the classification comprising a selection question and a competitive product replacement question; when the classification is the selection question, performing steps S121-S126: S121. rewriting and converting the user question into M vector sub-questions, where M>1; S122. performing vector matching of the M vector sub-questions in a series description vector database, a series option vector database and a series classification vector database respectively, to obtain M*3 groups of a first number of initial predicted series in each group; S123. weighting and scoring the initial predicted series according to the vector matching degree ranking in the group, market characteristics and the vector database from which the initial predicted series comes, to obtain series scores; S124. selecting a second number of selected series from the initial predicted series according to the series scores; S125. determining attributes and attribute values of the selected series according to the relevance of the attributes of each series in the selected series to the user question and conflict rules between attribute values of different attributes, and determining product codes in the selected series according to the selected series, the attributes and the attribute values; and S126. outputting the product codes; when the classification is the competitive product replacement question, performing steps S131-S133: S131. extracting a competitive product code in the user question; S132. querying a replacement product code corresponding to the competitive product code in a competitive product database. When the replacement product code exists, performing step S133, otherwise performing steps S121-S126; and S133. outputting the replacement product code.
[0006] In some embodiments, step S124 comprises: S1241: obtaining a third number of preliminary selected series from the initial predicted series according to the series scores; and S1242: calling a pre-trained series prediction reasoning model to select the second number of selected series from the third number of preliminary selected series in combination with the user question.
[0007] In some embodiments, the market characteristics comprise hot-selling products, products in stock or ordinary products, wherein the weights of the hot-selling products and the products in stock are higher than the weight of the ordinary products, and S1241 comprises: when the number of ordinary product series in the initial predicted series is less than or equal to a pre-determined number of preliminary selected ordinary products, taking all the ordinary product series in the initial predicted series to join the preliminary selected series; and when the number of ordinary product series in the initial predicted series exceeds the number of preliminary selected ordinary products, taking the number of preliminary selected ordinary products of ordinary product series in the initial predicted series to join the preliminary selected series according to the series scores.
[0008] In some embodiments, the method further comprises step S120 of performing multi-level category prediction according to the user question, wherein the prediction result comprises at least a first-level category and a second-level category; and step S1241 comprises: in a case where the number of series belonging to the second-level category in the initial prediction series is less than or equal to a predetermined second-level category preliminary selection number, taking all series belonging to the second-level category in the initial prediction series into the preliminary selection series; and in a case where the number of series belonging to the second-level category in the initial prediction series exceeds the second-level category preliminary selection number, taking second-level category preliminary selection number of series belonging to the second-level category in the initial prediction series into the preliminary selection series according to series scores.
[0009] In some embodiments, the classification further comprises a general question answer, and the method further comprises, in a case where the classification is the general question answer, performing steps S141-S144: S141. querying a commodity detail database for commodity details corresponding to a commodity code in the user question; S142. inputting the user question into a pre-configured networked query model to obtain networked knowledge points; S143. supplementing the commodity details and the networked knowledge points to the user question to generate a supplemented question; and S144. inputting the supplemented question into a pre-trained reasoning model to obtain and output question answer information.
[0010] In some embodiments, step S141 comprises: S1411. identifying a to-be-confirmed code in the user question that conforms to a commodity code rule; S1412. querying the pre-configured commodity detail database for the to-be-confirmed code, and performing step S1413 if the commodity detail database contains the to-be-confirmed code, or performing steps S1414-S1415 if the commodity detail database does not contain the to-be-confirmed code; S1413. obtaining commodity details associated with the to-be-confirmed code from the commodity detail database; S1414. inputting the to-be-confirmed code into a commodity code recognition model, and outputting the output result of the commodity code recognition model to the user; and S1415. determining a commodity code according to feedback information of the user on the output result of the commodity code recognition model, and obtaining associated commodity details from the commodity detail database.
[0011] In some embodiments, the method further comprises, in a case where the user inputs literal content and multimedia content, extracting knowledge points in the multimedia content according to information in the literal content; and adding the literal content and the extracted knowledge points in the multimedia content to the user question.
[0012] In some embodiments, step S123 comprises the following steps: S1231. obtaining a base score of each series according to the vector matching degree ranking of the series in the initial prediction series in the group; S1232. determining a weight according to the market characteristics of the series and the vector database from which the series comes; S1233. calculating the base score according to the weight to obtain the series score.
[0013] In some embodiments, step S125 comprises the following steps: S1251. judging whether each attribute of each series in the selected series is related to the user question, if yes, selecting the attribute, and if no, not selecting the attribute; S1252. filling the selected attribute and the attribute value of the attribute extracted from the user question into the attribute table of the selected series; S1253. verifying and / or editing the filled attribute and the attribute value thereof according to the filled attribute and the attribute value thereof in the attribute table and the conflict rules between the attribute values of different attributes predetermined in advance, and determining the attribute value of the unfilled attribute, thereby obtaining the attribute table of the selected series; S1254. determining the commodity code in the selected series according to the attribute and the attribute value thereof in the attribute table.
[0014] In some embodiments, M=3, and step S121 comprises: S1211. obtaining a preliminary rewritten question by rewriting the user question through a query to a pre-configured series database; S1212. generating a first sub-question by rewriting the preliminary rewritten question through a network query; S1213. generating a second sub-question by rewriting the preliminary rewritten question through semantic direct modification; S1214. generating a third sub-question by rewriting the preliminary rewritten question through deep reasoning combined with a knowledge base; and S1215. converting the first sub-question, the second sub-question and the third sub-question into three vector sub-questions respectively, wherein each rewriting adds one or more of a series name, a query subject, a series description, a series attribute, a commodity related description, a commodity function, a performance characteristic, a specification information and a commodity application scenario.
[0015] In some embodiments, the method further comprises the following steps: S151. querying detailed information of a commodity corresponding to the commodity code according to the commodity code; S152. inputting the detailed information of the commodity and the user question into a selection model to obtain an optimal commodity code; and S153. outputting the optimal commodity code.
[0016] In some embodiments, after step S122, the method further comprises: performing a deduplication operation on the M*3 groups of the first number of initial prediction series in each group, and taking the initial prediction series after the deduplication operation as the initial prediction series in subsequent steps S123-S124.
[0017] In a second aspect, embodiments of the present application provide an industrial product selection question and answer device, the device comprising a memory and a processor, the memory having stored thereon a computer program which, when executed by the processor, implements the method described in any of the above embodiments.
[0018] In a third aspect, embodiments of the present application provide a computer program product comprising computer readable instructions which, when executed by a processor, perform the steps of the method described in any of the above embodiments.
[0019] In a fourth aspect, embodiments of the present application provide a storage medium having stored thereon computer readable instructions which, when executed by a processor, perform the steps of the method described in any of the above embodiments.
[0020] The industrial product selection question and answer technical solution provided by embodiments of the present application solves the professional problem solving in the vertical field of industrial products in the field of industrial information and data processing technology. In the multiple steps of the technical solution, different machine learning models (large models) are combined to realize the corresponding functions respectively, and the input and output of the machine learning model are respectively innovatively adapted to the information processing and data operation of the technical solution of the present application, so that the industrial product selection and answer can be generated for the professional problems in the field of industrial products. The problems of relying on manual selection and answering questions and inaccurate understanding of general large models in the prior art are solved, and the efficiency and accuracy are improved. The industrial product selection question and answer technical solution proposed by embodiments of the present application can be realized through application software (APP) development, and can be applied to an industrial product selection question and answer robot or an industrial product selection Internet search platform. BRIEF DESCRIPTION OF DRAWINGS
[0021] The above and other objects, features and advantages of embodiments of the present application will be readily understood through reading the detailed description below, with reference to the accompanying drawings. In the drawings, several embodiments of the present application are shown by way of example and not limitation, in which:
[0022] Figure 1 A flowchart of an industrial product selection question and answer method according to embodiments of the present application is shown;
[0023] Figure 2 A schematic diagram of one example of a series of predictions according to embodiments of the present application is shown;
[0024] Figure 3 A flowchart of one example of an industrial product selection question and answer method according to embodiments of the present application is shown.
[0025] In the drawings, the same or corresponding reference numbers denote the same or corresponding parts. DETAILED DESCRIPTION
[0026] The principles and spirits of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only so that those skilled in the art can better understand and implement the present application, and do not limit the scope of the present application in any way.
[0027] It should be noted that the numbering of various steps herein, such as S121, S1241, etc., is to distinguish between various steps by different coding, for ease of reference, and to make the relationship between steps clearer, and is not a figure mark.
[0028] In one aspect, embodiments of the present application provide an industrial product selection question and answer method. Referring to Figure 1 which shows a flowchart of an industrial product selection question and answer method according to an embodiment of the present application. As Figure 1 shown, the method includes the following steps.
[0029] S110. Classify the user question, including select-model and competitive-substitution questions.
[0030] The first type of select-model question, the user (or customer) gives a specific use scenario and product parameters, and asks the customer to recommend a specific product model; the second type is the competitive-substitution question, the customer gives a specific model of a competitive product, and asks to recommend a model of our product.
[0031] For example only, a specific implementation can be to configure a large model agent service, which is to input a customer question, then classify the question, and return one of the CatagoryEnum enumeration select-model, competitive-substitution. The large model agent can be obtained by pre-training a machine learning model accordingly.
[0032] As an embodiment of the present application, the method can further include: in the case where the user inputs the text content and the multimedia content, extracting the knowledge points in the multimedia content according to the information in the text content; adding the text content and the extracted knowledge points in the multimedia content to the user question. For example, the added user question can be used as the user question used in step S110 and subsequent steps.
[0033] For example only, the extraction of knowledge points in the picture-StringextractKnowledgeFromImages(String question, File image) can be implemented as follows.
[0034] A large model agent with visual ability is pre-configured to extract key knowledge points in the picture according to the customer's input question and picture. If there is no question, only a picture is given to the large model, it may not know which information to extract. For example, only a person's photo is given, and directly extracting knowledge points, it may return information such as whether the person is obese, gender, etc., but if the customer's question is about the color of the person's shirt or whether they wear glasses, the large model will directly extract the most direct question according to the question, and if there is no question, the large model does not know which is the key when extracting the knowledge points of the picture, and the extracted knowledge points may not be able to answer the customer's question. The large model agent can be obtained by pre-training the machine learning model accordingly.
[0035] Determine whether the customer's entire question carries a picture. If a picture is carried, extract the required knowledge points imageKnowledge by calling extractKnowledgeFromImages, and then add the knowledge points to the background of the question as a new question. question = question + "background supplement:" + imageKnowledge.
[0036] When the classification is a selection problem, steps S121-S126 are performed. The selection problem is mainly divided into series prediction and commodity prediction. The first step is to predict multiple (for example, three) series, and the second step is for the large model to cooperate with the program code to select appropriate commodities for the multiple series.
[0037] Reference Figure 2 , which shows a schematic diagram of one example of series prediction according to an embodiment of the present application.
[0038] S121. Rewrite the user question (shown as "question rewriting" in the figure) and convert it into M vector sub-questions, where M>1. As one embodiment of the present application, M can be equal to 3. The customer's question can be rewritten (i.e., rewritten) by a large model and networking, replacing one question with three kinds of more explicit expressions, i.e., three sub-questions, and then embedding the three kinds of expressions into vector questions.
[0039] In this embodiment, step S121 can include steps S1211-S1215.
[0040] S1211. Preliminarily rewrite the user question by querying the pre-configured series database to obtain a preliminarily rewritten question.
[0041] For example, the original question is "What is the muffler model that can be matched with SYJ712M-5WAOU-01F-Q?" The preliminary rewriting will be rewritten according to SYJ712M-5WAOU-01F-Q, and the preliminary rewritten question is obtained: "What is the muffler model suitable for 3-way solenoid valve / pilot type elastic seal direct piping type?" It can be seen that the series name is added in this rewriting.
[0042] S1212. The first sub-question is generated by rewriting the preliminary rewritten question through network query.
[0043] Rewriting through network query can extract more key information and supplement it to the original question to generate the first sub-question, for example:
[0044] Product description: The recommended electromagnetic valve is SMC's SY series two-position five-way single electric control electromagnetic valve, suitable for DC 24V power supply, and the connection port diameter is 6mm. The electromagnetic valve is widely used in automatic control system, with the characteristics of fast response, high reliability and long service life.
[0045] Key options:
[0046] 1. Valve body type: two-position five-way
[0047] 2. Control mode: single electric control
[0048] 3. Power voltage: DC 24V
[0049] 4. Connection port diameter: 6mm
[0050] 5. Interface type: G1 / 8 (other interface types can be selected according to actual needs)
[0051] 6. Working pressure range: 0.15-0.7MPa
[0052] 7. Ambient temperature: -5-60℃ (not frozen)
[0053] 8. Fluid temperature: 5-60℃
[0054] 9. Suitable fluid: air
[0055] 10. Protection level: IP65 (dustproof and waterproof)
[0056] As can be seen, the sub-questions generated by the above example network query add the application scene and performance characteristics of the goods, and supplement more information in the question, which expands the question.
[0057] S1213. The second sub-question is generated by rewriting the preliminary rewritten question through semantic direct modification.
[0058] For example, the query subject in the preliminary rewritten question can be extracted and rewritten. For example, the series name is extracted by coding and added to the query subject.
[0059] For example, the preliminary rewritten question generated in the above example is "What is the silencer model suitable for a 3-way electromagnetic valve / lead-type elastic seal direct piping type?". The second sub-question generated after the second rewriting can be "What is the silencer model suitable for a 3-way electromagnetic valve / lead-type elastic seal direct piping type? Query subject: silencer".
[0060] The addition of the query subject can make the question more targeted and easier to obtain accurate selection.
[0061] S1214. The third sub-question is generated by rewriting the preliminary rewritten question through deep reasoning combined with the knowledge base. Deep reasoning can be implemented by a large model, for example. An example of a third sub-question generated by deep reasoning is as follows:
[0062] Product name: silencer
[0063] Product description: A silencer suitable for SYJ712M-5WAOU-01F-Q electromagnetic valve, used to reduce exhaust noise.
[0064] Specification information:
[0065] * Thread type: Rc
[0066] * Suitable electromagnetic valve type: 3-way electromagnetic valve / lead type
[0067] * Installation method: direct piping type
[0068] * Rated voltage: DC 24V
[0069] * Function: normally off type
[0070] * Manual operation: non-locking push type
[0071] As can be seen, the product function and specification information are added through deep reasoning, and the parameters are completed.
[0072] For example, there are more than 30 major categories, more than 200 secondary categories, and 6000 sub-series under a certain brand of industrial products, with a total of millions of specific goods, and more than 30,000 technical documents for the introduction of these brands. The 30,000 technical documents can be pre-extracted and stored in the knowledge base to generate a knowledge graph.
[0073] In step S1214, the relevant knowledge can be extracted and supplemented to the original question through deep reasoning of the machine learning model based on the user question and the knowledge graph in the knowledge base, thereby performing the third rewriting.
[0074] It should be noted that the first rewriting, the second rewriting and the third rewriting described above are steps that are respectively independently executed, and there is no limitation on the order relationship, and the three rewritings can be executed in the order opposite to the above or other different orders, or can be executed synchronously.
[0075] S1215. The first sub-problem, the second sub-problem and the third sub-problem are respectively converted into three vector sub-problems.
[0076] Among them, each rewriting described above adds one or more of the series name, the query subject, the series description, the series attribute, the commodity related description, the commodity function, the performance characteristics, the specification information, and the commodity application scene.
[0077] Through the problem rewriting of step S121, the attributes, the commodity related description and other information can be added to the problem, so that the problem is more intuitive, and it is beneficial to subsequent accurate selection.
[0078] S122. The M vector sub-problems are respectively subjected to vector matching in the series description vector database, the series option vector database and the series classification vector database, to obtain M*3 groups of the first number of initial prediction series. The vector sub-problems are subjected to vector distance calculation with the vector data in the database. Each sub-problem is subjected to recall in different vector libraries, and the first number (for example, 500) of series most suitable for each sub-problem are calculated.
[0079] For example, the series description library can include basic data+series description+other attributes, the series option library can include basic data+selectable values, and the series classification library can include basic data+range classification library. The basic data of the series mainly refers to catalogid(series id), primary category, secondary category, series full name and the like. The other attributes refer to attributes unrelated to selection, which cannot be selected by the customer, and are non-option attributes. The series description vector database, the series option vector database and the series classification vector database are respectively the vectorized databases of the series description library, the series option library and the series classification library.
[0080] As an embodiment of the present application, after step S122, a deduplication operation can also be performed on the M*3 groups of the first number of initial prediction series obtained, and the initial prediction series after the deduplication operation are taken as the initial prediction series in subsequent steps S123-S124.
[0081] S123. The initial prediction series are subjected to weighted scoring according to the vector matching degree ranking of the initial prediction series in the group, the market characteristics and the vector database from which the initial prediction series come, to obtain series scores.
[0082] As an embodiment of the present application, the market characteristics can include hot-selling items, in-stock items, or ordinary items, wherein the weights of the hot-selling items and the in-stock items are higher than the weight of the ordinary items.
[0083] As an embodiment of the present application, step S123 can include steps S1231-S1233.
[0084] S1231. Obtain a base score of each series according to the vector matching degree ranking in the group according to the initial prediction series.
[0085] For example, in the case of M=3 and the first number being 500, a total of 3*3*500=4500 initial prediction series are obtained. The base score of each series in the initial prediction series can be, for example: base score = 1 / (1500+ranking).
[0086] S1232. Determine the weight according to the market characteristics of the series and the vector database from which it comes.
[0087] As an example, the series are now divided into three types: ordinary series, in-stock series, and hot-selling series (both in-stock and hot-selling are counted as hot-selling). The determination of the weight is shown in Table 1 below.
[0088] Table 1. Weight list
[0089] Hot item Stock item Normal item Series description 5 4 2 Series option 3 2 1 Series classification 2 2 1
[0090] After such a rewritten original problem becomes three sub-problems, respectively go to three different vector libraries (series description library, series option library, series classification library) to recall the series. After recalling each series, the score is calculated in the above manner, and the same series appears in different sub-problems or different vector library recall results, and the scores need to be added up.
[0091] S1233. Calculate the series score according to the weighted calculation of the base score according to the weight. The weighted calculation can be, for example, multiplying the weight by the base score.
[0092] S124. Select a second number of selected series from the initial prediction series according to the series score. The second number can be, for example, 3.
[0093] S125. Determine the attributes and attribute values of the selected series according to the relevance of each attribute of the selected series to the user question and the conflict rules between the attribute values of different attributes, and determine the product code in the selected series according to the selected series, the attributes, and the attribute values.
[0094] As an embodiment of the present application, step S125 can include steps S1251-S1254.
[0095] S1251. Determine whether each attribute of each series in the selected series is relevant to the user question, and if relevant, select the attribute, and if not relevant, do not select the attribute.
[0096] S1252. Fill the selected attributes and the attribute values of the attributes extracted from the user question into the attribute table of the selected series.
[0097] S1253. Verify and / or edit the filled attributes and their attribute values according to the conflict rules between different attribute values of the attributes in the attribute table, and determine the attribute values of the unfilled attributes, thereby obtaining the attribute table of the selected series.
[0098] S1254. Determine the product code in the selected series according to the attributes and their attribute values in the attribute table.
[0099] The step S125 is described in detail below in conjunction with a specific example.
[0100] The description of the series, all attributes and attribute values of the series, and the question are provided to the large model, which determines whether each attribute is relevant to the question according to the question, and if not relevant, does not select, and if relevant, selects the relevant attribute value, such as the customer question containing a caliber of 10 mm, and the series attribute having a caliber attribute and having options of 8 mm, 10 mm, and 12 mm, the large model needs to select 10 mm. This section uses the large model because the customer may describe 10 mm or ten millimeters, and ordinary programs are prone to miss. In this example, caliber is an attribute (also referred to as an attribute name), and 10 mm is an attribute value (also referred to as an option or selectable option).
[0101] The large model selects all attributes that can be selected for the series, and the program fills the results into the attribute table (attribute Map, or option Map), and then verifies whether the selected several options conflict with each other, and if they conflict with each other, the series cannot have a product recommendation that meets the customer's needs.
[0102] The logic of the program matching the product model that meets the customer's needs is as follows:
[0103] Suppose a series has 10 attributes, each attribute has different options, and the database has previously defined the judgment of whether different attribute values conflict. There can be several to hundreds of conflict rules for each series. For example, when attribute 1 selects A, attribute 2 selects B, and attribute 4 selects D, a conflict is generated, which is one of the rules. When attribute 1 selects B, attribute 3 selects C, attribute 5 selects A, and attribute 7 selects C, a conflict is generated, which is another rule.
[0104] There is a Map<attribute name, attribute value> currentSelection, which represents the result of all the current selections. If attribute 1 selects A, attribute 2 selects B, attribute 3 selects C, attribute 6 selects C, and attributes 4, 5, and 7 are not selected, then currentSelection is
[0105] {
[0106] "attribute 1": "A",
[0107] "attribute 2": "B",
[0108] "attribute 3": "C",
[0109] "attribute 6": "C"
[0110] }
[0111] The conflict rule List<Map<attribute name, attribute value>> conflictRules represents multiple sets of conflict rules for this series. Taking the above two sets of conflict rules as an example, the data structure in conflictRules should be:
[0112] [{
[0113] "attribute 1": "A",
[0114] "attribute 2": "B",
[0115] "attribute 4": "D"
[0116] }, {
[0117] "attribute 1": "B",
[0118] "attribute 3": "C",
[0119] "attribute 5": "A",
[0120] "attribute 7": "C"
[0121] }]
[0122] Boolean validSelection(currentSelection, conflictRules) can check whether the selection is reasonable:
[0123] Define a isValid variable, default set to true, for loop check each map in confilctRules, then traverse each key in mapRule, try to get value from currentSelection with same key, if can't get value, or get value is not equal to mapRule, then indicate that mapRule not hit, only if first key in mapRule get value and result is same as itself, this rule is satisfied. As long as one rule is still satisfied, the currentSelection is not in compliance.
[0124] All property options of this series can be List<Map<property name, List<property value> propertyOptions, an example is as follows:
[0125] [{
[0126] "Property 1": ["A", "B", "C", "D"], { "Property 2": ["A", "B", "C", "D", "E"]},...
[0127] }]
[0128] The logic of filling out the complete product code according to the large model part options is as follows (still taking the above as an example, assuming that a series has 7 attributes, and the large model only maintains 4, then the program needs to check which values of the other 3 can not violate the rules, and there may be many such choices, as long as the program chooses any one to fill in the 7 options and does not break the rules), fulfillModelNo(Map<property name, property value> currentSelection, List<Map<property name, property value>> confilctRules, int index, Map<property name, List<property value> propertyOptions, Map<property name, property value> aiSelection):
[0129] aiSelection represents the result of the initial AI recommendation, index represents the current progress to the x-th property in the series of all properties, when index = propertyOptions.length, it means the recursion ends, otherwise propertyOptions.get(index) takes out the property x, if property x exists in aiSelection, it means that the property does not need to be further speculated, and validSelection(currentSelection, conflictRules) is directly called to verify whether it is legal. If property x is not in aiSelection, all option values List of property x options are taken out, and then a for loop is used to try to verify whether it is legal to add it to currentSelection. In order to ensure that the currentSelection of this recursive layer is not contaminated, a newCurrentSelection = currentSelection needs to be created before the option is added, and then the option is added to newCurrentSelection, and validSelection(newCurrentSelection, conflictRules) is called to verify whether it is legal. If the first option is not legal, the second is verified, and so on until a legal element is found, or all options of element x are verified to be illegal. If none of them are legal, the recursion is returned upwards, indicating that the previous property x-1 is legal, but once that element is selected, the subsequent layer cannot proceed, and the property x-1 layer should select other elements. If a legal option can be found in the property x of the index layer, it can be verified to be legal, and the rule calls fulfillModelNo(newCurrentSelection, conflictRules, index + 1, propertyOptions, aiSelection).
[0130] The entire recursion will end when index = propertyOptions.length, and the currentSelection at that time is returned, and this result is the result found to verify the feasibility. If the entire recursion is stuck at a certain layer, it will be returned back until all attempts are verified to be illegal, indicating that the recommended combination cannot select a feasible product.
[0131] S126. Output the product code.
[0132] Optionally, the method can also compare the advantages and disadvantages of multiple commodities, specifically, can include steps S151-S153.
[0133] S151. According to the commodity code, query the detailed information of the commodity corresponding to the commodity code.
[0134] S152. Input the detailed information of the commodity and the user question into the optimization model to obtain an optimal commodity code.
[0135] S153. Output the optimal commodity code.
[0136] Different series recommend different commodity codes, query the detailed information of the commodity (commodity details completion), and put the three commodities and the question together into the large model again, so that the large model selects the optimal one and gives the reason for the selection.
[0137] When the classification is a competitive product replacement problem, steps S131-S133 are performed.
[0138] S131. Extract the competitive product code in the user question.
[0139] S132. Query the replacement commodity code corresponding to the competitive product code in the competitive product database, and if the replacement commodity code exists, perform step S133, otherwise perform steps S121-S126.
[0140] S133. Output the replacement commodity code.
[0141] The product model of the competitive product and the corresponding replacement relationship between the commodity and the competitive product are prepared in advance. If the competitive product code provided by the customer cannot be queried in the database, it is returned that the competitive product code has no replacement scheme. If the code contains the competitive product library, it is queried whether there is a replacement scheme in advance. If there is a replacement scheme, the replacement scheme is directly returned to the front end. If there is no replacement scheme, only the commodity information of the competitive product is queried, and the commodity attributes of the competitive product are extracted. After extraction, the question becomes whether there is an xx commodity recommendation with attribute 1 as A, attribute 2 as B, …, and the type selection scheme is directly used.
[0142] As an embodiment of the present application, step S124 can include steps S1241-S1242.
[0143] S1241. Obtain a third number (for example, 20) of preliminary selected series from the initial predicted series according to the series score.
[0144] S1242. Call a pre-trained series prediction inference model to select a second number (for example, 3) of selected series from the third number (for example, 20) of preliminary selected series according to the user question.
[0145] In this embodiment, step S1241 can include: in the case that the number of normal product series in the initial prediction series is less than or equal to the predetermined normal product preliminary selection number (for example, 20% of 20, 4), taking all normal product series in the initial prediction series to join the preliminary selection series; in the case that the number of normal product series in the initial prediction series exceeds the normal product preliminary selection number, taking normal product preliminary selection number of normal product series in the initial prediction series according to the series score to join the preliminary selection series.
[0146] The mechanism of step S1241 is used to ensure that normal product series accounts for a certain proportion in the selected 20 preliminary selection series, for example, to ensure that the number of normal products exceeds 20% of the 20 preliminary selection series, that is, 4. Avoiding the fact that hot-selling products are selected entirely due to high weight, resulting in inaccurate recommendation results. Using this mechanism, a good balance between accuracy and similarity can be achieved.
[0147] As an embodiment of the present application, the method further includes step S120: performing multi-level category prediction according to the user question, and the prediction result at least includes a first-level category and a second-level category. As shown in the "large category prediction". Figure 2
[0148] In this embodiment, step S1241 can include: in the case that the number of series belonging to the second-level category in the initial prediction series is less than or equal to the predetermined second-level category preliminary selection number (for example, 20% of 20, 4), taking all series belonging to the second-level category in the initial prediction series to join the preliminary selection series; in the case that the number of series belonging to the second-level category in the initial prediction series exceeds the second-level category preliminary selection number, taking second-level category preliminary selection number of series belonging to the second-level category in the initial prediction series according to the series score to join the preliminary selection series.
[0149] The mechanism of step S1241 can ensure that the number of second-level category predictions exceeds 20% at least in the 20 preliminary selection series. For example, the user wants to recommend a filter core, and the second-level category obtained through category prediction is a filter core. However, when the vector is calculated, a large number of filter features may be described, and a large number of filter products may appear in the vector similarity calculation. And because the filter is a hot-selling product and the filter core is not a hot-selling product, the score of the filter is generally higher than that of the filter core after weighting. Using this mechanism, it is ensured that there are 20% of filter cores in the preliminary selection series, which can ensure that the second-level category prediction products are recommended, and will not be excluded from the recommendation due to a lower score than the hot-selling product.
[0150] Of course, the category hierarchy of the series can not only include the first category and the second category, but can have more categories, for example, there are 5 levels of categories. Since the second category can usually locate what kind of goods, for example, the second category can see that the goods are cylinder, valve, filter element, etc., and the lower level is usually a description of the characteristics of the goods, so in the case of multiple levels of categories, the number of series of the second category is usually pre- guaranteed.
[0151] The series prediction is exemplarily described below in combination with specific examples.
[0152] Suppose the original question of the customer is: Can you recommend a 12mm adapter?
[0153] Suppose the second category prediction ( Figure 2 The large category prediction shown) predicts that it is an adapter.
[0154] Suppose the rewritten question after direct reasoning is: Recommend a 12mm joint.
[0155] Suppose the result of the network rewriting is: Recommend a 12mm joint.
[0156] Suppose the result of direct rewriting is to recommend a 12mm adapter.
[0157] Use the three questions to calculate the vector distance in the series description group, the series option group, and the series classification three groups respectively, and take the first 500 each.
[0158] Finally, take out the most 4500 series in the 9 groups according to the above mentioned rules, because the series in different groups can be repeated, after removing the duplicates, suppose finally there are 1000 series taken out. The series with the highest weight can get 30 points, this series is a hot-selling series, and each question appears in the series description, series option and series classification, that is 3*(5+3+2)=30 points. The minimum weight is 1, that is, a normal product only appears in the series option or series classification of a question.
[0159] After sorting the 1000 series, the 1000 series are grouped into a normal group (a group belonging to normal products) and a connector group (a group belonging to a predicted secondary category). There can be overlap between the two groups. The top 4 (20% of 20 = 4) are taken from the normal group and the secondary classification group. If the number of series in the group itself is not enough for 4, the entire group is taken out, and then the values are taken from the 1000 series according to the ranking, so that the data in the normal product and the predicted hit category each has at least 20%. The core purpose of this is to worry that after the hot-selling and on-stock scoring weighting, all the hot-selling products are pushed out, and the top-ranking normal products are pushed down. RAG (Retrieval-augmented Generation) calculation mainly looks at semantic similarity, without reasoning logic, and it is possible that the customer wants a filter cartridge, and according to the similarity calculation, it is possible that all the filters are pushed out, because the problem description can be "push a filter with a filter degree of 99.9%, a diameter of 9mm, and a receiving pressure of 1mpa". Most of the description in the entire problem is related to the filter. In the distance similarity calculation, it is extremely likely that all the filters are pushed out, and only a small amount of cartridges. The cartridge is the key predicted category when the front large model predicts. In this way, it is guaranteed that the cartridge will be pushed out, and in the last step of the large model taking 20 out of 3, the large model has reasoning logic, and according to the customer's question, the cartridge will be directly ranked in the front.
[0160] Reference Figure 3 which shows a flowchart of one example of an industrial product selection question and answer method according to an embodiment of the present application. As one embodiment of the present application, the classification can also include a common question, for example, the user asks whether a specific specified product model or series or large category can do something.
[0161] For example only, when the classification includes a common question, the specific implementation can be to configure a large model agent service, which functions to input a customer question, then perform question classification, and return one of the CatagoryEnum enumeration select-model, competitive-substitution, or common-question.
[0162] If the returned classification of the original question of the customer is common-question, it is determined whether to perform information supplementing according to whether the customer question contains a picture and a product code, and then the original question of the customer is supplemented with network information. All the supplemented information is used to call a reasoning large model to answer the question, and the answer is returned to the customer in a streaming manner.
[0163] In this embodiment, the method can further include, in the case where the classification is a common question answer, performing steps S141-S144.
[0164] S141. Query the product details corresponding to the product code in the user question in the product details database.
[0165] For example, a certain industrial product has more than 30 major categories, more than 200 secondary categories, and 6000 sub-series, a total of more than a million specific products, and more than 30,000 technical documents for the introduction of these brands. The 30,000 technical documents can be pre-extracted for knowledge to generate a knowledge graph and stored in the product details database.
[0166] In step S141, the relevant pre-knowledge can be extracted from the knowledge graph of the existing database according to the user question. The pre-knowledge can be used as a context together with the original user question to form a new supplemented question for subsequent steps.
[0167] As an embodiment of the present application, step S141 can include steps S1411-S1415.
[0168] S1411. Identify the to-be-confirmed code in the user question that meets the product code rule.
[0169] For example, the product code meets the regular expression “[A-Za-z0-9]+(?: [-][A-Za-z0-9]+)*”, that is, the product code is a combination of letters and numbers, and can be connected with “-”. The product code list List<String> modelNoList in the question is extracted by the regular expression.
[0170] For example, if the user question is “Please recommend a connector that matches CJ2B10-30Z-XXX”, the to-be-confirmed code “CJ2B10-30Z-XXX” can be extracted therefrom.
[0171] Generally, the combination of alphanumeric characters is more than 5 digits, and the combination is more likely to be a product code. Therefore, when determining whether the to-be-confirmed code is a product code, the number of code digits of the to-be-confirmed code can be screened first. If the number of code digits exceeds a predetermined number of digits (for example, 5 digits), it is considered that the to-be-confirmed code is likely to be a product code, and subsequent queries are performed.
[0172] S1412. Query the to-be-confirmed code in the pre-configured product detail database. If the to-be-confirmed code exists in the product detail database, perform step S1413. If the to-be-confirmed code does not exist in the product detail database, perform steps S1414-S1415.
[0173] S1413. Obtain the product details associated with the to-be-confirmed code from the product detail database.
[0174] For example, if the size of the modelNoList is greater than 0 and the product details can be checked according to the modelNo, the question = question + "Product description supplement:"; The for loop modelNoList queries the specific product details productDetail from the database according to the modelNo and supplements them into the question. In each loop body, question = question + "" + modelNo + ":" + productDetail.
[0175] S1414. Input the to-be-confirmed code into the product code recognition model, and output the output result of the product code recognition model to the user.
[0176] For example, if the user question is "I want an 80cm mold", and the 80cm product code is not found in the product detail database, the question "I want an 80cm mold" can be input into the product code recognition model. The 80cm in this question is a product code?
[0177] S1415. According to the feedback information of the user to the output result of the code recognition model, determine the product code, and obtain the associated product details from the product detail database.
[0178] For example, the user inputs an alphanumeric combination that matches the regular expression, but the code is not found in the product detail database. The code recognition model can be used to confirm whether the code is a product code. The model may prompt that there are missing digits or extra digits in the code, prompting the user to correct the code or re-edit the code.
[0179] S142. Input the user question into the pre-configured network query model to obtain the network knowledge point.
[0180] For example, a large model agent with networking function is pre-configured, which can return the contents of the top 5 websites on the Internet according to the customer's question, and extract key knowledge points from the website contents according to the customer's question, and finally return the comprehensive knowledge points searchKnowledges. Assemble the latest question question = question + "networking result supplement:" + searchKnowledges.
[0181] S143. Supplement the commodity details and the networking knowledge points to the user question to generate a completed question.
[0182] S144. Input the completed question into the pre-trained reasoning model to obtain and output the question answer information.
[0183] In another aspect, the embodiments of the present application also propose an industrial product selection and answering device, which comprises a memory and a processor, and the memory stores a computer program, and the computer program realizes the industrial product selection and answering method described in any of the above embodiments when executed by the processor.
[0184] In yet another aspect, the embodiments of the present application propose a computer program product comprising computer readable instructions which, when executed by a processor, perform the steps of the industrial product selection and answering method described in any of the above embodiments.
[0185] In yet another aspect, the embodiments of the present application propose a storage medium storing computer readable instructions which, when executed by a processor, perform the steps of the industrial product selection and answering method described in any of the above embodiments.
[0186] The industrial product selection and answering technical solution provided by the embodiments of the present application solves the professional problem solving of the industrial product vertical field in the field of industrial information and data processing technology. Different machine learning models (large models) are combined in the steps of the technical solution to realize the corresponding functions, and the input and output of the machine learning model are respectively innovatively adapted to the information processing and data operation of the technical solution of the present application, so that the professional problems in the field of industrial products can be selected and answers can be generated. The embodiments of the present application solve the problem of relying on manual selection and answering in the prior art and the inaccurate understanding of general large models, and improve the efficiency and accuracy.
[0187] The industrial product selection and answering technical solution proposed by the embodiments of the present application can be realized by application software (APP) development, and can be applied to an industrial product selection and answering robot or an industrial product selection and answering Internet search platform.
[0188] The foregoing description of implementations of the application has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the application be limited not with this detailed description, but rather by the claims appended hereto.
Claims
1. An industrial product selection question-and-answer method characterized by comprising: The method comprises: S110. classifying the user question, the classification comprising a selection question and a competitive product replacement question; when the classification is the selection question, performing steps S121-S126: S121. rewriting and converting the user question into M vector sub-questions, where M>1; S122. performing vector matching on the M vector sub-questions in a series description vector database, a series option vector database and a series classification vector database respectively to obtain M*3 groups of a first number of initial predicted series in each group; S123. weighting and scoring the initial predicted series according to the vector matching degree ranking in the group, market characteristics and the vector database from which the initial predicted series is obtained to obtain series scores; S124. selecting a second number of selected series from the initial predicted series according to the series scores; S125. determining the attributes and attribute values of the selected series according to the correlation between the attributes of each series in the selected series and the user question and the conflict rules between attribute values of different attributes, and determining the product code in the selected series according to the selected series, the attributes and the attribute values; S126. outputting the product code, when the classification is the competitive product replacement question, performing steps S131-S133: S131. extracting the competitive product code in the user question; S132. querying the replacement product code corresponding to the competitive product code in a competitive product database, and when the replacement product code exists, performing step S133, otherwise performing steps S121-S126; S133. outputting the replacement product code.
2. The method of claim 1, wherein, Step S124 comprises: S1241: obtaining a third number of preliminary selected series from the initial predicted series according to the series scores; S1242: calling a pre-trained series prediction inference model to select the second number of selected series from the third number of preliminary selected series in combination with the user question.
3. The method of claim 2, wherein, The market characteristics comprise hot-selling products, products in stock or ordinary products, wherein the weights of the hot-selling products and the products in stock are higher than the weight of the ordinary products, and S1241 comprises: when the number of ordinary product series in the initial predicted series is less than or equal to a pre-determined number of preliminary selected ordinary products, taking all the ordinary product series in the initial predicted series to join the preliminary selected series; when the number of ordinary product series in the initial predicted series exceeds the number of preliminary selected ordinary products, taking the number of preliminary selected ordinary products of ordinary product series in the initial predicted series to join the preliminary selected series.
4. The method of claim 2, wherein, The method further comprises step S120: performing multi-level category prediction according to the user question, the prediction result at least comprising a first-level category and a second-level category; and step S1241 comprises: when the number of series belonging to the second-level category in the initial predicted series is less than or equal to a pre-determined number of preliminary selected second-level categories, taking all the series belonging to the second-level category in the initial predicted series to join the preliminary selected series; when the number of series belonging to the second-level category in the initial predicted series exceeds the number of preliminary selected second-level categories, taking the number of preliminary selected second-level categories of series belonging to the second-level category in the initial predicted series to join the preliminary selected series.
5. The method of claim 1, wherein, The classification also includes general question answering, and the method further comprises, in the case that the classification is general question answering, performing steps S141-S144: S141. Querying the commodity details database for commodity details corresponding to the commodity code in the user question; S142. Inputting the user question into a pre-configured networked query model to obtain networked knowledge points; S143. Supplementing the commodity details and the networked knowledge points to the user question to generate a completed question; S144. Inputting the completed question into a pre-trained reasoning model to obtain and output question answering information.
6. The method of claim 5, wherein, Step S141 comprises: S1411. Identifying a to-be-confirmed code in the user question that conforms to the commodity code rule; S1412. Querying the pre-configured commodity details database for the to-be-confirmed code, and if the to-be-confirmed code exists in the commodity details database, performing step S1413, and if the to-be-confirmed code does not exist in the commodity details database, performing steps S1414-S1415; S1413. Obtaining commodity details associated with the to-be-confirmed code from the commodity details database; S1414. Inputting the to-be-confirmed code into a commodity code recognition model, and outputting the output result of the commodity code recognition model to the user; S1415. Determining the commodity code according to the feedback information of the user for the output result of the code recognition model, and obtaining the associated commodity details from the commodity details database.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: In the case that the user inputs the text content and the multimedia content, extracting knowledge points in the multimedia content according to the information in the text content; Adding the text content and the extracted knowledge points in the multimedia content to the user question.
8. The method according to any one of claims 1-6, characterized in that, Step S123 comprises the following steps: S1231. Obtaining a base score of each series according to the vector matching degree ranking of the initial prediction series in the group; S1232. Determining a weight according to the market characteristics of the series and the vector database from which the series comes; S1233. Weighting and calculating the base score according to the weight to obtain the series score.
9. The method according to any one of claims 1-6, characterized in that, Step S125 comprises the following steps: S1251. Judging whether each attribute of each series in the selected series is related to the user question, and if so, selecting the attribute, and if not, not selecting the attribute; S1252. Filling the selected attribute and the attribute value of the attribute extracted from the user question into the attribute table of the selected series; S1253. According to the filled attributes and attribute values in the attribute table and the conflict rules between attribute values of different attributes determined in advance, verifying and / or editing the filled attributes and attribute values, and determining the attribute values of the unfilled attributes, thereby obtaining the attribute table of the selected series; S1254. Determining the commodity code in the selected series according to the attributes and attribute values in the attribute table.
10. The method according to any one of claims 1-6, characterized in that, M=3, and step S121 comprises: S1211. Preliminarily rewriting the user question by querying the pre-configured series database to obtain a preliminarily rewritten question; S1212. First rewriting the preliminarily rewritten question by networked query to generate a first sub-question; S1213. A second rephrasing of the preliminary rephrased question is generated by directly modifying the preliminary rephrased question through semantics; S1214. A third rephrasing of the preliminary rephrased question is generated by combining the knowledge base and deep reasoning; S1215. The first, second, and third sub-questions are converted into three vector sub-questions, respectively, wherein each rephrasing adds one or more of a series name, a query subject, a series description, a series attribute, a product-related description, a product function, a performance characteristic, a specification information, and a product application scenario.
11. The method according to any one of claims 1-6, characterized in that, The method further comprises the following steps: S151. According to the product code, the detailed information of the product corresponding to the product code is queried; S152. The detailed information of the product and the user question are input into a selection model to obtain an optimal product code; S153. The optimal product code is output.
12. The method of any one of claims 1-6, wherein, After step S122, the method further comprises: performing a deduplication operation on the obtained M*3 groups of the first number of initial prediction series in each group, and taking the initial prediction series after the deduplication operation as the initial prediction series in subsequent steps S123-S124.
13. An industrial product selection question answering apparatus characterized by comprising: The device comprises a memory and a processor, and the memory stores a computer program, which, when executed by the processor, implements the method of any one of claims 1-12.
14. A computer program product comprising computer readable instructions, characterized in that, When the instructions are run by the processor, the steps of the method according to any one of claims 1-12 are performed.
15. A storage medium storing computer readable instructions, characterized in that, When the instructions are run by the processor, the steps of the method according to any one of claims 1-12 are performed.
Citation Information
Patent Citations
Commodity selection method and system and computer readable storage medium
CN112613953A
Competitive product identification method and system based on search result ranking
CN119202355A