Hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration

By using a multi-agent collaborative framework and a multimodal knowledge base, the problems of data silos, difficulty in balancing query efficiency and accuracy, and compliance in the hospital maintenance data management system have been solved, achieving efficient and accurate maintenance data query and secure and compliant management.

CN121786205APending Publication Date: 2026-04-03SHANGHAI FUMED TIANJIAN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing hospital maintenance data management systems suffer from data silos, difficulty in balancing query efficiency and accuracy, technical bottlenecks in heterogeneous data integration, and insufficient compliance with medical data, resulting in low efficiency in maintenance data management and failure to meet security and compliance requirements.

Method used

A multi-agent collaborative framework is adopted, in which natural language queries are broken down by task decomposition agents, retrieval agents execute hybrid retrieval strategies, and the generation agents generate maintenance plan drafts. The verification agents ensure compliance, and the combination of a multimodal knowledge base and security compliance mechanisms enables efficient and accurate maintenance data query.

Benefits of technology

It optimizes query response speed and task collaboration efficiency, improves cross-modal query accuracy, reduces the risk of hallucinations, ensures data security and compliance, and meets the efficient and accurate query needs of medical equipment maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005745464800000121
    Figure BDA0005745464800000121
  • Figure BDA0005745464800000128
    Figure BDA0005745464800000128
  • Figure BDA0005745464800000141
    Figure BDA0005745464800000141
Patent Text Reader

Abstract

The invention discloses a hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration, and relates to the technical field of medical information processing, and the system comprises a multi-agent collaboration scheduling module, a task decomposition agent, a retrieval agent, a generation agent, a verification agent, a multi-modal knowledge base construction module and a mixed retrieval execution module. Multi-agent cooperation is coordinated through a publishing-subscribing mechanism, task decomposition, mixed retrieval, scheme generation and compliance verification of natural language query are achieved, a multi-modal knowledge base adopts a GMR-Tree mixed index structure to retrieve structured and unstructured data in a unified mode, a mixed retrieval strategy is combined with vector retrieval and keyword retrieval, and the query efficiency is improved. Semantic and statistical features are balanced through dynamic weights, and the security compliance management and control module realizes fine-grained authority control and non-tampering log records through CP-ABE encryption and block chain auditing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information processing technology, specifically to a hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration. Background Technology

[0002] Hospital logistics engineering maintenance data management is a crucial link in ensuring the normal operation of medical services. With the widespread application of intelligent equipment in hospitals, the volume of maintenance data is experiencing explosive growth. According to relevant industry reports, large tertiary hospitals have an average of more than 2,000 medical devices, generating more than 100,000 maintenance records and a large amount of equipment operation data annually. The data types cover structured data (such as maintenance work orders and sensor logs) and unstructured data (such as equipment manual PDFs and fault report texts), and must comply with the local storage requirements of medical data security regulations for sensitive data.

[0003] The existing hospital maintenance data management system has the following main technical defects:

[0004] First, the problem of data silos is severe. Maintenance data is scattered across enterprise resource planning systems, hospital information systems, and IoT platforms. Traditional manual cross-system queries are time-consuming, and medical staff report low logistical response efficiency. Traditional database query technologies process structured maintenance data using SQL statements, but they cannot handle natural language queries, have insufficient capabilities for processing unstructured data, and lack cross-system data integration mechanisms.

[0005] Second, balancing query efficiency and accuracy is difficult. Single-entity retrieval-enhanced generation systems generate repair suggestions based on a large language model combined with vector retrieval, but suffer from a high illusion rate, meaning the generated content may contain incorrect information. Using multiple rounds of retrieval to improve accuracy significantly increases response time; conversely, using a single retrieval to improve speed leads to a substantial increase in the illusion rate. Existing systems rely solely on a single vector retrieval strategy, without incorporating semantic expansion and secondary ranking mechanisms, thus failing to balance semantic similarity and statistical features.

[0006] Third, there are technical bottlenecks in integrating heterogeneous data. Structured data needs to retain spatiotemporal features (such as timestamps in sensor logs and device installation locations), while unstructured data needs to extract textual and visual features (such as text in PDFs and schematic diagrams of device components). Traditional indexing structures (such as B+ trees and vector indexes) cannot simultaneously support joint queries of both types of data. Traditional relational databases only support indexing structured data and cannot handle vector representations of unstructured data; vector databases only support vector retrieval of unstructured data and cannot retain the spatiotemporal features of structured data.

[0007] Fourth, medical data compliance is insufficient. Maintenance data includes equipment serial numbers and patient-related information (such as patient identifiers for bedside equipment), and must simultaneously meet local storage requirements and fine-grained access control needs. Existing systems either rely solely on account passwords for access control without a dynamic attribute permission mechanism, or depend on third-party cloud platforms, thus violating local storage requirements, and lack dual protection mechanisms of encryption and auditing.

[0008] To address the aforementioned technical deficiencies, there is an urgent need to provide a technical solution that can achieve unified retrieval of multi-source heterogeneous maintenance data, balance query efficiency and accuracy, and meet medical data security and compliance requirements. Summary of the Invention

[0009] To address the technical deficiencies of existing technologies, this invention provides a hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration. By constructing a multi-agent collaboration framework, a multimodal knowledge base, a hybrid retrieval strategy, and a security and compliance mechanism, it enables efficient and accurate querying and analysis of hospital logistics engineering maintenance data.

[0010] The technical solution provided by this invention includes:

[0011] The multi-agent collaborative scheduling module is used to coordinate message passing and task scheduling among task decomposition agents, retrieval agents, generation agents, and verification agents based on a publish-subscribe message mechanism. The messages include task identifiers, subtask statuses, retrieval results, and verification feedback.

[0012] The task decomposition agent receives natural language queries input by the user, identifies device entities, fault types, and component relationships in the query through dependency analysis, decomposes the natural language query into a structured sub-task list based on a dynamic block strategy, and publishes the structured sub-task list to the multi-agent collaborative scheduling module.

[0013] The retrieval agent subscribes to a structured list of subtasks, executes a hybrid retrieval strategy for each subtask, retrieves maintenance data related to the subtask from a multimodal knowledge base, and performs semantic expansion based on a medical equipment maintenance knowledge graph to broaden the retrieval coverage.

[0014] The multimodal knowledge base construction module is used to perform spatiotemporal embedding processing on structured maintenance data to generate spatiotemporal embedding vectors, to perform vectorization processing on unstructured maintenance data to generate text vector representations, and to connect vector databases and relational databases through the GMR-Tree hybrid index structure to achieve unified retrieval of multimodal data.

[0015] The hybrid retrieval execution module is used to perform semantic vector retrieval through the vector retrieval engine, keyword matching retrieval through the keyword retrieval engine, and weighted fusion and fusion of vector retrieval results and keyword retrieval results through the result fusion and ranking unit to generate fused ranking results.

[0016] A generating agent is used to subscribe to the fusion ranking results, generate a draft maintenance plan based on a medical-specific large language model combined with dynamic prompting engineering, and send the draft maintenance plan to the verification agent.

[0017] The verification agent is used to evaluate the evidence relevance between the fusion ranking result and the draft maintenance plan through the evidence re-ranking model, check whether the draft maintenance plan complies with the medical device maintenance specifications through the rule engine, and determine whether to output the validated maintenance plan based on the evidence relevance score and the compliance check results.

[0018] The technical solution provided by this invention has the following technical effects:

[0019] First, a multi-agent collaboration framework enables parallel task processing and asynchronous communication. The task decomposition agent breaks down complex queries into structured sub-tasks based on dependency analysis. The retrieval agent improves data acquisition efficiency through a hybrid retrieval strategy. The generation agent dynamically generates content by combining a medical-specific large language model. The verification agent ensures output accuracy and compliance through an evidence reordering model and a rule engine, thereby optimizing the overall query response speed and task collaboration efficiency.

[0020] Second, based on the construction of a multimodal knowledge base, we can achieve unified storage and efficient retrieval of multi-source heterogeneous data in hospital logistics and maintenance. We can process sensor time-series data through graph attention networks and extract unstructured data features by combining CLIP and BERT models, thereby improving the accuracy and semantic consistency of cross-modal queries and reducing the information fragmentation problem caused by data dispersion.

[0021] Third, a hybrid retrieval strategy is adopted to balance semantic and statistical features through dynamic weight parameters. The multi-hop retrieval process enhances the reasoning ability of complex maintenance queries based on knowledge graph path planning, reducing the risk of illusion in generated content.

[0022] Fourth, by using a localized storage architecture, CP-ABE encrypted access control, data anonymization, and blockchain audit logs, we ensure that medical maintenance data complies with security regulations, enabling fine-grained access management and traceable access auditing. Attached Figure Description

[0023] Figure 1 This is an overall architecture diagram of the hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration provided in this embodiment of the invention.

[0024] Figure 2 This is a schematic diagram of the structure of the multi-agent cooperative scheduling module provided in an embodiment of the present invention.

[0025] Figure 3 This is a schematic diagram of the structure of the multimodal knowledge base construction module provided in an embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of the structure of the hybrid retrieval execution module provided in an embodiment of the present invention.

[0027] Figure 5 This is a structural diagram of the security compliance management module provided in an embodiment of the present invention. Detailed Implementation

[0028] Please refer to the attached document. Figures 1-5 The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] See Figure 1 This invention provides a hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration. The system includes a multi-agent collaborative scheduling module, a task decomposition agent, a retrieval agent, a generation agent, a verification agent, a multimodal knowledge base construction module, a hybrid retrieval execution module, and a security and compliance management module. The modules communicate loosely through a publish-subscribe messaging mechanism, supporting parallel processing and asynchronous scheduling of tasks.

[0030] In a preferred embodiment, the system is deployed within a hospital intranet environment, employing a microservice architecture to enable independent deployment and elastic scaling of each module. The system's hardware configuration includes an Intel Xeon Gold 6248R CPU, 256GB DDR4 memory, an NVIDIA A100 GPU, and 10TB NVMe SSD storage. The system supports at least 100 concurrent users, with an average response time of no more than 5 seconds per query.

[0031] See Figure 2 The multi-agent collaborative scheduling module is the core scheduling component of this system, responsible for coordinating message passing and task scheduling among task decomposition agents, retrieval agents, generation agents, and verification agents. This module adopts a publish-subscribe communication mechanism based on Kafka message queues to ensure the system's scalability and high throughput.

[0032] The multi-agent collaborative scheduling module includes a message routing unit, a task status management unit, and a load balancing unit. The message routing unit distributes messages to the corresponding agents based on message type. Messages are in JSON format and include fields such as task identifier, subtask status, retrieval result, verification feedback, and timestamp. The task status management unit maintains the execution status of each task, including pending, in progress, completed, and failed states. The load balancing unit dynamically allocates tasks based on the current load of each agent, using a weighted round-robin algorithm to achieve load balancing.

[0033] In a preferred embodiment, the message queue is deployed using a Kafka cluster with 3 Broker nodes. Each Topic has 3 Partitions to support parallel consumption. The maximum message retention time is 7 days, and the maximum size of a single message is 1MB. The agents employ a role-based subscription mechanism: task decomposition agents subscribe to user query topics, retrieval agents subscribe to task decomposition topics, generate agent-subscribed retrieval result topics, and verify agent-subscribed generated result topics.

[0034] The technical advantages of the multi-agent collaborative scheduling module are: it enables loosely coupled communication between agents through a publish-subscribe mechanism, allowing each agent to be expanded independently without affecting other components; it achieves traceability of task execution through task state management and supports automatic retry of failed tasks; and it achieves efficient utilization of system resources through load balancing, avoiding single-point performance bottlenecks.

[0035] The task decomposition agent is responsible for receiving natural language queries input by the user and breaking them down into a structured list of subtasks. This agent serves as the entry point for user interaction with the system, and the accuracy of its decomposition directly impacts the quality of subsequent retrieval and generation.

[0036] The task decomposition agent comprises a dependency parsing unit and a semantic expansion unit. The dependency parsing unit employs a dependency parsing model fine-tuned for the medical maintenance domain to perform syntactic analysis on natural language queries, identifying dependency relationships between equipment entities, fault entities, and component entities. The dependency parsing model is based on the BERT architecture and is fine-tuned and trained on a corpus from the medical maintenance domain. The training corpus includes equipment manuals, fault reports, and maintenance manuals, with a corpus size of 100,000 labeled samples. Dependency relationship types include subject-verb, verb-object, and modifier relationships.

[0037] The semantic extension unit maps identified fault entities to associated fault diagnosis paths based on the UMLS medical knowledge graph. The UMLS knowledge graph contains the relationships between medical device fault codes, fault symptoms, fault causes, and maintenance solutions. Semantic extension employs a multi-hop reasoning strategy, with the number of hops ranging from 1 to 3, adding associated entities in the fault diagnosis path to a structured subtask list.

[0038] In a preferred embodiment, the processing flow of the task decomposition agent is as follows: First, it receives a natural language query input by the user, such as "Repair steps for GE CT-1200 fault code E001"; then, the dependency analysis unit identifies the device entity "GE CT-1200", the fault code "E001", and the action "Repair"; next, the semantic extension unit queries the fault diagnosis path corresponding to "E001" through the UMLS knowledge graph: "Power module voltage abnormality → Check power module → Replace power module"; finally, it generates a structured subtask list, including three subtasks: "Explanation of E001 fault code", "CT machine power module detection", and "Repair record of E001 fault of the same model of CT machine".

[0039] The task decomposition agent employs a dynamic chunking strategy implemented using a DSP framework. This strategy dynamically adjusts the chunking granularity based on the semantic complexity of the query. For simple queries (such as "fault code explanation"), a single subtask is generated; for complex queries (such as "multi-device linkage fault diagnosis"), multiple related subtasks are generated. The criteria for determining the chunking granularity include the number of entities involved in the query (single or multiple entities), the number of relational layers (single or multi-layered relationships), and the expected data processing volume (small or large amounts of data).

[0040] The retrieval agent is responsible for subscribing to a structured list of subtasks, executing a hybrid retrieval strategy for each subtask, and retrieving maintenance data related to the subtask from a multimodal knowledge base. This agent is the core component of data acquisition, and its retrieval quality directly affects the accuracy of the generated content.

[0041] The retrieval agent comprises a retrieval request construction unit, a hybrid retrieval invocation unit, and a result aggregation unit. The retrieval request construction unit is responsible for converting structured subtasks into retrieval requests, which include query vectors and keyword lists. The query vectors are generated by encoding subtask descriptions using the Sentence-BERT model, resulting in a 768-dimensional vector. The keyword list extracts nouns and verbs from the subtasks through word segmentation and part-of-speech tagging.

[0042] The hybrid retrieval invocation unit is responsible for sending retrieval requests to the hybrid retrieval execution module and receiving the fused ranking results. The result aggregation unit is responsible for aggregating the retrieval results from multiple subtasks, removing duplicate documents, and sorting them by relevance score.

[0043] The retrieval agent performs semantic expansion based on a medical equipment maintenance knowledge graph to broaden the retrieval coverage. This semantic expansion employs a strategy combining the FMEA framework and the UMLS knowledge graph. The FMEA framework defines the relationships between failure modes, failure effects, and failure causes, while the UMLS knowledge graph provides the semantic relationships between medical equipment terms. The semantic expansion process includes: first, querying the FMEA framework to obtain associated failure modes based on the failure entities in the subtasks; then, mapping the failure modes to associated equipment components and maintenance plans using the UMLS knowledge graph; and finally, adding the expanded entities to the keyword list of the retrieval request.

[0044] In a preferred embodiment, for the subtask "CT machine power module detection", the semantic expansion results include related terms such as "power voltage detection", "power module fault diagnosis", and "power board replacement", which expands the scope of the search and improves the recall rate.

[0045] The generating agent is responsible for subscribing to and merging the ranking results, and generating a draft repair plan based on a medical-specific large language model combined with dynamic prompts. This agent is the core component of content generation, and its generation quality directly affects the user's repair guidance effectiveness.

[0046] The generated intelligent agent comprises a context building unit, a prompt template library, and a large language model inference unit. The context building unit is responsible for integrating the evidence documents from the fusion and ranking results into the input context of the large language model. The prompt template library stores prompt templates for different maintenance task types, including system role definition templates, task instruction templates, safety constraint templates, and multi-hop inference guidance templates. The large language model inference unit is responsible for calling the medical-specific large language model to generate a draft maintenance plan.

[0047] The generated intelligent agent employs a dynamic prompting engineering injection mechanism. The core components of this mechanism include: a system role definition template, defining the large language model's role in the medical maintenance scenario as a "medical equipment maintenance expert," emphasizing its strict adherence to medical safety regulations; a task instruction template, designing corresponding instructions based on different types of maintenance tasks, such as fault diagnosis, component replacement, and safe operation; a safety constraint template, containing constraints related to medical equipment maintenance safety regulations and fault code interpretation standards; and a multi-hop reasoning guidance template, guiding the large language model to perform multi-hop reasoning using a knowledge graph, for example, "Please generate steps based on the reasoning path of fault phenomenon → component abnormality → maintenance solution."

[0048] The execution process of the dynamic injection strategy is as follows: First, key information such as equipment model, fault phenomenon and fault code are extracted from the fusion and sorting results; then, related entities and reasoning paths are obtained through UMLS knowledge graph; next, dynamic variables such as fault information, safety specifications and knowledge graph paths are injected into the predefined prompt template to generate complete context prompts; finally, the context prompts are input into the large language model to generate a draft maintenance plan.

[0049] In a preferred embodiment, the generated agent uses the PMC-LLaMA model as a large language model specifically for medical applications. To support deployment on edge devices, the model is lightweighted and compressed using model pruning and quantization techniques, reducing its size from 30GB to 8GB. The compressed model exhibits a performance decrease of no more than 3% in the repair solution generation task, but a 2.5x increase in inference speed.

[0050] The verification agent is responsible for verifying the accuracy and compliance of the generated content, ensuring that the output repair plan is reliable and compliant. This agent is a core component of quality assurance, effectively reducing the rate of hallucinations through a dual verification mechanism.

[0051] The verification agent comprises an evidence relevance assessment unit, a compliance check unit, and a feedback control unit. The evidence relevance assessment unit uses the BgeRerank model to calculate the semantic relevance score between each evidence document and the draft maintenance plan in the fusion ranking results. The relevance score is calculated using the following formula:

[0052] S rel (d i ,r)=σ(W r ·[E(d i );E(r)]+b r ),

[0053] Among them, S rel (d i ,r) represents the i-th evidence document d i The correlation score between the draft repair plan and the r; E(d) i E(r) and E(r) are vector representations of the evidence document and the repair plan draft, respectively, output by the encoding layer of the BgeRerank model; W r Let b be a trainable weight matrix with dimensions 2d×1, where d is the vector dimension; r σ is the bias term; σ is the Sigmoid activation function, which maps the output to the interval [0,1]; the symbols [·; ·] represent vector concatenation operations.

[0054] The compliance check unit uses a rule engine to verify whether the draft repair plan complies with medical device repair specifications. The rule engine includes the following check rules: whether the fault code interpretation is consistent with the equipment manual; whether the repair procedures comply with safe operating procedures; and whether the repair plan contains sensitive information (such as patient identification). The rule engine is implemented using the Drools rule engine, and its rule base contains over 500 rules.

[0055] The feedback control unit determines whether to output a verified repair plan based on the evidence relevance score and compliance check results. The feedback control logic is as follows: if the average relevance score is lower than the preset evidence relevance threshold, a regeneration instruction is sent to the generating agent, and the relevance score is used as feedback information; if the compliance check result is non-compliant, the draft repair plan is automatically corrected or a regeneration instruction is sent to the generating agent; if the average relevance score is not lower than the preset evidence relevance threshold and the compliance check result is compliant, a verified repair plan is output.

[0056] In a preferred embodiment, the preset evidence relevance threshold is 0.85. When the average relevance score is below 0.85, the verification agent sends a regeneration instruction to the generation agent, retrying a maximum of 3 times. If the relevance score is still below the threshold after 3 retries, a prompt message is returned to the user, suggesting that the query conditions be refined.

[0057] See Figure 3 The multimodal knowledge base construction module is responsible for the unified storage and indexing of structured and unstructured maintenance data. This module is the core component of data management, and its index structure directly affects the efficiency and coverage of retrieval.

[0058] The multimodal knowledge base construction module includes a spatiotemporal embedding processing unit, a text vectorization processing unit, an image feature extraction unit, and a GMR-Tree hybrid index structure.

[0059] The spatiotemporal embedding processing unit performs spatiotemporal feature embedding processing on the sensor time-series data. This unit uses a graph attention network (GATv2) to process the sensor time-series data to generate entity vectors. The input of the graph attention network is the feature matrix and adjacency matrix of the sensor nodes, and the output is the entity vector of each node. The formula for generating the spatiotemporal embedding vector is as follows:

[0060]

[0061] in, Let i be the hidden state vector of node i in layer l+1, and let i be the initial state. This is the vector of the sensor's original measurement values; Let i be the set of neighboring nodes of node i; The attention weights of node j to node i in layer l are calculated using the attention mechanism; W (l) Let be the trainable weight matrix of the l-th layer, with dimension d×d; The timestamp position encoding vector for node i is generated using sinusoidal position encoding and has a dimension of d. Let be the one-hot encoded vector of the device location of node i, with dimension d; σ is the LeakyReLU activation function.

[0062] The formula for calculating the timestamp location code is as follows:

[0063]

[0064] Among them, t i is the timestamp value corresponding to node i, using the Unix timestamp format; k is the dimension index of the position encoding, with a value range from 0 to d / 2-1; d is the vector dimension, in this embodiment d=1024; and These are the even-numbered and odd-numbered elements of the positional encoding vector, respectively.

[0065] The text vectorization processing unit performs vectorization processing on unstructured data such as equipment instruction manuals (PDF) and fault report texts. This unit first extracts text information from PDF documents using OCR technology, achieving an OCR recognition accuracy of no less than 99%. Then, it uses a medical-grade BERT model to vectorize the extracted text, generating a 768-dimensional text vector representation.

[0066] The image feature extraction unit extracts image content features from the device manual using the CLIP model. The CLIP model is trained using a contrastive learning approach, enabling it to understand the semantics of both images and text simultaneously. The image feature vector has a 512-dimensional dimension. Image-text association is achieved through cosine similarity calculation, with a similarity threshold of 0.7.

[0067] The GMR-Tree hybrid index structure is one of the core innovations of this invention, used to connect vector databases and relational databases to achieve unified retrieval of multimodal data. The node structure of GMR-Tree consists of three parts: Minimum Boundary Region (MBR), used to preserve the geographical location features of devices, represented by latitude and longitude coordinates; Semantic Signature (SIG), used to store text and vector features, encoded using a Bloom filter; and Index Pointer (PTRN), used for indexing both the vector database (Milvus) and the relational database (PostgreSQL).

[0068] The GMR-Tree construction algorithm is as follows: First, all data items are partitioned into R-Trees according to geographical location, generating a spatial index layer; then, each R-Tree node is clustered according to semantic similarity, generating a semantic index layer; finally, pointers to both a vector database and a relational database are created for each semantic cluster. The GMR-Tree query algorithm supports three modes: spatial range query, semantic similarity query, and mixed query.

[0069] In a preferred embodiment, the vector database is deployed using Milvus, and the relational database is deployed using PostgreSQL. Milvus is configured in standalone mode with IVF_FLAT index type and 1024 cluster centers. PostgreSQL is configured in master-slave replication mode, with the master node responsible for writes and the slave nodes responsible for reads. The GMR-Tree index build time is approximately logarithmic in scale to the data size, and the query time complexity is O(log N+K), where N is the total amount of data and K is the number of returned results.

[0070] See Figure 4 The hybrid retrieval execution module is responsible for performing vector retrieval and keyword retrieval, and for merging and ranking the retrieval results. This module is the core component of retrieval capabilities, and its retrieval strategy directly affects the accuracy and recall of the query.

[0071] The hybrid retrieval execution module includes a vector retrieval engine, a keyword retrieval engine, a result fusion and sorting unit, and a secondary sorting unit.

[0072] The vector retrieval engine uses the Sentence-BERT model to vectorize retrieval requests and performs approximate nearest neighbor search using the FAISS index. The Sentence-BERT model, based on the BERT architecture, is fine-tuned on sentence similarity tasks to generate semantically rich sentence vectors. The FAISS index uses the IVF_FLAT index type, supporting efficient large-scale vector retrieval. The vector retrieval results include document identifiers and cosine similarity scores.

[0073] The keyword search engine uses the BM25 algorithm to calculate the word matching score between the search request and candidate documents. The BM25 algorithm is a classic bag-of-words model retrieval algorithm that considers factors such as term frequency, inverse document frequency, and document length. The keyword search results include document identifiers and BM25 scores.

[0074] The result fusion ranking unit employs an adaptive hybrid retrieval fusion algorithm to combine vector retrieval results and keyword retrieval results. The fusion algorithm is an improvement upon the Reverse Rank (RRF) algorithm, incorporating a dynamic weighting mechanism. The formula for calculating the fusion score is as follows:

[0075]

[0076] Among them, Score fusion (d) represents the fusion score of document d; rank vec (d) represents the ranking position of document d in the vector retrieval results, starting from 1; rank kw (d) represents the ranking position of document d in the keyword search results, starting from 1; k is a smoothing constant, in this embodiment k = 60; α is the vector search weight parameter, with a value range of 0.6 to 0.8; β is the keyword search weight parameter, with a value range of 0.2 to 0.4, and α + β = 1.

[0077] In a preferred embodiment, the weight parameters are dynamically adjusted according to the complexity of the medical maintenance scenario: for emergency fault handling scenarios, α ranges from 0.3 to 0.5, and β ranges from 0.5 to 0.7, focusing on precise keyword matching; for complex multi-hop reasoning scenarios, α ranges from 0.6 to 0.8, and β ranges from 0.2 to 0.4, focusing on semantic understanding; for preventative maintenance scenarios, α ranges from 0.5 to 0.7, and β ranges from 0.3 to 0.5, balancing semantics and keywords.

[0078] The secondary ranking unit uses the Next Sentence Prediction (NSP) module of the BERT model to perform a secondary ranking of the fused ranking results. The NSP module is used to evaluate the logical coherence between the query and candidate documents. The formula for calculating the secondary ranking is as follows:

[0079] Score nsp (q,d)=P(IsNext|[CLS]q[SEP]d[SEP]),

[0080] Among them, Score nsp (q,d) represents the logical coherence score between query q and document d; P(IsNext|·) represents the probability of the “next sentence” predicted by the BERT model; [CLS] and [SEP] are special labels for the BERT model.

[0081] The secondary sorting unit reorders a preset number of candidate documents that rank highly in the merged sorting results. The preset number ranges from 2 to 5, with a default value of 3 in this embodiment. This parameter is dynamically adjusted according to the needs of the medical maintenance scenario: 2 to 3 for emergency fault handling scenarios; 3 to 4 for complex multi-hop inference scenarios; and 4 to 5 for preventative maintenance scenarios.

[0082] See Figure 5The security and compliance management module is responsible for implementing localized storage, encrypted access control, and audit log functions to ensure the security and compliance of medical maintenance data. This module is a core component of security assurance, and its design complies with HIPAA and domestic personal information protection regulations.

[0083] The security and compliance management module includes a CP-ABE encryption control unit, a data anonymization unit, and a blockchain audit log unit.

[0084] The CP-ABE encryption control unit implements fine-grained access control based on ciphertext policy attribute-based encryption technology. The core idea of ​​CP-ABE is to embed access policies into ciphertext, so that only users whose attribute sets meet the access policies can decrypt data.

[0085] The initialization process of the CP-ABE system generates a system public key and a master key. The formulas for generating the system public key and master key are as follows:

[0086] PK = {G0, g, h = g} β ,e(g,g) α},

[0087] MK={g α ,β},

[0088] Where PK is the system public key, used to encrypt maintenance data; MK is the master key, held by the system administrator, used to generate user private keys; G0 is a bilinear cyclic group of order p; g is the generator of the G0 group; h = g β Let e(g,g) be a group element generated by the generator g and the random number β. α Let α be the bilinear mapping e raised to the power of α on (g, g); α and β are secret parameters randomly selected by the system.

[0089] The user's private key is generated based on the master key and the user's attribute set. The formula for generating the user's private key is as follows:

[0090] SK S ={g β·r ,h r ,{g r · H(y)} y∈S},

[0091] Among them, SK S Let S be the user's private key, where S is the user's attribute set; r is a parameter randomly selected for the user to enhance the security of the private key; H(y) is the attribute hash function that maps attribute y to elements in the G0 group; {g r·H(y)} y∈S This is a private key component generated for each attribute y in the user attribute set S.

[0092] The access policy tree is constructed using a tree structure. Leaf nodes represent attribute conditions (such as "role = maintenance engineer" and "equipment model = GE CT-1200"), while non-leaf nodes represent logical operators (such as AND and OR). An example of an access policy tree is "((role = maintenance engineer) AND (equipment model = GE CT-1200)) OR ((role = logistics supervisor) AND (permission = read-only))".

[0093] The data anonymization unit uses the AES-256 algorithm to encrypt and store sensitive fields in maintenance records, and employs a named entity recognition model to identify and replace protected health information in the maintenance records. The AES-256 algorithm uses a 256-bit key length, CBC encryption mode, and a randomly generated initialization vector. The named entity recognition model is trained based on a BiLSTM-CRF architecture and can identify sensitive entities such as patient names, patient identifiers, and device serial numbers.

[0094] The Blockchain Audit Log unit writes access log records to the Hyperledger Fabric permissioned blockchain. This unit includes a log generation subunit, a blockchain writing subunit, and a log query subunit.

[0095] The log generation subunit generates an access log record for each data access. The access log record contains the following fields: user identifier, which identifies the user who performed the access operation; access timestamp, which records the time when the access occurred, with millisecond precision; operation type, including operations such as query, modification, and deletion; accessed data identifier, which identifies the maintenance data that was accessed; and permission verification result, which records the result of CP-ABE permission verification.

[0096] The blockchain writing sub-unit writes access log records to the Hyperledger Fabric permissioned blockchain. Hyperledger Fabric uses a channel mechanism to achieve data isolation, with maintenance data access logs written to a dedicated channel. Smart contracts are responsible for automatically checking the compliance of access log records, including checking whether users have access permissions and whether access operations comply with business rules.

[0097] The log query subunit responds to auditors' query requests by retrieving access log records that match the query criteria from the permissioned blockchain. Query criteria include time range, user ID, and operation type. The immutability of the blockchain ensures the reliability and traceability of the audit logs.

[0098] The system also includes a query complexity evaluation unit, which dynamically adjusts the weight parameters of the hybrid retrieval based on the complexity of the query. This unit is the core component of adaptive optimization, capable of automatically selecting the optimal retrieval strategy according to different query scenarios.

[0099] The query complexity evaluation unit calculates the query complexity score using a multilayer perceptron. Input features include: the number of entities involved in the natural language query, identified by the dependency parsing unit; the number of relation types and layers, obtained through knowledge graph queries; and the amount of data processed, estimated through historical query statistics. The multilayer perceptron has an input layer, a hidden layer, and an output layer. The hidden layer has 64 nodes and uses ReLU as the activation function. The output layer uses the Sigmoid function to map the complexity score to the interval [0,1].

[0100] The formula for calculating the query complexity score is as follows:

[0101] C score =σ(W2·ReLU(W1·x+b1)+b2),

[0102] Among them, C score The query complexity score ranges from [0,1]; x is the input feature vector, which includes three components: number of entities, number of relation layers, and amount of data processing; W1 is the first-layer weight matrix with a dimension of 64×3; b1 is the first-layer bias vector with a dimension of 64; W2 is the second-layer weight matrix with a dimension of 1×64; b2 is the second-layer bias scalar; σ is the Sigmoid activation function.

[0103] In response to a query complexity score lower than a preset complexity threshold (0.5 in this embodiment), the vector retrieval weight parameter is set to a first value (0.5 in this embodiment), and the keyword retrieval weight parameter is set to a second value (0.5 in this embodiment), employing a balanced retrieval strategy. In response to a query complexity score not lower than a preset complexity threshold, the vector retrieval weight parameter is set to a third value (0.8 in this embodiment), and the keyword retrieval weight parameter is set to a fourth value (0.2 in this embodiment), emphasizing a semantic understanding-based retrieval strategy.

[0104] The system provided by this invention has been deployed and tested in a top-tier hospital. The test dataset includes 1,000 maintenance query samples, covering three scenarios: routine maintenance queries, technical consultations, and emergency fault queries. The testing period was from October to November 2024.

[0105] In terms of response efficiency, the system's average response time is 2.8 seconds, which is 99.1% faster than the traditional ERP system (45 minutes) and 99.4% faster than the standalone RAG system (8 minutes). The response time for P1 level faults (such as the CT scanner failing to start) is no more than 5 seconds, meeting the hospital's operational requirement of "responding to emergency faults within 10 minutes".

[0106] In terms of accuracy, the system's hallucination rate decreased to 3.2%, a reduction of 85.6% compared to a standalone RAG system (average 22.3%). The generated content achieved a 98% compliance rate with equipment maintenance specifications, a 15.3% improvement over the general large language model (85%). The knowledge graph reasoning accuracy reached 92%, accurately associating fault symptoms with maintenance solutions.

[0107] In terms of data integration capabilities, the system achieves a multi-source data integration coverage rate of 98.5%, a 103.1% improvement over existing systems (average 48.5%). Cross-system query operations have been reduced from 5 steps to 1 step, and the time for an engineer to perform a single query has been reduced from 45 minutes to 2.8 seconds.

[0108] In terms of compliance and security, the system achieves 100% compliance, passing compliance audits with HIPAA and domestic personal information protection regulations. Access control precision reaches the device model level, with no unauthorized access incidents detected. Data anonymization rate reaches 100%, and sensitive information has not been leaked. The query and traceability efficiency of blockchain audit logs is 80% higher than traditional log systems.

[0109] In terms of operation and maintenance efficiency, the time spent on manual verification has decreased from 40% to 2%, the resolution rate of P1 level work orders has increased from 75% in the existing system to 99.2%, and the equipment repair time has been shortened from 72 hours to 2.1 hours.

[0110] Those skilled in the art should understand that the above embodiments are merely illustrative examples, and various modifications and variations can be made to the above embodiments without departing from the principles of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A hospital logistics engineering maintenance data RAG query system based on multi-agent collaboration, characterized in that, include: A multi-agent collaborative scheduling module is used to coordinate message passing and task scheduling among task decomposition agents, retrieval agents, generation agents and verification agents based on a publish-subscribe message mechanism. The message includes task identifier, sub-task status, retrieval result and verification feedback. The task decomposition agent is used to receive natural language queries input by users, identify device entities, fault types and component relationships in the query through dependency analysis, decompose the natural language query into a structured sub-task list based on a dynamic block strategy, and publish the structured sub-task list to the multi-agent collaborative scheduling module. A retrieval agent is used to subscribe to the structured subtask list, execute a hybrid retrieval strategy for each subtask, obtain maintenance data related to the subtask from a multimodal knowledge base, and perform semantic expansion based on a medical equipment maintenance knowledge graph to expand the retrieval coverage. The multimodal knowledge base construction module is used to perform spatiotemporal embedding processing on structured maintenance data to generate spatiotemporal embedding vectors, to perform vectorization processing on unstructured maintenance data to generate text vector representations, and to connect vector databases and relational databases through the GMR-Tree hybrid index structure to achieve unified retrieval of multimodal data. The hybrid retrieval execution module is used to perform semantic vector retrieval and output vector retrieval results through a vector retrieval engine, perform keyword matching retrieval and output keyword retrieval results through a keyword retrieval engine, and perform weighted fusion and fusion of the vector retrieval results and the keyword retrieval results through a result fusion and sorting unit to generate a fusion and sorting result; A generating agent is used to subscribe to the fusion ranking results, generate a draft maintenance plan based on a medical-specific large language model combined with dynamic prompting engineering, and send the draft maintenance plan to the verification agent; The verification agent is used to evaluate the evidence relevance between the fusion ranking result and the draft maintenance plan through an evidence re-ranking model to generate an evidence relevance score, check whether the draft maintenance plan complies with medical device maintenance specifications through a rule engine to generate a compliance check result, and determine whether to output a validated maintenance plan based on the evidence relevance score and the compliance check result.

2. The system according to claim 1, characterized in that, The task decomposition agent also includes: The dependency analysis unit is used to perform syntactic analysis on the natural language query using a dependency analysis model finely tuned in the field of medical maintenance, and to identify the dependency relationships between equipment entities, fault entities, and component entities, wherein the dependency relationships include subject-verb relations, verb-object relations, and modification relations. The semantic extension unit is used to map the identified fault entities to the associated fault diagnosis paths based on the UMLS medical knowledge graph, and add the associated entities in the fault diagnosis paths to the structured subtask list.

3. The system according to claim 1, characterized in that, The multimodal knowledge base construction module also includes: The spatiotemporal embedding processing unit is used to process sensor time-series data through a graph attention network to generate entity vectors, and to integrate timestamp location encoding and device location one-hot encoding into the entity vectors to generate the spatiotemporal embedding vector, wherein the spatiotemporal embedding vector has a dimension of 1024. The nodes of the GMR-Tree hybrid index structure include a minimum boundary region to preserve device geographic location features, a semantic signature to store text and vector features, and an index pointer to associate vector databases and relational databases.

4. The system according to claim 1, characterized in that, The hybrid retrieval execution module also includes: The vector retrieval engine uses the Sentence-BERT model to vectorize the retrieval request and performs an approximate nearest neighbor search through the FAISS index to output the vector retrieval results. The keyword retrieval engine uses the BM25 algorithm to calculate the word matching score between the retrieval request and the candidate documents to output the keyword retrieval results. The result fusion and sorting unit uses a reciprocal ranking fusion algorithm to fuse the vector retrieval results and the keyword retrieval results, wherein the weight parameter of the vector retrieval results is a first preset weight value, and the weight parameter of the keyword retrieval results is a second preset weight value. The fusion calculation process of the result fusion sorting unit includes: For each candidate document, obtain the first sorting position of the candidate document in the vector retrieval results and the second sorting position in the keyword retrieval results; The fusion score of the candidate document is calculated based on the first preset weight value, the second preset weight value, the first sorting position, and the second sorting position. All candidate documents are sorted in descending order according to the fusion score to generate the fusion ranking result; The first preset weight value ranges from 0.6 to 0.8, the second preset weight value ranges from 0.2 to 0.4, and the sum of the first preset weight value and the second preset weight value is 1.

5. The system according to claim 1, characterized in that, It also includes a security and compliance management module, which uses the CP-ABE encryption control unit to perform fine-grained permission verification based on user attribute sets and preset access policy trees to control access permissions for maintenance data, and uses the blockchain audit log unit to write access logs to the permissioned blockchain to achieve tamper-proof access auditing.

6. The system according to claim 1, characterized in that, The verification agent also includes: The evidence reordering model uses the BgeRerank model to calculate the semantic relevance score between each evidence document and the draft maintenance plan in the fusion ranking result. In response to the semantic relevance score being lower than a preset evidence relevance threshold, the verification agent sends a regeneration instruction to the generation agent; In response to the semantic relevance score being not lower than a preset evidence relevance threshold and the compliance check result being compliant, the verification agent outputs the verified repair plan.

7. The system according to claim 1, characterized in that, The hybrid retrieval execution module further includes a secondary sorting unit, used for: For a predetermined number of candidate documents that rank highly in the fusion ranking results, the next sentence prediction module of the BERT model is used to calculate the logical coherence score between each candidate document and the natural language query. The preset number of candidate documents are reordered based on the logical coherence score; The preset quantity ranges from 2 to 5.

8. The system according to claim 1, characterized in that, The security compliance management module also includes: The CP-ABE encryption control unit generates a system public key and a master key based on a bilinear cyclic group, and generates a user private key based on the user's role attributes and device model attributes. The leaf nodes of the preset access policy tree are attribute conditions, and the non-leaf nodes of the preset access policy tree are logical operators. The data desensitization unit is used to encrypt and store the equipment serial number field in the maintenance record using the AES-256 algorithm, and to identify and replace the protected health information in the maintenance record using the named entity recognition model.

9. The system according to claim 1, characterized in that, The blockchain audit log unit includes: The log generation subunit is used to generate access log records for each data access. The access log records include user identifier, access timestamp, operation type, accessed data identifier, and permission verification result. The blockchain writing sub-unit is used to write the access log records to the Hyperledger Fabric permissioned blockchain and to automatically check the compliance of the access log records through smart contracts. The log query subunit is used to retrieve access log records that meet the query conditions from the permissioned blockchain in response to the query request from the auditor.

10. The system according to claim 1, characterized in that, The system also includes a query complexity evaluation unit, used for: Based on the number of entities involved in the natural language query, the number of relation types and the amount of data processed, a multilayer perceptron is used to calculate the query complexity score. In response to the query complexity score being lower than a preset complexity threshold, the first preset weight value is set to a first value, and the second preset weight value is set to a second value. In response to the query complexity score being not lower than a preset complexity threshold, the first preset weight value is set to a third value, and the second preset weight value is set to a fourth value. Wherein, the first value is less than the third value, and the second value is greater than the fourth value.