Retrieval enhancement generation method and system based on port equipment maintenance
By using the retrieval enhancement generation method in port equipment maintenance, the problems of complex failure modes and diagnosis dependence on experience are solved, efficient and accurate fault location and processing are achieved, and maintenance efficiency and equipment operation efficiency are improved.
Patent Information
- Application Number
- CN202510843579.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-23
AI Technical Summary
The failure modes in port equipment maintenance are complex, fault diagnosis relies on experience, and technical documentation is scattered, resulting in low maintenance efficiency, serious equipment downtime losses, and difficulty in achieving standardization and popularization.
A retrieval enhancement generation method based on port equipment maintenance stores equipment data in a vector database through data preprocessing and indexing. A pre-trained text embedding model is used to convert user query text into a high-dimensional real-valued vector, retrieve the most matching fault knowledge fragment, and optimize the generation of fault location results and processing suggestions.
It improves the accuracy and efficiency of fault handling, reduces equipment downtime, improves port operation efficiency and equipment maintenance level, and ensures the accuracy and reliability of information.
Smart Images

Figure CN120687465A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and more specifically, relates to a retrieval enhancement generation method and system based on port equipment maintenance. Background Art
[0002] In the port operating environment, various large and heavy mechanical equipment such as quay cranes, yard cranes, gantry cranes, automated guided vehicles (AGVs) and reach stackers are key facilities to ensure the efficient operation of the port.
[0003] However, the maintenance and repair of these mechanical equipment face numerous challenges. First, the complexity and diversity of failure modes often require technicians to rely on extensive experience and expertise when diagnosing, which greatly increases the difficulty and time cost of troubleshooting. Second, technical documentation is voluminous and scattered, making it difficult to access, making it difficult for technicians to quickly obtain accurate information when needed, affecting maintenance efficiency. In addition, diagnosis and decision-making are highly dependent on the experience of senior technicians, which to a certain extent limits the standardization and popularization of maintenance work and increases the reliance on specific highly skilled personnel. Even more seriously, the loss of port operating efficiency caused by equipment downtime due to poor fault handling efficiency has become a key factor restricting the overall economic benefits and competitiveness of the port.
[0004] Therefore, how to accurately locate the fault mode and improve the efficiency of fault handling has become a technical problem that needs to be solved urgently in the field of port equipment maintenance. Summary of the Invention
[0005] In view of the defects of the existing technology, the purpose of this application is to provide a retrieval enhancement generation method and system based on port equipment maintenance, aiming to solve the problems in the existing technology.
[0006] To achieve the above objectives, in a first aspect, the present application provides a retrieval enhancement generation method based on port equipment maintenance, comprising: Acquiring equipment data based on the knowledge carrier of the port equipment, performing data preprocessing and data indexing on the equipment data, and storing the processed data in a vector database or index; Use the pre-trained text embedding model to convert the fault query text entered by the user into a high-dimensional real-valued vector; Retrieving the fault knowledge fragments that best match the high-dimensional real-valued vector in the vector database, and optimizing the fault knowledge fragments to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is combined with the fault query text to generate enhanced prompts, and the enhanced prompts are input into a large language model for reasoning analysis to generate fault location results and processing suggestions.
[0007] Optionally, searching the vector database for a fault knowledge fragment that best matches the high-dimensional real-valued vector, and optimizing the fault knowledge fragment to obtain an optimal knowledge fragment set, including: In a pre-built vector database or index, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest to the query text semantics; Using the ranking model to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain a ranking result, and performing metadata filtering on the ranking result to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is integrated into a structured context information package, and the context information package and the fault query text form an enhanced prompt.
[0008] Optionally, performing data preprocessing and data indexing on the device data and storing the processed data in a vector database or index includes: Performing data cleaning and normalization on the device data to obtain normalized data; Performing document parsing and intelligent segmentation on the normalized data to obtain parsed segmented data; Performing metadata extraction and data enrichment on the normalized data and / or parsed block data to obtain metadata-enriched data blocks for port equipment maintenance; The metadata-enriched data blocks are stored in a vector database or index.
[0009] Optionally, the data cleaning and normalization process includes: Remove elements not related to the technical content from the documentation of the device data; Perform optical character recognition on scanned PDF documents, obtain OCR results, and proofread and correct the OCR results to reduce text recognition errors; Ensure consistency in the terminology used in the document, standardize the formats of dates, times, and units of measurement, and clean up special characters and garbled characters in the text to ensure uniform coding; Extracting table data from the document and converting it into a structured format, and verifying the correspondence between the table header and the cell content; The text information in the drawing is extracted through optical character recognition and the text information is associated with a specific area or symbol of the drawing.
[0010] Optionally, the document parsing and intelligent segmentation process includes: Extracting content from the large document in the device data according to the file format to obtain the original logical structure of the large document, wherein the original logical structure includes chapters, paragraphs, lists, and titles; Adopting a knowledge chunking strategy to chunk the extracted content of the original logical structure, setting chunking granularity to balance information focus and semantic integrity, and strengthening the processing of extracted content containing complex logical structures; The knowledge segmentation strategy is determined based on any one or more of fixed-length segmentation, sentence or paragraph boundary recognition segmentation for natural language processing, document structure segmentation, and intelligent algorithm segmentation for semantic coherence.
[0011] Optionally, it also includes: Preprocessing the fault query text to obtain a structured and unambiguous internal representation; The pre-processing process includes text cleaning, lexical and syntactic analysis, query expansion and ambiguity elimination; Use a pre-trained text embedding model to convert the user-entered fault query text into a high-dimensional real-valued vector, including: The internal representation of the query text is input into the pre-trained deep learning text embedding model, and the mapped high-dimensional real-valued vector is output to capture the deep semantic features of the query text.
[0012] Optionally, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest in semantics to the query text, including: Determine a first vector length corresponding to the high-dimensional real-valued vector and a second vector length corresponding to the knowledge block vector; Calculate the cosine similarity between the high-dimensional real-valued vector and the knowledge block vector based on the cosine formula combined with the length of the first vector and the length of the second vector; Determining the semantic relevance between the high-dimensional real-valued vector and the knowledge block vector based on the calculation result of the cosine similarity, so as to determine the candidate fault knowledge segment that is closest in semantics to the fault query text; Among them, when the cosine similarity is 1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are maximally similar or consistent; when the cosine similarity is 0, it indicates that the high-dimensional real-valued vector and the knowledge block vector are semantically irrelevant or independent; when the cosine similarity is -1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are opposite or negatively correlated.
[0013] Optionally, the candidate fault knowledge fragments are evaluated for relevance and re-ranked using a ranking model to obtain a ranking result, and the ranking result is subjected to metadata filtering to obtain an optimal knowledge fragment set, including: Input the candidate fault knowledge fragments into the ranking model, use the ranking model to jointly analyze the query and the complete text of each candidate fragment, perform relevance evaluation and re-ranking, and obtain a ranking result; The sorting results are filtered using metadata to eliminate fragments that do not meet specific constraints, thereby obtaining the optimal knowledge fragment set; the metadata includes device model, component type, document source, and timestamp.
[0014] In the second aspect, the present application also provides a retrieval enhancement generation system based on port equipment maintenance, comprising An offline processing module is used to obtain equipment data based on the knowledge carrier of the port equipment, perform data preprocessing and data indexing on the equipment data, and store the processed data in a vector database or index; A vector generation module is used to convert the fault query text input by the user into a high-dimensional real-valued vector using a pre-trained text embedding model; a retrieval optimization module, configured to retrieve the fault knowledge fragments that best match the high-dimensional real-valued vector in the vector database, and optimize the fault knowledge fragments to obtain an optimal knowledge fragment set; The text enhancement module is used to combine the optimal knowledge fragment set with the fault query text to generate enhanced prompts, input the enhanced prompts into a large language model for reasoning analysis, and generate fault location results and processing suggestions.
[0015] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.
[0017] In a fifth aspect, the present application provides a computer program product, which, when executed on a processor, enables the processor to execute the method described in the first aspect or any possible implementation of the first aspect.
[0018] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0019] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies: (1) This application obtains the equipment data of the port equipment to be maintained and performs preprocessing and indexing, and then stores the data in a vector database to achieve subsequent efficient retrieval. The pre-trained text embedding model is used to convert the user fault query text into a high-dimensional real-valued vector, which can deeply capture the semantic essence of the query text rather than relying solely on keyword matching. This greatly improves the accuracy of retrieval and can better understand the user's intention. By retrieving the most matching fault knowledge fragments and further optimizing the optimal knowledge fragment set, the high quality and high relevance of the knowledge fragments provided to the language model are ensured, thereby improving processing efficiency. The optimal knowledge fragment set is combined with the fault query text to generate an enhanced prompt input language model, which can fully utilize the powerful reasoning and analysis capabilities of the language model. The language model is based on rich and accurate information for reasoning, and the generated fault location and processing suggestions will be more accurate, reliable and targeted, helping port staff to quickly and effectively solve equipment failures, reduce downtime, and improve port operation efficiency and equipment maintenance level.
[0020] (2) This application significantly improves the quality and consistency of device data through meticulous data cleaning and normalization, providing a key guarantee for the subsequent accurate understanding and application of information. Operations such as removing irrelevant elements, correcting OCR errors, unifying terminology and formatting, and processing special characters and garbled characters effectively eliminate noise and ambiguity in the data, ensuring the accuracy and readability of the text content. This not only makes subsequent document parsing and knowledge segmentation more reliable, but also directly improves the accuracy of vector representation and similarity calculation.
[0021] (3) This application has deeply optimized the preliminary search results by introducing a ranking model and metadata filtering mechanism, significantly improving the relevance and practicality of the final knowledge fragments. The ranking model can go beyond simple vector similarity and jointly analyze the complete text of the query and candidate fragments to more accurately evaluate their relevance and re-rank them, thereby screening out the truly most relevant knowledge fragments. Metadata filtering uses additional information such as device model, component type, document source, timestamp, etc. to further eliminate fragments that do not meet specific constraints, ensuring that the knowledge fragments are not only semantically relevant but also have practical applicability. The dual optimization mechanism greatly improves the quality of the knowledge ultimately provided to the language model, making the generated fault location and processing suggestions more accurate, reliable and targeted. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is one of the flow charts of the retrieval enhancement generation method based on port equipment maintenance provided by an embodiment of the present application; Figure 2 This is the second flow chart of the retrieval enhancement generation method based on port equipment maintenance provided by the embodiment of the present application; Figure 3 This is a schematic diagram of the RAG process of the retrieval enhancement generation technology of the embodiment of the present application; Figure 4 This is a schematic diagram of an example of the RAG process in an embodiment of the present application; Figure 5 This is a diagram of the RAG architecture of an embodiment of the present application; Figure 6 This is a flowchart of the automated data engineering of an embodiment of the present application; Figure 7 This is a schematic structural diagram of the device provided in an embodiment of the present application; Figure 8 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0024] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.
[0025] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.
[0026] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0027] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.
[0028] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0029] Reference Figure 1 , the present application provides a retrieval enhancement generation method based on port equipment maintenance, comprising: S101. Acquire equipment data based on the knowledge carrier of the port equipment, perform data preprocessing and data indexing on the equipment data, and store the processed data in a vector database or index; S102. Using a pre-trained text embedding model, the fault query text input by the user is converted into a high-dimensional real-valued vector; S103. Retrieve the fault knowledge fragment that best matches the semantic vector from the vector database, and optimize the fault knowledge fragment to obtain the optimal knowledge fragment set; S104. Combine the optimal knowledge fragment set with the fault query text to generate enhanced prompts, input the enhanced prompts into a large language model for reasoning analysis, and generate fault location results and processing suggestions.
[0030] Specifically, the present embodiment aims to build an efficient and accurate intelligent recommendation system. Its cornerstone lies in systematic, high-quality preprocessing of the vast and complex heterogeneous data in the field of port machinery maintenance. This process aims to transform raw data into formatted, structured, or semi-structured knowledge units suitable for use in the Retrieval Augmentation Generation (RAG) model.
[0031] The first step is to collect and identify data through S101, which requires a comprehensive collection of various knowledge carriers related to port machinery and equipment.
[0032] The core task of this step is to collect all knowledge sources related to the port equipment to be maintained. These sources may be in various forms, including but not limited to equipment operation manuals, maintenance logs, fault reports, repair guides, technical drawings, training materials, expert experience summaries, etc.
[0033] After preprocessing, the data needs to be indexed, which usually involves dividing the text content into logically related knowledge blocks and generating vector representations for each block. These vectors are then stored in a vector database along with the original text fragments and their metadata for subsequent efficient retrieval.
[0034] Next, in S102, when the user describes the device failure they encountered, they enter a query. This step uses a pre-trained text embedding model (a sentence vector encoder based on the Transformer architecture). This model captures the semantic relationships and context between words and converts the entire query sentence into a fixed-length, high-dimensional vector.
[0035] Specifically, the query text in this embodiment is input into a pre-trained deep learning text embedding model, typically a sentence vector encoder based on the Transformer architecture. This model maps the query text into a high-dimensional real-valued vector. This query embedding accurately captures the deep semantic features of the query and is the basis for semantic similarity matching. The embedding model used maintains consistency or compatibility with the model used when vectorizing knowledge base document blocks, ensuring that queries and documents can be effectively compared within the same vector space.
[0036] Vectors that are close in distance in vector space typically represent semantically similar text. For example, the two queries "crane cannot start" and "crane cannot ignite" may use different terms, but their semantic vectors are very close in space. This makes subsequent vector similarity calculation possible and provides a foundation for precise semantic-based search.
[0037] Furthermore, at step S103, a search is performed in the previously established vector database. Specifically, the similarity (cosine similarity) between the query vector and all knowledge chunk vectors in the database is calculated. The higher the similarity, the closer the knowledge chunk's content is to the semantics of the user's query.
[0038] Sorted by similarity, the top several knowledge fragments are selected as candidate results. However, relying solely on vector similarity may not be perfect, as similar knowledge fragments may come from different devices, different contexts, or contain incomplete information. Therefore, optimization is necessary to ultimately obtain an optimal set of high-quality, highly relevant, and highly applicable knowledge fragments, providing a reliable information foundation for the next step.
[0039] Finally, in step S104, the optimal knowledge fragments selected in the previous step are combined with the original user fault query text to form a structured enhanced prompt. This enhanced prompt is then input into a powerful language model. Leveraging its powerful natural language understanding and generation capabilities, the language model combines the rich information in the enhanced prompt to perform in-depth reasoning and analysis. This model can understand the complex relationship between fault symptoms and possible causes, reference solutions from the knowledge fragments, and even combine information from multiple fragments for comprehensive judgment. Ultimately, it generates a clear, specific, and actionable fault location description and handling suggestions, providing direct guidance to port maintenance personnel in resolving the problem.
[0040] Reference Figure 2 , Figure 2A process for optimizing ranking by processing user interaction histories using a large language model (LLM) is presented. First, through methods such as sequential prompts and contextual learning, the LLM is trained to perceive the sequential nature of the interaction history and identify patterns H. Next, the system retrieves candidate items and, through a guidance mechanism, reduces positional deviations to form patterns C. Finally, an LLM (such as ChatGPT) is used to rank these candidate items according to an instruction template T and parse the output to obtain the final ranking result [2, 1, 3]. The entire process aims to improve both the accuracy and efficiency of ranking.
[0041] Reference Figure 3 , Figure 3 This is a schematic diagram of the RAG process of the retrieval enhancement generation technology in an embodiment of the present application.
[0042] The offline processing process includes: data preprocessing, text chunking, text embedding, and vector storage. The online processing process includes: user query, query embedding, similarity search, and reranking; The generation phase includes: Generate Response, LLM Processing, and Context Assembly.
[0043] Reference Figure 4 , Figure 4 The following is a schematic diagram of an RAG process example, including the following steps: After the raw data is structured, large files are divided into smaller fragments through document segmentation. These fragments are then converted into text embeddings, and the embedding information is stored in a vector database. First, the raw data is structured, with large files being segmented into smaller fragments through document segmentation. Then, through text embedding (including direct encoding, static embedding, and dynamic embedding), the structured data is converted into vectorized data and stored in a vector database. When a user initiates a query, the system generates a query vector and retrieves text from the vector database through hybrid retrieval (combining global semantic retrieval and document retrieval). Matching paragraphs are selected through nearest neighbor retrieval, matching sorting, reranking, and de-duplication and merging of similar text. Finally, the LLM generation model processes these paragraphs and integrates them to generate the final answer.
[0044] Reference Figure 5As shown in the RAG architecture diagram of an embodiment of the present application, the user first enters a query. The system uses embedding technology to convert the query into a vector representation, then searches the vector database to find text units related to the query. The relevant text units are combined with the user query, the user's question, preset prompt words, and context information to form a complete input, which is passed to the large language model (LLM). Ultimately, the LLM generates an answer based on this information.
[0045] Reference Figure 6 , Figure 6 This is a flowchart of the automated data engineering process according to an embodiment of the present application, including: Use original maintenance data for vectorized embedding; Use the vector database to perform vector similarity detection to obtain similar record pairs; Use the LLM model to merge similar records.
[0046] Optionally, the fault knowledge fragments that best match the semantic vector are retrieved from the vector database, and the fault knowledge fragments are optimized to obtain an optimal knowledge fragment set, including: In a pre-built vector database or index, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest to the query text semantics; The ranking model is used to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain the ranking results. The ranking results are then filtered by metadata to obtain the optimal knowledge fragment set. The optimal knowledge fragment set is integrated into a structured context information package, and the context information package and the query text form an enhanced prompt.
[0047] Specifically, after the query vector is generated, the system performs a rapid search based on vector similarity. This step is performed within a pre-built, dedicated vector database or index that stores vector representations of all knowledge chunks. By calculating similarity (such as cosine similarity or inner product) between the query vector and the vectors of each knowledge chunk in the index, the system efficiently retrieves a set (top-K) of candidate knowledge fragments that are most semantically similar to the query. This dense retrieval mechanism goes beyond traditional keyword matching and uncovers deeper semantic connections.
[0048] To further improve the accuracy and applicability of retrieval results, the system can optionally implement multi-stage re-ranking and metadata filtering. Initially recalled candidate knowledge fragments can be fed into a more sophisticated ranking model, such as the Cross-Attention Encoder, which performs a more detailed relevance assessment and ranking by jointly analyzing the query and the full text of each candidate fragment. At the same time, leveraging the rich metadata (such as device model, component type, document source, timestamp, etc.) assigned to the knowledge blocks during the preprocessing phase, the sorted results can be rigorously filtered to eliminate entries that do not meet specific constraints, ensuring the final output is highly contextually relevant.
[0049] Optionally, the device data is preprocessed and indexed, and the processed data is stored in a vector database or index, including: Clean and normalize the equipment data to obtain normalized data; Perform document parsing and intelligent segmentation on the normalized data to obtain parsed segmented data; Perform metadata extraction and data enrichment on the normalized data and / or parsed block data to obtain metadata-enriched data blocks for port equipment maintenance; The metadata-enriched data blocks are stored in a vector database or index.
[0050] Furthermore, the data cleaning and normalization process includes: Remove elements not related to the technical content from the documentation of device data; Perform optical character recognition on scanned PDF documents, obtain OCR results, and proofread and correct the OCR results to reduce text recognition errors; Ensure consistency in terminology across documents, standardize the formats of dates, times, and units of measurement, and clean up special characters and garbled characters in the text to ensure uniform coding. Extract table data from documents and convert it into a structured format, and verify the correspondence between table headers and cell contents; Use optical character recognition to extract text information from drawings and associate the text information with specific areas or symbols in the drawings.
[0051] Specifically, in the embodiment of the present application, after the data collection is completed, the data cleaning and normalization stage is entered. The goal of this stage is to improve data quality, eliminate noise, and ensure the consistency and accuracy of information. Specific operations include: removing elements in the document that are not related to the technical content; performing high-quality optical character recognition (OCR) processing on the scanned PDF, and proofreading and correcting the OCR results to reduce text recognition errors; unifying the terminology in different documents; standardizing the formats of date, time, measurement units, etc.; processing special characters and garbled characters in the text to ensure unified encoding (such as UTF-8). For tabular data, it needs to be accurately extracted from the document and converted into a format that is easy to process, while ensuring the correct correspondence between the header and the cell content. Text information in the drawing also needs to be extracted through OCR and associated with specific areas or symbols in the drawing as much as possible.
[0052] It should be noted that optical character recognition (OCR) in the embodiments of the present application is a technology that converts text information in an image into editable text through optical scanning or photography. Its core principle is to use computer vision and pattern recognition technology to extract text features in the image and match them into computer-recognizable character codes. The OCR workflow generally includes steps such as image preprocessing, text positioning, character segmentation, feature extraction, character recognition, and post-processing. For example, the preprocessing stage improves image quality through operations such as grayscale, binarization, and denoising, while character recognition relies on machine learning or deep learning models to compare the extracted features with the character library.
[0053] Furthermore, the process of document parsing and intelligent segmentation includes: Extracting content from the large document in the device data according to the file format to obtain the original logical structure of the large document, where the original logical structure includes chapters, paragraphs, lists, and titles; Adopting a knowledge chunking strategy to chunk the extracted content of the original logical structure, setting chunking granularity to balance information focus and semantic integrity, and strengthening the processing of extracted content containing complex logical structures; The knowledge chunking strategy is determined based on any one or more of fixed-length chunking, sentence or paragraph boundary recognition chunking based on natural language processing, document structure chunking, and intelligent algorithm chunking based on semantic coherence.
[0054] Specifically, given the limitations of large language models in processing context length and retrieval efficiency considerations, large documents must be broken down into smaller, more manageable semantic units, or "knowledge chunks." Document parsing first involves extracting content from various file formats (such as PDF and DOCX), preserving the original logical structure, such as chapters, paragraphs, lists, and headings, as much as possible. Subsequently, an appropriate knowledge chunking strategy is employed. This may include fixed-length chunking (by character or token count), chunking based on sentence or paragraph boundary recognition using natural language processing, or more advanced intelligent chunking algorithms based on document structure (such as chapters and sections in a manual) or semantic coherence. The chunking granularity requires careful design. Too large a chunking granularity can lead to unfocused information and poor retrieval accuracy, while too small a chunking granularity can fragment semantics and result in incomplete information. For text containing complex logic (such as fault trees and decision processes), specialized processing logic may be required to ensure that its inherent relevance can be effectively utilized after chunking.
[0055] Furthermore, metadata extraction and enrichment are performed simultaneously with or after chunking. It is crucial to associate rich metadata with each generated knowledge chunk. This metadata may include: original document name, document version, source (document publication or revision date, device model or series, associated systems or components, section titles, page ranges, and possible keyword tags). This metadata not only facilitates precise filtering during retrieval but also provides the RAG system with richer contextual information, enhancing the relevance and credibility of recommendation results and making it easier for users to trace information sources.
[0056] Optionally, it also includes: Preprocess the fault query text to obtain a structured and unambiguous internal representation; The preprocessing process includes text cleaning, lexical and syntactic analysis, query expansion, and ambiguity elimination; Use a pre-trained text embedding model to convert the user-entered fault query text into a high-dimensional real-valued vector, including: The internal representation of the query text is input into the pre-trained deep learning text embedding model, and the mapped high-dimensional real-valued vector is output to capture the deep semantic features of the query text.
[0057] Specifically, the embodiments of the present application are intended to perform efficient and accurate knowledge positioning on user input, providing high-quality contextual basis for the subsequent language model generation stage. This process begins with the capture and normalization of user queries. The system receives queries submitted by users in the form of natural language, fault codes, or keywords. The original query is then preprocessed, including necessary text cleaning, lexical and syntactic analysis, and possible query expansion or ambiguity elimination, in order to convert it into a structured, unambiguous internal representation that accurately reflects the user's information needs.
[0058] Optionally, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest in semantics to the query text, including: Determine a first vector length corresponding to the high-dimensional real-valued vector and a second vector length corresponding to the knowledge block vector; Calculate the cosine similarity between the high-dimensional real-valued vector and the knowledge block vector based on the cosine formula combined with the length of the first vector and the length of the second vector; According to the calculation results of cosine similarity, the semantic relevance between the high-dimensional real-valued vector and the knowledge block vector is determined to determine the candidate fault knowledge fragment that is closest in semantics to the fault query text; Among them, when the cosine similarity is 1, it means that the semantics of the high-dimensional real-valued vector and the knowledge block vector are maximally similar or consistent; when the cosine similarity is 0, it means that the high-dimensional real-valued vector and the knowledge block vector are semantically irrelevant or independent; when the cosine similarity is -1, it means that the semantics of the high-dimensional real-valued vector and the knowledge block vector are opposite or negatively correlated.
[0059] Specifically, the cosine similarity in the embodiment of the present application is a method for measuring the degree of directional proximity.
[0060] The user's question is recorded as a vector , a piece of information in the knowledge base is another vector .
[0061] The formula for calculating their cosine similarity is:
[0062] in, A measure of how closely two vectors agree in direction. If they point in similar directions, this value will be large. and Represents the "length" or "strength" of each of these two vectors.
[0063] The calculation of cosine similarity essentially quantifies the degree of directional alignment between two vectors. The numerator in the formula, the dot product of the vectors, reflects the directional consistency of the two vectors and the product of their respective moduli; the denominator is the product of the moduli of the two vectors. By dividing the dot product by the product of their respective moduli, the vector lengths (or "strengths") are normalized, making cosine similarity a pure measure of the cosine of the angle between the vectors. Its value is unaffected by the absolute magnitude of the vectors themselves, focusing solely on their relative orientation in multidimensional space. This metric is strictly bounded within the interval [−1, 1]. Specifically, a cosine similarity of 1 indicates that the two vectors point in exactly the same direction, representing the highest degree of semantic similarity or agreement. A cosine similarity of 0 means that the vectors are orthogonal, typically indicating semantic uncorrelation or independence. A cosine similarity of −1 indicates that the two vectors point in completely opposite directions, which, under certain semantic interpretations, may indicate opposition or a strong negative correlation. In specific text processing applications, due to the characteristics of word or document embedding, cosine similarity values tend to be concentrated in the range [0, 1]. In this case, the closer the value is to 1, the closer or more closely the semantic content of the compared text segments matches. Therefore, cosine similarity is a key computational tool in information retrieval and natural language processing for identifying semantic relevance and screening highly relevant segments.
[0064] Optionally, the ranking model is used to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain a ranking result, and the ranking result is subjected to metadata filtering to obtain an optimal knowledge fragment set, including: The candidate fault knowledge fragments are input into the ranking model, and the ranking model is used to jointly analyze the query and the complete text of each candidate fragment, perform relevance evaluation and re-ranking, and obtain the ranking results; The sorting results are filtered using metadata, which includes device model, component type, document source, and timestamp, to eliminate fragments that do not meet specific constraints and obtain the optimal set of knowledge fragments.
[0065] Specifically, to further improve the accuracy and applicability of retrieval results, this application may optionally implement multi-stage re-ranking and metadata filtering. The initially recalled candidate knowledge fragments can be fed into a more sophisticated ranking model, such as the Cross-Attention Encoder, which performs a more detailed relevance assessment and ranking by jointly analyzing the query and the complete text of each candidate fragment. At the same time, by utilizing the rich metadata (such as device model, component type, document source, timestamp, etc.) assigned to the knowledge block in the preprocessing stage, the sorted results can be strictly filtered to eliminate entries that do not meet specific constraints, ensuring the high contextual relevance of the final output.
[0066] Reference Figure 7 , the present application also provides a retrieval enhancement generation system based on port equipment maintenance, including The offline processing module 710 is used to obtain equipment data based on the knowledge carrier of the port equipment, perform data preprocessing and data indexing on the equipment data, and store the processed data in a vector database or index; A vector generation module 720 is configured to convert the fault query text input by the user into a high-dimensional real-valued vector using a pre-trained text embedding model; The retrieval optimization module 730 is used to retrieve the fault knowledge fragments that best match the semantic vector in the vector database and optimize the fault knowledge fragments to obtain the optimal knowledge fragment set; The text enhancement module 740 is used to combine the optimal knowledge fragment set with the fault query text to generate enhanced prompts, input the enhanced prompts into the large language model for reasoning analysis, and generate fault location results and processing suggestions.
[0067] Optionally, searching the vector database for a fault knowledge fragment that best matches the high-dimensional real-valued vector, and optimizing the fault knowledge fragment to obtain an optimal knowledge fragment set, including: In a pre-built vector database or index, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest to the query text semantics; Using the ranking model to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain a ranking result, and performing metadata filtering on the ranking result to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is integrated into a structured context information package, and the context information package and the fault query text form an enhanced prompt.
[0068] Optionally, performing data preprocessing and data indexing on the device data and storing the processed data in a vector database or index includes: Performing data cleaning and normalization on the device data to obtain normalized data; Performing document parsing and intelligent segmentation on the normalized data to obtain parsed segmented data; Performing metadata extraction and data enrichment on the normalized data and / or parsed block data to obtain metadata-enriched data blocks for port equipment maintenance; The metadata-enriched data blocks are stored in a vector database or index.
[0069] Optionally, the data cleaning and normalization process includes: Remove elements not related to the technical content from the documentation of the device data; Perform optical character recognition on scanned PDF documents, obtain OCR results, and proofread and correct the OCR results to reduce text recognition errors; Ensure consistency in the terminology used in the document, standardize the formats of dates, times, and units of measurement, and clean up special characters and garbled characters in the text to ensure uniform coding; Extracting table data from the document and converting it into a structured format, and verifying the correspondence between the table header and the cell content; The text information in the drawing is extracted through optical character recognition and the text information is associated with a specific area or symbol of the drawing.
[0070] Optionally, the document parsing and intelligent segmentation process includes: Extracting content from the large document in the device data according to the file format to obtain the original logical structure of the large document, wherein the original logical structure includes chapters, paragraphs, lists, and titles; Adopting a knowledge chunking strategy to chunk the extracted content of the original logical structure, setting chunking granularity to balance information focus and semantic integrity, and strengthening the processing of extracted content containing complex logical structures; The knowledge segmentation strategy is determined based on any one or more of fixed-length segmentation, sentence or paragraph boundary recognition segmentation for natural language processing, document structure segmentation, and intelligent algorithm segmentation for semantic coherence.
[0071] Optionally, it also includes: Preprocessing the fault query text to obtain a structured and unambiguous internal representation; The pre-processing process includes text cleaning, lexical and syntactic analysis, query expansion and ambiguity elimination; Use a pre-trained text embedding model to convert the user-entered fault query text into a high-dimensional real-valued vector, including: The internal representation of the query text is input into the pre-trained deep learning text embedding model, and the mapped high-dimensional real-valued vector is output to capture the deep semantic features of the query text.
[0072] Optionally, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest in semantics to the query text, including: Determine a first vector length corresponding to the high-dimensional real-valued vector and a second vector length corresponding to the knowledge block vector; Calculate the cosine similarity between the high-dimensional real-valued vector and the knowledge block vector based on the cosine formula combined with the length of the first vector and the length of the second vector; Determining the semantic relevance between the high-dimensional real-valued vector and the knowledge block vector based on the calculation result of the cosine similarity, so as to determine the candidate fault knowledge segment that is closest in semantics to the fault query text; Among them, when the cosine similarity is 1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are maximally similar or consistent; when the cosine similarity is 0, it indicates that the high-dimensional real-valued vector and the knowledge block vector are semantically irrelevant or independent; when the cosine similarity is -1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are opposite or negatively correlated.
[0073] Optionally, the candidate fault knowledge fragments are evaluated for relevance and re-ranked using a ranking model to obtain a ranking result, and the ranking result is subjected to metadata filtering to obtain an optimal knowledge fragment set, including: Input the candidate fault knowledge fragments into the ranking model, use the ranking model to jointly analyze the query and the complete text of each candidate fragment, perform relevance evaluation and re-ranking, and obtain a ranking result; The sorting results are filtered using metadata to eliminate fragments that do not meet specific constraints, thereby obtaining the optimal knowledge fragment set; the metadata includes device model, component type, document source, and timestamp.
[0074] Optionally, searching the vector database for a fault knowledge fragment that best matches the high-dimensional real-valued vector, and optimizing the fault knowledge fragment to obtain an optimal knowledge fragment set, including: In a pre-built vector database or index, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest to the query text semantics; Using the ranking model to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain a ranking result, and performing metadata filtering on the ranking result to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is integrated into a structured context information package, and the context information package and the fault query text form an enhanced prompt.
[0075] Optionally, performing data preprocessing and data indexing on the device data and storing the processed data in a vector database or index includes: Performing data cleaning and normalization on the device data to obtain normalized data; Performing document parsing and intelligent segmentation on the normalized data to obtain parsed segmented data; Performing metadata extraction and data enrichment on the normalized data and / or parsed block data to obtain metadata-enriched data blocks for port equipment maintenance; The metadata-enriched data blocks are stored in a vector database or index.
[0076] Optionally, the data cleaning and normalization process includes: Remove elements not related to the technical content from the documentation of the device data; Perform optical character recognition on scanned PDF documents, obtain OCR results, and proofread and correct the OCR results to reduce text recognition errors; Ensure consistency in the terminology used in the document, standardize the formats of dates, times, and units of measurement, and clean up special characters and garbled characters in the text to ensure uniform coding; Extracting table data from the document and converting it into a structured format, and verifying the correspondence between the table header and the cell content; The text information in the drawing is extracted through optical character recognition and the text information is associated with a specific area or symbol of the drawing.
[0077] Optionally, the document parsing and intelligent segmentation process includes: Extracting content from the large document in the device data according to the file format to obtain the original logical structure of the large document, wherein the original logical structure includes chapters, paragraphs, lists, and titles; Adopting a knowledge chunking strategy to chunk the extracted content of the original logical structure, setting chunking granularity to balance information focus and semantic integrity, and strengthening the processing of extracted content containing complex logical structures; The knowledge segmentation strategy is determined based on any one or more of fixed-length segmentation, sentence or paragraph boundary recognition segmentation for natural language processing, document structure segmentation, and intelligent algorithm segmentation for semantic coherence.
[0078] Optionally, a pre-processing module is further included, for: Preprocessing the fault query text to obtain a structured and unambiguous internal representation; The pre-processing process includes text cleaning, lexical and syntactic analysis, query expansion and ambiguity elimination; Use a pre-trained text embedding model to convert the user-entered fault query text into a high-dimensional real-valued vector, including: The internal representation of the query text is input into the pre-trained deep learning text embedding model, and the mapped high-dimensional real-valued vector is output to capture the deep semantic features of the query text.
[0079] Optionally, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest in semantics to the query text, including: Determine a first vector length corresponding to the high-dimensional real-valued vector and a second vector length corresponding to the knowledge block vector; Calculate the cosine similarity between the high-dimensional real-valued vector and the knowledge block vector based on the cosine formula combined with the length of the first vector and the length of the second vector; Determining the semantic relevance between the high-dimensional real-valued vector and the knowledge block vector based on the calculation result of the cosine similarity, so as to determine the candidate fault knowledge segment that is closest in semantics to the fault query text; Among them, when the cosine similarity is 1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are maximally similar or consistent; when the cosine similarity is 0, it indicates that the high-dimensional real-valued vector and the knowledge block vector are semantically irrelevant or independent; when the cosine similarity is -1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are opposite or negatively correlated.
[0080] Optionally, the candidate fault knowledge fragments are evaluated for relevance and re-ranked using a ranking model to obtain a ranking result, and the ranking result is subjected to metadata filtering to obtain an optimal knowledge fragment set, including: Input the candidate fault knowledge fragments into the ranking model, use the ranking model to jointly analyze the query and the complete text of each candidate fragment, perform relevance evaluation and re-ranking, and obtain a ranking result; The sorting results are filtered using metadata to eliminate fragments that do not meet specific constraints, thereby obtaining the optimal knowledge fragment set; the metadata includes device model, component type, document source, and timestamp.
[0081] It is understandable that the detailed functional implementation of each of the above units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.
[0082] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0083] Reference Figure 8 Based on the methods in the above embodiments, an embodiment of the present application provides an electronic device, which may include: a processor (Processor) 810, a communication interface (Communications Interface) 820, a memory (Memory) 830, and a communication bus 840. The processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to execute the methods in the above embodiments.
[0084] In addition, the logic instructions in the aforementioned memory 830 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
[0085] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0086] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0087] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0088] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC.
[0089] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).
[0090] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0091] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A search enhancement generation method based on port equipment maintenance, characterized in that: include: Acquiring equipment data based on the knowledge carrier of the port equipment, performing data preprocessing and data indexing on the equipment data, and storing the processed data in a vector database or index; Use the pre-trained text embedding model to convert the fault query text entered by the user into a high-dimensional real-valued vector; Retrieving the fault knowledge fragments that best match the high-dimensional real-valued vector in the vector database, and optimizing the fault knowledge fragments to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is combined with the fault query text to generate enhanced prompts, and the enhanced prompts are input into a large language model for reasoning analysis to generate fault location results and processing suggestions.
2. The retrieval enhancement generation method based on port equipment maintenance according to claim 1 is characterized in that: Retrieving the fault knowledge fragments that best match the high-dimensional real-valued vector from the vector database, and optimizing the fault knowledge fragments to obtain an optimal knowledge fragment set, including: In a pre-built vector database or index, the similarity between the high-dimensional real-valued vector and the knowledge block vector is calculated to determine the candidate fault knowledge fragment that is closest to the query text semantics; Using the ranking model to evaluate the relevance and re-rank the candidate fault knowledge fragments to obtain a ranking result, and performing metadata filtering on the ranking result to obtain an optimal knowledge fragment set; The optimal knowledge fragment set is integrated into a structured context information package, and the context information package and the fault query text form an enhanced prompt.
3. The retrieval enhancement generation method based on port equipment maintenance according to claim 1 is characterized in that: Preprocessing and indexing the device data, and storing the processed data in a vector database or index, including: Performing data cleaning and normalization on the device data to obtain normalized data; Performing document parsing and intelligent segmentation on the normalized data to obtain parsed segmented data; Performing metadata extraction and data enrichment on the normalized data and / or parsed block data to obtain metadata-enriched data blocks for port equipment maintenance; The metadata-enriched data blocks are stored in a vector database or index.
4. The retrieval enhancement generation method based on port equipment maintenance according to claim 3 is characterized in that: The data cleaning and normalization process includes: Remove elements not related to the technical content from the documentation of the device data; Perform optical character recognition on scanned PDF documents, obtain OCR results, and proofread and correct the OCR results to reduce text recognition errors; Ensure consistency in the terminology used in the document, standardize the formats of dates, times, and units of measurement, and clean up special characters and garbled characters in the text to ensure uniform coding; Extracting table data from the document and converting it into a structured format, and verifying the correspondence between the table header and the cell content; The text information in the drawing is extracted through optical character recognition and the text information is associated with a specific area or symbol of the drawing.
5. The retrieval enhancement generation method based on port equipment maintenance according to claim 3 is characterized in that: The process of document parsing and intelligent segmentation includes: Extracting content from the large document in the device data according to the file format to obtain the original logical structure of the large document, wherein the original logical structure includes chapters, paragraphs, lists, and titles; Adopting a knowledge chunking strategy to chunk the extracted content of the original logical structure, setting chunking granularity to balance information focus and semantic integrity, and strengthening the processing of extracted content containing complex logical structures; The knowledge segmentation strategy is determined based on any one or more of fixed-length segmentation, sentence or paragraph boundary recognition segmentation for natural language processing, document structure segmentation, and intelligent algorithm segmentation for semantic coherence.
6. The retrieval enhancement generation method based on port equipment maintenance according to claim 1 is characterized in that: Also includes: Preprocessing the fault query text to obtain a structured and unambiguous internal representation; The pre-processing process includes text cleaning, lexical and syntactic analysis, query expansion and ambiguity elimination; Use a pre-trained text embedding model to convert the user-entered fault query text into a high-dimensional real-valued vector, including: The internal representation of the query text is input into the pre-trained deep learning text embedding model, and the mapped high-dimensional real-valued vector is output to capture the deep semantic features of the query text.
7. The retrieval enhancement generation method based on port equipment maintenance according to claim 2 is characterized in that: Calculate the similarity between the high-dimensional real-valued vector and the knowledge block vector to determine the candidate fault knowledge fragment that is closest to the query text semantics, including: Determine a first vector length corresponding to the high-dimensional real-valued vector and a second vector length corresponding to the knowledge block vector; Calculate the cosine similarity between the high-dimensional real-valued vector and the knowledge block vector based on the cosine formula combined with the length of the first vector and the length of the second vector; Determining the semantic relevance between the high-dimensional real-valued vector and the knowledge block vector based on the calculation result of the cosine similarity, so as to determine the candidate fault knowledge segment that is closest in semantics to the fault query text; Among them, when the cosine similarity is 1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are maximally similar or consistent; when the cosine similarity is 0, it indicates that the high-dimensional real-valued vector and the knowledge block vector are semantically irrelevant or independent; when the cosine similarity is -1, it indicates that the semantics of the high-dimensional real-valued vector and the knowledge block vector are opposite or negatively correlated.
8. The retrieval enhancement generation method based on port equipment maintenance according to claim 2 is characterized in that: The candidate fault knowledge fragments are evaluated for relevance and re-ranked using a ranking model to obtain a ranking result, and the ranking result is subjected to metadata filtering to obtain an optimal knowledge fragment set, including: Input the candidate fault knowledge fragments into the ranking model, use the ranking model to jointly analyze the query and the complete text of each candidate fragment, perform relevance evaluation and re-ranking, and obtain a ranking result; The sorting results are filtered using metadata to eliminate fragments that do not meet specific constraints, thereby obtaining the optimal knowledge fragment set; the metadata includes device model, component type, document source, and timestamp.
9. A search enhancement generation system based on port equipment maintenance, characterized in that: include: An offline processing module is used to obtain equipment data based on the knowledge carrier of the port equipment, perform data preprocessing and data indexing on the equipment data, and store the processed data in a vector database or index; A vector generation module is used to convert the fault query text input by the user into a high-dimensional real-valued vector using a pre-trained text embedding model; a retrieval optimization module, configured to retrieve the fault knowledge fragments that best match the high-dimensional real-valued vector in the vector database, and optimize the fault knowledge fragments to obtain an optimal knowledge fragment set; The text enhancement module is used to combine the optimal knowledge fragment set with the fault query text to generate enhanced prompts, input the enhanced prompts into a large language model for reasoning analysis, and generate fault location results and processing suggestions.
10. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 8.
Citation Information
Cited By
Insurance clause knowledge base self-maintenance method, system and equipment based on large model
CN120975207A
Insurance clause knowledge base self-maintenance method, system and device based on large model
CN120975207B