3C production line knowledge retrieval method and device
By constructing a knowledge vector base and training the knowledge retrieval model in stages, the problems of inaccurate understanding and insufficient reasoning ability in the knowledge management of 3C production lines were solved, achieving accurate question answering and complex logical reasoning, and improving knowledge retrieval efficiency.
Patent Information
- Application Number
- CN202511119693.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-12-16
AI Technical Summary
Existing technologies cannot accurately understand user intent in 3C production line knowledge management, nor can they support multi-turn dialogues and complex logical reasoning, resulting in a low degree of matching between knowledge retrieval results and user needs.
We construct a knowledge vector library, extract knowledge question-answer pairs through a large language model, and train the knowledge retrieval model in stages to improve domain knowledge learning, document summarization, and question-answer generation capabilities. We then combine a hybrid retrieval method based on semantic similarity and keyword recall to generate standard answers.
It achieves accurate question answering, multi-turn dialogue, and complex logical reasoning based on natural language, significantly improving the knowledge retrieval efficiency and problem-solving capabilities of 3C production lines.
Smart Images

Figure CN121144449A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge management technology, and in particular to a knowledge retrieval method and apparatus for 3C production lines. Background Technology
[0002] As the level of intelligence in 3C (computer, communication, and consumer electronics) production lines continues to increase, the need for effective management and utilization of the massive amounts of knowledge generated during the production process is becoming increasingly urgent. This knowledge typically exists in the form of equipment operating procedures, maintenance records, and anomaly handling documents, scattered across various documents. Therefore, building a knowledge base capable of efficiently retrieving and accurately answering questions related to the production line is crucial for improving production efficiency and quality.
[0003] In existing technologies, some enterprises have attempted to use traditional Frequently Asked Questions (FAQ) systems or keyword search engines to assist in knowledge retrieval. However, these solutions have significant drawbacks: First, they cannot accurately understand the natural language questions posed by users, resulting in a low degree of matching between search results and user intent. This is because keyword search relies solely on literal matching, while FAQ systems require pre-defining all possible questions and answers, making it difficult to cover the various complex situations encountered in actual production. Second, they cannot support multi-turn dialogues and complex logical reasoning, making it difficult to meet users' needs for in-depth understanding of the issues.
[0004] Therefore, a more intelligent knowledge base construction solution is needed, which can fully understand user intent, efficiently retrieve relevant documents, and perform reasoning and generation, thereby improving the knowledge management level of 3C production lines. Summary of the Invention
[0005] This invention provides a knowledge retrieval method and apparatus for 3C production lines, which solves the problems of inaccurate understanding and insufficient reasoning ability in traditional knowledge retrieval methods in 3C production line knowledge management. It can achieve accurate question answering based on natural language, support for multi-turn dialogue, and complex logical reasoning, thereby significantly improving knowledge retrieval efficiency and problem-solving ability.
[0006] This invention provides a knowledge retrieval method for 3C production lines, comprising: constructing a knowledge vector library, the knowledge vector library including vectorized text blocks generated from original production line documents; extracting information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; training the domain knowledge learning ability of a knowledge retrieval model based on the knowledge question-answer pairs to obtain a first-stage knowledge retrieval model; training the document summarization ability of the first-stage model based on the triple data output by the large language model to obtain a second-stage knowledge retrieval model; training the question-answer generation ability of the second-stage knowledge retrieval model based on the knowledge question-answer pairs and the triple data to obtain a third-stage knowledge retrieval model; obtaining a target text block from the knowledge vector library based on a user query question; inputting the user query question and the target text block into the third-stage knowledge retrieval model to generate a standard answer; wherein, the number of parameters of the large language model is greater than the number of parameters of the knowledge retrieval model.
[0007] According to a 3C production line knowledge retrieval method provided by the present invention, the construction of a knowledge vector library includes: receiving the original production line document; performing noise reduction and enhancement processing on the original production line document, and extracting information from the processed document to obtain document information; segmenting the document information based on document structure and semantic similarity to obtain multiple text blocks; and performing vectorization processing and persistent storage on each text block to obtain the knowledge vector library.
[0008] According to a knowledge retrieval method for a 3C production line provided by the present invention, the step of extracting information from the vectorized text block through a large language model to obtain multiple knowledge question-answer pairs includes: inputting the vectorized text block into the large language model, and using prompt technology to make the large language model ask and answer questions itself to extract the multiple knowledge question-answer pairs.
[0009] According to a knowledge retrieval method for 3C production lines provided by the present invention, the process of obtaining the triplet data includes: inputting the questions and corresponding vectorized text blocks in the knowledge question-answer pair into the large language model to generate triplet data containing questions, text blocks, and summaries.
[0010] According to a 3C production line knowledge retrieval method provided by the present invention, the step of obtaining target text blocks from the knowledge vector library based on user query questions includes: obtaining M vectorized text blocks based on user query questions and a hybrid retrieval method combining semantic similarity recall and keyword recall; extracting target summary information of the M vectorized text blocks through the large language model; calculating the similarity between the target summary information and the user query questions, and filtering according to a similarity threshold to obtain N vectorized text blocks; and reordering the N vectorized text blocks according to relevance using a target reordering algorithm to obtain the target text block with the highest matching degree to the user query questions; wherein M and N are only positive integers, and M is greater than or equal to N.
[0011] According to the knowledge retrieval method for 3C production lines provided by the present invention, the target reordering algorithm is a ranking learning algorithm or a large model scoring mechanism.
[0012] This invention also provides a 3C production line knowledge retrieval device, comprising the following modules: a knowledge vectorization module, a model training module, and a model inference module; the knowledge vectorization module is used to construct a knowledge vector library, the knowledge vector library including vectorized text blocks generated from original production line documents; the model training module is used to extract information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; based on the knowledge question-answer pairs, the domain knowledge learning ability of the knowledge retrieval model is trained to obtain a first-stage knowledge retrieval model; based on the triple data output by the large language model, the document summarization ability of the first-stage model is trained to obtain a second-stage knowledge retrieval model; based on the knowledge question-answer pairs and the triple data, the question-answer generation ability of the second-stage knowledge retrieval model is trained to obtain a third-stage knowledge retrieval model; the model inference module is used to obtain target text blocks from the knowledge vector library based on user query questions, input the user query questions and the target text blocks into the third-stage knowledge retrieval model, and generate standard answers; wherein, the number of parameters of the large language model is greater than the number of parameters of the knowledge retrieval model.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the 3C production line knowledge retrieval methods described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the 3C production line knowledge retrieval method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described 3C production line knowledge retrieval methods.
[0016] The 3C production line knowledge retrieval method and apparatus provided by this invention transforms scattered production line documents into semantically understandable structured knowledge by constructing a knowledge vector library containing vectorized text blocks. This overcomes the limitations of traditional retrieval methods that rely solely on keyword matching, accurately capturing the deep correlation between user questions and document content, and solving the problem of inaccurate natural language understanding. It utilizes a large language model to extract knowledge question-answer pairs and trains the knowledge retrieval model in stages: first, it solidifies the domain knowledge foundation; then, it strengthens document summarization capabilities; and finally, it enhances question-answer generation and logical reasoning abilities. This enables the model to extract key information from complex documents and integrate multi-source knowledge to form a coherent reasoning chain, effectively compensating for the insufficient reasoning capabilities of traditional methods. Simultaneously, the collaborative work between the large language model and the lightweight retrieval model balances training data quality with practical application efficiency, ensuring rapid response to query needs on the production floor. This achieves accurate question answering, multi-turn dialogue, and complex reasoning based on natural language, significantly improving the efficiency and problem-solving capabilities of 3C production line knowledge retrieval. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts illustrating the 3C production line knowledge retrieval method provided by the present invention; Figure 2 This is the second flowchart of the 3C production line knowledge retrieval method provided by the present invention; Figure 3 This is the third flowchart of the 3C production line knowledge retrieval method provided by the present invention; Figure 4 This is the fourth flowchart of the 3C production line knowledge retrieval method provided by the present invention; Figure 5 This is a schematic diagram of the structure of the 3C production line knowledge retrieval device provided by the present invention; Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0021] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0022] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0023] This application describes some exemplary embodiments for illustrative purposes. It should be understood that this application may be implemented in other ways not specifically shown in the accompanying drawings.
[0024] like Figure 1As shown, this application provides a 3C production line knowledge retrieval method, which can be applied to a 3C production line knowledge retrieval device. The 3C production line knowledge retrieval method may include steps S101-S103: S101, 3C production line knowledge retrieval device constructs knowledge vector base.
[0025] The aforementioned knowledge vector base includes vectorized text blocks generated from the original production line documents.
[0026] Optionally, the 3C production line knowledge retrieval device constructs a knowledge vector library, including: receiving the original production line document; performing noise reduction and enhancement processing on the original production line document, and extracting information from the processed document to obtain document information; segmenting the document information based on document structure and semantic similarity to obtain multiple text blocks; and vectorizing and persistently storing each text block to obtain the knowledge vector library.
[0027] Specifically, the daily operation of a 3C production line generates a large number of technical documents, such as Standard Operating Procedures (SOPs), maintenance work orders, and user manuals. These documents come in various formats, including but not limited to PDF, HTML, JSON, and PPT, and can even be images containing key information. They carry various kinds of knowledge necessary for the smooth operation of the production line, such as how to operate the equipment and how to troubleshoot and repair malfunctions. By building a knowledge vector base, S101 can transform these scattered and diverse documents into structured knowledge that can be used efficiently, laying the foundation for subsequent intelligent knowledge retrieval.
[0028] The specific processing steps are as follows: First, the original production line documents undergo noise reduction and enhancement. For text documents, the encoding format is uniformly set to UTF-8, and the file content is parsed using pdfminer. When text is encountered in images, Optical Character Recognition (OCR) technology is used to extract it. At the same time, redundant information such as headers, footers, watermarks, and garbled characters are removed. For example, in an equipment manual, there may be many duplicate cover template pages, which will be cleaned up. For image documents, such as maintenance records for some old equipment that are handwritten in photos, blurry and low-contrast images can first undergo image noise reduction and enhancement operations such as sharpening, watermark removal, and sharpening. Then, OCR or multimodal models are used to extract the text. For example, a blurry photo of a fault scene can be clearly extracted after processing to extract key information such as "patch head jamming". Next comes document segmentation. To ensure the semantic integrity of each segment, it can be segmented according to the hierarchical headings in the document, such as "1.1 Startup Procedures" and "1.2 Shutdown Procedures" in a device manual. If a segment is too long, models like BERT are used to calculate the similarity between sentences, grouping sentences with similar meanings together. For example, the troubleshooting process for the "overload" alarm in a maintenance work order will not be broken into fragments but will exist as a complete segment. Finally, the segmented text blocks are converted into semantic vectors that computers can recognize using embedding models such as BERT, Sentence-BERT, and OpenAI Embedding. This is like creating a unique "semantic code" for each segment, which is then stored in specialized knowledge vector libraries such as FAISS, Milvus, Weaviate, and Pinecone to form a knowledge vector library.
[0029] In this way, on the one hand, the originally messy documents are preprocessed and segmented, removing redundant information and retaining the core content; on the other hand, the semantic vector conversion allows the system to retrieve based on the meaning of the content, rather than just looking at keywords, thereby improving retrieval accuracy.
[0030] S102, the 3C production line knowledge retrieval device extracts information from the vectorized text block using a large language model to obtain multiple knowledge question-answer pairs.
[0031] Optionally, the 3C production line knowledge retrieval device extracts information from the vectorized text block using a large language model to obtain multiple knowledge question-answer pairs, including: inputting the vectorized text block into the large language model, and using prompt technology to make the large language model ask and answer questions itself to extract the multiple knowledge question-answer pairs.
[0032] Specifically, leveraging the powerful semantic understanding and generation capabilities of large language models, potential question-and-answer relationships can be automatically mined from processed vectorized text blocks, efficiently generating content for knowledge retrieval models to learn. Therefore, such as... Figure 2 As shown, vectorized text blocks from the knowledge vector library can be input into a large language model with a large number of parameters (deepseek-r1:72b). Then, a prompt can guide the model to perform self-questioning and answering. For example, the prompt might state, "You are a technical expert on a 3C production line. Based on this content about troubleshooting pick-and-place machines, please raise as many questions as possible that operators might encounter and provide accurate answers." Under this guidance, the large language model will proactively generate knowledge question-and-answer pairs based on the information in the text. Finally, the generated knowledge question-and-answer pairs can be stored in the knowledge vector library.
[0033] It should be noted that the entire process does not require any pre-set rules and is completed autonomously by the model's understanding of the text content. The generated question-answer pairs will be stored in the knowledge vector library along with the vectorized text blocks, becoming the basic data for subsequent training of the lightweight knowledge retrieval model.
[0034] In this way, not only can the knowledge points in the document be covered more comprehensively, but the generated question-and-answer pairs can also be more in line with the actual needs of the production site, ensuring that the model trained later can better solve the real problems of front-line personnel. At the same time, it greatly reduces the dependence on manually labeled data and improves information processing efficiency and automation.
[0035] The S103 3C production line knowledge retrieval device trains the domain knowledge learning ability of the knowledge retrieval model based on the knowledge question-answer pairs to obtain a first-stage knowledge retrieval model. Based on the triple data output by the large language model, it trains the document summarization ability of the first-stage model to obtain a second-stage knowledge retrieval model. Based on the knowledge question-answer pairs and the triple data, it trains the question-answer generation ability of the second-stage knowledge retrieval model to obtain a third-stage knowledge retrieval model.
[0036] The number of parameters in the large language model is greater than the number of parameters in the knowledge retrieval model.
[0037] First, such as Figure 2 As shown, the 3C production line knowledge retrieval device can train a lightweight knowledge retrieval model's domain knowledge learning ability based on knowledge question-answer pairs. In this stage, the model takes question Q from the knowledge question-answer pair as input and answer A as output, aiming to enable the model to master the basic knowledge of the 3C production line. This knowledge forms the basis for the model's professional domain knowledge and reasoning ability. The knowledge question-answer pairs are input into the knowledge retrieval model (deepseek-r1:7b) for fine-tuning, resulting in a first-stage knowledge retrieval model (deepseek-r1:7b sft1).
[0038] Secondly, such as Figure 2 As shown, the 3C production line knowledge retrieval device can train the document summarization capability of a one-stage knowledge retrieval model (deepseek-r1:7b sft1) to obtain a two-stage knowledge retrieval model. Specifically, as... Figure 3 As shown, the question A and its corresponding vectorized text block from the knowledge question-answering pair are first input into the large language model (deepseek-r1:72b) to generate triplet data containing the question, text block, and summary. This process aims to train the large language model's ability to find clues related to the question and filter noisy documents; for example... Figure 2 As shown, the generated triplet data is then used to train the first-stage knowledge retrieval model (deepseek-r1:7b sft1) to enable it to have document summarization capabilities, thus obtaining the second-stage knowledge retrieval model (deepseek-r1:7b sft2).
[0039] Finally, as Figure 2 As shown, the 3C production line knowledge retrieval device can be based on a two-stage knowledge retrieval model (deepseek-r1:7b sft2), combined with the question-and-answer generation capabilities of the model trained using knowledge question-and-answer pairs and triplet data, to obtain a three-stage knowledge retrieval model (deepseek-r1:7b sft3). This training stage takes questions and summaries as input and answers as output, aiming to improve the model's ability to summarize and generalize answers to questions. Through training, the final three-stage knowledge retrieval model is obtained.
[0040] It should be noted that this phased and progressive training method allows the model's capabilities to gradually focus on the understanding, refinement, and application of production line knowledge. This ensures both professional depth and on-site practicality through lightweight design, effectively solving the problems of inaccurate answers and difficult deployment of general-purpose models in professional fields.
[0041] S104, the 3C production line knowledge retrieval device obtains target text blocks from the knowledge vector library based on user query questions, inputs the user query questions and the target text blocks into a three-stage knowledge retrieval model, and generates standard answers.
[0042] Optionally, the 3C production line knowledge retrieval device obtains target text blocks from the knowledge vector database based on the user query question, including: obtaining M vectorized text blocks based on the user query question and a hybrid retrieval method combining semantic similarity recall and keyword recall; extracting target summary information from the M vectorized text blocks using the large language model; calculating the similarity between the target summary information and the user query question, and filtering according to a similarity threshold to obtain N vectorized text blocks; and reordering the N vectorized text blocks according to relevance using a target reordering algorithm to obtain the target text block with the highest matching degree to the user query question; wherein M and N are only positive integers, and M is greater than or equal to N.
[0043] Specifically, such as Figure 4 As shown, the 3C production line knowledge retrieval device can, based on the user's query, employ a hybrid retrieval method combining semantic similarity recall and keyword recall to obtain M vectorized text blocks, thereby expanding the retrieval scope and achieving a wide-ranging "complete search," ensuring that as many relevant documents as possible are recalled. Then, using a large language model, target summary information is extracted from the above M vectorized text blocks, and the similarity between this target summary information and the user's query is calculated. Based on a similarity threshold, these are filtered to obtain N vectorized text blocks. This process utilizes methods such as distillation and semantic similarity to achieve "optimization," obtaining more accurate similarity scores and effectively filtering noisy text blocks. Finally, a target reordering algorithm based on a ranking learning algorithm or a large model scoring mechanism is used to reorder the N vectorized text blocks according to relevance, further optimizing the retrieval results to achieve "precision," obtaining the target text block with the highest matching degree to the user's query.
[0044] It should be noted that this progressive retrieval logic of "first find all, then filter the best, and finally sort accurately" not only avoids missing key knowledge due to a narrow retrieval scope, but also eliminates noise and focuses on the core through layers of filtering, ultimately making the contextual information obtained by the model more accurate and effective, thereby improving the accuracy and reliability of intelligent question answering.
[0045] Optionally, ultimately, as Figure 4 As shown, the user query question and the target text block are taken as input and fed into the three-stage knowledge retrieval model (deepseek-r1:7b sft3) that has undergone multi-stage fine-tuning to generate the final natural language answer.
[0046] In this embodiment, a knowledge vector library containing vectorized text blocks is constructed to transform scattered production line documents into semantically understandable structured knowledge. This overcomes the limitations of traditional retrieval methods that rely solely on keyword matching, accurately capturing the deep relationship between user questions and document content, and solving the problem of inaccurate natural language understanding. A large language model is used to extract knowledge question-answer pairs, and the knowledge retrieval model is trained in stages. First, a solid foundation of domain knowledge is established, then document summarization capabilities are strengthened, and finally, question-answer generation and logical reasoning capabilities are improved. This enables the model to extract key information from complex documents and integrate multi-source knowledge to form a coherent reasoning chain, effectively compensating for the shortcomings of traditional methods in reasoning ability. Simultaneously, the collaborative work between the large language model and the lightweight retrieval model balances training data quality and practical application efficiency, ensuring that the production site can quickly respond to query needs. This achieves accurate question answering, multi-turn dialogue, and complex reasoning based on natural language, significantly improving the efficiency of knowledge retrieval and problem-solving capabilities in the 3C production line.
[0047] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0048] It should be noted that the device in the embodiments of this application includes a virtual device and a physical device. The virtual device can be a 3C production line knowledge retrieval device, and the physical device can include electronic devices, computer storage media, and computer program products.
[0049] The 3C production line knowledge retrieval method provided in this application can be executed by a 3C production line knowledge retrieval device or a control module for 3C production line knowledge retrieval within that device. This application uses the execution of the 3C production line knowledge retrieval method by a 3C production line knowledge retrieval device as an example to illustrate the 3C production line knowledge retrieval device provided in this application.
[0050] It should be noted that the embodiments of this application can divide the 3C production line knowledge retrieval device into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. Optionally, the module division in the embodiments of this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0051] like Figure 5 As shown in the figure, this application embodiment provides a 3C production line knowledge retrieval device 500. The 3C production line knowledge retrieval device 500 includes: a knowledge vectorization module 501, a model training module 502, and a model reasoning module 503.
[0052] The knowledge vectorization module 501 is used to construct a knowledge vector library, which includes vectorized text blocks generated from the original production line document. The model training module 502 is used to extract information from the vectorized text block using a large language model to obtain multiple knowledge question-answer pairs; based on the knowledge question-answer pairs, train the domain knowledge learning ability of the knowledge retrieval model to obtain a first-stage knowledge retrieval model; based on the triple data output by the large language model, train the document summarization ability of the first-stage model to obtain a second-stage knowledge retrieval model; and based on the knowledge question-answer pairs and the triple data, train the question-answer generation ability of the second-stage knowledge retrieval model to obtain a third-stage knowledge retrieval model. The model reasoning module 503 is used to obtain target text blocks from the knowledge vector library based on user query questions, input the user query questions and target text blocks into a three-stage knowledge retrieval model, and generate standard answers. The number of parameters in the large language model is greater than the number of parameters in the knowledge retrieval model.
[0053] Optionally, the knowledge vectorization module 501 is used to receive the original production line document; perform noise reduction and enhancement processing on the original production line document, and extract information from the processed document to obtain document information; perform document segmentation on the document information based on document structure and semantic similarity to obtain multiple text blocks; and perform vectorization processing and persistent storage on each text block to obtain the knowledge vector library.
[0054] Optionally, the step of extracting information from the vectorized text block using a large language model to obtain multiple knowledge question-answer pairs includes: inputting the vectorized text block into the large language model, and using prompt technology to make the large language model ask and answer questions on its own to extract the multiple knowledge question-answer pairs.
[0055] Optionally, the process of obtaining the triplet data includes: inputting the questions and corresponding vectorized text blocks in the knowledge question-answering pair into the large language model to generate triplet data containing questions, text blocks, and summaries.
[0056] Optionally, the model inference module 503 is used to obtain M vectorized text blocks based on the user query question and a hybrid retrieval method combining semantic similarity recall and keyword recall; extract target summary information of the M vectorized text blocks through the large language model; calculate the similarity between the target summary information and the user query question, and filter according to the similarity threshold to obtain N vectorized text blocks; and reorder the N vectorized text blocks according to relevance using a target reordering algorithm to obtain the target text block with the highest matching degree to the user query question; wherein M and N are only positive integers, and M is greater than or equal to N.
[0057] Optionally, the target reordering algorithm is a ranking learning algorithm or a large model scoring mechanism.
[0058] In this embodiment, a knowledge vector library containing vectorized text blocks is constructed to transform scattered production line documents into semantically understandable structured knowledge. This overcomes the limitations of traditional retrieval methods that rely solely on keyword matching, accurately capturing the deep relationship between user questions and document content, and solving the problem of inaccurate natural language understanding. A large language model is used to extract knowledge question-answer pairs, and the knowledge retrieval model is trained in stages. First, a solid foundation of domain knowledge is established, then document summarization capabilities are strengthened, and finally, question-answer generation and logical reasoning capabilities are improved. This enables the model to extract key information from complex documents and integrate multi-source knowledge to form a coherent reasoning chain, effectively compensating for the shortcomings of traditional methods in reasoning ability. Simultaneously, the collaborative work between the large language model and the lightweight retrieval model balances training data quality and practical application efficiency, ensuring that the production site can quickly respond to query needs. This achieves accurate question answering, multi-turn dialogue, and complex reasoning based on natural language, significantly improving the efficiency of knowledge retrieval and problem-solving capabilities in the 3C production line.
[0059] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logic instructions in the memory 630 to execute a 3C production line knowledge retrieval method. This method includes: constructing a knowledge vector library, which includes vectorized text blocks generated from original production line documents; extracting information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; training the domain knowledge learning ability of a knowledge retrieval model based on the knowledge question-answer pairs to obtain a first-stage knowledge retrieval model; training the document summarization ability of the first-stage model based on the triplet data output by the large language model to obtain a second-stage knowledge retrieval model; training the question-answer generation ability of the second-stage knowledge retrieval model based on the knowledge question-answer pairs and the triplet data to obtain a third-stage knowledge retrieval model; obtaining a target text block from the knowledge vector library based on a user query question; inputting the user query question and the target text block into the third-stage knowledge retrieval model to generate a standard answer; wherein the number of parameters in the large language model is greater than the number of parameters in the knowledge retrieval model.
[0060] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0061] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the 3C production line knowledge retrieval method provided by the above methods. The method includes: constructing a knowledge vector library, which includes vectorized text blocks generated from original production line documents; extracting information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; training the domain knowledge learning ability of the knowledge retrieval model based on the knowledge question-answer pairs to obtain a first-stage knowledge retrieval model; training the document summarization ability of the first-stage model based on the triple data output by the large language model to obtain a second-stage knowledge retrieval model; training the question-answer generation ability of the second-stage knowledge retrieval model based on the knowledge question-answer pairs and the triple data to obtain a third-stage knowledge retrieval model; obtaining a target text block from the knowledge vector library based on a user query question; inputting the user query question and the target text block into the third-stage knowledge retrieval model to generate a standard answer; wherein the number of parameters of the large language model is greater than the number of parameters of the knowledge retrieval model.
[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the 3C production line knowledge retrieval method provided by the above methods. This method includes: constructing a knowledge vector library, the knowledge vector library including vectorized text blocks generated from original production line documents; extracting information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; training the domain knowledge learning ability of a knowledge retrieval model based on the knowledge question-answer pairs to obtain a first-stage knowledge retrieval model; training the document summarization ability of the first-stage model based on the triplet data output by the large language model to obtain a second-stage knowledge retrieval model; training the question-answer generation ability of the second-stage knowledge retrieval model based on the knowledge question-answer pairs and the triplet data to obtain a third-stage knowledge retrieval model; obtaining a target text block from the knowledge vector library based on a user query question; inputting the user query question and the target text block into the third-stage knowledge retrieval model to generate a standard answer; wherein the number of parameters of the large language model is greater than the number of parameters of the knowledge retrieval model.
[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A knowledge retrieval method for 3C production lines, characterized in that, include: Construct a knowledge vector library, which includes vectorized text blocks generated from the original production line documents; Information is extracted from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; Based on the knowledge question-answer pairs, the domain knowledge learning ability of the knowledge retrieval model is trained to obtain a first-stage knowledge retrieval model. Based on the triple data output by the large language model, the document summarization ability of the first-stage model is trained to obtain a second-stage knowledge retrieval model. Based on the knowledge question-answer pairs and the triple data, the question-answer generation ability of the second-stage knowledge retrieval model is trained to obtain a third-stage knowledge retrieval model. Based on the user query question, the target text block is obtained from the knowledge vector library. The user query question and the target text block are input into a three-stage knowledge retrieval model to generate a standard answer. The number of parameters in the large language model is greater than the number of parameters in the knowledge retrieval model.
2. The 3C production line knowledge retrieval method according to claim 1, characterized in that, The construction of the knowledge vector base includes: Receive the original production line document; The original production line document is subjected to noise reduction and enhancement processing, and information is extracted from the processed document to obtain document information; Based on document structure and semantic similarity, the document information is segmented to obtain multiple text blocks; Each text block is vectorized and persistently stored to obtain the knowledge vector library.
3. The 3C production line knowledge retrieval method according to claim 1 or 2, characterized in that, The process of extracting information from the vectorized text block using a large language model yields multiple knowledge question-answer pairs, including: The vectorized text block is input into the large language model, and the prompt technique is used to make the large language model ask and answer questions on its own in order to extract the multiple knowledge question-answer pairs.
4. The 3C production line knowledge retrieval method according to claim 1, characterized in that, The process of obtaining the triplet data includes: The questions and corresponding vectorized text blocks in the knowledge question-answering pairs are input into the large language model to generate triplet data containing questions, text blocks, and summaries.
5. The 3C production line knowledge retrieval method according to claim 1, characterized in that, The step of retrieving the target text block from the knowledge vector base based on the user's query question includes: Based on the user query question, and combined with a hybrid retrieval method of semantic similarity recall and keyword recall, M vectorized text blocks are obtained; The target summary information of the M vectorized text blocks is extracted using the large language model. Calculate the similarity between the target summary information and the user query question, and filter according to the similarity threshold to obtain N vectorized text blocks; The N vectorized text blocks are reordered according to their relevance using a target reordering algorithm to obtain the target text block that best matches the user's query question. Where M and N are only positive integers, and M is greater than or equal to N.
6. The 3C production line knowledge retrieval method according to claim 5, characterized in that, The target reordering algorithm is a sorting learning algorithm or a large model scoring mechanism.
7. A knowledge retrieval device for a 3C production line, characterized in that, include: The module includes knowledge vectorization, model training, and model inference. The knowledge vectorization module is used to construct a knowledge vector library, which includes vectorized text blocks generated from the original production line documents. The model training module is used to extract information from the vectorized text blocks using a large language model to obtain multiple knowledge question-answer pairs; based on the knowledge question-answer pairs, the domain knowledge learning ability of the knowledge retrieval model is trained to obtain a first-stage knowledge retrieval model; based on the triplet data output by the large language model, the document summarization ability of the first-stage model is trained to obtain a second-stage knowledge retrieval model; based on the knowledge question-answer pairs and the triplet data, the question-answer generation ability of the second-stage knowledge retrieval model is trained to obtain a third-stage knowledge retrieval model. The model reasoning module is used to obtain target text blocks from the knowledge vector library based on user query questions, input the user query questions and target text blocks into a three-stage knowledge retrieval model, and generate standard answers. The number of parameters in the large language model is greater than the number of parameters in the knowledge retrieval model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the 3C production line knowledge retrieval method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the 3C production line knowledge retrieval method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the 3C production line knowledge retrieval method as described in any one of claims 1 to 6.