A drug management method and system based on data structure and peak flow of people

By using B+ trees and hash tables to store patient and drug information in the hospital, a peak drug management model is established, which solves the problem of low drug management efficiency during peak flow times and achieves fast and accurate drug retrieval and resource optimization.

CN117976158BActive Publication Date: 2024-10-15THE THIRD AFFILIATED HOSPITAL OF SUN YAT SEN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311620236.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2024-10-15
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

The existing hospital drug management system is inefficient during peak flow times and is prone to medication errors, resulting in long waiting times for patients and a waste of resources.

Method used

Using a data structure-based method, B+ trees and hash tables are used to store patient information and drug information respectively, define the peak flow function, establish a peak drug management model, and quickly retrieve drug locations by inserting or deleting nodes to ensure accurate drug prescribing. Reduce getting the wrong medicine and waiting time.

Benefits of technology

It improves the accuracy and efficiency of drug retrieval, reduces patient waiting time, alleviates hospital congestion, and enables timely replenishment of drugs under different traffic conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117976158B_ABST
    Figure CN117976158B_ABST
Patent Text Reader

Abstract

The invention discloses a drug management method and system based on data structure and peak flow of people, including: by collecting patient information and drug information, defining a peak flow of people function, and establishing a drug management peak model; inserting or deleting nodes contained in patient information and drug information corresponding to a b+ tree and a hash table in the drug management peak model, and then updating and storing the nodes in a node segment, returning to the position of the corresponding node segment, obtaining and traversing the position set of all node segments; the invention utilizes the characteristics of the b+ tree and the hash table to insert and delete nodes of drug information and patient information, and can quickly retrieve drug locations to ensure accurate prescription of drugs, greatly saving the time of taking wrong drugs and waiting time for patients to pick up drugs, and alleviating the phenomenon of long queues at the drug pick-up window in the hospital, and at the same time, analyzing the model can understand the consumption of various drugs when the flow of people is large and when the flow of people is small, and replenish drugs in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drug management, and in particular to a drug management method and system based on data structure and peak value of human flow. Background Art

[0002] Currently, most hospitals have a system where patients manually dispense medicines after they are prescribed by doctors. This is not only inefficient, but also inevitably leads to errors due to improper drug management, which greatly increases patients’ waiting time and causes congestion in hospitals. It requires the deployment of staff for guidance, which consumes too many resources.

[0003] Therefore, it is necessary to design a management method for patients to quickly obtain medicines and medical staff to prescribe medicines during peak traffic hours. Summary of the invention

[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0005] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides a drug management method based on data structure and peak flow of people, which is used to solve the problems in the background technology.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a drug management method based on data structure and peak flow of people, comprising:

[0008] Collect patient information and drug information, store patient information in a b+ tree, and store drug information in a hash table;

[0009] Define the peak function of the flow of people, and establish a peak model for drug management based on the b+ tree that stores patient information and the hash table of drug information;

[0010] Insert or delete nodes contained in the patient information and drug information corresponding to the b+ tree and hash table in the drug management peak model, update and store the processed nodes in a node segment, and return to the position of the corresponding node segment to obtain a position set of all node segments;

[0011] Traverse according to the position set of the node segments, output the result of the drug management peak model, analyze the result, and obtain the drug management method of the corresponding peak flow of people.

[0012] As a preferred solution of the drug management method based on data structure and peak flow of people described in the present invention, wherein: patient information is stored in a b+ tree, and drug information is stored in a hash table, including:

[0013] The ID number in the patient information is used as the primary key of the b+ tree, the symptoms are used as the foreign key, and the rest of the information is used as the child key of the b+ tree;

[0014] The QR code of the drug is used as the primary key, the treatment effect is used as the foreign key, and the remaining information is used as the value of the hash table and stored in the corresponding row of the hash table.

[0015] As a preferred solution of the drug management method based on data structure and peak flow rate of the present invention, the peak flow rate function is defined, including:

[0016] Time period function and traffic flow function;

[0017] The time period function is expressed as:

[0018]

[0019] The traffic flow function is expressed as:

[0020]

[0021] Among them, H(t) represents the state or behavior of the hospital under different traffic conditions; p t represents the flow of people at time t, δ represents the threshold of the flow of people, that is, the floating value of the flow of people.

[0022] As a preferred solution of the drug management method based on data structure and peak flow of people described in the present invention, the drug management peak model is established, including:

[0023] The drug management peak model is expressed as:

[0024]

[0025] The model constraints are:

[0026]

[0027] Among them, q b+ (n) represents the information content of all patient nodes in the b+ tree, q hx (m) represents the amount of information of all drug nodes in the hash table.

[0028] As a preferred solution of the drug management method based on data structure and peak flow of people described in the present invention, the nodes contained in the patient information and drug information corresponding to the b+ tree and hash table in the drug management peak model are inserted or deleted, and the processed nodes are updated and stored in a node segment, and the position of the corresponding node segment is returned at the same time, and the position set of all node segments is obtained, including:

[0029] Point the primary key node of the b+ tree to the primary key node in the hash table, and build the primary key node jump of the b+ tree and the hash table; connect the foreign key node of the b+ tree to the foreign key node in the hash table, and establish the data address of the "primary-foreign" key node;

[0030] When new patient information is inserted, i.e., prescribed, or deleted, i.e., medicine is taken; the primary key node of the b+ tree is updated, this node is used as a candidate index and the address of the primary key node is recorded, and then the primary key node in the hash table corresponding to the candidate index is inserted or deleted;

[0031] When the primary key node of the hash table is inserted, the data address of the "primary-foreign" key node is compared with the address of the primary key node of the candidate index record; if the addresses are the same, the insertion is performed; if the addresses are different, the primary key, foreign key node and subkey of the corresponding drug information and the primary key, foreign key node and data address of the "primary-foreign" key node of the corresponding b+ tree are deleted together, and the data address before the record is deleted is saved in a node segment;

[0032] When the primary key node of the hash table is deleted, check whether the primary key node of the corresponding drug data exists in the b+ tree; if it does not exist in the b+ tree, then the deletion is prohibited; if it exists in the b+ tree, then check whether the data address exists in the node segment where the data address is saved, if the data address exists, then delete the data row corresponding to the "primary-foreign" key node, if it does not exist, then the deletion is prohibited;

[0033] Through the above insertion or deletion operations, the data addresses of all node segments, that is, the location set of the node segments, are obtained.

[0034] As a preferred solution of the drug management method based on data structure and peak flow of people described in the present invention, wherein: traversing according to the position set of the node segment and outputting the result of the drug management peak model includes:

[0035] Arrange the nodes in the node segment position set in order from small to large, with the smallest node as the node head to store the node head pointer, and the largest node as the node tail to store the node tail pointer;

[0036] Let the next node of the current node be the child node, and each child node cannot exceed The child node stores a pointer to the next current node;

[0037] The first character of the data address in the node is used as a keyword and converted into a decimal form. If the number of child nodes < the decimal form and the node tree = the number of child nodes, all node segments are traversed, otherwise the data address is discarded.

[0038] In a second aspect, the present invention provides a drug management system based on data structure and peak flow of people, which includes:

[0039] The preprocessing module collects patient information and drug information, and stores the patient information in a b+ tree and the drug information in a hash table;

[0040] The model building module defines the peak function of the flow of people and builds a drug management peak model based on the b+ tree storing patient information and the hash table of drug information;

[0041] The information processing module inserts or deletes the nodes contained in the patient information and drug information corresponding to the b+ tree and the hash table in the drug management peak model, updates and stores the processed nodes in a node segment, and returns to the position of the corresponding node segment to obtain a position set of all node segments;

[0042] The result analysis module traverses according to the position set of the node segments, outputs the result of the drug management peak model, analyzes the result, and obtains the drug management method of the corresponding peak flow of people.

[0043] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: the processor implements any step of the above method when executing the computer program.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: the computer program implements any step of the above method when executed by a processor.

[0045] Compared with the prior art, the invention has the following beneficial effects: the invention collects patient information and drug information, stores the patient information in a b+ tree, and stores the drug information in a hash table; defines a peak flow function, and establishes a drug management peak model based on the b+ tree storing the patient information and the hash table storing the drug information; inserts or deletes the nodes contained in the patient information and drug information corresponding to the b+ tree and the hash table in the drug management peak model, updates and stores the processed nodes in a node segment, and returns to the position of the corresponding node segment to obtain a position set of all node segments; traverses according to the position set of the node segment, outputs the result of the drug management peak model, analyzes the result, and obtains a drug management method for the corresponding peak flow; the invention utilizes the characteristics of the b+ tree and the hash table to insert and delete the nodes of the drug information and the patient information, and can quickly retrieve the drug location to ensure accurate prescription of drugs, greatly saves the wrong drug and the waiting time of patients, and alleviates the phenomenon of long queues at the hospital drug collection window. At the same time, by analyzing the model, it is possible to understand the consumption of various drugs when the flow of people is large and when the flow of people is small, and replenish drugs in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0047] Figure 1 This is an overall flow chart of a drug management method based on data structure and flow peak according to an embodiment of the present invention;

[0048] Figure 2 A system structure diagram of a drug management method based on data structure and peak flow of patients according to an embodiment of the present invention;

[0049] Figure 3 A node efficiency curve diagram of a drug management method based on data structure and peak flow of people according to an embodiment of the present invention;

[0050] Figure 4 A patient waiting time curve diagram of a traditional method of a drug management method based on a data structure and a peak flow of people according to an embodiment of the present invention;

[0051] Figure 5 This is a patient waiting time curve diagram of the method of the present invention for drug management based on data structure and peak flow of patients described in one embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0054] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0055] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0056] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0057] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0058] Example 1

[0059] Reference Figure 1 and Figure 2, which is the first embodiment of the present invention, and provides a drug management method based on data structure and peak flow of people, including:

[0060] S1. Collect patient information and drug information, store the patient information in a b+ tree, and store the drug information in a hash table;

[0061] Furthermore, the ID number in the patient information is used as the primary key of the b+ tree, the symptoms are used as the foreign key, and the rest of the information is used as the child key of the b+ tree;

[0062] Furthermore, the QR code of the drug is used as the primary key, the treatment effect is used as the foreign key, and the remaining information is used as the value of the hash table and stored in the corresponding row of the hash table;

[0063] Specifically, patient information includes ID number, symptoms, age, medications needed, and any history of allergies;

[0064] Specifically, drug information includes QR code, therapeutic effect, daily dosage, age and people who should not take the drug;

[0065] S2. Define the peak function of the flow of people, and establish a drug management peak model based on the b+ tree storing patient information and the hash table of drug information;

[0066] Furthermore, the peak function of the flow of people is defined to include a time period function and a flow of people function;

[0067] Specifically, the time period function is expressed as:

[0068]

[0069] Specifically, the flow function is expressed as:

[0070]

[0071] Among them, H(t) represents the state or behavior of the hospital under different traffic conditions; p t represents the flow of people at time t, δ represents the threshold of the flow of people, that is, the floating value of the flow of people;

[0072] It should be noted that when the hospital flow is large and needs to be manually guided by dispatching, H(t) takes 1, and takes 0 in other states; the value range of δ is 0 to the current flow value minus the integer part of the flow value, and the decimal part is rounded to five decimal places;

[0073] Furthermore, the peak model of drug management is expressed as:

[0074]

[0075] The model constraints are:

[0076]

[0077] st 0≤H(t)≤t

[0078] 0<x<t,t∈{0,2t-1}

[0079] Among them, q b+ (n) represents the information content of all patient nodes in the b+ tree, q hx (m) represents the amount of information of all drug nodes in the hash table;

[0080] It should be noted that, in order to simplify the model calculation, the present invention only considers the flow function and the time period function, and functions can be added according to the actual application situation;

[0081] S3. Insert or delete nodes contained in the patient information and drug information corresponding to the b+ tree and hash table in the drug management peak model, update the processed nodes and store them in a node segment, and return to the position of the corresponding node segment to obtain the position set of all node segments;

[0082] Furthermore, the primary key node of the b+ tree is pointed to the primary key node in the hash table, and the primary key node jump of the b+ tree and the hash table is constructed; the foreign key node of the b+ tree is connected to the foreign key node in the hash table, and the data address of the "primary-foreign" key node is established;

[0083] Furthermore, when new patient information is inserted, i.e., prescribed, or deleted, i.e., taken, the primary key node of the b+ tree is updated, this node is used as a candidate index and the address of the primary key node is recorded, and then the primary key node in the hash table corresponding to the candidate index is inserted or deleted;

[0084] Furthermore, when the primary key node of the hash table is inserted, the data address of the "primary-foreign" key node is compared with the address of the primary key node of the candidate index record; if the addresses are the same, the insertion is performed; if the addresses are different, the primary key, foreign key node and subkey of the corresponding drug information and the primary key, foreign key node and data address of the "primary-foreign" key node of the corresponding b+ tree are deleted together, and the data address before the record is deleted is saved in a node segment;

[0085] Furthermore, when the primary key node of the hash table is deleted, check whether the primary key node of the corresponding drug data exists in the b+ tree; if it does not exist in the b+ tree, then the deletion is prohibited; if it exists in the b+ tree, then check whether the data address exists in the node segment where the data address is saved, if the data address exists, then delete the data row corresponding to the "primary-foreign" key node, if it does not exist, then the deletion is prohibited;

[0086] It should be noted that prohibiting deletion requires obtaining higher authority;

[0087] Furthermore, through the above insertion or deletion operations, the data addresses of all node segments, i.e., the location set of the node segments, are obtained;

[0088] It should be noted that the node segment position set includes q b+ (n) and q hx (m);

[0089] It should be noted that, since the primary key node of the b+ tree can be automatically jumped to the corresponding primary key node in the hash table by calling it, the corresponding prescription information can be automatically found through the patient information, which increases the connection between the information and saves time for the actual medical staff to prescribe medicine;

[0090] S4. Traverse according to the location set of the node segments, output the result of the drug management peak model, analyze the result, and obtain the drug management method of the corresponding peak flow of people;

[0091] Furthermore, the nodes in the position set of the node segment are arranged in order from small to large, the smallest node is used as the node head to store the node head pointer, and the largest node is used as the node tail to store the node tail pointer;

[0092] Furthermore, let the next node of the current node be a child node, and each child node cannot exceed The child node stores a pointer to the next current node;

[0093] Furthermore, the first character of the data address in the node is used as a keyword and converted into a decimal form. If the number of child nodes < the decimal form and the node tree = the number of child nodes, all node segments are traversed, otherwise the data address is discarded.

[0094] It should be noted that the traversal process is equivalent to the process of updating all medicines. Every time a patient takes medicine, the medicine will be reduced accordingly to ensure that there will be no quantity errors in the consumption of medicines.

[0095] Furthermore, this embodiment also provides a drug management system based on data structure and peak flow of people, including:

[0096] The preprocessing module collects patient information and drug information, and stores the patient information in a b+ tree and the drug information in a hash table;

[0097] The model building module defines the peak function of the flow of people and builds a drug management peak model based on the b+ tree storing patient information and the hash table of drug information;

[0098] The information processing module inserts or deletes the nodes contained in the patient information and drug information corresponding to the b+ tree and the hash table in the drug management peak model, updates and stores the processed nodes in a node segment, and returns to the position of the corresponding node segment to obtain a position set of all node segments;

[0099] The result analysis module traverses according to the position set of the node segments, outputs the result of the drug management peak model, analyzes the result, and obtains the drug management method of the corresponding peak flow of people.

[0100] This embodiment further provides a computer device, which is applicable to the case of a drug management method based on data structure and peak flow of people, including:

[0101] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the drug management method based on data structure and peak flow of people as proposed in the above embodiment.

[0102] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0103] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the drug management method based on data structure and flow peak value as proposed in the above embodiment is implemented.

[0104] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0105] Example 2

[0106] Reference Figures 3 to 5, which is the second embodiment of the present invention, and which provides a drug management method based on data structure and peak flow of people, including: verifying the beneficial effects of the method of the present invention through simulation experiments;

[0107] Experimental environment: MATLAB is used as the experimental software of the present invention, and the version number is: 9.10.0.1602886 (R2021a); ​​the waiting time is set to 300 seconds, and the flow data is divided into peak hours / 200 people per hour and off-peak hours / 50 people per hour;

[0108] Use 60% of the data as the training set of the model, 30% as the test set of the model, and the remaining 10% as the error value of the model. Input the above data into the model for training;

[0109] Depend on Figure 3 It can be seen that the accuracy of the method of the present invention is lower than that of the traditional method at 0 to 9, but it is higher than that of the traditional method at 9 to 23. It can be seen that the accuracy of the method of the present invention is higher than that of the traditional method in taking medicine because it fully utilizes the query characteristics of the b+ tree and the hash table;

[0110] Figure 4 The horizontal axis represents the patient waiting time, and the vertical axis represents the time to pick up medicine. It can be seen that during the peak period when the model introduces the flow of people data, the patient waiting time becomes longer and longer, while the waiting time is shorter during the off-peak period, indicating that the traditional method takes a long time to pick up medicine when dealing with the flow of people during peak periods; after using the method of the present invention, the time and accuracy of picking up medicine will be greatly improved. Figure 5 ;

[0111] In summary, the present invention can reduce the waiting time of patients during peak hours, improve the accuracy and speed of medication collection, and provide effective protection for hospitals to cope with peak traffic flow and reduce resource scheduling.

[0112] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0113] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0117] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A drug management method based on data structure and peak flow of people, characterized in that: include: Collect patient information and drug information, store patient information in a b+ tree, and store drug information in a hash table; A peak flow function is defined by a time period function and a flow function, and a drug management peak model is established based on the peak flow function and a b+ tree storing patient information and a hash table storing drug information; The function of defining the peak flow of people includes: a time period function and a flow of people function; The time period function is expressed as: The traffic flow function is expressed as: Among them, H(t) represents the state or behavior of the hospital under different traffic conditions; p t represents the flow of people at time t, δ represents the threshold of the flow of people, that is, the floating value of the flow of people; Establish a peak model for drug management, including: The drug management peak model is expressed as: The model constraints are: q hx (m)>q b+ (n), st 0≤H(t)≤t 0<x<t,t∈{0,2t-1} Among them, q b+ (n) represents the information content of all patient nodes in the b+ tree, q hx (m) represents the amount of information of all drug nodes in the hash table; Insert or delete nodes contained in the patient information and drug information corresponding to the b+ tree and hash table in the drug management peak model, update and store the processed nodes in a node segment, and return to the position of the corresponding node segment to obtain a position set of all node segments; Traverse according to the position set of the node segments, output the result of the drug management peak model, analyze the result, and obtain the drug management method of the corresponding peak flow of people.

2. The drug management method based on data structure and peak flow of patients as claimed in claim 1, characterized in that: Store patient information in a b+ tree and drug information in a hash table, including: The ID number in the patient information is used as the primary key of the b+ tree, the symptoms are used as the foreign key, and the rest of the information is used as the child key of the b+ tree; The QR code of the drug is used as the primary key, the treatment effect is used as the foreign key, and the remaining information is used as the value of the hash table and stored in the corresponding row of the hash table.

3. The drug management method based on data structure and peak flow of patients as claimed in claim 1, characterized in that: Insert or delete nodes contained in the patient information and drug information corresponding to the b+ tree and hash table in the drug management peak model, update the processed nodes and store them in a node segment, and return to the position of the corresponding node segment to obtain the position set of all node segments, including: Point the primary key node of the b+ tree to the primary key node in the hash table, and build the primary key node jump of the b+ tree and the hash table; connect the foreign key node of the b+ tree to the foreign key node in the hash table, and establish the data address of the "primary-foreign" key node; When new patient information is inserted, i.e., prescribed, or deleted, i.e., medicine is taken; the primary key node of the b+ tree is updated, this node is used as a candidate index and the address of the primary key node is recorded, and then the primary key node in the hash table corresponding to the candidate index is inserted or deleted; When the primary key node of the hash table is inserted, the data address of the "primary-foreign" key node is compared with the address of the primary key node of the candidate index record; if the addresses are the same, the insertion is performed; if the addresses are different, the primary key, foreign key node and subkey of the corresponding drug information and the primary key, foreign key node and data address of the "primary-foreign" key node of the corresponding b+ tree are deleted together, and the data address before the record is deleted is saved in a node segment; When the primary key node of the hash table is deleted, check whether the primary key node of the corresponding drug data exists in the b+ tree; if it does not exist in the b+ tree, then the deletion is prohibited; if it exists in the b+ tree, then check whether the data address exists in the node segment where the data address is saved, if the data address exists, then delete the data row corresponding to the "primary-foreign" key node, if it does not exist, then the deletion is prohibited; Through the above insertion or deletion operations, the data addresses of all node segments, that is, the location set of the node segments, are obtained.

4. The drug management method based on data structure and peak flow of patients as claimed in claim 3, characterized in that: Traversing the node segment position set, outputting the results of the drug management peak model, including: Arrange the nodes in the node segment position set in order from small to large, with the smallest node as the node head to store the node head pointer, and the largest node as the node tail to store the node tail pointer; Let the next node of the current node be the child node, and each child node cannot exceed The child node stores a pointer to the next current node; The first character of the data address in the node is used as a keyword and converted into a decimal form. If the number of child nodes < the decimal form and the node tree = the number of child nodes, all node segments are traversed, otherwise the data address is discarded.

5. A drug management system based on data structure and peak flow of people, based on the drug management method based on data structure and peak flow of people as claimed in any one of claims 1 to 4, characterized in that: include: The preprocessing module collects patient information and drug information, and stores the patient information in a b+ tree and the drug information in a hash table; A model building module defines a peak flow function through a time period function and a flow function, and builds a drug management peak model based on the peak flow function and a b+ tree storing patient information and a hash table storing drug information; The information processing module inserts or deletes the nodes contained in the patient information and drug information corresponding to the b+ tree and the hash table in the drug management peak model, updates and stores the processed nodes in a node segment, and returns to the position of the corresponding node segment to obtain a position set of all node segments; The result analysis module traverses according to the position set of the node segments, outputs the result of the drug management peak model, analyzes the result, and obtains the drug management method of the corresponding peak flow of people.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.