Method and apparatus for detecting communication state of blood purification apparatus
By periodically sending heartbeat and status update commands within the blood purification equipment to detect the communication status between the host computer and the slave computer, the problem of communication anomalies in the equipment was solved, ensuring the safety and stability of the equipment.
Patent Information
- Application Number
- CN202411677847.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Abnormal communication between the host computer and the slave computer in the blood purification equipment affects the safety and stability of the equipment.
By periodically sending heartbeat and status update commands, the status of the uplink and downlink communication channels between the host computer and the slave computer is detected. The heartbeat command is used to detect the downlink channel status, and the status update command is used to detect the uplink channel status. The communication status is monitored in real time and an alert is issued when there is an anomaly.
It enables real-time and efficient detection of the communication status of blood purification equipment, allowing for timely detection and handling of communication anomalies, ensuring the normal operation of the equipment and patient safety.
Smart Images

Figure CN119449655B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blood purification, in particular to a method and device for detecting communication state of blood purification equipment. BACKGROUND
[0002] In order to improve the reliability and stability of blood purification equipment, the distributed control system based on ARM processor core board in blood purification equipment has been widely used. From the system architecture, the distributed control system usually includes host computer and slave computer, wherein the host computer refers to the control device that can directly send control instructions, and is responsible for user operation interface and process control and other upper layer logic, and the slave computer can control the running state of the blood purification equipment after receiving the control instructions.
[0003] However, the communication state of the host computer and the slave computer may be abnormal due to various reasons, which affects the safety of the blood purification equipment during the blood purification process. SUMMARY
[0004] The present application aims to provide a method for detecting the communication state between the host computer and the slave computer when the blood purification equipment is working, so as to improve the safety of the blood purification equipment during use.
[0005] To solve the above problems, the first aspect of the present application provides a method for detecting the communication state of blood purification equipment, the medical equipment includes a host computer and a plurality of slave computers, and the detection method comprises detecting the communication state of the uplink and downlink communication channels between the host computer and each slave computer.
[0006] For each slave computer, the detection of the communication state of the downlink communication channel between the host computer and the slave computer comprises:
[0007] The host computer periodically issues a heartbeat instruction to the slave computer, and detects the communication state of the downlink communication channel between the host computer and the slave computer according to whether the slave computer periodically receives the heartbeat instruction;
[0008] For each slave computer, the detection of the communication state of the uplink communication channel between the host computer and the slave computer comprises:
[0009] The slave computer periodically uploads a state update instruction to the host computer, the state update instruction is used to instruct the host computer to update the display value corresponding to the slave computer to a first value, the host computer is also used to execute the received state update instruction, and periodically update the display value corresponding to the slave computer to a second value, and detect the communication state of the uplink communication channel between the host computer and the slave computer according to the time length that the display value corresponding to the slave computer remains as the second value.
[0010] The second aspect of the present application provides a detection device for communication state of a blood purification device, the medical device comprising a host computer and a plurality of slave computers, the detection device comprising a first monitoring module for detecting communication state of an uplink communication channel between the host computer and each of the slave computers, and a second monitoring module for detecting communication state of a downlink communication channel between the host computer and each of the slave computers.
[0011] For each of the slave computers, the second monitoring module detecting the communication state of the downlink communication channel between the host computer and the slave computer comprises:
[0012] The host computer periodically issues a heartbeat instruction to the slave computer, and according to whether the slave computer periodically receives the heartbeat instruction, the communication state of the downlink communication channel between the host computer and the slave computer is detected.
[0013] For each of the slave computers, the first monitoring module detecting the communication state of the uplink communication channel between the host computer and the slave computer comprises:
[0014] The slave computer periodically uploads a state update instruction to the host computer, the state update instruction being used to instruct the host computer to update a display value corresponding to the slave computer to a first value, the host computer further being configured to execute the received state update instruction and periodically update the display value corresponding to the slave computer to a second value, and according to a time length for which the display value corresponding to the slave computer remains at the second value, the communication state of the uplink communication channel between the host computer and the slave computer is detected.
[0015] The third aspect of the present application provides an electronic device, comprising a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of the detection method described above.
[0016] According to still another aspect of the embodiments of the present application, there is provided a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the detection method described above.
[0017] The communication state detection method of the blood purification equipment provided by the application detects the communication states of two communication channels, i.e., the uplink and downlink communication channels between the upper computer and the lower computer, so as to determine whether the upper computer or the lower computer is the cause when a fault is detected, and when detecting the communication state of the downlink communication channel, the heartbeat instruction periodically issued by the upper computer is adopted, and whether the lower computer also receives the heartbeat instruction is detected, so that the communication state of the downlink communication channel can be detected in real time and efficiently, when detecting the communication state of the uplink communication channel, on one hand, the lower computer is instructed to periodically upload the state update instruction to the upper computer, and the state update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to the first value, so that when the communication state of the uplink communication channel is normal, the upper computer can periodically receive the state update instruction and update the display value corresponding to the lower computer to the first value, on the other hand, the upper computer also periodically updates the display value to the second value, so that if it is found that the display value is updated to the second value for a long time, it is indicated that the upper computer does not normally receive the state update instruction uploaded by the lower computer, so that the abnormality of the uplink communication channel is effectively determined, the communication state of the uplink communication channel is detected in real time and efficiently, and a solid foundation is provided for ensuring the normal operation of the blood purification equipment. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 The architecture schematic diagram of the upper computer and the lower computer of the blood purification equipment provided by the embodiment of the application is provided.
[0019] Figure 2 The communication state detection method of the blood purification equipment provided by the embodiment of the application is provided.
[0020] Figure 3 The flowchart schematic diagram of detecting the communication state of the downlink communication channel between the upper computer and the lower computer is provided for the embodiment of the application.
[0021] Figure 4 The flowchart schematic diagram of detecting the communication state of the uplink communication channel between the upper computer and the lower computer is provided for the embodiment of the application.
[0022] Figure 5 The flowchart schematic diagram of detecting the response ability of the lower computer to the heartbeat instruction is provided for the embodiment of the application.
[0023] Figure 6 The structure schematic diagram of a detection device provided by the embodiment of the application is provided.
[0024] Figure 7 The structure schematic diagram of an electronic device provided by the embodiment of the application is provided. DETAILED DESCRIPTION
[0025] Reference Figure 1 , Figure 1An architecture diagram of a host computer and slave computers of a blood purification device is provided. Figure 1 As shown, a host computer and multiple slave computers are connected in a CAN bus mode, and each slave computer node is independently connected to the CAN bus node in a communication line. The slave computer includes a board card, and each board card of the slave computer is independently connected to the host computer through a communication thread. The host computer adopts a CAN bus center control system and can be accessed by any board card in the communication system. The board card obtains instructions from the host computer in an information reading mode. The slave computer receives and executes specific instructions transmitted by the host computer, and feeds back the status of instruction execution and the detected device state and other information to the host computer. In some embodiments, the host computer can adopt an ARM architecture processor, communicate with the slave computer through a communication interface (such as UART, USB, and CAN bus, etc.), receive data collected by the slave computer, and perform complex analysis and processing on the data, etc. At the same time, the host computer can send control instructions to the slave computer and display data and operation options to the user in a graphical interface. The slave computer is various terminals (such as blood pumps, heparin pumps, heaters, and arteriovenous clamps, etc.), which are configured with various communication interfaces (such as CAN, RS232, and RS485, etc.) and have respective communication protocols. The host computer and the slave computer are connected through a communication interface, and each slave computer node can be connected to the center node in an independent communication line to realize safe transmission of communication system data.
[0026] In the communication process of the host computer and the slave computer of the embodiment, the host computer usually sends a segment of instructions, the slave computer receives the instructions within a specified time, processes the received instructions, and clears the received instructions after the specified time. However, when the host computer performs multitasking processing, the real-time performance of sending instructions is often affected, which occasionally causes an uncertain time interruption between bytes of sent instructions, resulting in a lack of stability and reliability of the communication connection between the host computer and the slave computer, and affecting the safety of the blood purification device during the blood purification process.
[0027] In order to ensure the safety of the blood purification device during the blood purification process, the embodiment provides a detection method for the communication state of the blood purification device to detect whether the communication connection between the host computer and the slave computer is normal in real time.
[0028] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0029] It should be noted that examples of embodiments of the present application are shown in the drawings, wherein the same or similar notations are used to represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary only, and are used for explanation and interpretation of the present application, and cannot be interpreted as a limitation on the present application.
[0030] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the use of the phrase "comprising" in the specification of the present application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we say an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any one of the associated listed items and all combinations thereof.
[0031] The first aspect of the present embodiment provides a method for detecting the communication state of a blood purification device, which includes a host computer and a plurality of slave computers, as shown in Figure 2 The detection method includes detecting the communication state of the uplink and downlink communication channels between the host computer and each slave computer, wherein:
[0032] S2101, for each slave computer, detecting the communication state of the downlink communication channel between the host computer and the slave computer includes:
[0033] The host computer periodically issues a heartbeat instruction to the slave computer, and according to whether the slave computer periodically receives the heartbeat instruction, the communication state of the downlink communication channel between the host computer and the slave computer is detected.
[0034] In the present embodiment, the host computer periodically issues a heartbeat instruction to the slave computer when detecting the communication state of the downlink communication channel. The heartbeat instruction is a small amount of data packet sent by one of the two parties (the host computer in the present embodiment) to the other party (the slave computer in the present embodiment) at regular intervals (or no more than a certain time interval), and the other party determines whether to reply a small amount of data packet after receiving the data packet according to the need. In the present embodiment, the communication state of the downlink communication channel between the host computer and the slave computer is detected according to whether the slave computer also periodically receives the heartbeat instruction. If the slave computer can periodically receive the heartbeat instruction, it means that the communication state of the downlink channel between the host computer and the slave computer is normal, and if the slave computer cannot periodically receive the heartbeat instruction, it means that the communication state of the downlink channel between the host computer and the slave computer is abnormal.
[0035] S2102, for each lower machine, detecting the communication state of the uplink communication channel between the upper machine and the lower machine comprises:
[0036] The lower machine periodically uploads a state update instruction to the upper machine, the state update instruction being used to instruct the upper machine to update the display value corresponding to the lower machine to a first value, the upper machine further being used to execute the received state update instruction and periodically update the display value corresponding to the lower machine to a second value, and according to the time length for which the display value corresponding to the lower machine remains at the second value, detecting the communication state of the uplink communication channel between the upper machine and the lower machine.
[0037] It should be noted that, Figure 2 S2101 and S2102 are displayed in sequence according to the arrows in the foregoing description, but these steps are not necessarily executed in the order indicated by the arrows, and the arrows do not represent the order of S2101 and S2102.
[0038] When detecting the communication state of the uplink communication channel, the embodiment of the present application instructs the lower machine to periodically upload a state update instruction to the upper machine, the state update instruction being used to instruct the upper machine to update the display value corresponding to the lower machine to a first value, so that when the communication state of the uplink communication channel is normal, the upper machine can periodically receive the state update instruction and update the display value corresponding to the lower machine to the first value, and on the other hand, the upper machine will also periodically update the display value to a second value, which makes it possible to effectively determine that the uplink communication channel is abnormal if it is found that the display value is updated to the second value for a long time, indicating that the upper machine does not normally receive the state update instruction uploaded by the lower machine.
[0039] The method for detecting the communication state of the blood purification device according to the embodiments of the present application comprises detecting the communication state of two communication channels, i.e., the uplink and downlink communication channels between the upper computer and the lower computer, so as to determine whether the upper computer or the lower computer is the cause when a fault is detected. When detecting the communication state of the downlink communication channel, the heartbeat instruction is periodically sent by the upper computer, and whether the heartbeat instruction is received by the lower computer is detected, so that the communication state of the downlink communication channel can be detected in real time and efficiently. When detecting the communication state of the uplink communication channel, the lower computer is instructed to periodically upload the state update instruction to the upper computer, and the state update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to the first value. Therefore, when the communication state of the uplink communication channel is normal, the state update instruction can be periodically received by the upper computer, and the display value corresponding to the lower computer is updated to the first value. On the other hand, the display value is also periodically updated to the second value by the upper computer. Therefore, if it is found that the display value is updated to the second value for a long time, it is indicated that the state update instruction uploaded by the lower computer is not normally received by the upper computer, so that the abnormality of the uplink communication channel is effectively determined, the communication state of the uplink communication channel is detected in real time and efficiently, and a solid foundation is provided for ensuring the normal operation of the blood purification device.
[0040] On the basis of the above embodiments, as an optional embodiment, the communication state of the downlink communication channel between the upper computer and the lower computer is detected according to whether the heartbeat instruction is periodically received by the lower computer, comprising:
[0041] S2201, periodically judging whether the heartbeat instruction is received by the lower computer based on the sending period of the heartbeat instruction;
[0042] S2202a, if the heartbeat instruction is received by the lower computer according to the sending period, it is determined that the communication state of the downlink communication channel between the upper computer and the lower computer is normal, and the preset clock is reset to zero.
[0043] S2202b, if the heartbeat instruction is not received by the lower computer according to the sending period, and the heartbeat instruction is still not received when the timing of the preset clock reaches the first preset time length, it is determined that the communication state of the downlink communication channel between the upper computer and the lower computer is abnormal.
[0044] Since the heartbeat instruction is periodically sent by the upper computer, when the communication state of the downlink communication channel is normal, the heartbeat instruction can also be periodically received by the lower computer based on the sending period of the heartbeat instruction. For example, if the heartbeat instruction is sent by the upper computer every 4 ms, when the communication state of the downlink communication channel is normal, the heartbeat instruction can also be received by the lower computer every 4 ms.
[0045] The lower computer of the embodiment of the present application is also configured with a clock, which restarts timing each time the lower computer receives a heartbeat instruction. If the lower computer does not receive a heartbeat instruction according to the issuing period, the clock will continue to accumulate the time length. If the heartbeat instruction is still not received when the timing reaches the first preset time length, it is determined that the communication state of the downlink communication channel between the upper computer and the lower computer is abnormal.
[0046] The first preset time length of the embodiment of the present application is n times of the time length of the period of issuing the heartbeat instruction, and n is a positive integer. For example, when the first preset time length is 2 times of the time length of the period of issuing the heartbeat instruction, it means that if the upper computer occasionally does not receive a heartbeat instruction, but receives a heartbeat instruction in the next period, it is still considered that the communication state of the downlink communication channel is normal, which to some extent enhances the tolerance of detection and does not cause frequent warnings. Preferably, 2≤n≤10, thereby improving the reliability and accuracy of the downlink communication channel between the upper computer and the lower computer, and avoiding the safety of the blood purification process affected by the untimely warning.
[0047] Please refer to Figure 3 which exemplarily shows a flowchart of detecting the communication state of the downlink communication channel between the upper computer and the lower computer according to the embodiment of the present application, as shown in Figure 3 , a communication thread is randomly selected. The upper computer sends a heartbeat instruction to the lower computer of the communication thread every several milliseconds. If the lower computer receives the heartbeat instruction based on the issuing period, it is determined that the communication state is normal, and continues to wait for the heartbeat instruction issued by the upper computer. If the lower computer does not receive the heartbeat instruction from the upper computer, it starts timing. If the heartbeat instruction is still not received when the accumulated time length exceeds the preset time length, the lower computer directly determines that there is a communication problem with the upper computer, reminds of the communication interruption, issues a warning, and clears the accumulated time length. If the lower computer receives the heartbeat instruction from the upper computer before the accumulated time length reaches the preset time length, it is determined that the communication is normal, and the accumulated time length is cleared. For example, the upper computer sends a heartbeat command to the human-computer interaction board and the blood path protection board through the CAN bus every 500 ms. The corresponding board lower computer always monitors whether the CAN receives a valid command. If any valid command is not received for 4 seconds, the power supply voltage of all modules of the blood purification equipment (including blood pump, heparin pump and heater, etc.) is turned off, a warning dialog box is popped up on the display screen, the buzzer is controlled to continuously sound, and the accumulated time length is cleared.
[0048] On the basis of the above-mentioned embodiments, as an optional embodiment, the communication state of the uplink communication channel between the upper computer and the lower computer is detected according to the time length during which the display value corresponding to the lower computer is maintained as the second value, comprising:
[0049] S2301, periodically judging whether the display value corresponding to the lower computer is the second value;
[0050] S2302a, if it is determined that the display value corresponding to the lower machine is not the second value, updating the display value corresponding to the lower machine to the second value, and determining that the communication state of the uplink communication channel between the upper machine and the lower machine is normal;
[0051] S2302b, if it is determined that the display value corresponding to the lower machine is the second value, recording the duration that the display value corresponding to the lower machine remains the second value;
[0052] S2303a, if the duration reaches the second preset duration before the display value corresponding to the lower machine is not the second value, updating the display value corresponding to the lower machine to the second value, determining that the communication state of the uplink communication channel between the upper machine and the lower machine is normal, and restarting the timing;
[0053] S2303b, if the duration reaches the second preset duration and the display value corresponding to the lower machine is still the second value, determining that the communication state of the uplink communication channel between the upper machine and the lower machine is abnormal.
[0054] The embodiment of the present application periodically judges whether the display value corresponding to the lower machine is the second value. If the display value corresponding to the lower machine is not the second value, it indicates that the display value has been updated to the first value according to the state update instruction before, and also indicates that the communication state of the uplink communication channel between the upper machine and the lower machine is normal. If it is determined that the display value corresponding to the lower machine is the second value, it indicates that the display value of the lower machine has been updated to the second value, and no state update instruction has been received. Then, the duration that the display value corresponding to the lower machine remains the second value is recorded. If the state update instruction is received before the duration reaches the second preset duration, the display value corresponding to the lower machine is updated to the first value, so it can be determined that the communication state of the uplink communication channel is normal. On the one hand, the recorded duration needs to be cleared, and on the other hand, the display value needs to be updated to the second value. If the display value corresponding to the lower machine is still the second value when the duration reaches the second preset duration, it indicates that the communication state of the uplink communication channel between the upper machine and the lower machine is abnormal.
[0055] The embodiment of the present application confirms whether the lower machine normally feeds back the state of instruction execution and the detected device state to the upper machine. If it is normal, it indicates that the current communication thread is smooth, otherwise, it reminds that the communication is interrupted. The lower machine will upload the real-time data of the related device to the upper machine through the CAN bus every certain period of time for data display. If the upper machine does not receive the information, the display data will not be updated. According to this logic, if the upper machine does not receive the corresponding information after accumulating for more than a preset time, it indicates that the corresponding board card sends the command abnormally.
[0056] Please refer to Figure 4An exemplary flow chart of the application for detecting the communication state of the uplink communication channel between the host computer and the slave computer is shown in Fig. 1, which shows the flow chart of the application for detecting the communication state of the uplink communication channel between the host computer and the slave computer. Figure 4 As shown in Fig. 2, the initialization sets the display value state of each board card to 1, and after starting the communication detection thread, the slave computer continuously uploads the command value 1 to the board card at a certain frequency, and detects the display value state of the slave computer every 1s, and judges whether the current display value state is 0; if not, the host computer controls the display value state to be set to 0; if yes, the delay time is recorded as N+1, and N is the number of times of judging the display value of the board card; if the delay time exceeds 5s, an alarm is sent to remind that the communication between the slave computer and the host computer has been disconnected, and the delay time is cleared. After the display value of the board card becomes 0, if the communication is normal, the board card can receive the command value 1 uploaded by the slave computer and update the display value, so that the display value of the board card will not be 0 in the next judgment; if the display value is 0, it means that the command value uploaded by the slave computer is not received, and there is a possibility of communication delay or communication interruption between the slave computer and the host computer; if no data is received for 5s, it means that the communication is not delayed, but interrupted, and an alarm needs to be sent at this time.
[0057] Based on the above embodiments, as an optional embodiment, the communication state of the uplink and downlink communication channels between the host computer and each of the slave computers is detected, including:
[0058] For each slave computer, the communication state of the downlink communication channel between the host computer and the slave computer is periodically detected;
[0059] For each slave computer, if it is determined that the communication state of the downlink communication channel between the host computer and the slave computer is normal, the communication state of the uplink communication channel between the host computer and the slave computer is periodically detected.
[0060] That is, when the application periodically detects the communication state of the uplink and downlink communication channels between the host computer and the slave computer, the communication state of the downlink communication channel is detected first, and only when the communication state of the downlink communication channel is normal, the communication state of the uplink communication channel is detected. In this way, the communication thread between the host computer and the slave computer is detected and diagnosed layer by layer, which can accurately find the fault point of the communication interruption, and helps to ensure the safety of the data transmission process.
[0061] In the above various embodiments, methods for checking whether the host computer normally sends instructions to the slave computer and whether the slave computer normally feeds back instructions to the host computer are provided respectively, and the focus is on diagnosing whether the communication thread between the two has been disconnected. In fact, the blood purification equipment also requires that after the slave computer receives the instructions from the host computer, the slave computer must respond and return a reply signal. However, if the communication is unstable, it will also lead to the delay or even loss of the reply signal of the slave computer, affecting the normal use of the blood purification equipment. Therefore, it is necessary to diagnose whether the slave computer can normally reply to the command.
[0062] Based on the above various embodiments, as an optional embodiment, the detection method further comprises:
[0063] For each slave computer, when the communication states of the uplink communication channels between the host computer and the slave computer are all normal, the ability of the slave computer to reply to the heartbeat instruction is detected.
[0064] The slave computer of the embodiment of the application comprises a storage container, which is used to store the received heartbeat instruction and record the time when the heartbeat instruction is issued; accordingly, the detection of the ability of the slave computer to reply to the heartbeat instruction comprises:
[0065] Periodically detecting whether there is an un-replied target heartbeat instruction in the storage container;
[0066] If the target heartbeat instruction exists, the timeout time of the target heartbeat instruction is calculated;
[0067] If the timeout time is greater than a third preset time length, it is indicated that the slave computer uploads a version acquisition instruction to the host computer every fourth preset time length;
[0068] If the host computer receives the version acquisition instruction or the reply message of the target heartbeat instruction within the fourth preset time length, it is determined that the ability of the slave computer to reply to the heartbeat instruction is normal, and the timeout time is reset to zero;
[0069] If the host computer does not receive the version acquisition instruction or the reply message of the target heartbeat instruction within the fourth preset time length, it is determined that the ability of the slave computer to reply to the heartbeat instruction is abnormal.
[0070] Please refer to Figure 5 which exemplarily shows a flowchart of detecting the ability of the slave computer to reply to the heartbeat instruction provided by the embodiment of the application, as shown in Figure 5As shown, each board is provided with a command storage container, and in the initialization stage, each storage container is first emptied, and each communication thread is determined. After the host sends a command to the corresponding lower machine, the command is inserted into the storage container on the corresponding board, and the sending time is recorded. Under normal circumstances, the corresponding lower machine will reply to the command in time. After starting the communication detection thread, the storage container of each board is automatically detected every 1s to see if there is an un-replied command, and if there is an un-replied command, the timeout time of the un-replied command is calculated. If the timeout time exceeds 6s, it is preliminarily considered that there is a communication stability problem, and the system will control the corresponding board to send a version information acquisition command to the host every 2s, and if the host receives the version information acquisition command within 2s or receives the above-mentioned delayed reply command, it means that the communication stability has been restored, and the storage container is emptied to return to the initial state; if the version information acquisition command is not received within 2s, and no reply command is received, it means that the lower machine cannot normally reply to the received command, the communication stability between the lower machine and the host is poor, and the connection may have been interrupted, and a communication exception needs to be reminded.
[0071] On the basis of the above embodiments, as an optional embodiment, the method further comprises:
[0072] If at least one of the communication states of the uplink and downlink communication channels between the host and each lower machine and the ability of the lower machine to respond to the heartbeat command is abnormal, the current treatment mode is stopped and a blood return mode is entered;
[0073] In response to the end of blood return, the blood purification device is controlled to stop.
[0074] If the blood purification device suddenly has a communication abnormality failure while working (also referred to as a treatment mode), the user cannot manipulate the blood purification device through the display screen, and if the power is directly turned off, the stop will affect the patient's blood return, but if the treatment continues, since the communication thread of the entire blood purification device has been interrupted, control commands cannot be edited and sent, and state parameters cannot be fed back and received, the blood purification device is in an unknown and uncontrollable state, and there is a great safety risk in continued use. Therefore, the emergency measures are added in the embodiments of the application to control the blood purification device to safely stop. Specifically, four physical buttons are provided on the liquid crystal display of the blood purification device, namely, a sound pause button, a pause button, a start button, and a power on / off button. In the emergency state, the user presses and holds the sound pause button for 10s, then releases it, and then presses the pause button once within 5s, the blood purification device will automatically stop the current treatment mode and immediately enter the blood return mode, then press the start button again, the blood purification device will start blood return, and after the blood return is completed, the blood purification device will automatically stop.
[0075] The second aspect of the embodiment of the present application provides a detection device of a communication state of a blood purification equipment, as shown in the drawings, the device can comprise: a first monitoring module 601 for detecting a communication state of an uplink communication channel between the host computer and each of the slave computers, and a second monitoring module 602 for detecting a communication state of a downlink communication channel between the host computer and each of the slave computers, wherein, Figure 6
[0076] For each of the slave computers, the second monitoring module 602 detecting the communication state of the downlink communication channel between the host computer and the slave computer comprises:
[0077] periodically issuing a heartbeat instruction by the host computer to the slave computer, and detecting the communication state of the downlink communication channel between the host computer and the slave computer according to whether the heartbeat instruction is periodically received by the slave computer;
[0078] For each of the slave computers, the first monitoring module 601 detecting the communication state of the uplink communication channel between the host computer and the slave computer comprises:
[0079] periodically uploading a state update instruction by the slave computer to the host computer, the state update instruction being used to instruct the host computer to update a display value corresponding to the slave computer to a first value, the host computer further being used to execute the received state update instruction and periodically update the display value corresponding to the slave computer to a second value, and detecting the communication state of the uplink communication channel between the host computer and the slave computer according to a time length for which the display value corresponding to the slave computer remains the second value.
[0080] The device of the embodiment of the present application can execute the method provided by the embodiment of the present application, the implementation principles of which are similar, and the actions performed by each module in the device of the embodiment of the present application are corresponding to the steps in the method of the embodiment of the present application. The detailed function description of each module of the device can be referred to the description of the corresponding method in the foregoing, and will not be repeated here.
[0081] The third aspect of the embodiment of the present application provides an electronic device, including a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to realize the steps of the detection method, compared with the related art, the communication state of two communication channels of uplink and downlink between the upper computer and the lower computer can be detected, so that when a fault is detected, it is determined whether the upper computer or the lower computer is the cause, when the communication state of the downlink communication channel is detected, the heartbeat instruction of the upper computer is periodically transmitted downward, and whether the lower computer also receives the heartbeat instruction is detected, so that the communication state of the downlink communication channel can be detected in real time and efficiently, when the communication state of the uplink communication channel is detected, on one hand, the lower computer is instructed to periodically upload the state update instruction to the upper computer, and the state update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to the first value, so that when the communication state of the uplink communication channel is normal, the state update instruction can be periodically received by the upper computer, and the display value corresponding to the lower computer is updated to the first value, on the other hand, the upper computer also periodically updates the display value to the second value, so that if it is found that the display value is updated to the second value for a long time, it is indicated that the state update instruction uploaded by the lower computer is not normally received by the upper computer, so that the abnormality of the uplink communication channel is effectively determined, the communication state of the uplink communication channel is detected in real time and efficiently, and a solid foundation is provided for ensuring the normal operation of the blood purification device.
[0082] In an optional embodiment, an electronic device is provided, as shown in Figure 7 As shown in Figure 7 The electronic device 7000 shown in the figure includes a processor 7001 and a memory 7003. The processor 7001 and the memory 7003 are connected, such as through a bus 7002. Optionally, the electronic device 7000 can also include a transceiver 7004, which can be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual application, the transceiver 7004 is not limited to one, and the structure of the electronic device 7000 does not constitute a limitation on the embodiments of the present application.
[0083] The processor 7001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure. The processor 7001 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.
[0084] The bus 7002 can include a path for transmitting information between the above-mentioned components. The bus 7002 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 7002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus.
[0085] The memory 7003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, an optical disk storage (including a compact disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium, other magnetic storage device, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation.
[0086] The memory 7003 is used to store computer programs for executing the embodiments of the present application, and is controlled by the processor 7001 for execution. The processor 7001 is used to execute the computer programs stored in the memory 7003 to realize the steps shown in the foregoing method embodiments.
[0087] A fourth aspect of the embodiments of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps and corresponding contents of the foregoing method embodiments.
[0088] A fifth aspect of the embodiments of the present application further provides a computer program product, and the computer program product comprises a computer program. The computer program is executed by a processor to implement the steps and corresponding contents of the foregoing method embodiments.
[0089] It should be understood that, although each step in the flowchart of the accompanying drawings is displayed in sequence according to the indication of the arrow, these steps are not necessarily executed in sequence according to the indication of the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other sequences. Moreover, at least part of the steps in the flowchart of the accompanying drawings can comprise multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0090] Although the present disclosure is disclosed as above, the protection scope of the present disclosure is not limited to this. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present disclosure, and these changes and modifications shall fall within the protection scope of the present disclosure.
Claims
1. A method of detecting a communication state of a blood purification apparatus, characterized by, The blood purification equipment comprises a host computer and a plurality of slave computers, and the detection method comprises detecting the communication state of the uplink and downlink communication channels between the host computer and each of the slave computers; For each of the slave computers, the detection of the communication state of the downlink communication channel between the host computer and the slave computer comprises: periodically issuing a heartbeat instruction from the host computer to the slave computer, and detecting the communication state of the downlink communication channel between the host computer and the slave computer according to whether the heartbeat instruction is periodically received by the slave computer; For each of the slave computers, the detection of the communication state of the uplink communication channel between the host computer and the slave computer comprises: periodically uploading a state update instruction from the slave computer to the host computer, the state update instruction being used to instruct the host computer to update the display value corresponding to the slave computer to a first value, the host computer further being configured to execute the received state update instruction and periodically update the display value corresponding to the slave computer to a second value, and detecting the communication state of the uplink communication channel between the host computer and the slave computer according to the length of time for which the display value corresponding to the slave computer remains at the second value.
2. The detection method according to claim 1, characterized in that, The detection of the communication state of the downlink communication channel between the host computer and the slave computer according to whether the heartbeat instruction is periodically received by the slave computer comprises: periodically determining whether the heartbeat instruction is received by the slave computer based on the issuing period of the heartbeat instruction; if the heartbeat instruction is received by the slave computer according to the issuing period, determining that the communication state of the downlink communication channel between the host computer and the slave computer is normal, and resetting a preset clock; if the heartbeat instruction is not received by the slave computer according to the issuing period, and the heartbeat instruction is still not received by the slave computer when the preset clock is counted for a first preset length of time, determining that the communication state of the downlink communication channel between the host computer and the slave computer is abnormal; wherein the first preset length of time is n times the length of the period of the heartbeat instruction, and n is a positive integer.
3. The method of claim 1, wherein The detection of the communication state of the uplink communication channel between the host computer and the slave computer according to the length of time for which the display value corresponding to the slave computer remains at the second value comprises: periodically determining whether the display value corresponding to the slave computer is the second value; if it is determined that the display value corresponding to the slave computer is not the second value, updating the display value corresponding to the slave computer to the second value, and determining that the communication state of the uplink communication channel between the host computer and the slave computer is normal; if it is determined that the display value corresponding to the slave computer is the second value, recording the length of time for which the display value corresponding to the slave computer remains at the second value; if it is determined that the display value corresponding to the slave computer is not the second value before the length of time reaches a second preset length of time, updating the display value corresponding to the slave computer to the second value, determining that the communication state of the uplink communication channel between the host computer and the slave computer is normal, and resetting the clock; if it is determined that the display value corresponding to the slave computer is still the second value when the length of time reaches the second preset length of time, determining that the communication state of the uplink communication channel between the host computer and the slave computer is abnormal.
4. The assay method according to any one of claims 1 to 3, characterized by, The detection of the communication state of the uplink and downlink communication channels between the upper computer and each of the lower computers comprises: For each lower computer, periodically detecting the communication state of the downlink communication channel between the upper computer and the lower computer; For each lower computer, if it is determined that the communication state of the downlink communication channel between the upper computer and the lower computer is normal, periodically detecting the communication state of the uplink communication channel between the upper computer and the lower computer.
5. The detection method according to claim 4, characterized in that, The detection method further comprises: For each lower computer, when the communication state of the uplink communication channel between the upper computer and the lower computer is normal, detecting the ability of the lower computer to respond to the heartbeat instruction.
6. The detection method according to claim 5, characterized in that, The lower computer comprises a storage container for storing the received heartbeat instruction and recording the time when the heartbeat instruction is issued; The detection of the ability of the lower computer to respond to the heartbeat instruction comprises: Periodically detecting whether there is an unresponded target heartbeat instruction in the storage container; If the target heartbeat instruction exists, calculating the timeout time of the target heartbeat instruction; If the timeout time is greater than a third preset time length, instructing the lower computer to upload a version acquisition instruction to the upper computer every fourth preset time length; If the upper computer receives the version acquisition instruction or the response message of the target heartbeat instruction within the fourth preset time length, it is determined that the ability of the lower computer to respond to the heartbeat instruction is normal, and the timeout time is reset to zero; If the upper computer does not receive the version acquisition instruction or the response message of the target heartbeat instruction within the fourth preset time length, it is determined that the ability of the lower computer to respond to the heartbeat instruction is abnormal.
7. The detection method according to claim 4, characterized in that, Further comprising: If at least one of the communication state of the uplink and downlink communication channels between the upper computer and each of the lower computers and the ability of the lower computer to respond to the heartbeat instruction is abnormal, stopping the current treatment mode and entering a blood return mode; In response to the end of blood return, controlling the blood purification device to stop.
8. A communication state detection device of a blood purification apparatus, characterized by comprising: The blood purification device comprises an upper computer and a plurality of lower computers, and the detection device comprises a first monitoring module for detecting the communication state of the uplink communication channel between the upper computer and each of the lower computers and a second monitoring module for detecting the communication state of the downlink communication channel between the upper computer and each of the lower computers; For each of the lower computers, the second monitoring module detects the communication state of the downlink communication channel between the upper computer and the lower computer by periodically issuing a heartbeat instruction from the upper computer to the lower computer and detecting the communication state of the downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction; For each of the lower computers, the first monitoring module detects the communication state of the uplink communication channel between the upper computer and the lower computer by periodically issuing a heartbeat instruction from the upper computer to the lower computer and detecting the communication state of the uplink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction; For each of the lower computers, the first monitoring module detects the communication state of the uplink communication channel between the upper computer and the lower computer by periodically issuing a heartbeat instruction from the upper computer to the lower computer and detecting the communication state of the uplink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction; The lower machine periodically uploads a state update instruction to the upper machine, the state update instruction being used to instruct the upper machine to update a display value corresponding to the lower machine to a first value, the upper machine further being configured to execute the received state update instruction and periodically update the display value corresponding to the lower machine to a second value, and according to a time length for which the display value corresponding to the lower machine remains at the second value, detect a communication state of an uplink communication channel between the upper machine and the lower machine.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the steps of the detection method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the detection method of any one of claims 1-7.
Citation Information
Patent Citations
Master-slave equipment communication system and method and terminal equipment
CN110445700A
Communication connection monitoring method, medical system and storage medium
CN116669810A