Medical supplies management system and supplies management method
By building a medical material management system in the SPD system and combining natural language processing technology, the complexity and insufficient informationization of medical consumables management are solved, and the automation and refinement of consumables management is realized, ensuring the timely supply of consumables and quality and safety.
Patent Information
- Application Number
- CN202510741101.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-05
AI Technical Summary
There are many types of medical consumables and difficult management. Under the traditional management model, consumables are easily lost, expired and short of inventory. The hospital's information level is low, making it difficult to meet the requirements of timeliness and quality and safety.
A medical material management system is built based on the SPD system, combined with natural language processing technology, through the interaction of user domain, business domain and data domain, it realizes enhanced update of text information and generation of SQL query statements, improving information expression accuracy and system linkage.
It realizes the automation and refinement of medical material management, improves the accuracy and efficiency of inventory management, ensures the timely supply of consumables and quality and safety, and reduces management costs.
Smart Images

Figure CN120280106B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology and is a medical automation management solution, specifically to a medical supplies management system and a supplies management method. Background Art
[0002] Medical consumables are commonly used products in clinical hospitals, and their role for hospitals and patients is self-evident. Hospitals generally classify medical consumables into high-value consumables and low-value consumables, and some classify them into daily-use medical consumables and implantable medical consumables. However, the variety of medical consumables is huge, reaching tens of thousands, making management very difficult, and it is difficult to arrange them neatly and orderly for easy use. Under the traditional hospital management model, in addition to warehouse management personnel, medical staff also spend a lot of time managing medical consumables, which not only increases the workload of medical staff, but also easily leads to problems such as loss, expiration, and inventory shortages of consumables, making the efficient management of medical supplies difficult. In addition, the hospital's shortcomings in information construction and the lack of authoritative management cases have further restricted the improvement of medical supplies management. Summary of the Invention
[0003] In response to the above technical problems, this application provides a medical supplies management system and a materials management method. It can build a medical supplies management system based on the SPD system and combine natural language processing to achieve automated task understanding and execution, thereby improving the level of medical supplies management and enabling users to quickly and conveniently use different services. In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0004] In a first aspect, a medical supplies management system is provided, which includes a hospital information system, an SPD system and a supplier ERP system; the hospital information system and the SPD system are linked through an order integration interface system, and at least one user domain is configured in the hospital information system, and a business domain and a data domain are configured in the order integration interface system; the user domain is used to receive text messages initiated by users and transmit the text messages to the business domain, the business domain and the data domain are used to parse the text messages and generate corresponding SQL query statements, and generate query results based on the query statements and return them to the user domain or / and the target subsystem in the SPD system, and the target subsystem issues corresponding action instructions based on the query results.
[0005] In some specific implementations, the data domain includes a vector database and a business database, the vector database is deployed with a query sample set and a dictionary item set, and the business database is deployed with a medical data feature form and a business data form.
[0006] In a second aspect, a medical supplies management method is provided, which is applied to any of the medical supplies management systems described above, and the method includes: receiving text information sent by a user domain and enhancing and updating the text information to obtain target text information; obtaining semantic information of the target text information, and determining the maximum similarity vector between the semantic information and a vector database, and generating an SQL query statement based on the maximum similarity vector; generating a query result based on the correspondence between the SQL query statement and the business database.
[0007] In some specific implementations, the text information is enhanced and updated, including: performing vector decomposition on the text information to obtain a vector representation of the text information; and performing intent classification based on the vector representation to determine the intent classification result corresponding to the text information, and determining a text template and process rules based on the intent classification result, and rewriting and updating the text information based on the text template to obtain the target text information.
[0008] In some specific implementations, the rewriting and updating of the text information based on the text template includes: determining the entity type label in the text template, and filling the text template with the word segmentation corresponding to the vector representation of the same entity type label in the text information.
[0009] In some specific implementations, the method further includes: determining the difference between the entity type label in the current text information and the entity type label in the previous round of text information, retrieving the historical SQL query statement generated in the previous round based on the difference, and updating the acquired semantic information based on the historical SQL query statement.
[0010] In some specific implementations, updating the acquired semantic information based on the historical SQL query statements includes: encoding the target text information and the historical SQL query statements respectively to obtain corresponding semantic feature information and SQL character vectors.
[0011] In some specific implementations, determining the maximum similarity vector between the semantic information and the vector database includes: performing attention calculations on the semantic feature information and the SQL character vector respectively, concatenating the calculation results with the hidden vector output by the long short-term memory network to obtain a fused query vector, and matching the fused query vector with the vector database.
[0012] In some specific implementations, generating an SQL query statement based on the maximum similarity vector includes: determining a query sample based on the result corresponding to the maximum similarity vector, and determining a matching item between each field value in the target text information and a set of dictionary items, and updating the query sample based on the matching item to obtain the SQL query statement.
[0013] In some specific implementations, generating a query result based on the correspondence between the SQL query statement and the business database includes: configuring rules for the query result based on process rules.
[0014] The technical solution provided in the embodiments of this application builds a front-to-back medical supplies management system based on the SPD system, achieving system-level linkage between scenario applications and supplies management. Furthermore, through the supplies management method configured in the system, natural language processing technology is used to update and enhance the input text information to improve the level of information expression. The corresponding query statement is determined based on the semantic characteristics of the text information and the configured vector database. The query statement is updated and supplemented through the dictionary item set in the system, making the generated SQL query statement more complete and accurate, thereby improving the level of medical supplies management and enabling users to quickly and conveniently use different services. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] The methods, systems, and / or programs in the accompanying drawings will be further described according to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. These exemplary embodiments are non-limiting exemplary embodiments, wherein example numerals represent similar structures in the various views of the drawings.
[0017] Figure 1 This is a structural diagram of the medical supplies management system provided in an embodiment of the present application.
[0018] Figure 2 This is the user domain interface view provided by the embodiment of the present application.
[0019] Figure 3 This is a schematic diagram of the data domain structure provided in an embodiment of the present application.
[0020] Figure 4 It is a flow chart of the medical supplies management method provided in the embodiment of the present application.
[0021] Figure 5 This is a schematic diagram of the management device structure provided in an embodiment of the present application.
[0022] Figure 6 This is a schematic diagram of the terminal device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to better understand the above technical solution, the technical solution of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0024] In the following detailed description, numerous specific details are set forth by way of example in order to provide a thorough understanding of the relevant teachings. However, it will be apparent to one skilled in the art that the present application can be practiced without these details. In other instances, well-known methods, procedures, systems, compositions, and / or circuits have been described at a relatively high level, without detail, to avoid unnecessarily obscuring aspects of the present application.
[0025] Flowcharts are used in this application to illustrate the execution processes performed by the system according to the embodiments of the present application. It should be clearly understood that the execution processes of the flowcharts may not be executed in sequence. Instead, these execution processes may be executed in reverse order or simultaneously. In addition, at least one additional execution process may be added to the flowchart. One or more execution processes may be deleted from the flowchart.
[0026] Before further explaining the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0027] (1) In response to, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0028] (2) Based on, used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0029] Compared with ordinary commodities, medical consumables have the characteristics of a wide variety, high quality requirements and large usage, which makes their management quite challenging. The management of medical consumables has the following characteristics: (1) There are many types and lack of standards. With the development of medical technology and the improvement of medical level, more and more categories of medical consumables have been developed to treat a variety of diseases in modern people. However, there is no clear classification standard for medical devices. Most hospitals classify consumables according to their value, which easily brings many problems to consumables management. (2) The level of informatization is low. In order to improve management efficiency and make management data more visual and accurate, hospitals gradually use information systems to manage medical data, so that hospitals can more conveniently manage the procurement, acceptance, warehousing, and outbound processes of consumables and reduce the possibility of errors. However, due to the high price and high operating costs of general large-scale and easy-to-use information systems, they have not received much attention from many small hospitals. The traditional management model is not only inefficient but also prone to errors, and can no longer meet the growing demand for consumables management. (3) The demand is time-sensitive. Medical consumables are different from conventional commodities. It directly affects whether the rescue operation can be carried out quickly. Therefore, it is particularly important to ensure that demand is met in a timely manner. This means that medical consumables need to maintain a stable inventory to avoid delays in treatment due to out-of-stock situations. Even if out-of-stock situations occur, they must be replenished quickly to prevent further serious consequences. (4) High quality and safety. The medical industry must ensure the safety of medical consumables, otherwise medical accidents may occur. Therefore, consumables have extremely high requirements in terms of quality, temperature, timeliness, etc., and must meet specified standards to meet the needs of quality and safety.
[0030] Due to the wide variety of medical consumables, the low level of information technology in some hospitals, and the complex structure and difficulty in controlling the medical supply chain itself, many inventory inaccuracies in medical consumables management have occurred. A critical link in the medical supply chain is the management of medical consumables. With the emergence of refined management models, hospitals are increasingly focusing on using innovative methods to reduce costs and increase efficiency. The SPD model is divided into three business segments: Supply, Processing, and Distribution. This model connects external suppliers or third-party logistics organizations, the hospital's general warehouse, and in-hospital departments, achieving coordination and meeting needs within and outside the medical supply chain. Third-party logistics organizations can help hospitals with refined inventory management, while also strengthening the hospital's full-process supervision and reducing hospital management costs. These three business operations are implemented using the third-party logistics organization's SPD system and the hospital's HIS system to complete management work simultaneously.
[0031] In response to current management needs, a medical supplies management system based on the SPD model is provided in the present application embodiment. Figure 1This system 100 includes a hospital information system 110, an SPD system 120, and a supplier ERP system 130. The hospital information system 110 is linked to the SPD system 120 via an order integration interface system 140, and the SPD system 120 is linked to the supplier ERP system 130 via an off-site order integration interface system 150. The central point of this system is the SPD system. The central warehouse in the SPD system is responsible for the distribution and replenishment management of medicines and consumables to secondary warehouses or departments. The SPD system will monitor the inventory in real time and replenish the inventory to the hospital in a timely manner when the inventory is insufficient. In other words, the distribution method has changed from the previous pull-type distribution based on demand to the push-type distribution based on system prediction and calculation. During the distribution process, the SPD central warehouse will actively replenish the secondary warehouses or departments. In the event of an emergency shortage, emergency replenishment can also be carried out to meet demand, ensure the timeliness of material supply and the safety of patients.
[0032] To enhance the management sophistication of secondary and tertiary warehouses, the system has installed smart medicine cabinets in each department and ward, using delivery boxes for distribution. The installation of smart medicine cabinets in wards not only ensures more secure storage of consumables, but also enables traceability of consumable consumption. Most importantly, it enables medical staff to obtain the necessary consumables in the shortest possible time, significantly shortening response times and improving the hospital's service level and efficiency. Furthermore, because the SPD system can accurately predict and record consumable usage, it can also provide data support and ordering recommendations to the procurement department.
[0033] Among them, the hospital information system (HIS) may include outpatient (emergency) fee collection system, outpatient and emergency doctor workstation, inpatient billing system, hospital department system, resident doctor workstation, nurse workstation, mobile nurse station and other systems and interfaces; the SPD system includes outpatient (emergency) pharmacy management system, central pharmacy management subsystem, large warehouse storage management system, configuration center management subsystem and equipment control system, among which the equipment control system is used to control automatic dispensing machines, automatic medical supplies packaging machines, intelligent storage machines and transmission equipment.
[0034] Specifically, the target subsystem can be understood as the smart medicine cabinets installed in various departments and wards. That is, the medical supplies management system in this embodiment can query the corresponding medical supplies management status based on instructions issued by medical staff, and then distribute the target medical supplies to the smart medicine cabinets in the corresponding departments or wards through the target subsystem, thereby achieving comprehensive medical supply query and distribution within the hospital.
[0035] The instructions issued to medical personnel in this embodiment differ from those in the prior art in that they can be text messages. Specifically, medical personnel can enter natural text when issuing tasks, which is then parsed by the order integration interface system and generated into a corresponding SQL query statement. The SQL query statement is then used to perform the final query and issue the instruction.
[0036] Therefore, in one possible implementation, the hospital information system is configured with at least one user domain, each corresponding to a service initiator or departmental unit, for initiating medical services. In this embodiment, medical services refer to services related to medical supplies and do not include actual medical treatment services. The user domain is connected to the SPD system via the order integration interface system to process services. The service processing relies on the service domain and data domain configured in the order integration interface system.
[0037] Specifically, the business domain and data domain receive the natural text language transmitted by the user domain and parse the text information to generate corresponding SQL query statements, and generate query results based on the query statements and return them to the user domain and / or the target subsystem in the SPD system.
[0038] Among them, see Figure 2 This is the user domain interface view in this embodiment. The user domain can be understood as the client corresponding to the medical staff or the unit department. The client can be built on the mini program or can be an independently deployed application software. A chat interface is configured in this client, which includes a session management function. The user's query records and interactive content during use are saved, which is convenient for the user to review historical queries in subsequent visits or to continue previous operations after interruption. Taking into account that users may have requirements for visual representation of data, this system has the ability to automatically convert the list-based data in the query results into charts, which effectively improves the readability of the data and makes data analysis more intuitive and easy to understand.
[0039] The business and data domains are configured in the order integration interface system to parse text information entered by the user and obtain query results. The data processing process in the business domain primarily involves enhancing, updating, and parsing text information, and generating SQL query statements through vector matching and retrieval.
[0040] See Figure 3Regarding the schematic diagram of the data domain structure, in this embodiment, a vector database 310 and a business database 320 are deployed in the data domain 300, which are used to process vector matching and retrieval tasks, and effectively manage and query a large amount of medical business data. In the vector database, a query sample set 311 for storing and managing the processing process and a plurality of dictionary item sets 312 for storing various professional terms and classification data are deployed. The business database 320 is constructed based on PostgreSQL, and a plurality of business data tables 321 are deployed, and each business data table contains a plurality of fields. The design of the data tables and fields fully considers the specific requirements and data characteristics of the medical field, and reduces the space-time complexity of the system when processing medical-related queries.
[0041] For the medical material management system provided in this embodiment, a medical material management method is configured in the order integration interface system to implement the processing and result generation of tasks initiated by the user domain. For this method, please refer to Figure 4 , including the following steps:
[0042] Step S41. Receive the text information sent by the user domain and enhance and update the text information to obtain the target text information.
[0043] In this embodiment, the user inputs text information on the terminal. The text information can be understood as natural language. Its expression method and the content of the text input take into account both user habits and expression convenience, and is usually colloquial content. For different users, they have different language expression habits, and their information description capabilities and results are also different. And because of the expression method of daily spoken language, the sentences are relatively simple, and there are cases such as abbreviations and aliases, resulting in a large amount of noise in the obtained data information, which needs to be processed and eliminated. And for the problems and the information to be queried, a clear description is a relatively strict requirement, because users' cognitions of a certain problem are different, and there may be a problem that a certain detail or knowledge point is naturally defaulted to be known and then ignored. If it is necessary to check whether the input information omits details or conditions, it will be relatively troublesome in the processing process and affect the use. Moreover, the applicant found that users often input more words unrelated to the business in the text information, such as modal particles like "ma", "ne", "ya", etc.
[0044] Therefore, based on the problems that occur in the above actual use, in order to make the text information processing faster and more accurate. In this embodiment, a text enhancement and update method is provided to enhance and update the text information sent by the user, so that the input text information is updated to the target text information with lower subsequent processing cost while ensuring that its meaning remains unchanged.
[0045] Among them, the processing logic for text enhancement update is to determine the intention corresponding to the text information currently input by the user, and determine the corresponding text template and process rules based on the intention.
[0046] Specifically, the text template in this embodiment is a logical connection relationship between multiple entities. Through this text template, the important entities extracted from the text information can be recombined to obtain the final target text information. As for the process rules, they refer to the processing rules of the business domain. Different intentions have different processing logic for the business domain. For example, when the user's intention is to query, the business domain needs to synchronize the information to be queried to the user domain so that the user can obtain the information, and its process rules are only to obtain the corresponding query information and synchronize it. When the user's intention is to apply for an item, the process rules corresponding to the business domain are to query the corresponding item information, and send the item information to the user domain for secondary confirmation, and query the target subsystem related to the item based on the secondary confirmation feedback result, and issue the application work order to the target subsystem in the SPD system.
[0047] Specifically, for the text information enhancement and update in this embodiment, the text information must first be vectorized to obtain a vector representation of the text information. The vector representation can be obtained using the Word2Vec word vector model, which is used to convert text into a high-dimensional vector representation. The Word2Vec word vector model can be implemented using a model structure in the prior art and will not be described in detail in this embodiment.
[0048] In this embodiment, the obtained vector representation is used to determine its corresponding intent through a recognition model. The recognition model is specifically based on the Text-CNN model, which is a trained and convergent intent recognition model and includes a convolutional layer, a pooling layer, a fully connected layer, and a loss function layer. The convolutional layer uses a one-dimensional convolution to receive the input vector representation, and processes the vector representation using convolution kernels of sizes 3, 4, and 5 to obtain text features. In this embodiment, an excitation layer is also provided at the output of the convolutional layer, with an activation function to improve the nonlinear expression of the network. In this embodiment, the activation function uses the ReLU activation function. After the convolutional layer extracts the text features, it is pooled by the pooling layer to retain important features in the text, effectively reducing the input data size and computational complexity. The pooling operation in this embodiment uses a maximum pooling strategy. A fully connected layer is provided in the final stage of the model to input the pooled feature vector into the loss function layer to calculate the probability distribution of each category. Since the classification task in this embodiment is a multi-classification task, the sigmoid loss function is used in this embodiment.
[0049] In this embodiment, the above processing can determine the intent classification corresponding to the text information provided by the user, update and reorganize the text information according to the intent classification, and determine subsequent feedback based on the intent classification.
[0050] In one possible implementation method, the update and reorganization of text information is carried out by determining the corresponding text template through intent classification, and then the text information is rewritten and updated according to the text template to obtain the target text information. The Prompt template is used for the text template, in which the entity logical relationship and the template base are configured according to different intent classification situations. This implementation obtains the entity type label in this text template, and fills the word segmentation corresponding to the vector representation of the same entity type label in the text information into the above text template, thereby achieving the rewriting and updating of the text information. It can be understood that in this embodiment, only the key entities in the text information are retained, and the key entities are rewritten based on the entity logical relationship of the text template.
[0051] For example, for the text input: What are the top three consumables used in the past month? Through the method proposed in step S41, the intention of this input text information is a query intention, and its key entities are the past month, usage quantity, top three, and consumables. The text template corresponding to the query intention is called, and the above key entities are filled into the text template. The updated text is: Query the top three consumables used in the past month. This case shows that the text information processed in this step is clearer and more specific than the input, and reduces the interference caused by non-standardized terms.
[0052] Step S42: Acquire semantic information of the target text information, determine the maximum similarity vector between the semantic information and a vector database, and generate an SQL query statement based on the maximum similarity vector.
[0053] Step S41 is used to update the text information input by the user to obtain more accurate and complete target text information, thereby enhancing the understanding of the input text. In this embodiment, the corresponding SQL query statement needs to be obtained for the processed target text information. For this purpose, the semantic information of the target text information is first determined, and then the semantic information is compared with the query examples in the configured vector database. Then, each field value in the target text information is matched with the dictionary item set in the vector database to determine the matching items. Finally, the query example is updated based on the matching items to obtain the final SQL statement.
[0054] In this embodiment, the semantic information of the target text information is acquired using an encoder-decoder structure. However, it is worth noting that in a multi-round query scenario, the text information input in each round is correlated. The traditional encoder-decoder structure can only pay attention to the contextual connections between the target text information in the current query round, but may lose the connections between the contexts in the multi-round query scenario. Therefore, in order to make semantic extraction more accurate, it is necessary to pay attention not only to the contextual connections of the current query round, but also to the contextual connections between the text information in the previous and next query rounds.
[0055] Therefore, in this embodiment, in order to ensure the accuracy and completeness of semantic extraction, the input to the encoder-decoder structure includes not only the target text information of the current query round but also the result output of the previous round.
[0056] Therefore, in this embodiment, before performing semantic extraction, it is necessary to determine whether the current inquiry round and the previous inquiry round are related rounds, and determine the accuracy of subsequent semantic information extraction based on the determination result.
[0057] Specifically, the determination of whether a text belongs to a related round is based on the difference between the entity type labels in the current text and those in the previous round. Specifically, if the proportion of entity type labels corresponding to the current text that differ from those in the previous round exceeds a preset threshold, the current text is determined to be unrelated to the previous round. Otherwise, the current text is determined to be related to the previous round, and the features corresponding to the historical SQL query statements in the previous round need to be combined during this round of processing to obtain a complete semantic feature expression.
[0058] Specifically, we first explain the encoder-decoder structure corresponding to multiple rounds of queries. In this embodiment, the main structures of both the encoder and decoder are long short-term memory networks, and the decoder is equipped with an attention mechanism. The long short-term memory network can be a general network in the prior art, and its network structure is not further described in this embodiment.
[0059] The encoder is used to obtain the semantic feature information corresponding to the target text information, and the decoder is used to splice the semantic feature information with the SQL character vector corresponding to the historical SQL query statement based on the attention mechanism. The calculation result is then spliced with the hidden vector output by the long short-term memory network to obtain a fused query vector. Finally, the fused query vector is matched with the vector database.
[0060] It can be seen from step S41 that the vector representation corresponding to the entity has been obtained in step S41. Although the target text information and the text information have changed during this processing, the entity in the target text information has not changed, and its corresponding vector representation has also not changed. In addition, the text in the target text information other than the entity is configured based on the template, and its own fixed vector does not need to be extracted separately in this process, and can be directly retrieved. Therefore, in this embodiment, there is no need to perform the vector representation extraction process in step S42.
[0061] In this embodiment, the encoder-decoder structure can determine the fused query vector corresponding to the target text information. This fused query vector includes the query vector corresponding to the current text information and the SQL character vector corresponding to the previous query result.
[0062] Furthermore, for obtaining SQL query statements, similarity calculation is performed between the fused query vector and the query sample set in the vector database to obtain the query sample corresponding to the maximum similarity. In this embodiment, the similarity calculation can be implemented using the method in the prior art, which will not be described in detail in this embodiment. In addition, in order to ensure the integrity of the match, it is also necessary to perform secondary matching and updating on the professional terms in the target text information. By parsing the dictionary item field of each entity in the target text information, text similarity matching is performed with the dictionary item set of professional terms, and each field value is cyclically checked to see if an item matching the dictionary value can be found. If the match is successful, it is then determined whether these dictionary items belong to the collection class. For collection class dictionary items, each subclass is parsed and connected using "OR" logic; for non-collection class dictionary items, they are directly replaced with standardized professional terms in the dictionary item set, and the query sample is updated with the standardized professional terms to form the final SQL query statement, effectively solving the problem of inaccurate expression in the text.
[0063] Step S43: Generate query results based on the correspondence between the SQL query statement and the business database.
[0064] In this embodiment, the processing procedures are different due to different intents. Therefore, for the obtained query statement, in this embodiment, the execution of the SQL query also needs to be configured according to the process rules obtained in step S41. That is, the execution of the SQL query needs to determine whether to only return or issue commands to other target subsystems for execution.
[0065] If only the query is returned, the data tables related to the SQL query are selected and the relevant data table structure is integrated into the returned context information, reducing the interference of irrelevant content and thus reducing the length of the context. If a command needs to be issued to another target subsystem for execution, the relevant data tables and command symbols are sent to the corresponding target subsystem at the time of return to execute the corresponding behavior.
[0066] It can be seen from steps S41 to S43 that the embodiment of the present application provides a medical supplies management system and management method, which can improve the degree of information expression by updating and enhancing the input text information, determine the corresponding query statement according to the semantic characteristics of the text information and the configured vector database, and update and supplement the query statement according to the configured dictionary item set to make the generated SQL query statement more complete and accurate, thereby improving the overall level of medical supplies management and enabling users to quickly and conveniently use different services.
[0067] In another embodiment, see Figure 5 For the method of step S41 to step S43, a virtual management device may be configured to execute the method. The management device 50 includes:
[0068] The text processing module 51 is used to receive text information sent by the user and enhance and update the text information to obtain target text information;
[0069] A query generation module 52 is configured to obtain semantic information of the target text information, determine a maximum similarity vector between the semantic information and a vector database, and generate an SQL query statement based on the maximum similarity vector;
[0070] The result generating module 53 is configured to generate a query result based on the correspondence between the SQL query statement and the business database.
[0071] See Figure 6The methods corresponding to steps S41-S43 can also be integrated into the provided terminal device 60. Given that devices may vary significantly due to configuration or performance, the device may include one or more processors 601 and memory 602. The memory 602 may store one or more applications or data. The memory 602 may be either transient or persistent. The application stored in the memory 602 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in the terminal device. Furthermore, the processor 601 may be configured to communicate with the memory 602, and the terminal device may execute the series of computer-executable instructions in the memory 602. The terminal device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input / output interfaces 605, one or more keyboards 606, and the like.
[0072] In a specific embodiment, the terminal device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the terminal device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:
[0073] Receiving a text message sent by a user domain and enhancing and updating the text message to obtain target text message;
[0074] Acquire semantic information of the target text information, determine a maximum similarity vector between the semantic information and a vector database, and generate an SQL query statement based on the maximum similarity vector;
[0075] Generate query results based on the corresponding relationship between the SQL query statement and the business database.
[0076] Optionally, the processor can execute various functions by running or executing the software program stored in the memory and calling the data stored in the memory, such as executing the above Figure 4 The method shown.
[0077] In a specific implementation, as an embodiment, the processor may include one or more microprocessors.
[0078] The memory is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment and will not be repeated here.
[0079] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0080] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0081] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0082] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0083] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part 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 several 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. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0084] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A medical supplies management system, characterized in that: The system includes a hospital information system, an SPD system and a supplier ERP system; the hospital information system and the SPD system are linked through an order integration interface system, and at least one user domain is configured in the hospital information system, and a business domain and a data domain are configured in the order integration interface system; the user domain is used to receive text messages initiated by users and transmit the text messages to the business domain, the business domain and the data domain are used to parse the text messages and generate corresponding SQL query statements, and generate query results based on the SQL query statements and return them to the user domain or / and the target subsystem in the SPD system, and the target subsystem issues corresponding action instructions based on the query results; the data domain includes a vector database and a business database, the vector database is deployed with a query sample set and a dictionary item set, the dictionary item set is used to store various professional terms and classified data, and the business database is deployed with medical data special The method comprises the following steps: a property form and a business data form; the business database is constructed based on PostgreSQL, and each business data table contains multiple fields; the text information is determined with the query sample in the configured vector database, and then each field value in the text information is matched with the dictionary item set in the vector database and a matching item is determined, and finally the query sample is updated according to the matching item to obtain the final SQL statement; specifically, the method comprises the following steps: parsing the dictionary item field of each entity in the target text information, performing text similarity matching with the dictionary item set, cyclically checking whether each field value can find an item matching the dictionary value, and if the match is successful, continuing to judge whether these dictionary items belong to the collection class; for the collection class dictionary items, each subclass is parsed and connected using OR logic; for the non-collection class dictionary items, the standardized professional terms in the dictionary item set are directly replaced, and the query sample is updated with the standardized professional terms to form the final SQL query statement.
2. A medical supplies management method, characterized in that: The method is applied to the medical supplies management system according to claim 1, and the method includes: Receive a text message sent from a user domain and enhance and update the text message to obtain target text information; perform vector decomposition on the text message to obtain a vector representation of the text message; perform intent classification based on the vector representation to determine the intent classification result corresponding to the text message, and determine a text template and process rules based on the intent classification result; the template is configured with entity logical relationships and a template base according to different intent classification situations; the intent classification includes query and claim; Acquiring semantic information of the target text information, determining a maximum similarity vector between the semantic information and a vector database, and generating an SQL query statement based on the maximum similarity vector; the method further includes determining whether the current query round and the previous query round are related rounds before performing semantic information extraction, including: determining the difference between the entity type labels in the current text information and the entity type labels in the previous round of text information; if the proportion of the number of entity type labels corresponding to the current text that are different from the entity type labels in the previous round of text information does not exceed a preset threshold, determining that there is a correlation between the current text and the previous round of text, retrieving the historical SQL query statements generated in the previous round, and combining the features corresponding to the historical SQL query statements in the previous round during this round of processing, and updating the acquired semantic information based on the historical SQL query statements, specifically including: encoding the target text information and the historical SQL query statements respectively to obtain corresponding semantic feature information and SQL character vectors, splicing the semantic feature information and the SQL character vectors based on an attention mechanism by a decoder, and then splicing the calculation result with the hidden vector output by the long short-term memory network to obtain a fused query vector; Generate query results based on the correspondence between the SQL query statement and the business database; including: configuring rules for the query results based on process rules, specifically including: if only returning, selecting the data table related to the SQL query, and integrating the relevant data table structure into the returned context information; if it is necessary to issue a command to other target subsystems for execution, then when returning, send the relevant data table and command symbol to the corresponding target subsystem at the same time to execute the corresponding behavior.
3. The medical supplies management method according to claim 2, characterized in that: The text information is enhanced and updated, including: rewriting and updating the text information based on the text template to obtain target text information.
4. The medical supplies management method according to claim 3, characterized in that: The text information is rewritten and updated based on the text template, including: determining the entity type label in the text template, and filling the text template with the word segmentation corresponding to the vector representation with the same entity type label in the text information.
5. The medical supplies management method according to claim 2, characterized in that: Determining a maximum similarity vector between the semantic information and a vector database includes: matching the fused query vector with the vector database.
6. The medical supplies management method according to claim 2, characterized in that: Generating an SQL query statement based on the maximum similarity vector includes: determining a query sample based on a result corresponding to the maximum similarity vector, determining a matching item between each field value in the target text information and a dictionary item set, and updating the query sample based on the matching item to obtain the SQL query statement.
Citation Information
Patent Citations
Coal mine material management dialogue method and system based on Self-Attention mechanism and all-in-one machine thereof
CN110597975A
SPD medical information processing method and system
CN112768025A
Data analysis method and system based on natural language, electronic equipment and storage medium
CN118132587A
SQL (Structured Query Language) generation model and multi-round Text-to-SQL method and system based on SQL generation model
CN120086236A