High-concurrency multi-thread infusion monitoring method, system, medium and equipment
By using the MQTT protocol and multi-threaded consumption mechanism to process in the infusion monitoring system, the problems of delay and inaccuracy in the processing of high concurrent data are solved, and efficient and real-time infusion information monitoring and management are achieved.
Patent Information
- Application Number
- CN202510043876.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-29
AI Technical Summary
The existing infusion monitoring system has problems such as delay, data loss and inconsistent specifications when processing high concurrent data, resulting in inaccurate monitoring results, increasing the work burden of medical staff, and possibly affecting the treatment effect of patients.
The MQTT protocol is used for data packet conversion, and the infusion monitoring information is processed through a multi-threaded consumption mechanism to achieve efficient, real-time and accurate infusion information monitoring and management.
By collecting and processing infusion monitoring information in real time, data transmission efficiency and processing speed are improved, real-time and stability of the infusion monitoring system are ensured, and accurate monitoring and rapid response to infusion information are achieved.
Smart Images

Figure CN119905199A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical equipment monitoring, and relates to a high-concurrency multi-threaded infusion monitoring method, system, medium and equipment. Background Art
[0002] In modern medical environments, infusion is one of the common treatment methods. In order to ensure the safety and accuracy of the infusion process, real-time monitoring of the infusion status (such as drip rate, remaining liquid volume, etc.) becomes particularly important. Traditional infusion monitoring systems usually rely on a single central processor to process all monitoring data, which is prone to delays and data loss when faced with a large amount of concurrent data. With the expansion of hospital scale and the increase in the number of patients, the demand for efficient and stable infusion monitoring systems is growing.
[0003] Existing infusion monitoring systems have obvious bottlenecks when processing high-concurrency data, which are mainly manifested in data transmission delays, low processing efficiency, and inability to respond to abnormal situations in a timely manner. In addition, traditional systems lack a consistency verification mechanism for infusion specifications, which can easily lead to inconsistent specifications due to misinput or equipment replacement, thereby affecting the accuracy of monitoring results. These deficiencies not only increase the workload of medical staff, but may also have an adverse effect on the treatment effect of patients. Therefore, there is an urgent need for a new infusion monitoring method that can efficiently process high-concurrency data and ensure monitoring accuracy. Summary of the invention
[0004] In response to the shortcomings of the prior art, the present application provides a high-concurrency multi-threaded infusion monitoring method, system, medium and device, which realizes efficient, real-time and accurate infusion information monitoring and management by adopting the MQTT protocol for data packet conversion and a multi-threaded consumption mechanism to process infusion monitoring information.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a high-concurrency multi-threaded infusion monitoring method, comprising:
[0006] Collect infusion monitoring information in real time; wherein the infusion monitoring information includes: infusion specifications and infusion weight;
[0007] According to the preset MQTT protocol, the infusion monitoring information is converted into a data packet that complies with the MQTT protocol, and each of the data packets is sent and stored in a preset thread-safe queue;
[0008] According to the preset multi-thread consumption mechanism, each working thread is controlled to extract and process each data packet in the thread safety queue in parallel, obtain the analysis result of each monitoring service, and complete the infusion information monitoring.
[0009] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by collecting infusion monitoring information in real time, and using MQTT protocol conversion and thread-safe queue storage of data packets, high-concurrency data transmission can be efficiently processed to ensure the real-time and stability of the infusion monitoring system; the multi-threaded consumption mechanism enables multiple working threads to process data packets in parallel, significantly improving the speed and efficiency of data processing, thereby achieving accurate monitoring and rapid response to infusion information.
[0010] In some embodiments of the first aspect of the present application, converting the infusion monitoring information into a data packet that complies with the MQTT protocol according to a preset MQTT protocol, and storing each of the data packets in a preset thread-safe queue includes:
[0011] According to a preset MQTT protocol, converting the infusion monitoring information into a data packet that complies with the MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier, and a timestamp corresponding to the infusion monitoring information;
[0012] A comparison is performed based on the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread-safe queue. If the comparison meets the preset rules, the existing data packet is updated based on the current data packet. Otherwise, the current data packet is directly stored in the thread-safe queue.
[0013] Compared with the prior art, the above embodiment has the following beneficial effects: by marking the data packet in detail (information type, monitor identifier, timestamp) and comparing it with the existing data packet before storage, the method ensures the consistency and accuracy of the data. The mechanism of updating or adding a new data packet avoids duplicate data and redundant information, reduces the waste of storage space, and improves the reliability of subsequent data analysis, so that the system can still maintain efficient data management capabilities in a high-concurrency environment.
[0014] In some embodiments of the first aspect of the present application, according to a preset multi-thread consumption mechanism, controlling each working thread to extract and process each of the data packets in the thread-safe queue in parallel to obtain analysis results of each monitoring service includes:
[0015] Calculate the drip rate of the drip according to the infusion weight at each time stamp in the data packet and the preset drip coefficient;
[0016] According to a preset dripping speed threshold range, determining whether the current dripping speed is within the dripping speed threshold range, and if determined to be no, sending an alarm message;
[0017] The infusion weight in the data packet is calculated and matched with the tare weight and container capacity in each preset container specification to obtain the actual container specification, and based on the actual container specification, it is determined whether the infusion specification in the data packet is consistent. If not, an alarm message is sent.
[0018] Compared with the prior art, the above embodiment has the following beneficial effects: by calculating the dripping rate and comparing it with the preset threshold range, abnormal situations can be discovered in time and alarm information can be sent, effectively preventing potential risks during the infusion process; in addition, by matching and verifying the infusion weight with the container specifications, the consistency of the infusion specifications is ensured, further improving the accuracy and safety of the system, and reducing misjudgments and erroneous operations caused by inconsistent specifications.
[0019] In some embodiments of the first aspect of the present application, the method of controlling each working thread to extract and process each of the data packets in the thread-safe queue in parallel according to a preset multi-thread consumption mechanism to obtain analysis results of each monitoring service further includes:
[0020] Calculate the remaining liquid volume according to the infusion specifications and infusion weight in the data packet;
[0021] Calculate the predicted time for completion of infusion according to the current remaining liquid volume and drip rate;
[0022] According to the current remaining liquid volume and the preset minimum liquid volume threshold, it is determined whether it is necessary to send the infusion completion information.
[0023] Compared with the prior art, the above embodiment has the following beneficial effects: by calculating the remaining liquid volume and predicting the infusion completion time, it provides medical staff with an accurate time reference, which helps to optimize the nursing process and resource allocation; at the same time, it determines whether it is necessary to send the infusion completion information based on the minimum liquid volume threshold, thereby ensuring the smooth completion of the infusion process, reducing the risk of not promptly handling the liquid due to depletion, and improving the overall nursing quality and patient safety.
[0024] In a second aspect, the present invention also provides a high-concurrency multi-threaded infusion monitoring system, comprising: a data acquisition module, a transmission module and a processing module;
[0025] Wherein, the data acquisition module is used to collect infusion monitoring information in real time; wherein, the infusion monitoring information includes: infusion specifications and infusion weight;
[0026] The transmission module is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to the preset MQTT protocol, and send and store each data packet in a preset thread-safe queue;
[0027] The processing module is used to control each working thread to extract and process each data packet in the thread safety queue in parallel according to a preset multi-thread consumption mechanism, obtain the analysis results of each monitoring service, and complete the infusion information monitoring.
[0028] Compared with the prior art, the above embodiments of the present application have the following beneficial effects: by real-time collection of infusion monitoring information, and using MQTT protocol conversion and thread-safe queue storage of data packets, high-concurrency data transmission can be efficiently processed to ensure the real-time and stability of the infusion monitoring system; the multi-threaded consumption mechanism enables multiple working threads to process data packets in parallel, significantly improving the speed and efficiency of data processing, thereby achieving accurate monitoring and rapid response to infusion information.
[0029] In some embodiments of the second aspect of the present application, the transmission module includes: a data encapsulation unit and a comparison unit;
[0030] Wherein, the data encapsulation unit is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to a preset MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier and a timestamp corresponding to the infusion monitoring information;
[0031] The comparison unit is used to compare the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread safety queue. If the comparison meets the preset rules, the existing data packet is updated according to the current data packet; otherwise, the current data packet is directly stored in the thread safety queue.
[0032] Compared with the prior art, the above embodiment has the following beneficial effects: by marking the data packet in detail (information type, monitor identifier, timestamp) and comparing it with the existing data packet before storage, the method ensures the consistency and accuracy of the data. The mechanism of updating or adding a new data packet avoids duplicate data and redundant information, reduces the waste of storage space, and improves the reliability of subsequent data analysis, so that the system can still maintain efficient data management capabilities in a high-concurrency environment.
[0033] In some embodiments of the second aspect of the present application, the processing module includes: a dripping rate calculation unit, a dripping rate warning unit, and an infusion specification confirmation unit;
[0034] The drip rate calculation unit is used to calculate the drip rate of the drip according to the infusion weight at each time stamp in the data packet and the preset drip coefficient;
[0035] The dripping speed warning unit is used to judge whether the current dripping speed is within the dripping speed threshold range according to the preset dripping speed threshold range, and if it is judged to be not, send an alarm message;
[0036] The infusion specification confirmation unit is used to calculate and match the infusion weight in the data packet with the tare weight and container capacity in each preset container specification to obtain the actual container specification, and determine whether the infusion specification in the data packet is consistent based on the actual container specification, and send an alarm message if it is inconsistent.
[0037] Compared with the prior art, the above embodiment has the following beneficial effects: by calculating the dripping rate and comparing it with the preset threshold range, abnormal situations can be discovered in time and alarm information can be sent, effectively preventing potential risks during the infusion process; in addition, by matching and verifying the infusion weight with the container specifications, the consistency of the infusion specifications is ensured, further improving the accuracy and safety of the system, and reducing misjudgments and erroneous operations caused by inconsistent specifications.
[0038] In some embodiments of the second aspect of the present application, the processing module further includes: a remaining liquid volume calculation unit, a completion time prediction unit, and an infusion completion notification unit;
[0039] The remaining liquid volume calculation unit is used to calculate the remaining liquid volume according to the infusion specifications and infusion weight in the data packet;
[0040] The completion time prediction unit is used to calculate the predicted completion time of the infusion according to the current remaining liquid volume and dripping rate;
[0041] The infusion completion notification unit is used to determine whether it is necessary to send the infusion completion information based on the current remaining liquid volume and a preset minimum liquid volume threshold.
[0042] Compared with the prior art, the above embodiment has the following beneficial effects: by calculating the remaining liquid volume and predicting the infusion completion time, it provides medical staff with an accurate time reference, which helps to optimize the nursing process and resource allocation; at the same time, it determines whether it is necessary to send the infusion completion information based on the minimum liquid volume threshold, thereby ensuring the smooth completion of the infusion process, reducing the risk of not promptly handling the liquid due to depletion, and improving the overall nursing quality and patient safety.
[0043] In the third aspect, the present invention also provides a high-concurrency multi-threaded infusion monitoring device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when loaded into the processor, implements the steps of the high-concurrency multi-threaded infusion monitoring method.
[0044] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the high-concurrency multi-threaded infusion monitoring method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 : A flow chart of a high-concurrency multi-threaded infusion monitoring method provided in some embodiments of the present invention.
[0046] Figure 2 : A structural diagram of a high-concurrency multi-threaded infusion monitoring system provided in some embodiments of the present invention.
[0047] Figure 3 : A structural diagram of a high-concurrency multi-threaded infusion monitoring device provided in some embodiments of the present invention.
[0048] Figure 4 :A business processing log diagram of a high-concurrency multi-threaded infusion monitoring system provided in some embodiments of the present invention DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Embodiment 1:
[0051] Please refer to Figure 1 , a high-concurrency multi-threaded infusion monitoring method provided by an embodiment of the present invention, comprising steps S1 to S3:
[0052] Step S1: Collect infusion monitoring information in real time.
[0053] Among them, the infusion monitoring information includes: infusion specifications and infusion weight. These two types of information are mainly used for real-time monitoring of infusion. In addition, it can also include the online status and button information of the detector to ensure the normal operation of the detector, and when medical staff adjust the detector, they can respond accordingly according to the button information in time.
[0054] In this embodiment, step S1 realizes real-time update monitoring of infusion information by real-time collection of infusion monitoring information.
[0055] Step S2: According to the preset MQTT protocol, the infusion monitoring information is converted into a data packet that complies with the MQTT protocol, and each of the data packets is sent and stored in a preset thread-safe queue.
[0056] Preferably, in some embodiments of the present application, step S2 can be implemented by the following preferred implementation, including steps S21 to S22, as follows:
[0057] S21: according to a preset MQTT protocol, converting the infusion monitoring information into a data packet that complies with the MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier and a timestamp corresponding to the infusion monitoring information;
[0058] S22: Compare the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread safety queue. If the comparison meets the preset rules, update the existing data packet according to the current data packet; otherwise, directly store the current data packet in the thread safety queue.
[0059] In the specific implementation, for example, the source of the currently received data packet belongs to a certain detector, and the corresponding information type is the infusion weight. Check the data packets in the current thread security queue. If there are data packets whose source belongs to the same detector, and the corresponding information type is also the infusion weight, then the system automatically recognizes that the two data packets belong to the infusion information of the same patient. Considering the system's operating load and space occupancy, the update interval of the infusion weight can be set to once every 20 seconds, and then compare the timestamps of the two data packets. If the difference in timestamps exceeds 20 seconds, it means that the real-time performance of the old data packet is low, and it can be directly updated with the new data packet. If the interval is within 20 seconds, it is directly stored in the security queue. In addition, the maximum number of data packets of the same type from the same source can be set in the security queue. For example, if the maximum number of storage is set to 3, the security queue can store 3 data packets of the same type from the same source at the same time, which is convenient for subsequent certain business call processing; if they are from different sources or there are no old data packets of the same type, they can be directly stored in the security queue.
[0060] In this preferred embodiment, steps S21-S22 ensure the consistency and accuracy of data by marking the data packet in detail (information type, monitor identifier, timestamp) and comparing it with the existing data packet before storage. The mechanism of updating or adding data packets avoids duplicate data and redundant information, reduces the waste of storage space, and improves the reliability of subsequent data analysis, so that the system can still maintain efficient data management capabilities in a high-concurrency environment.
[0061] In this embodiment, step S2 utilizes MQTT protocol conversion and thread-safe queue storage of data packets to efficiently process high-concurrency data transmission, thereby ensuring the real-time and stability of the infusion monitoring system.
[0062] Step S3: According to the preset multi-thread consumption mechanism, each working thread is controlled to extract and process each data packet in the thread safety queue in parallel, obtain the analysis result of each monitoring service, and complete the infusion information monitoring.
[0063] Preferably, in some embodiments of the present application, step S3 can be implemented by the following preferred implementations, including steps S31 to S34, as follows:
[0064] S31: Calculating the drip rate of the drip according to the infusion weight at each time stamp in the data packet and a preset drip coefficient;
[0065] S32: judging whether the current dripping speed is within the dripping speed threshold range according to the preset dripping speed threshold range, and if the current dripping speed is not within the dripping speed threshold range, sending an alarm message;
[0066] S33: Calculate and match the infusion weight in the data packet with the tare weight and container capacity in the preset container specifications to obtain the actual container specifications, and determine whether the infusion specifications in the data packet are consistent based on the actual container specifications. If they are inconsistent, send an alarm message.
[0067] S34: Calculating the remaining liquid volume according to the infusion specifications and infusion weight in the data packet;
[0068] S35: Calculating the predicted time for completion of infusion according to the current remaining liquid volume and dripping rate;
[0069] S36: Determine whether it is necessary to send an infusion completion message based on the current remaining liquid volume and a preset minimum liquid volume threshold.
[0070] In this preferred embodiment, steps S31-S36 can detect abnormal situations in time and send alarm information by calculating the dripping rate and comparing it with the preset threshold range, thereby effectively preventing potential risks in the infusion process; in addition, by matching and verifying the infusion weight with the container specifications, the consistency of the infusion specifications is ensured, further improving the accuracy and safety of the system, and reducing misjudgments and erroneous operations caused by inconsistent specifications; it can also provide medical staff with an accurate time reference by calculating the remaining liquid volume and predicting the infusion completion time, which helps to optimize the nursing process and resource allocation; at the same time, it determines whether it is necessary to send the infusion completion information based on the minimum liquid volume threshold, thereby ensuring the smooth completion of the infusion process, reducing the risk of not timely processing due to liquid depletion, and improving the overall nursing quality and patient safety.
[0071] In addition, if other services need to be monitored, for example, after medical staff adjust certain parameter settings of the detector, they can also collect the corresponding parameter signals and add corresponding business processing logic to implement them; for example, if the operating status of the detector itself needs to be monitored, it can be judged by collecting the heartbeat signal of the detector; for example, Figure 4 As shown in the business processing log diagram, the system can also share the monitoring information to external third-party devices; the business implementation of this system can be flexibly expanded according to the needs of medical staff, and will not be elaborated here.
[0072] In this embodiment, the multi-thread consumption mechanism of step S3 enables multiple working threads to process data packets in parallel, which significantly improves the speed and efficiency of data processing, thereby achieving accurate monitoring and rapid response to infusion information.
[0073] In summary, compared with the prior art, the above embodiments of the present application have the following beneficial effects: by real-time collection of infusion monitoring information, and using MQTT protocol conversion and thread-safe queue storage of data packets, high-concurrency data transmission can be efficiently processed to ensure the real-time and stability of the infusion monitoring system; the multi-threaded consumption mechanism enables multiple working threads to process data packets in parallel, significantly improving the speed and efficiency of data processing, thereby achieving accurate monitoring and rapid response to infusion information.
[0074] Embodiment 2:
[0075] Please refer to Figure 2 , a high-concurrency multi-threaded infusion monitoring system disclosed in an embodiment of the present invention includes: a data acquisition module M1, a transmission module M2 and a processing module M3.
[0076] Wherein, the data acquisition module M1 is used to collect infusion monitoring information in real time; wherein, the infusion monitoring information includes: infusion specifications and infusion weight.
[0077] The data acquisition module M1 of this embodiment acquires the infusion monitoring information in real time, thereby realizing real-time update monitoring of the infusion information.
[0078] The transmission module M2 is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to the preset MQTT protocol, and send and store each data packet in a preset thread-safe queue.
[0079] The transmission module M2 includes: a data encapsulation unit and a comparison unit;
[0080] Wherein, the data encapsulation unit is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to a preset MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier and a timestamp corresponding to the infusion monitoring information;
[0081] The comparison unit is used to compare the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread safety queue. If the comparison meets the preset rules, the existing data packet is updated according to the current data packet; otherwise, the current data packet is directly stored in the thread safety queue.
[0082] The transmission module M2 of this embodiment ensures the consistency and accuracy of the data by marking the data packet in detail (information type, monitor identification, timestamp) and comparing it with the existing data packet before storage. The mechanism of updating or adding a new data packet avoids duplicate data and redundant information, reduces the waste of storage space, and improves the reliability of subsequent data analysis, so that the system can still maintain efficient data management capabilities in a high-concurrency environment.
[0083] The processing module M3 is used to control each working thread to extract and process each data packet in the thread safety queue in parallel according to a preset multi-thread consumption mechanism, obtain analysis results of each monitoring service, and complete infusion information monitoring.
[0084] The processing module M3 includes: a dripping rate calculation unit, a dripping rate warning unit and an infusion specification confirmation unit;
[0085] The drip rate calculation unit is used to calculate the drip rate of the drip according to the infusion weight at each time stamp in the data packet and the preset drip coefficient;
[0086] The dripping speed warning unit is used to judge whether the current dripping speed is within the dripping speed threshold range according to the preset dripping speed threshold range, and if it is judged to be not, send an alarm message;
[0087] The infusion specification confirmation unit is used to calculate and match the infusion weight in the data packet with the tare weight and container capacity in each preset container specification to obtain the actual container specification, and determine whether the infusion specification in the data packet is consistent based on the actual container specification, and send an alarm message if it is inconsistent.
[0088] The processing module M3 of this embodiment calculates the dripping rate and compares it with the preset threshold range, so as to promptly detect abnormal situations and send alarm information, thereby effectively preventing potential risks during the infusion process; in addition, by matching and verifying the infusion weight with the container specifications, the consistency of the infusion specifications is ensured, further improving the accuracy and safety of the system and reducing misjudgments and erroneous operations caused by inconsistent specifications.
[0089] The processing module M3 further includes: a remaining liquid volume calculation unit, a completion time prediction unit and an infusion completion notification unit;
[0090] The remaining liquid volume calculation unit is used to calculate the remaining liquid volume according to the infusion specifications and infusion weight in the data packet;
[0091] The completion time prediction unit is used to calculate the predicted completion time of the infusion according to the current remaining liquid volume and dripping rate;
[0092] The infusion completion notification unit is used to determine whether it is necessary to send the infusion completion information based on the current remaining liquid volume and a preset minimum liquid volume threshold.
[0093] The processing module M3 of this embodiment also provides medical staff with an accurate time reference by calculating the remaining liquid volume and predicting the completion time of infusion, which helps to optimize the nursing process and resource allocation; at the same time, it determines whether it is necessary to send the infusion completion information based on the minimum liquid volume threshold, ensuring the smooth completion of the infusion process, reducing the risk of not processing in time due to liquid depletion, and improving the overall nursing quality and patient safety.
[0094] In summary, compared with the prior art, the embodiments of the present application have the following beneficial effects: by collecting infusion monitoring information in real time, and using MQTT protocol conversion and thread-safe queue storage of data packets, it efficiently handles high-concurrency data transmission to ensure the real-time and stability of the infusion monitoring system; the multi-threaded consumption mechanism enables multiple working threads to process data packets in parallel, significantly improving the speed and efficiency of data processing, thereby achieving accurate monitoring and rapid response to infusion information.
[0095] The division of the modules described above is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules may be combined or integrated into another system.
[0096] Embodiment three:
[0097] Figure 3 The structure diagram of a high-concurrency multi-threaded infusion monitoring device of the present application is presented. Figure 3 As shown, the high-concurrency multi-threaded infusion monitoring device may include: a processor N1, a memory N2, a data interface N3 and a communication bus N4.
[0098] Among them: the processor N1, the memory N2, and the data interface N3 communicate with each other through the communication bus N4; the data interface N3 is used for data communication with other devices such as input devices or output devices; the processor N1 is used to execute the program N5, which can specifically execute the relevant steps in the above-mentioned high-concurrency multi-threaded infusion monitoring method embodiment.
[0099] Specifically, the program N5 may include program codes, and the program codes include computer executable instructions.
[0100] The processor N1 may be a central processing unit CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the high-concurrency multi-threaded infusion monitoring device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0101] The memory N2 is used to store the program N5. The memory N2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0102] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present application are not directed to any particular programming language.
[0103] Embodiment 4:
[0104] An embodiment of the present invention also provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a high-concurrency multi-threaded infusion monitoring device / system, the high-concurrency multi-threaded infusion monitoring device / system executes a high-concurrency multi-threaded infusion monitoring method in any of the above-mentioned method embodiments.
[0105] In the specification provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. Similarly, in order to simplify the application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are thus clearly incorporated into the specific embodiment, wherein each claim itself is used as a separate embodiment of the application.
[0106] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
Claims
1. A high-concurrency multi-threaded infusion monitoring method, characterized in that: include: Collect infusion monitoring information in real time; wherein the infusion monitoring information includes: infusion specifications and infusion weight; According to the preset MQTT protocol, the infusion monitoring information is converted into a data packet that complies with the MQTT protocol, and each of the data packets is sent and stored in a preset thread-safe queue; According to the preset multi-thread consumption mechanism, each working thread is controlled to extract and process each data packet in the thread safety queue in parallel, obtain the analysis result of each monitoring service, and complete the infusion information monitoring.
2. A high-concurrency multi-threaded infusion monitoring method as claimed in claim 1, characterized in that: The method of converting the infusion monitoring information into a data packet that complies with the MQTT protocol according to the preset MQTT protocol, and storing each data packet in a preset thread-safe queue, includes: According to a preset MQTT protocol, converting the infusion monitoring information into a data packet that complies with the MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier, and a timestamp corresponding to the infusion monitoring information; A comparison is performed based on the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread-safe queue. If the comparison meets the preset rules, the existing data packet is updated based on the current data packet. Otherwise, the current data packet is directly stored in the thread-safe queue.
3. A high-concurrency multi-threaded infusion monitoring method as claimed in claim 2, characterized in that: According to the preset multi-thread consumption mechanism, each working thread is controlled to extract and process each data packet in the thread safety queue in parallel to obtain the analysis result of each monitoring service, including: Calculate the drip rate of the drip according to the infusion weight at each time stamp in the data packet and the preset drip coefficient; According to a preset dripping speed threshold range, determining whether the current dripping speed is within the dripping speed threshold range, and if determined to be no, sending an alarm message; The infusion weight in the data packet is calculated and matched with the tare weight and container capacity in each preset container specification to obtain the actual container specification, and based on the actual container specification, it is determined whether the infusion specification in the data packet is consistent. If not, an alarm message is sent.
4. A high-concurrency multi-threaded infusion monitoring method as claimed in claim 3, characterized in that: According to the preset multi-thread consumption mechanism, each working thread is controlled to extract and process each data packet in the thread safety queue in parallel to obtain the analysis result of each monitoring service, and further includes: Calculate the remaining liquid volume according to the infusion specifications and infusion weight in the data packet; Calculate the predicted time for completion of infusion according to the current remaining liquid volume and drip rate; According to the current remaining liquid volume and the preset minimum liquid volume threshold, it is determined whether it is necessary to send the infusion completion information.
5. A high-concurrency multi-threaded infusion monitoring system, characterized in that: include: Data acquisition module, transmission module and processing module; Wherein, the data acquisition module is used to collect infusion monitoring information in real time; wherein, the infusion monitoring information includes: infusion specifications and infusion weight; The transmission module is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to the preset MQTT protocol, and send and store each data packet in a preset thread-safe queue; The processing module is used to control each working thread to extract and process each data packet in the thread safety queue in parallel according to a preset multi-thread consumption mechanism, obtain the analysis results of each monitoring service, and complete the infusion information monitoring.
6. A high-concurrency multi-threaded infusion monitoring system as claimed in claim 5, characterized in that: The transmission module includes: a data encapsulation unit and a comparison unit; Wherein, the data encapsulation unit is used to convert the infusion monitoring information into a data packet that complies with the MQTT protocol according to a preset MQTT protocol; wherein the data packet is provided with an information type identifier, a monitor identifier and a timestamp corresponding to the infusion monitoring information; The comparison unit is used to compare the information type identifier, monitor identifier and timestamp of the current data packet and the existing data packets in the thread safety queue. If the comparison meets the preset rules, the existing data packet is updated according to the current data packet; otherwise, the current data packet is directly stored in the thread safety queue.
7. A high-concurrency multi-threaded infusion monitoring system as claimed in claim 6, characterized in that: The processing module includes: a dripping rate calculation unit, a dripping rate warning unit and an infusion specification confirmation unit; The drip rate calculation unit is used to calculate the drip rate of the drip according to the infusion weight at each time stamp in the data packet and the preset drip coefficient; The dripping speed warning unit is used to judge whether the current dripping speed is within the dripping speed threshold range according to the preset dripping speed threshold range, and if it is judged to be not, send an alarm message; The infusion specification confirmation unit is used to calculate and match the infusion weight in the data packet with the tare weight and container capacity in each preset container specification to obtain the actual container specification, and determine whether the infusion specification in the data packet is consistent based on the actual container specification, and send an alarm message if it is inconsistent.
8. A high-concurrency multi-threaded infusion monitoring system as claimed in claim 7, characterized in that: The processing module further includes: a remaining liquid volume calculation unit, a completion time prediction unit and an infusion completion notification unit; The remaining liquid volume calculation unit is used to calculate the remaining liquid volume according to the infusion specifications and infusion weight in the data packet; The completion time prediction unit is used to calculate the predicted completion time of the infusion according to the current remaining liquid volume and dripping rate; The infusion completion notification unit is used to determine whether it is necessary to send the infusion completion information based on the current remaining liquid volume and a preset minimum liquid volume threshold.
9. A high-concurrency multi-threaded infusion monitoring device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into the processor, the steps of a high-concurrency multi-threaded infusion monitoring method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a high-concurrency multi-threaded infusion monitoring method according to any one of claims 1-4 are implemented.