A parenteral nutrition solution preparation big data intelligent storage system
By adjusting the number of virtual nodes according to the similarity of patient vital signs data and the distribution of data locations in the parenteral nutrition preparation big data storage system, the problems of data mixing and inefficient retrieval in the existing technology are solved, and efficient, accurate storage and rapid retrieval of parenteral nutrition preparation data are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN TIANYUAN MEDICAL EQUIPMENT CO LTD
- Filing Date
- 2025-12-01
- Publication Date
- 2026-06-30
AI Technical Summary
Existing consistent hashing algorithms do not consider the clinical relevance of data in parenteral nutrition preparation big data storage, resulting in data mixing, inefficient retrieval, and poor reference accuracy, which cannot meet the clinical needs for rapid and accurate retrieval of parenteral nutrition preparation data.
By obtaining the similarity of the vital signs data of current patients and historical patients, the number of virtual nodes on the hash ring is adjusted. Based on the similarity of vital signs and the differences in data location distribution, the number of virtual nodes is dynamically adjusted to achieve accurate partitioned storage and efficient retrieval of data.
This improves the storage stability and retrieval efficiency of parenteral nutrition solution preparation data, ensuring data accuracy and rapid response capabilities, and meeting the needs of individualized clinical solution preparation.
Smart Images

Figure CN121687399B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parenteral nutrition solution preparation technology, specifically to a parenteral nutrition solution preparation big data intelligent storage system. Background Technology
[0002] Parenteral nutrition (PDN) preparation refers to the process of mixing various nutrients required by patients, such as amino acids, glucose, fat emulsions, electrolytes, vitamins, trace elements, and water, in a sterile environment according to a specific formula in an infusion bag. It is a crucial means of providing comprehensive life support to patients who cannot obtain sufficient nutrition through oral or enteral routes. Because different patients have significant differences in disease type, metabolic status, and physiological indicators such as liver and kidney function, the required composition of their parenteral nutrition solutions also varies. Therefore, PDN preparation is essentially a highly individualized treatment plan. In actual clinical practice, each time a PDN solution is prepared for a patient, two important types of data are generated: solution composition data and patient vital sign data. These data are of significant reference value for the preparation of parenteral nutrition solutions for subsequent new patients. As the number of patients increases, these two types of data accumulate, forming a massive and complex big data dataset. In existing methods, a consistent hashing algorithm is used to store and manage the liquid composition data and vital sign data. This algorithm maps the data to a fixed hash value space through a hash function and organizes the space into a hash ring with the beginning and end connected. By setting up several virtual nodes on the ring, the data interval division and relative balance of storage load are achieved, which improves the scalability and fault tolerance of the system to a certain extent.
[0003] However, in the specific scenario of parenteral nutrition preparation, the consistent hashing algorithm only divides the data evenly without considering the clinical semantic correlation between the data. This results in a high degree of data mixing in terms of type and content within the same interval. When retrieving reference data clinically, it is necessary to call the storage intervals corresponding to multiple virtual nodes simultaneously to filter out the valid data. This not only significantly reduces the data retrieval efficiency but may also affect the accuracy of the preparation plan reference due to interference from irrelevant data. In addition, the mixed storage of data will also increase the complexity of subsequent data management (such as data updates, data backups, and data cleaning), further restricting the realization of the clinical value of big data in parenteral nutrition preparation and making it difficult to meet the clinical demand for rapid and accurate retrieval of parenteral nutrition preparation data. Summary of the Invention
[0004] To address the shortcomings of existing consistent hashing algorithms for storing large amounts of parenteral nutrition preparation data, which suffer from data corruption, inefficient retrieval, and poor accuracy due to a lack of proper partitioning based on clinical relevance, thus failing to meet the technical requirements for rapid and accurate access to parenteral nutrition preparation data in clinical settings, this invention aims to provide a smart storage system for large amounts of parenteral nutrition preparation data. The specific technical solution adopted is as follows:
[0005] This invention provides a parenteral nutrition solution preparation big data intelligent storage system, the system comprising:
[0006] The data acquisition module is used to acquire the patient's parenteral nutrition solution preparation data; the parenteral nutrition solution preparation data includes vital sign data.
[0007] The module for obtaining the initial virtual node number is used to obtain the reference historical patients for the current patient based on the similarity of the vital signs data between the current patient and historical patients; and to obtain the initial virtual node number for the hash storage area of each real node based on the type and location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring.
[0008] The virtual node adjustment degree acquisition module is used to obtain the virtual node adjustment degree of each real node's hash storage area based on the difference in the location distribution of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node and other real nodes, as well as the difference in the initial planned number of virtual nodes.
[0009] The module for obtaining the corrected number of virtual nodes is used to correct the initial number of virtual nodes based on the degree of virtual node adjustment, and to obtain the corrected number of virtual nodes in the hash storage area of each real node.
[0010] Furthermore, the method for obtaining the reference historical patients is as follows:
[0011] Each patient's various vital signs data are constructed into a vector, which serves as the vital signs vector for each patient;
[0012] Obtain the cosine similarity between the current patient's and each historical patient's sign vectors, and use these as the degree of sign similarity.
[0013] When the similarity of physical signs is greater than the preset threshold for similarity of physical signs, the corresponding historical patient will be used as the reference historical patient for the current patient.
[0014] Furthermore, the method for obtaining the initial planned number of virtual nodes is as follows:
[0015] The effectiveness of the hash storage area of each real node is determined based on the types of parenteral nutrition preparation data of reference patients stored in the hash storage area of each real node on the hash ring.
[0016] Based on the location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring, the dispersion of the hash storage area of each real node is obtained.
[0017] The product of the negative correlation between the effectiveness of each real node's hash storage area and the normalized result of the dispersion is used as the weight of the virtual node in each real node's hash storage area.
[0018] The product of the preset number of virtual nodes in the hash storage area of each real node and the weight increase of the virtual nodes is rounded up, and the result is used as the adjustment value for the number of virtual nodes in the hash storage area of each real node.
[0019] The sum of the preset number of virtual nodes in the hash storage area of each real node and the adjusted value of the number of virtual nodes is used as the initial number of virtual nodes in the hash storage area of each real node.
[0020] Furthermore, the method for obtaining the degree of effectiveness is as follows:
[0021] For any real node, the reference historical patients corresponding to the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of the real node are all regarded as target historical patients.
[0022] For any target historical patient, obtain the number of types of vital sign data stored in the hash storage area of the target historical patient in the real node, and use it as the first quantity;
[0023] The number of types of parenteral nutrition solution composition data stored in the hash storage area of the target historical patient at the real node is obtained as the second quantity; among them, parenteral nutrition solution composition data includes vital sign data and solution composition data;
[0024] The ratio of the first quantity to the total number of types of vital sign data for the target historical patient is taken as the first value;
[0025] The second value is the ratio of the second quantity to the total number of different types of solution composition data for the target historical patient.
[0026] The sum of the first and second values is taken as the storage extent of the target historical patient in the hash storage area of the real node;
[0027] The sum of the storage extent of all target historical patients within the hash storage area of the real node, multiplied by the total number of target historical patients, is normalized to determine the effectiveness of the hash storage area of the real node.
[0028] Furthermore, the method for obtaining the degree of dispersion is as follows:
[0029] For any real node, the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of that real node are all used as the target data;
[0030] The distance between any two adjacent target data storage locations obtained in a clockwise direction is taken as the first distance;
[0031] The average of all first distances is used as the dispersion of the hash storage area of the real node.
[0032] Furthermore, the method for obtaining the degree of adjustment of the virtual node is as follows:
[0033] For any real node, the virtual node load level of the hash storage area of the real node is obtained based on the location where the target data is stored in the hash storage area of the real node.
[0034] Based on the difference in virtual node load between the real node and each other real node in the hash storage area, and the difference in the initial planned number of virtual nodes, obtain the reference difference in the hash storage area between the real node and each other real node.
[0035] The result of negatively correlating and normalizing the mean of all reference differences is used as the virtual node adjustment degree of the hash storage area of the real node.
[0036] Furthermore, the method for obtaining the load level of the virtual node is as follows:
[0037] For any real node, obtain the number of consecutive stored data segments consisting of the target data within the hash storage area of that real node, and use this as the number of nodes to be analyzed.
[0038] The difference between the number of node analyses and the constant 1 is used as the virtual node load level of the hash storage area of the real node.
[0039] Furthermore, the method for obtaining the reference difference degree is as follows:
[0040] For any real node, all other real nodes except that real node are regarded as reference real nodes;
[0041] For any reference real node, obtain the difference in virtual node load between the real node and the hash storage area of the reference real node, as the first difference;
[0042] The difference between the initial virtual node count of the hash storage area of the real node and the reference real node is obtained as the second difference;
[0043] The sum of the first difference and the second difference is used as the reference difference degree between the hash storage area of the real node and the reference real node.
[0044] Furthermore, the method for obtaining the proposed number of modified virtual nodes is as follows:
[0045] For any real node, the product of the initial number of virtual nodes in the hash storage area of that real node and the degree of virtual node adjustment is rounded up, and the result is used as the adjusted number of virtual nodes in the hash storage area of that real node.
[0046] Furthermore, the method for obtaining the hash storage area of each real node is as follows:
[0047] The region formed by two adjacent real nodes on the hash ring in a clockwise direction is used as the hash storage region for the first real node in the clockwise direction among the two adjacent real nodes.
[0048] The present invention has the following beneficial effects:
[0049] This invention first identifies a reference historical patient based on the similarity of the current patient's vital signs data with those of historical patients. This facilitates accurate and efficient preparation of parenteral nutrition solutions for the current patient. To ensure accurate and efficient retrieval of the reference historical patient's data, and thus accurate and efficient preparation of the current patient's parenteral nutrition solution, the invention further determines the initial number of virtual nodes in the hash storage area of each real node based on the type and location of the reference historical patient's parenteral nutrition solution data stored in the hash storage area of each real node on the hash ring. This preliminary determination of the virtual nodes that can be bound to each real node facilitates better storage and retrieval of the reference historical patient's parenteral nutrition solution data. Finally, to prevent the loss of the reference historical patient's parenteral nutrition solution data, the invention improves the stability of the data storage. Qualitatively, based on the differences in the location distribution of parenteral nutrition preparation data for reference historical patients stored in the hash storage areas of each real node and other real nodes, as well as the differences in the initially planned number of virtual nodes, the degree of virtual node adjustment in the hash storage area of each real node is obtained. This accurately reflects the adjustment of the initially planned number of virtual nodes in the hash storage area of each real node. Then, based on the degree of virtual node adjustment, the initially planned number of virtual nodes is corrected, and the corrected planned number of virtual nodes in the hash storage area of each real node is obtained. This accurately determines the virtual nodes that can be bound to each real node, ensuring stable storage of reference historical patient data. This effectively improves the efficiency and accuracy of reading reference historical patient data, and facilitates more accurate and efficient preparation of parenteral nutrition solutions for current patients. Attached Figure Description
[0050] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a structural block diagram of a parenteral nutrition solution preparation big data intelligent storage system provided in one embodiment of the present invention;
[0052] Figure 2 A flowchart illustrating a method for obtaining a predetermined number of initial virtual nodes according to an embodiment of the present invention;
[0053] Figure 3 A flowchart illustrating a method for obtaining the degree of virtual node adjustment according to an embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram of a computer device provided according to an embodiment of the present invention. Detailed Implementation
[0055] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a parenteral nutrition solution preparation big data intelligent storage system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0057] The following description, in conjunction with the accompanying drawings, details the specific scheme of the parenteral nutrition solution preparation big data intelligent storage system provided by the present invention.
[0058] Example 1:
[0059] This invention proposes a smart storage system for big data on parenteral nutrition solution preparation. Please refer to [link / reference]. Figure 1 The diagram illustrates a structural block diagram of a big data intelligent storage system for parenteral nutrition solution preparation according to an embodiment of the present invention. The system includes: a data acquisition module 10, an initial virtual node proposed quantity acquisition module 20, a virtual node adjustment degree acquisition module 30, and a corrected virtual node proposed quantity acquisition module 40.
[0060] The data acquisition module 10 is used to acquire the patient's parenteral nutrition solution preparation data; the parenteral nutrition solution preparation data includes vital sign data.
[0061] Specifically, in this embodiment, parenteral nutrition solution data for each patient is obtained from the parenteral nutrition solution preparation data transfer platform. This data includes various solution component data and various vital sign data. The solution component data provides the specific composition and content information of the parenteral nutrition solution used by each patient, covering quantitative data for all nutrients in the solution, such as the types of amino acids and the amount added per 100ml of solution (e.g., alanine 5g, leucine 3g), glucose concentration (e.g., 20% glucose solution), type and infusion dose of fat emulsion (e.g., medium- and long-chain fat emulsion 200ml / day), electrolytes (e.g., potassium chloride 2mmol / L), vitamins (e.g., vitamin B complex preparation 5ml), and trace elements (e.g., selenium 0.1mg), etc. Vital sign data includes the patient's physical condition indicators at the time of solution preparation, including basic physiological signs (e.g., body temperature 36.5℃, heart rate 75 bpm, blood pressure 120 / 80 mmHg), and biochemical test indicators (e.g., liver function indicator ALT). Core data reflecting the patient's physical condition include renal function indicators such as serum creatinine (40 U / L), renal function indicators such as serum creatinine (80 μmol / L), blood glucose (5.6 mmol / L), serum albumin (35 g / L), disease diagnosis-related information (such as postoperative gastrointestinal tumors, severe pancreatitis, intestinal fistula, etc.), and nutritional assessment indicators (such as body mass index (BMI) of 18.5 kg / m², upper arm circumference of 25 cm).
[0062] It should be noted that the types of data on the composition of the solution and the types of vital signs are the same for each patient.
[0063] The initial virtual node quantity acquisition module 20 is used to obtain the reference historical patients for the current patient based on the similarity of the vital signs data of the current patient and the historical patients; and to obtain the initial virtual node quantity for the hash storage area of each real node based on the type and location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring.
[0064] Specifically, it is known that individual patients typically have varying physical conditions. Therefore, the nutrient content in parenteral nutrition (PDN) solutions will differ between patients. This means that each new patient requires analysis of their condition to prepare a tailored PDN solution. However, in reality, some patients may share similar physical characteristics. Patients with similar characteristics usually have similar nutrient content in their PDN solutions. Therefore, by referencing the nutrient content of PDN solutions prepared for historical patients with similar characteristics, PDN solutions can be prepared more efficiently. Thus, in the clinical application of PDN solution preparation, the core value of data lies in providing accurate references for individualized preparation. This value depends on the strong correlation between the data and the patient's needs. Ideally, the two core types of data generated for PDN solution preparation—solution composition data (reflecting the nutritional composition of the solution) and vital sign data (reflecting the patient's physical condition)—should be prioritized for classification based on the correlation with the patient's clinical characteristics. That is, PDN solution data for patients with similar vital sign data should be grouped into the same category. For example, the vital signs data and corresponding low-protein loading solution preparation data of patients with liver dysfunction can be divided into one category, while the vital signs data and corresponding low-phosphorus and low-potassium solution preparation data of patients with renal failure can be divided into another category. This classification allows for direct location of the category matching the current patient's condition when retrieving reference data in subsequent clinical practice, quickly filtering out effective information and avoiding interference from irrelevant data. Furthermore, this embodiment first obtains reference historical patients for the current patient based on the similarity of the vital signs data between the current patient and historical patients, which is beneficial for accurately and efficiently preparing parenteral nutrition solutions for the current patient.
[0065] However, existing consistent hashing algorithms do not consider the correlations between parenteral nutrition solution preparation data. Their design logic focuses on the uniformity and stability of data storage, mapping massive amounts of data onto a virtual hash ring simply by calculating hash values. Then, by evenly distributing virtual nodes, the hash ring is divided into several equal storage areas, achieving indiscriminate partitioned storage of data. This storage method, which does not distinguish data correlations and only pursues equal area distribution, directly leads to a highly mixed data type within each storage partition. It may contain both vital sign data from patients with different diseases and data on various highly different solution components. For example, a certain partition may simultaneously store high-energy solution preparation data for healthy postoperative patients, low-glucose solution preparation data for diabetic patients, and hypotonic solution preparation data for elderly and frail patients, as well as their vital sign data. Furthermore, data clutter can further exacerbate efficiency issues in subsequent storage retrieval. When clinicians need to retrieve reference data for a specific patient group (such as diabetic patients), the data is scattered across multiple storage partitions, necessitating the use of multiple virtual nodes for cross-partition data retrieval. Conversely, for partitions with low data concentration, retrieval may only require a small number of virtual nodes. This unstable state of fluctuating virtual node calls not only significantly increases the time cost of data retrieval but may also introduce a large amount of irrelevant data due to cross-partition retrieval, reducing the accuracy of the reference data. Ultimately, this leads to a severe disconnect between the storage effectiveness of large amounts of parenteral nutrition preparation-related data and actual clinical needs, making it difficult to fully realize its intended reference value. The consistent hashing algorithm is a well-known technology and will not be elaborated upon further.
[0066] To accurately and efficiently retrieve the parenteral nutrition (NUM) component data corresponding to historical patients for the current patient, enabling accurate and efficient preparation of NUM solutions, this embodiment first obtains the hash storage area of each real node on the hash ring based on the distribution of real nodes. Then, it analyzes the NUM data stored in the hash storage area of each real node. The more abundant and clustered the NUM data in the hash storage area of a real node, the more valuable the data is for preparing NUM solutions for the current patient, indirectly reflecting that the hash storage area of that real node does not require virtual node partitioning. Therefore, this embodiment determines the initial number of virtual nodes for each real node's hash storage area based on the type and location of the NUM data stored therein, facilitating better subsequent storage and retrieval of the NUM data.
[0067] Preferably, in one feasible embodiment of this method, the method for obtaining reference historical patients is as follows: Each patient's various vital sign data are constructed into a vector, serving as each patient's vital sign vector. It should be noted that the dimensions of each patient's vital sign vector are the same, and the elements at the same position in the vital sign vector correspond to the same type of vital sign data. The cosine similarity between the current patient's and each historical patient's vital sign vectors is obtained, and this is used as the degree of vital sign similarity. The greater the degree of vital sign similarity, the more meaningful the corresponding historical patient's solution composition data is for the current patient. Therefore, this embodiment sets a preset threshold for the degree of vital sign similarity to 0.6. The implementer can set the size of the preset threshold for the degree of vital sign similarity according to the actual situation, and this is not limited here. When the degree of vital sign similarity is greater than the preset threshold, the corresponding historical patient is used as the reference historical patient for the current patient.
[0068] Preferably, in one feasible embodiment of this invention, the method for obtaining the hash storage area of each real node is as follows: A known real node, through its specific identifier (such as IP address or hostname), calculates a fixed hash value using a hash function. Therefore, its position on the hash ring is determined and immutable. Simultaneously, since the set of real nodes used and the hash algorithm itself remain unchanged, the mapping position of all parenteral nutrition preparation-related data on the hash ring after hashing is also fixed. Therefore, in this embodiment, the area formed by two adjacent real nodes on the hash ring is used as the hash storage area of the first real node in the clockwise direction among the two adjacent real nodes, thereby obtaining the hash storage area of each real node on the hash ring. It should be noted that each real node has only one unique hash storage area.
[0069] Preferably, in one possible implementation of this embodiment, the method for obtaining the initial planned number of virtual nodes is described in [reference needed]. Figure 2 The document presents a flowchart of a method for obtaining the initial planned number of virtual nodes provided in this embodiment. The method includes the following steps:
[0070] Step S201: Based on the types of parenteral nutrition preparation data of reference historical patients stored in the hash storage area of each real node on the hash ring, obtain the validity of the hash storage area of each real node.
[0071] The more parenteral nutrition (NUM) preparation data for historical patients stored in the hash storage area of a real node, and the more comprehensive the types of NUM preparation data, the more necessary it is to read the entire data stored in that real node's hash storage area. This also provides valuable reference for preparing NUM preparations for the current patient. Therefore, this embodiment determines the effectiveness of each real node's hash storage area based on the types of NUM preparation data for historical patients stored within it. A higher effectiveness means that the corresponding real node's hash storage area is less likely to require partitioning through virtual nodes.
[0072] In one possible implementation of this embodiment, the method for obtaining the effectiveness is as follows: For any real node, all reference historical patients corresponding to the parenteral nutrition solution preparation data of reference historical patients stored in the hash storage area of the real node are taken as target historical patients; for any target historical patient, the number of types of vital sign data stored in the hash storage area of the real node for the target historical patient is obtained as a first number; the number of types of solution component data stored in the hash storage area of the real node for the target historical patient is obtained as a second number; the ratio of the first number to the total number of types of vital sign data for the target historical patient is taken as a first value; the ratio of the second number to the total number of types of solution component data for the target historical patient is taken as a second value; when the first... The larger the first and second values, the more complete the parenteral nutrition preparation data for the target historical patient is stored in the hash storage area of the real node. The sum of the first and second values is then used as the storage degree of the target historical patient in the hash storage area of the real node. The larger the storage degree of the target historical patient in the hash storage area of the real node, and the more target historical patients there are, the more meaningful the data stored in the hash storage area of the real node is for the current patient's parenteral nutrition preparation. Therefore, in this embodiment, the sum of the storage degrees of all target historical patients in the hash storage area of the real node and the product of the total number of target historical patients are normalized, and the result is used as the validity of the hash storage area of the real node. This embodiment uses a linear normalization method to normalize the sum of the storage degrees of all target historical patients in the hash storage area of the real node and the product of the total number of target historical patients. The linear normalization method is a well-known technique and will not be described in detail here.
[0073] This concludes the determination of the effectiveness of the hash storage area for each real node.
[0074] Step S202: Based on the location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring, obtain the dispersion of the hash storage area of each real node.
[0075] Unlike fixed-location physical nodes, virtual nodes offer high flexibility in their placement on the hash ring, allowing for dynamic planning and free positioning based on actual storage needs. The core design principle of virtual nodes is to create independent logical storage partitions for scattered but highly valuable data that is originally stored in a dispersed manner on the hash ring, enabling refined data management and rapid location. This approach effectively avoids information redundancy and access delays caused by high-value data being buried in a large amount of irrelevant information, thus significantly improving the efficiency of retrieving and utilizing historical data when preparing parenteral nutrition solutions for current patients. The more dispersed the locations of the parenteral nutrition solution preparation data for reference historical patients stored within the hash storage area of a physical node, the more necessary it is to use virtual nodes to partition the hash storage area of that physical node. Therefore, this embodiment obtains the dispersion degree of the hash storage area of each physical node based on the locations of the parenteral nutrition solution preparation data for reference historical patients stored within the hash storage area of each physical node on the hash ring. The greater the dispersion, the more necessary it is to use virtual nodes to partition the hash storage area of the corresponding physical node.
[0076] In one possible implementation of this embodiment, the method for obtaining the degree of dispersion is as follows: For any real node, the parenteral nutrition preparation data of reference historical patients stored in the hash storage area of the real node are all taken as target data; the distance between the storage locations corresponding to any two adjacent target data in a clockwise direction is taken as the first distance; the larger the first distance, the more dispersed the corresponding target data storage locations are; in order to characterize the dispersion of the storage locations of target data in the hash storage area of the real node as a whole, the average of all first distances is taken as the degree of dispersion of the hash storage area of the real node.
[0077] This gives us the extent to which the hash storage area of each real node is distributed.
[0078] Step S203: The product of the negative correlation result of the effectiveness of the hash storage area of each real node and the normalized result of the dispersion is used as the weight of the virtual node of the hash storage area of each real node.
[0079] It is known that the greater the effectiveness, the less the hash storage area of the corresponding real node needs to be partitioned using virtual nodes; conversely, the greater the dispersion, the more the hash storage area of the corresponding real node needs to be partitioned using virtual nodes. Therefore, this embodiment uses the product of the negative correlation between the effectiveness of each real node's hash storage area and the normalized result of the dispersion as the weighting of virtual nodes in each real node's hash storage area. The greater the weighting of virtual nodes, the more virtual nodes are needed for the corresponding real node's hash storage area. This embodiment uses 1 minus the difference in effectiveness as the negative correlation result of effectiveness; the dispersion is normalized using a linear normalization method.
[0080] At this point, the virtual nodes that acquire the hash storage area of each real node are weighted.
[0081] Step S204: Obtain the initial number of virtual nodes planned for the hash storage area of each real node.
[0082] It is known that the greater the weight increase of a virtual node, the more virtual nodes are needed in the hash storage area of the corresponding real node. Therefore, in this embodiment, the product of the preset number of virtual nodes in the hash storage area of each real node and the weight increase of the virtual node is rounded up, and the result is used as the adjustment value for the number of virtual nodes in the hash storage area of each real node. Then, the preset number of virtual nodes in the hash storage area of each real node and the virtual node number adjustment value are added together, and the result is used as the initial proposed number of virtual nodes in the hash storage area of each real node. In this embodiment, the preset number of virtual nodes is set to 10. Implementers can set the size of the preset number of virtual nodes according to the actual situation, and it is not limited here.
[0083] At this point, the initial number of virtual nodes for the hash storage area of each real node is determined.
[0084] The virtual node adjustment degree acquisition module 30 is used to acquire the virtual node adjustment degree of each real node's hash storage area based on the difference in the location distribution of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node and other real nodes, as well as the difference in the number of initially planned virtual nodes.
[0085] Specifically, although a virtual node is merely a logical marker on the hash ring and does not directly consume computing resources, it must be attached to a real node to function. If too many virtual nodes are bound to a real node, the hash storage area of that real node will become excessively large, significantly increasing the number of data query and access requests. This situation disrupts the balance of the overall node distribution (including real and virtual nodes) on the hash ring, causing a high concentration of load on that real node, easily leading to node performance bottlenecks or high load risks. Ultimately, this will adversely affect the read / write efficiency and stability of the parenteral nutrition preparation data stored on that node. Therefore, this embodiment, based on the differences in the location distribution of reference historical patient parenteral nutrition preparation data stored in the hash storage areas of each real node and other real nodes, as well as the differences in the initially planned number of virtual nodes, obtains the degree of virtual node adjustment in the hash storage area of each real node. This allows for subsequent adjustments to the initially planned number of virtual nodes in the hash storage area of each real node, more accurately determining the virtual nodes that can be bound to each real node, avoiding the loss of high-value data, and improving the efficiency of data retrieval.
[0086] Preferably, in one possible implementation of this embodiment, the method for obtaining the degree of virtual node adjustment is described in [reference needed]. Figure 3 The document presents a flowchart of a method for obtaining the adjustment degree of a virtual node, as provided in this embodiment. The method includes the following steps:
[0087] Step S301: For any real node, based on the location where the target data is stored in the hash storage area of the real node, obtain the virtual node load level of the hash storage area of the real node.
[0088] The more coherent the target data stored within the hash storage area of a real node, the fewer virtual nodes should be needed on that real node, indirectly reflecting a lower load risk for that real node. Therefore, in this embodiment, for any real node, the load level of the virtual nodes in the hash storage area of that real node is obtained based on the location of the target data stored there. The higher the virtual node load level, the more requests the real node needs to handle, indirectly indicating a greater high load risk for that real node. To avoid data loss or corruption in the hash storage area of a real node, the more virtual nodes that can be bound to that real node, the better.
[0089] In one possible implementation of this embodiment, the method for obtaining the virtual node load level is as follows: For any real node, the number of consecutive storage data segments consisting of target data within the hash storage area of that real node is obtained as the node analysis quantity. It should be noted that a consecutive storage data segment is a data segment consisting of target data with uninterrupted storage location order. For example, assuming the storage locations within the hash storage area of the real node are sequentially numbered 1, 2, 3…29, 30, if the storage locations numbered 1, 2, 3, 4, 5 all contain target data, then the target data in the storage locations numbered 1, 2, 3, 4, 5 constitutes a consecutive storage data segment. The difference between the node analysis quantity and a constant 1 is taken as the virtual node load level of the hash storage area of that real node, which is the maximum number of virtual nodes in the hash storage area of that real node under ideal conditions. It should be noted that each consecutive storage data segment is set as an independent storage area by the first and last nodes. It should be noted that if there is no target data within the hash storage area of that real node, then the hash storage area of that real node is not analyzed.
[0090] Step S302: Based on the difference in virtual node load between the real node and each other's hash storage areas, and the difference in the initial planned number of virtual nodes, obtain the reference difference in hash storage areas between the real node and each other's hash storage areas.
[0091] The greater the difference in virtual node load between a real node and the hash storage areas of all other real nodes, and the greater the difference in the initially planned number of virtual nodes, the more unstable the hash storage area of that real node is, and the more easily the stored target data is lost. This reduces the efficiency and accuracy of configuring parenteral nutrition solutions for the current patient. Therefore, the number of virtual nodes bound to that real node should be minimized to improve the stability of its hash storage area. This embodiment then uses the difference in virtual node load between the real node and the hash storage areas of all other real nodes, as well as the difference in the initially planned number of virtual nodes, to obtain a reference difference between the hash storage areas of that real node and the hash storage areas of all other real nodes. The greater the reference difference, the more uneven the initial virtual node settings between the real node and other real nodes, and the smaller the initially planned number of virtual nodes in the hash storage area of that real node should be.
[0092] In one possible implementation of this embodiment, the method for obtaining the reference difference degree is as follows: for any real node, all other real nodes besides the real node are taken as reference real nodes; for any reference real node, the absolute value of the difference between the virtual node load degree of the hash storage area of the real node and the reference real node is obtained as the first difference; the absolute value of the difference between the initial planned number of virtual nodes of the hash storage area of the real node and the reference real node is obtained as the second difference; the sum of the first difference and the second difference is taken as the reference difference degree between the hash storage areas of the real node and the reference real node.
[0093] At this point, the degree of reference difference between the hash storage area of the real node and each reference real node is obtained.
[0094] Step S303: The result of negatively correlating and normalizing the mean of all reference differences is used as the virtual node adjustment degree of the hash storage area of the real node.
[0095] It is known that the greater the reference difference, the smaller the initial number of virtual nodes in the hash storage area of the real patient should be. To determine the overall adjustment of the initial number of virtual nodes in the hash storage area of the real node, this embodiment uses the result of negatively correlated and normalized mean values of all reference differences as the adjustment level for the virtual nodes in the hash storage area of the real node. This embodiment also uses the negative of the mean of all reference differences as the power of an exponential function with the natural constant as its base. The output of this exponential function is the result of negatively correlated and normalized mean values of all reference differences.
[0096] At this point, the virtual node adjustment level of the hash storage area of each real node is obtained.
[0097] The module 40 for obtaining the corrected number of virtual nodes is used to correct the initial number of virtual nodes based on the degree of virtual node adjustment, and to obtain the corrected number of virtual nodes in the hash storage area of each real node.
[0098] Specifically, the greater the degree of virtual node adjustment, the smaller the reference difference, which indirectly reflects that the initial proposed number of virtual nodes in the hash storage area of the corresponding real node is more reasonable. Therefore, this embodiment corrects the initial proposed number of virtual nodes based on the degree of virtual node adjustment, accurately obtains the corrected proposed number of virtual nodes in the hash storage area of each real node, and then evenly distributes the corresponding real node's hash storage area by correcting the proposed number of virtual nodes, completing the establishment of virtual nodes in the hash storage area of each real node, thereby storing the data in the newly established empty database, completing the intelligent storage of parenteral nutrition solution big data, effectively improving the efficiency and accuracy of reading data from historical patients, and facilitating more accurate and efficient preparation of parenteral nutrition solutions for current patients.
[0099] Preferably, in one feasible way of this embodiment, the method for obtaining the corrected virtual node proposed number is as follows: for any real node, the product of the initial virtual node proposed number in the hash storage area of the real node and the virtual node adjustment degree is rounded up, and the result is used as the corrected virtual node proposed number in the hash storage area of the real node.
[0100] At this point, the corrected number of virtual nodes for the hash storage area of each real node is obtained.
[0101] In summary, this embodiment acquires the patient's parenteral nutrition preparation data and the current patient's reference historical patients; based on the type and location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of the real node on the hash ring, it obtains the initial proposed number of virtual nodes for the real node; based on the difference in the initial proposed number of virtual nodes between real nodes, it obtains the degree of virtual node adjustment for the real node; based on the degree of virtual node adjustment, it corrects the initial proposed number of virtual nodes, obtaining the corrected proposed number of virtual nodes in the hash storage area of each real node. This invention, by obtaining the corrected proposed number of virtual nodes that can be bound to each real node, effectively improves the stability of data storage and retrieval of parenteral nutrition preparation data for reference historical patients, which is beneficial for accurately and efficiently preparing parenteral nutrition solutions for the current patient.
[0102] Example 2:
[0103] This invention also proposes a smart storage device for big data on parenteral nutrition solution preparation. The device includes a memory and a processor. The memory stores executable program code, and the processor calls and executes the executable program code to perform the smart storage system for big data on parenteral nutrition solution preparation provided in the embodiments of this application. Specifically, the device may be a chip, component, or module. The chip may include a connected processor and memory; the memory stores instructions, and when the processor calls and executes the instructions, the chip can perform the smart storage system for big data on parenteral nutrition solution preparation provided in the above embodiments.
[0104] Furthermore, this application also protects a computer device; please refer to [link to relevant documentation]. Figure 4 The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402. When the processor 402 executes the computer program 403, the computer device can execute any of the aforementioned parenteral nutrition solution preparation big data intelligent storage systems.
[0105] Example 3:
[0106] The present invention also provides a computer-readable storage medium storing computer program code, which, when executed on a computer, causes the computer to perform the aforementioned method steps to realize the parenteral nutrition solution preparation big data intelligent storage system provided in the above embodiments.
[0107] Example 4:
[0108] The present invention also provides a computer program product, which, when run on a computer, causes the computer to perform the above-mentioned related steps to realize the parenteral nutrition solution preparation big data intelligent storage system provided in the above embodiments.
[0109] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0110] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0111] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A big data intelligent storage system for parenteral nutrition solution preparation, characterized in that, The system includes: The data acquisition module is used to acquire the patient's parenteral nutrition solution preparation data; the parenteral nutrition solution preparation data includes vital sign data. The module for obtaining the initial virtual node number is used to obtain the reference historical patients for the current patient based on the similarity of the vital signs data between the current patient and historical patients; and to obtain the initial virtual node number for the hash storage area of each real node based on the type and location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring. The virtual node adjustment degree acquisition module is used to obtain the virtual node adjustment degree of each real node's hash storage area based on the difference in the location distribution of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node and other real nodes, as well as the difference in the initial planned number of virtual nodes. The module for obtaining the corrected number of virtual nodes is used to correct the initial number of virtual nodes based on the degree of virtual node adjustment, and to obtain the corrected number of virtual nodes in the hash storage area of each real node. The method for obtaining the initial planned number of virtual nodes is as follows: The effectiveness of the hash storage area of each real node is determined based on the types of parenteral nutrition preparation data of reference patients stored in the hash storage area of each real node on the hash ring. Based on the location of the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of each real node on the hash ring, the dispersion of the hash storage area of each real node is obtained. The result of normalizing the product of the negative correlation between the effectiveness of the hash storage area of each real node and the dispersion is used as the weight of the virtual node in the hash storage area of each real node. The product of the preset number of virtual nodes in the hash storage area of each real node and the weight increase of the virtual nodes is rounded up, and the result is used as the adjustment value for the number of virtual nodes in the hash storage area of each real node. The sum of the preset number of virtual nodes in the hash storage area of each real node and the adjusted value of the number of virtual nodes is used as the initial number of virtual nodes in the hash storage area of each real node.
2. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 1, characterized in that, The method for obtaining the reference historical patients is as follows: Each patient's various vital signs data are constructed into a vector, which serves as the vital signs vector for each patient; Obtain the cosine similarity between the current patient's and each historical patient's sign vectors, and use these as the degree of sign similarity. When the similarity of physical signs is greater than the preset threshold for similarity of physical signs, the corresponding historical patient will be used as the reference historical patient for the current patient.
3. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 1, characterized in that, The method for obtaining the degree of effectiveness is as follows: For any real node, the reference historical patients corresponding to the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of the real node are all regarded as target historical patients. For any target historical patient, obtain the number of types of vital sign data stored in the hash storage area of the target historical patient in the real node, and use it as the first quantity; The number of types of parenteral nutrition solution composition data stored in the hash storage area of the target historical patient at the real node is obtained as the second quantity; among them, parenteral nutrition solution composition data includes vital sign data and solution composition data; The ratio of the first quantity to the total number of types of vital sign data for the target historical patient is taken as the first value; The second value is the ratio of the second quantity to the total number of different types of solution composition data for the target historical patient. The sum of the first and second values is taken as the storage extent of the target historical patient in the hash storage area of the real node; The sum of the storage extent of all target historical patients in the hash storage area of the real node and the product of the sum and the total number of target historical patients are normalized to obtain the effective extent of the hash storage area of the real node.
4. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 1, characterized in that, The method for obtaining the degree of dispersion is as follows: For any real node, the parenteral nutrition preparation data of the reference historical patients stored in the hash storage area of that real node are all used as the target data; The distance between any two adjacent target data storage locations obtained in a clockwise direction is taken as the first distance; The average of all first distances is used as the dispersion of the hash storage area of the real node.
5. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 4, characterized in that, The method for obtaining the degree of adjustment of the virtual node is as follows: For any real node, the virtual node load level of the hash storage area of the real node is obtained based on the location where the target data is stored in the hash storage area of the real node. Based on the difference in virtual node load between the real node and each other real node in the hash storage area, and the difference in the initial planned number of virtual nodes, obtain the reference difference in the hash storage area between the real node and each other real node. The result of negatively correlating and normalizing the mean of all reference differences is used as the virtual node adjustment degree of the hash storage area of the real node.
6. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 5, characterized in that, The method for obtaining the load level of the virtual node is as follows: For any real node, obtain the number of consecutive stored data segments consisting of the target data within the hash storage area of that real node, and use this as the number of nodes to be analyzed. The difference between the number of node analyses and the constant 1 is used as the virtual node load level of the hash storage area of the real node.
7. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 5, characterized in that, The method for obtaining the reference difference level is as follows: For any real node, all other real nodes except that real node are regarded as reference real nodes; For any reference real node, obtain the difference in virtual node load between the real node and the hash storage area of the reference real node, as the first difference; The difference between the initial virtual node count of the hash storage area of the real node and the reference real node is obtained as the second difference; The sum of the first difference and the second difference is used as the reference difference degree between the hash storage area of the real node and the reference real node.
8. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 1, characterized in that, The method for obtaining the proposed number of corrected virtual nodes is as follows: For any real node, the product of the initial number of virtual nodes in the hash storage area of that real node and the degree of virtual node adjustment is rounded up, and the result is used as the adjusted number of virtual nodes in the hash storage area of that real node.
9. The parenteral nutrition solution preparation big data intelligent storage system as described in claim 1, characterized in that, The method for obtaining the hash storage area of each real node is as follows: The region formed by two adjacent real nodes on the hash ring in a clockwise direction is used as the hash storage region for the first real node in the clockwise direction of the two adjacent real nodes.