Search

CN-121034567-B - Hospital logistics scheduling system and method based on large language model

CN121034567BCN 121034567 BCN121034567 BCN 121034567BCN-121034567-B

Abstract

The application discloses a hospital logistics scheduling system and method based on a large language model, which relate to knowledge question answering, and are characterized by constructing a logistics service data warehouse, reading structured data from the logistics service data warehouse, carrying out semantic analysis on text data in the structured data by using the large language model to generate a knowledge triplet, carrying out knowledge fusion on entities and relations in the knowledge triplet by calculating vector similarity, constructing a logistics service knowledge graph according to the fused knowledge triplet, receiving a natural language service request of a user, carrying out intention recognition by using the large language model, converting the extracted intention into structured query data, searching in the logistics service knowledge graph according to the structured query data, acquiring resource state data from the logistics service data warehouse, and generating a scheduling scheme by using a scheduling agent based on a LANGCHAIN frame.

Inventors

  • MA LONG
  • ZHANG YONGHUI
  • ZHANG BING

Assignees

  • 深圳医维智慧科技有限公司

Dates

Publication Date
20260505
Application Date
20250716

Claims (8)

  1. 1. A hospital logistics scheduling method based on a large language model, comprising: S1, collecting original data of a hospital logistics service, preprocessing the original data through data extraction, conversion and loading, and storing the preprocessed data according to a star database architecture to construct a logistics service data warehouse; S2, reading structured data from a logistics service data warehouse, carrying out semantic analysis on text data in the structured data by using a large language model, identifying entities by named entities, and extracting and acquiring relationships among the entities by relationships to generate a knowledge triplet; S3, converting the entities and the relations in the knowledge triples into vectors, carrying out knowledge fusion by calculating the similarity of the vectors, and constructing a logistic service knowledge graph according to the fused knowledge triples; s4, receiving a natural language service request of a user, carrying out intention recognition by using a large language model, and converting the extracted intention into structured query data; s5, searching in the logistic service knowledge graph according to the structured query data, acquiring resource state data from a logistic service data warehouse, and generating a scheduling scheme by scheduling agents based on LANGCHAIN frames; s6, carrying out visual processing on the scheduling scheme, and generating a logistic service analysis report according to the logistic service knowledge graph and the scheduling scheme; S5, generating a scheduling scheme by the agent, including: analyzing the query type and the query object according to the structured query data generated in the step S4, and performing graph traversal search in the logistic service knowledge graph to acquire entity nodes and relationship edges related to the query object; According to the entity nodes, similar case retrieval is carried out in the logistic service knowledge graph, and the historical processing cases with the similarity larger than a preset threshold value are retrieved through calculating the similarity between the current fault entity and the historical fault entity; According to the retrieved historical processing cases, calculating success rates and average processing time lengths of different processing personnel when similar faults are processed, identifying an optimal processing mode, and generating a personnel recommendation list and estimated processing time based on the historical processing cases; acquiring current resource state data from a logistics service data warehouse, wherein the current resource state data comprises a personnel real-time position, a current task state and a device running state, and acquiring a personnel list to be selected by combining a personnel recommendation list; based on LANGCHAIN frames, generating a scheduling scheme according to the input scheduling information through a large language model; based on LANGCHAIN framework, generating a scheduling scheme by a large language model, comprising: Constructing a layered scheduling Agent framework based on LANGCHAIN framework, configuring an Agent module for hierarchical information management, establishing a three-layer information structure of a core information layer, an extension information layer and a detailed information layer, and defining the priority and the calling strategy of each layer of information; Carrying out layering processing on the scheduling information, taking a query object in the structured query data as a core information layer, taking a list of people to be selected and estimated processing time as an expansion information layer, and taking the detailed content of a historical processing case and current resource state data as a detailed information layer; Constructing a promt template system supporting hierarchical calling, comprising an initial decision template, an information supplementing template and a decision template, When a first round of scheduling decision is made, inputting a related entity node of a query object of a core information layer into a large language model, analyzing the fault type and the emergency degree, and generating a preliminary scheduling strategy; According to the preliminary scheduling strategy, extracting candidate personnel matched with the initial scheduling strategy and corresponding estimated processing time in a personnel list to be selected from an expanded information layer through a Tool calling mechanism of LANGCHAIN, and acquiring the current task state of the candidate personnel from a detailed information layer to generate a second round of decision context; And generating a final scheduling scheme through a large language model according to the decision context of the second round.
  2. 2. The large language model based hospital logistics scheduling method of claim 1, wherein: S1, constructing a logistics service data warehouse, which comprises the following steps: Collecting original data of a hospital logistics service from a business database of a hospital logistics management system, wherein the original data comprises equipment warranty records, maintenance logs, personnel scheduling tables and task completion records; Extracting time fields, equipment identification fields, fault description fields, handler fields and processing result fields from different data sources; The extracted data is subjected to data conversion processing, wherein time data in different formats are unified into a standard time format, a text type equipment identifier is converted into unified codes, and data cleaning is performed on a fault description text to remove invalid characters; Carrying out data loading processing on the converted data, loading service data into a fact table according to a star database architecture, and respectively loading equipment attributes, personnel attributes and time attributes into corresponding dimension tables; and establishing an association relation between the fact table and the dimension table, wherein the fact table is connected with each dimension table through an external key to form a star-shaped structure which takes the fact table as a center and surrounds the dimension table, and the star-shaped structure is used as a logistic service data warehouse.
  3. 3. The large language model based hospital logistics scheduling method of claim 2, wherein: s2, generating a knowledge triplet, including: reading business data containing fault description fields and processing result fields from a fact table of a logistics service data warehouse, reading corresponding equipment attribute data and personnel attribute data from a dimension table, and combining the read data to form structured data; Extracting text data of a fault description field and a processing result field from the structured data, inputting the text data into a large language model for semantic analysis, and obtaining an analysis text containing semantic labels; carrying out named entity recognition on the analysis text, recognizing a device name entity, a fault type entity, a processing measure entity and a processing personnel entity, and distributing a unique identifier for each entity; Extracting and analyzing the context relation of the entity in the text through the relation according to the identified entity, and extracting the fault relation between the equipment name entity and the fault type entity, the solution relation between the fault type entity and the processing measure entity and the executor relation between the processing measure entity and the processing personnel entity; And generating knowledge triples according to the format of the subject entity-relation-object entity by taking the entity as a node and the relation as an edge, wherein each knowledge triplet is expressed as a structure of < entity 1, relation and entity 2 >.
  4. 4. A large language model based hospital logistics scheduling method in accordance with any one of claims 1 to 3, wherein: s3, constructing a logistic service knowledge graph according to the fused knowledge triples, wherein the logistic service knowledge graph comprises the following steps: extracting the entity and the relation in each knowledge triplet, mapping the entity and the relation to a vector space by utilizing word embedding, and generating a vector with fixed dimension; For the different knowledge triples, calculating cosine similarity between corresponding entity vectors, and judging that the corresponding entity is a similar entity when the similarity is larger than a preset threshold; carrying out knowledge fusion on knowledge triples of similar entities, wherein the knowledge fusion comprises merging different descriptions pointing to the same entity, unifying entity naming and eliminating repetitive relations, and generating a fused knowledge triplet set; And constructing a directed graph structure by taking the entities in the fused knowledge triplet set as graph nodes and the relationships as the edges of the graph, and taking the directed graph structure as a logistic service knowledge graph, wherein each node stores the attributes of the entities and each edge stores the relationship types.
  5. 5. The large language model based hospital logistics scheduling method of claim 4, wherein: S4, carrying out intention recognition by using a large language model, and converting the extracted intention into structured query data, wherein the method comprises the following steps: receiving a natural language service request input by a user through a natural language interactive interface, wherein the natural language service request comprises an equipment fault query request, a maintenance personnel query request, a historical fault statistics request or a maintenance progress query request; preprocessing a natural language service request, wherein the preprocessing comprises word segmentation processing, stop word removal and part-of-speech tagging, and a preprocessed request text is generated; inputting the preprocessed request text into a large language model, guiding the large language model to identify user intention through prompt word engineering, and extracting intention types and query parameters, wherein the intention types comprise query intention, statistical intention, scheduling intention or analysis intention; generating structured query data comprising query types, query objects, query conditions and query time ranges according to the identified intent types and query parameters; And (3) verifying the structured query data, checking whether the query object exists in the logistic service knowledge graph constructed in the step (S3), if not, returning prompt information to prompt the user to input again, and if so, transmitting the verified structured query data to the subsequent step.
  6. 6. The large language model based hospital logistics scheduling method of claim 1, wherein: the large language model uses DeepSeek.
  7. 7. The large language model based hospital logistics scheduling method of claim 1, wherein: The initial decision template contains only input placeholders for the core information layer to avoid first invocation beyond the context window limits of the large language model.
  8. 8. A hospital logistics scheduling system based on a large language model for performing the method of any one of claims 1 to 7, comprising: The data warehouse module is used for receiving the original data of the hospital logistics service, extracting, converting and loading the original data through the ETL, and constructing a logistics service data warehouse by adopting a star-shaped database architecture comprising a fact table and a dimension table; the knowledge extraction module is used for obtaining structured data in the logistic service data warehouse, carrying out semantic analysis on text data in the structured data by utilizing a large language model, identifying entities containing equipment names, fault types, processing measures and processing personnel by using named entities, and obtaining association relations among the entities by relation extraction to obtain knowledge triples containing the entities and the relations; The knowledge question-answering module is used for constructing a logistics service knowledge graph based on workflow arrangement of LANGCHAIN frames and according to the knowledge triples, receiving a natural language query request of a user, acquiring a query intention of the user through a large language model, searching in the logistics service knowledge graph according to the query intention, and returning a query result; The visualization module generates a visualization result through a large language model according to a natural language query request of a user and a returned query result; the report generation module is used for generating a logistic service analysis report containing fault analysis and processing suggestions based on a preset report template and user customization requirements according to the visualization result; The flow management module is used for storing hospital organization architecture data, employee information, post responsibilities and logistic service standard flows as resource state data; the intelligent scheduling module is used for constructing a scheduling Agent based on the Prompt and Agent modules LANGCHAIN and generating a personnel scheduling scheme according to the logistic service analysis report and the resource state data; And the data security module is used for desensitizing the resource state data.

Description

Hospital logistics scheduling system and method based on large language model Technical Field The application relates to the field of knowledge questions and answers, in particular to a hospital logistics scheduling system and method based on a large language model. Background With the rapid development of the medical industry and the continuous expansion of the hospital scale, the variety and complexity of the hospital logistics service are obviously increased, and the medical equipment report, the electromechanical equipment report, the security equipment report, the engineering report, the accompanying inspection of patients, the emergency cleaning, the hidden danger report and other various service types are covered. The hospital logistics service is used as an important support for ensuring the normal operation of medical activities, and the dispatching efficiency of the hospital logistics service directly influences the medical service quality. However, the conventional manual scheduling method needs to configure a large number of personnel to process various service worksheets, which not only has high cost of human resources, but also has long scheduling response time, especially when processing an emergency fault, the optimal processing time is often delayed because related information cannot be quickly acquired and analyzed. The existing intelligent hospital logistics scheduling system realizes informatization management to a certain extent, but faces serious scheduling decision efficiency problems in practical application. The concrete steps are as follows: Firstly, the information quantity to be comprehensively considered in the scheduling decision is huge, and the information quantity comprises multidimensional data such as equipment history fault records, maintenance personnel skill files, current task allocation states, equipment position information and the like. When the traditional system processes the massive information, the decision quality is not high due to the fact that simple rule matching is adopted, or a dispatcher is required to manually inquire a plurality of system interfaces to acquire information, so that dispatching efficiency is seriously affected. Second, existing systems lack an efficient utilization mechanism for historical experience. A large number of historical fault handling cases and successful experience are stored in different databases in a scattered manner, and cannot be quickly searched and referenced in scheduling decisions, so that each scheduling is like 'from zero', and the past best practices cannot be referred to. Again, with the advent of large language model technology, while its powerful semantic understanding and reasoning capabilities provide new possibilities for intelligent scheduling, the contextual window limitations inherent to large language models become a key bottleneck restricting their application in hospital logistics scheduling scenarios. When all relevant fault information, personnel information, historical cases and other input models are required to be comprehensively decided, information interception is often required to be carried out due to exceeding context limits, so that key information is lost, and the quality and feasibility of a scheduling scheme are seriously affected. Therefore, how to effectively organize and utilize massive logistic service data under the context limitation of a large language model, so as to realize rapid and accurate intelligent scheduling decision, and become a technical problem to be solved urgently for the logistic service management of hospitals. Disclosure of Invention Aiming at the problem that the scheduling efficiency of the hospital logistics service is low in the prior art, the application provides a hospital logistics scheduling system and method based on a large language model, which adopts a hierarchical information processing architecture and utilizes a Tool calling mechanism of LANGCHAIN frames, a promt template and the like, so that the problem that the scheduling decision efficiency is low due to information overload in the fault processing of the hospital logistics equipment is effectively solved. The application provides a hospital logistics scheduling system based on a large language model, which comprises a data warehouse module, a data processing module and a data processing module, wherein the data warehouse module receives hospital logistics service original data, extracts, converts and loads the original data through ETL, and adopts a star-shaped database architecture comprising a fact table and a dimension table to construct a logistics service data warehouse; the system comprises a knowledge extraction module, a knowledge question-answering module, a intelligent scheduling module, a report generation module, a process management module, a resource state data generation module, a scheduling module and a resource state data generation module, wherein the knowledge extraction modul