Method and device for detecting communication state of blood purification equipment

By detecting the communication status of the uplink and downlink communication channels between the upper and lower computers in the blood purification equipment, the problem of abnormal communication status in the equipment is solved, real-time and efficient fault detection and equipment security guarantees are achieved.

CN119449655AActive Publication Date: 2025-02-14JAFRON BIOMEDICAL
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411677847.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-14
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The communication status between the upper and lower computers in the blood purification equipment may be abnormal, affecting the safety of the equipment during the blood purification process.

Method used

By detecting the communication status of the uplink and downlink communication channels between the upper computer and the lower computer, the upper computer periodically issues heartbeat commands and detects whether the lower computer receives it, and the lower computer periodically uploads the status update commands to the upper computer and detects the display. The duration of the value updated to detect communication status efficiently in real time.

Benefits of technology

It can detect the communication status between the upper and lower computers in real time, determine the cause of the failure, and ensure the normal operation and safety of the blood purification equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449655A_ABST
    Figure CN119449655A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for detecting the communication state of blood purification equipment, the blood purification equipment comprises an upper computer and a plurality of lower computers, and the detection method comprises the following steps: detecting the communication state of uplink and downlink communication channels between the upper computer and each lower computer; detecting a communication state of a downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction; the lower computer periodically uploads a state updating instruction to the upper computer, the state updating instruction is used for indicating the upper computer to update a display value corresponding to the lower computer to a first value, and the upper computer is further used for executing the received state updating instruction and periodically updating the display value corresponding to the lower computer to a second value. And detecting the communication state of the uplink communication channel between the upper computer and the lower computer according to the duration in which the display value corresponding to the lower computer is kept at the second value. The method can effectively detect whether the blood purification equipment stores communication faults or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blood purification, and in particular to a method and device for detecting the communication status of a blood purification device. Background Art

[0002] In order to improve the reliability and stability of blood purification equipment, the distributed control system based on the ARM processor core board has been widely used in blood purification equipment. From the perspective of system architecture, the distributed control system usually includes a host computer and a slave computer. The host computer refers to the control device that can directly send control instructions, which is responsible for the upper-level logic such as the user operation interface and process control. The slave computer can control the operating status of the blood purification equipment after receiving the control instructions.

[0003] However, the communication status between the upper computer and the lower computer may be abnormal due to various reasons, affecting the safety of the blood purification equipment during the blood purification process. Summary of the invention

[0004] The present invention aims to provide a method capable of detecting the communication status between a host computer and a slave computer when a blood purification device is working, so as to improve the safety of the blood purification device during use.

[0005] To solve the above problems, a first aspect of the present invention provides a method for detecting the communication status of a blood purification device, wherein the medical device comprises a host computer and a plurality of slave computers, and the detection method comprises detecting the communication status of the uplink and downlink communication channels between the host computer and each of the slave computers;

[0006] Wherein, for each of the lower computers, detecting the communication status of the downlink communication channel between the upper computer and the lower computer includes:

[0007] The upper computer periodically sends a heartbeat instruction to the lower computer, and detects the communication status of the downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction;

[0008] For each of the lower computers, detecting the communication status of the uplink communication channel between the upper computer and the lower computer includes:

[0009] The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value, and detect the communication status of the uplink communication channel between the upper computer and the lower computer according to the length of time the display value corresponding to the lower computer remains at the second value.

[0010] A second aspect of the present invention provides a device for detecting the communication status of a blood purification device, wherein the medical device comprises a host computer and a plurality of slave computers, and the detection device comprises a first monitoring module for detecting the communication status of an uplink communication channel between the host computer and each of the slave computers and a second monitoring module for detecting the communication status of a downlink communication channel between the host computer and each of the slave computers;

[0011] Wherein, for each of the lower computers, the second monitoring module detects the communication status of the downlink communication channel between the upper computer and the lower computer, including:

[0012] The upper computer periodically sends a heartbeat instruction to the lower computer, and detects the communication status of the downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction;

[0013] For each of the lower computers, the first monitoring module detects the communication status of the uplink communication channel between the upper computer and the lower computer, including:

[0014] The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value, and detect the communication status of the uplink communication channel between the upper computer and the lower computer according to the length of time the display value corresponding to the lower computer remains at the second value.

[0015] A third aspect of the present invention provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above-mentioned detection method.

[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the above-mentioned detection method are implemented.

[0017] The method for detecting the communication status of the blood purification equipment described in the present invention detects the communication status of two communication channels, namely, the uplink and downlink, between the upper computer and the lower computer, so as to determine whether the cause is the upper computer or the lower computer when a fault is detected. When detecting the communication status of the downlink communication channel, the upper computer periodically sends a heartbeat instruction, and detects whether the lower computer also receives the heartbeat instruction to achieve the detection. The communication status of the downlink communication channel can be detected in real time and efficiently. When detecting the communication status of the uplink communication channel, the present invention instructs the lower computer to periodically upload a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the status of the downlink communication channel. The upper computer updates the display value corresponding to the lower computer to the first value, so when the communication status of the uplink communication channel is normal, the upper computer can periodically receive the status update instruction and update the display value corresponding to the lower computer to the first value. On the other hand, the upper computer will also periodically update the display value to the second value. This means that if it is found that the display value is updated to the second value for a long time, it means that the upper computer has not normally received the status update instruction uploaded by the lower computer, thereby effectively determining that the uplink communication channel is abnormal, and detecting the communication status of the uplink communication channel in real time and efficiently, providing a solid foundation for ensuring the normal operation of the blood purification equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of the architecture of the host computer and the slave computer of the blood purification device provided in an embodiment of the present invention;

[0019] Figure 2 A method for detecting the communication status of a blood purification device provided in an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a flow chart for detecting the communication status of a downlink communication channel between an upper computer and the lower computer provided in an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of a flow chart for detecting the communication status of an uplink communication channel between a host computer and the slave computer provided in an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of a flow chart for detecting the ability of the lower computer to respond to the heartbeat instruction provided in an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of the structure of a detection device provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] See also Figure 1 , Figure 1A schematic diagram of the architecture of the host computer and the slave computer of a blood purification device is provided. Figure 1 As shown, a host computer and multiple slave computers are connected in the form of CAN bus, and each slave computer node is independently connected to the CAN bus node by a communication line. The slave computer includes a board, and each board of the slave computer is independently connected to the host computer through a communication thread. The host computer adopts a CAN bus central control system and can be accessed by any board in the communication system. The board obtains instructions from the host computer in an information reading manner, and the slave computer receives and executes specific instructions transmitted by the host computer, and feeds back information such as the state of instruction execution and the detected device state 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.), realize the reception of data collected by the slave computer and the complex analysis and processing of the data, and the host computer can send control instructions to the slave computer at the same time, and can display data and operation options to the user in a graphical interface. The lower computers are various terminals (such as blood pumps, heparin pumps, heaters, and arteriovenous clamps, etc.), which are equipped with various communication interfaces (such as CAN, RS232, and RS485, etc.) and have their own communication protocols. The upper computer and the lower computer are connected by a communication interface, and each lower computer node can be connected to the central node through an independent communication line to achieve secure transmission of communication system data.

[0026] During the communication process between the host computer and the slave computer in the embodiment of the present application, usually after the host computer sends a section of instructions, the slave computer receives it within a specified time, performs relevant processing on the received instructions, and clears the received instructions after the specified time. However, when the host computer performs multi-tasking, it often affects the real-time performance of sending instructions, resulting in occasional interruptions of uncertain time between bytes of the sent instructions, resulting in a lack of stability and reliability in the communication connection between the host computer and the slave computer, 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, this embodiment provides a method for detecting the communication status of the blood purification device to detect in real time whether the communication connection between the upper computer and the lower computer is normal.

[0028] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are 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 repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0029] It should be noted that examples of embodiments of the present application are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0030] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, 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 refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0031] A first aspect of the present embodiment provides a method for detecting the communication status of a blood purification device, the blood purification device comprising a host computer and a plurality of slave computers, such as Figure 2 As shown, the detection method includes detecting the communication status of the uplink and downlink communication channels between the upper computer and each lower computer, wherein:

[0032] S2101, for each lower computer, detecting the communication status of the downlink communication channel between the upper computer and the lower computer includes:

[0033] The upper computer periodically sends a heartbeat command to the lower computer, and detects the communication status of the downlink communication channel between the upper computer and the lower computer based on whether the lower computer periodically receives the heartbeat command.

[0034] In the embodiment of the present application, when detecting the communication state of the downlink communication channel, the host computer periodically sends a heartbeat instruction to the subordinate computer. The heartbeat instruction is a data packet with a small amount of data sent by one party (the embodiment of the present application refers to the host computer) of the two interconnected parties at fixed intervals (or not exceeding a certain time interval) to the other party (the embodiment of the present application refers to the subordinate computer), and the other party determines whether to reply a data packet with a small amount of data after receiving the data packet as required. The embodiment of the present application detects the communication state of the downlink communication channel between the host computer and the subordinate computer according to whether the subordinate computer also periodically receives the heartbeat instruction. If the subordinate computer can periodically receive the heartbeat instruction, it indicates that the communication state of the downlink channel between the host computer and the subordinate computer is normal. If the subordinate computer cannot periodically receive the heartbeat instruction, it indicates that the communication state of the downlink channel between the host computer and the subordinate computer is abnormal.

[0035] S2102: For each slave computer, detecting the communication status of the uplink communication channel between the upper computer and the slave computer includes:

[0036] The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value. According to the length of time that the display value corresponding to the lower computer remains at the second value, the communication status of the uplink communication channel between the upper computer and the lower computer is detected.

[0037] It should be noted that Figure 2 In the figure, S2101 and S2102 are displayed in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows, and these arrows do not represent the order of S2101 and S2102.

[0038] When detecting the communication status of the uplink communication channel, the embodiment of the present application instructs the lower computer to periodically upload a status update instruction to the upper computer. The status 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 status of the uplink communication channel is normal, the upper computer can periodically receive the status update instruction and update the display value corresponding to the lower computer to the first value. On the other hand, the upper computer will also periodically update the display value to the second value. This means that if it is found that the display value is updated to the second value for a long time, it means that the upper computer has not normally received the status update instruction uploaded by the lower computer, thereby effectively determining that an abnormality has occurred in the uplink communication channel.

[0039] The method for detecting the communication status of the blood purification device of the embodiment of the present application includes detecting the communication status of two communication channels, namely, the uplink and downlink, between the upper computer and the lower computer, so as to determine whether the cause is the upper computer or the lower computer when a fault is detected. When detecting the communication status of the downlink communication channel, the upper computer periodically sends a heartbeat instruction, and detects whether the lower computer also receives the heartbeat instruction to achieve the detection. The communication status of the downlink communication channel can be detected in real time and efficiently. When detecting the communication status of the uplink communication channel, the embodiment of the present application instructs the lower computer to periodically upload a status update instruction to the upper computer. The status update instruction is used to The upper computer is instructed to update the display value corresponding to the lower computer to the first value. Therefore, when the communication status of the uplink communication channel is normal, the upper computer can periodically receive the status update instruction and update the display value corresponding to the lower computer to the first value. On the other hand, the upper computer will also periodically update the display value to the second value. This means that if it is found that the display value is updated to the second value for a long time, it means that the upper computer has not normally received the status update instruction uploaded by the lower computer, thereby effectively determining that an abnormality has occurred in the uplink communication channel, and detecting the communication status of the uplink communication channel in real time and efficiently, providing a solid foundation for ensuring the normal operation of the blood purification equipment.

[0040] Based on the above embodiments, as an optional embodiment, the embodiment of the present application detects the communication status of the downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction, including:

[0041] S2201, based on the issuing cycle of the heartbeat instruction, periodically determine whether the lower computer has received the heartbeat instruction;

[0042] S2202a, if the lower computer receives the heartbeat instruction according to the sending cycle, it determines that the communication status of the downlink communication channel between the upper computer and the lower computer is normal, and resets the preset clock;

[0043] S2202b. If the lower computer does not receive the heartbeat instruction within the sending cycle, and still does not receive the heartbeat instruction when the preset clock reaches the first preset time, it is determined that the communication status of the downlink communication channel between the upper computer and the lower computer is abnormal.

[0044] Since the upper computer sends heartbeat instructions periodically, when the communication status of the downstream communication channel is normal, the lower computer can also receive heartbeat instructions periodically based on the sending cycle of the heartbeat instructions. For example, if the upper computer sends a heartbeat instruction every 4ms, then when the communication status of the downstream communication channel is normal, the lower computer can also receive a heartbeat instruction every 4ms.

[0045] The lower computer of the embodiment of the present application is also equipped with a clock, which restarts each time the lower computer receives a heartbeat command. If the lower computer does not receive the heartbeat command within the sending cycle, the clock will continue to accumulate time. When the heartbeat command is still not received when the timing reaches the first preset time, it is determined that the communication status of the downlink communication channel between the upper computer and the lower computer is abnormal.

[0046] The first preset duration of the embodiment of the present application is n times the duration of the cycle of issuing the heartbeat instruction, where n is a positive integer. For example, when the first preset duration is twice the duration of the cycle of issuing the heartbeat instruction, it means that if the host computer occasionally does not receive the heartbeat instruction once, but receives the heartbeat instruction again in the next cycle, it will still be considered that the communication state of the downlink communication channel is normal, which enhances the tolerance of the detection to a certain extent and will not cause frequent warnings. Preferably, 2≤n≤10, thereby improving the reliability and accuracy of the downlink communication channel between the host computer and the slave computer, and avoiding the safety of the blood purification process affected by untimely warnings.

[0047] See also Figure 3 , which exemplarily shows a flow chart of detecting the communication status of the downlink communication channel between the upper computer and the lower computer in the embodiment of the present application, such as Figure 3 As shown, first randomly select a communication thread, the upper computer sends a heartbeat command to the lower computer of the communication thread every several milliseconds. If the lower computer receives the heartbeat command based on the sending cycle, it is determined that the communication status is normal, and continues to wait for the upper computer to send the heartbeat command. If the lower computer does not receive the heartbeat command from the upper computer, the timing starts. If the heartbeat command is still not received when the cumulative time exceeds the preset time, the lower computer directly determines that there is a communication problem with the upper computer, reminds the communication interruption, issues a warning, and clears the cumulative time at the same time; if the lower computer receives the heartbeat command from the upper computer before the preset time is accumulated, it is determined that the communication is normal, and the cumulative time is cleared. For example: the upper computer sends a heartbeat command to the human-machine interaction board and the blood circuit protection board through the CAN bus every 500ms. The corresponding board lower computer keeps monitoring CAN to see if a valid command is received. If no valid command is received for 4 seconds, the power supply voltage of all modules of the blood purification equipment (including the blood pump, heparin pump and heater, etc.) is turned off, and a warning dialog box pops up on the display screen, the control buzzer continues to sound, and the accumulated time is reset to zero.

[0048] Based on the above embodiments, as an optional embodiment, detecting the communication state of the uplink communication channel between the upper computer and the lower computer according to the time length during which the display value corresponding to the lower computer remains at the second value includes:

[0049] S2301, periodically determine whether the display value corresponding to the lower computer is a second value;

[0050] S2302a, if it is determined that the display value corresponding to the lower computer is not the second value, updating the display value corresponding to the lower computer to the second value, and determining that the communication state of the uplink communication channel between the upper computer and the lower computer is normal;

[0051] S2302b, if it is determined that the display value corresponding to the lower computer is the second value, then record the length of time for which the display value corresponding to the lower computer remains at the second value;

[0052] S2303a. If it is determined that the display value corresponding to the lower computer is not the second value before the duration reaches the second preset duration, the display value corresponding to the lower computer is updated to the second value, the communication state of the uplink communication channel between the upper computer and the lower computer is determined to be normal, and the timing is restarted;

[0053] S2303b. If the duration reaches a second preset duration and it is determined that the display value corresponding to the lower computer is still the second value, it is determined that the communication state of the uplink communication channel between the upper computer and the lower computer is abnormal.

[0054] The embodiment of the present application periodically determines 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 means that the upper machine has previously updated the display value to the first value according to the status update instruction, and it also means 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 means that after the display value of the lower machine is updated to the second value, the status update instruction has not been received, then the duration of the display value corresponding to the lower machine being maintained as the second value is recorded. If the status update instruction is received before the duration reaches the second preset duration, the display value corresponding to the lower machine will be 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 continue 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 means 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 computer normally feeds back the status of instruction execution and the detected device status and other information to the upper computer. If it is normal, it means that the current communication thread is unobstructed, otherwise, it reminds that the communication is interrupted. The lower computer will upload the real-time data of the relevant equipment to the upper computer through the CAN bus for data display at regular intervals. If the upper computer does not receive the information, the displayed data will not be updated. According to this logic, if the upper computer still does not receive the corresponding information after the preset time, it means that the corresponding board sends the command abnormally.

[0056] See also Figure 4, which exemplarily shows a flow chart of detecting the communication status of the uplink communication channel between the upper computer and the lower computer in an embodiment of the present application, such as Figure 4 As shown, the initialization setting sets the display value status of each board to 1. After the communication detection thread is turned on, the lower computer maintains a certain frequency to continuously upload the command value 1 to the board, detects the display value status of the lower computer every 1s, and determines whether the current display value status is 0; if not, the upper computer controls the display value status to 0; if so, the current delay time = N+1 is recorded, N is the number of times the board display value is determined; if the delay time exceeds 5s, an alarm is issued to remind the lower computer that the communication with the upper computer has been disconnected, and the delay time is reset. After the board display value becomes 0, if the communication is normal, the board can receive the command value 1 uploaded by the lower computer and update the display value, then the next time the board display value is determined, it will not be 0. If it is 0, it means that the command value uploaded by the lower computer has not been received, and there may be a communication delay or communication interruption between the lower computer and the upper computer; if no data is received for 5 consecutive seconds, it means that the communication is not delayed, but interrupted, and an alarm needs to be issued at this time.

[0057] Based on the above embodiments, as an optional embodiment, detecting the communication status of the uplink and downlink communication channels between the upper computer and each of the lower computers includes:

[0058] For each lower computer, periodically detecting the communication status of the downlink communication channel between the upper computer and the lower computer;

[0059] 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, the communication state of the uplink communication channel between the upper computer and the lower computer is periodically detected.

[0060] That is to say, when the embodiment of the present application periodically detects the communication status of the upstream and downstream communication channels between the upper computer and the lower computer, the communication status of the downstream communication channel is first detected. Only when the communication status of the downstream communication channel is normal, the communication status of the upstream communication channel will be detected. In this way, the communication thread between the upper computer and the lower computer is detected and diagnosed layer by layer, and the fault point of the communication interruption can be accurately found, which helps to ensure the security of the data transmission process.

[0061] In each of the above embodiments, a method for checking whether the upper computer sends instructions to the lower computer normally, and whether the lower computer normally feeds back instructions to the upper computer is provided, respectively, with the focus on diagnosing whether the communication thread between the two has been disconnected. In fact, the blood purification device also requires that after the lower computer receives the instruction from the upper computer, the lower computer must respond and return a reply signal. However, if the communication is unstable, it will also cause the reply signal of the lower computer to be delayed or even lost, affecting the normal use of the blood purification device. Therefore, it is necessary to diagnose whether the lower computer can reply to the command normally.

[0062] Based on the above embodiments, as an optional embodiment, the detection method further includes:

[0063] For each lower computer, when the communication status of the uplink communication channel between the upper computer and the lower computer is normal, the ability of the lower computer to respond to the heartbeat instruction is detected.

[0064] The lower computer of the embodiment of the present application includes a storage container, which is used to store the received heartbeat instruction and record the time when the heartbeat instruction is issued; accordingly, the ability of detecting the response of the lower computer to the heartbeat instruction includes:

[0065] Periodically checking whether there is an unanswered target heartbeat instruction in the storage container;

[0066] If the target heartbeat instruction exists, then the timeout period of the target heartbeat instruction is calculated;

[0067] If the timeout period is greater than the third preset time length, instructing the lower computer to upload a version acquisition instruction to the upper 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 lower computer to respond to the heartbeat instruction is normal, and the timeout time is reset to zero;

[0069] If the upper computer does not receive the version acquisition instruction within the fourth preset time period, or does not receive a reply message to the target heartbeat instruction, it is determined that the ability of the lower computer to respond to the heartbeat instruction is abnormal.

[0070] See also Figure 5 , which exemplarily shows a flow chart of detecting the ability of the lower computer to respond to the heartbeat instruction provided in an embodiment of the present application, such as Figure 5As shown, each board is provided with a storage container for commands. In the initialization phase, each storage container is first emptied to determine each communication thread to be detected. After the upper computer sends a command to the lower computer corresponding to the communication thread, the command is inserted into the storage container on the corresponding board and the sending time is recorded. Under normal circumstances, the corresponding lower computer will reply to the command in time. After starting the communication detection thread, it automatically detects whether there are unanswered commands in the storage container of each board every 1 second. If there are unanswered commands, the timeout time of the unanswered command is calculated. If the timeout exceeds 6s, it is preliminarily considered that there is a communication stability problem. The system will control the corresponding board to send a command to obtain version information to the host computer once every 2s. If the host computer receives the command to obtain version information within 2s, or receives the above-mentioned delayed reply command, it means that the communication stability has been restored, and the storage container is cleared and returned to the initial state. If the command to obtain version information is not received within 2s, and no reply command is received, it means that the lower computer cannot respond to the received command normally, the communication stability between the lower computer and the host computer is poor, the connection may have been interrupted, and a communication abnormality reminder needs to be issued.

[0071] Based on the above embodiments, as an optional embodiment, the method further includes:

[0072] If it is determined that at least one of the communication status of the uplink and downlink communication channels between the upper computer and each of the lower computers and the ability of the lower computers to respond to the heartbeat command is abnormal, the current treatment mode is stopped and the blood recovery mode is entered;

[0073] In response to the completion of blood return, the blood purification device is controlled to shut down.

[0074] If the blood purification device suddenly has a communication abnormality failure when it is working (also known as the treatment mode), the user can no longer operate the blood purification device through the display screen. If the power is directly cut off and the shutdown is stopped, the patient's blood return will be affected. However, if the treatment continues, since the communication thread of the entire blood purification device has been interrupted, the control instructions can no longer be edited and sent, and the state parameters can no longer be fed back and received. The blood purification device is in an unknown and uncontrollable state, and continued use will be extremely risky. Therefore, the embodiment of the present application adds emergency measures to control the safe disembarkation of the blood purification device. Specifically including: 4 physical buttons are set on the liquid crystal display of the blood purification device, namely, the sound pause button, the pause button, the start button, and the power on / off button. In an emergency state, the user presses the sound pause button for 10s and then releases it, and then presses the pause button within 5 seconds. The blood purification device will automatically stop the current treatment mode and immediately enter the blood return mode, and then continue to press the start button. The blood purification device will start to return blood, and the blood purification device will automatically shut down after the blood return is completed.

[0075] A second aspect of the embodiments of the present application provides a device for detecting the communication status of a blood purification device, such as Figure 6 As shown, the device may include: a first monitoring module 601 for detecting the communication status of the uplink communication channel between the upper computer and each of the lower computers, and a second monitoring module 602 for detecting the communication status of the downlink communication channel between the upper computer and each of the lower computers, wherein:

[0076] For each of the lower computers, the second monitoring module 602 detects the communication status of the downlink communication channel between the upper computer and the lower computer, including:

[0077] The upper computer periodically sends a heartbeat instruction to the lower computer, and detects the communication status of the downlink communication channel between the upper computer and the lower computer according to whether the lower computer periodically receives the heartbeat instruction;

[0078] For each of the lower computers, the first monitoring module 601 detects the communication status of the uplink communication channel between the upper computer and the lower computer, including:

[0079] The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value, and detect the communication status of the uplink communication channel between the upper computer and the lower computer according to the length of time the display value corresponding to the lower computer remains at the second value.

[0080] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which 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, the processor executes the above-mentioned computer program to implement the steps of the detection method, and compared with the related art, it can achieve: detecting the communication status of two communication channels, uplink and downlink, between the upper computer and the lower computer, so as to determine whether the cause is the upper computer or the lower computer when a fault is detected, and when detecting the communication status of the downlink communication channel, the upper computer periodically sends a heartbeat instruction, and detects whether the lower computer also receives the heartbeat instruction to achieve the communication status of the downlink communication channel in real time and efficiently. When detecting the communication status of the uplink communication channel, the embodiment of the present application indicates on the one hand The lower computer periodically uploads status update instructions to the upper computer. The status update instructions are used to instruct the upper computer to update the display value corresponding to the lower computer to the first value. Therefore, when the communication status of the uplink communication channel is normal, the upper computer can periodically receive the status update instructions and update the display value corresponding to the lower computer to the first value. On the other hand, the upper computer will also periodically update the display value to the second value. This means that if it is found that the display value is updated to the second value for a long time, it means that the upper computer has not normally received the status update instruction uploaded by the lower computer, thereby effectively determining that an abnormality has occurred in the uplink communication channel, and detecting the communication status of the uplink communication channel in real time and efficiently, providing a solid foundation for ensuring the normal operation of the blood purification equipment.

[0082] In an alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The electronic device 7000 shown 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 may also include a transceiver 7004, which may 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 applications, 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] Processor 7001 may 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 devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 7001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0084] The bus 7002 may include a path to transmit information between the above components. The bus 7002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 7002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0085] The memory 7003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0086] The memory 7003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 7001. The processor 7001 is used to execute the computer program stored in the memory 7003 to implement the steps shown in the above method embodiment.

[0087] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0088] The fifth aspect of the embodiments of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiments when executed by a processor.

[0089] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0090] Although the disclosure is disclosed as above, the protection scope of the disclosure is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the disclosure, and these changes and modifications will fall within the protection scope of the present invention.

Claims

1. A method for detecting the communication status of a blood purification device, characterized in that: The blood purification device comprises a host computer and a plurality of slave computers, and the detection method comprises detecting the communication status of the uplink and downlink communication channels between the host computer and each of the slave computers; Wherein, for each of the lower computers, detecting the communication status of the downlink communication channel between the upper computer and the lower computer includes: The upper computer periodically sends a heartbeat instruction to the lower computer, and detects the communication status 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, detecting the communication status of the uplink communication channel between the upper computer and the lower computer includes: The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value, and detect the communication status of the uplink communication channel between the upper computer and the lower computer according to the length of time the display value corresponding to the lower computer remains at the second value.

2. The detection method according to claim 1, characterized in that: The 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 comprises: Based on the sending cycle of the heartbeat instruction, periodically judging whether the lower computer has received the heartbeat instruction; If the lower computer receives the heartbeat instruction according to the sending cycle, 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 re-timed; If the lower computer does not receive the heartbeat instruction within the sending cycle, and still does not receive the heartbeat instruction when the timing of the preset clock reaches the first preset time, it is determined that the communication state of the downlink communication channel between the upper computer and the lower computer is abnormal; The first preset duration is n times the duration of the cycle for sending the heartbeat instruction, where n is a positive integer.

3. The detection method according to claim 1, characterized in that: The detecting the communication state of the uplink communication channel between the upper computer and the lower computer according to the duration for which the display value corresponding to the lower computer remains at the second value comprises: Periodically determining whether the display value corresponding to the lower computer is a second value; If it is determined that the display value corresponding to the lower computer is not the second value, updating the display value corresponding to the lower computer to the second value, and determining that the communication state of the uplink communication channel between the upper computer and the lower computer is normal; If it is determined that the display value corresponding to the lower computer is the second value, then the length of time for which the display value corresponding to the lower computer remains the second value is recorded; If it is determined that the display value corresponding to the lower computer is not the second value before the duration reaches the second preset duration, the display value corresponding to the lower computer is updated to the second value, the communication state of the uplink communication channel between the upper computer and the lower computer is determined to be normal, and the timing is restarted; If the duration reaches the second preset duration and it is determined that the display value corresponding to the lower computer is still the second value, it is determined that the communication state of the uplink communication channel between the upper computer and the lower computer is abnormal.

4. The detection method according to any one of claims 1 to 3, characterized in that: The detecting of the communication status 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 status 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, the communication state of the uplink communication channel between the upper computer and the lower computer is periodically detected.

5. The detection method according to claim 4, characterized in that: The detection method further comprises: For each lower computer, when the communication status of the uplink communication channel between the upper computer and the lower computer is normal, the ability of the lower computer to respond to the heartbeat instruction is detected.

6. The detection method according to claim 5, characterized in that: The lower computer includes a storage container, which is used to store the received heartbeat instructions and record the time when the heartbeat instructions are issued; The ability of detecting the lower computer to respond to the heartbeat instruction includes: Periodically checking whether there is an unanswered target heartbeat instruction in the storage container; If the target heartbeat instruction exists, then the timeout time of the target heartbeat instruction is calculated; If the timeout period is greater than the 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 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 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 within the fourth preset time period, or does not receive a reply message to the target heartbeat instruction, 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: Also includes: If it is determined that at least one of the communication status of the uplink and downlink communication channels between the upper computer and each of the lower computers and the ability of the lower computers to respond to the heartbeat command is abnormal, the current treatment mode is stopped and the blood recovery mode is entered; In response to the completion of blood return, the blood purification device is controlled to shut down.

8. A device for detecting the communication status of a blood purification device, characterized in that: The blood purification device comprises a host computer and a plurality of slave computers, and the detection device comprises a first monitoring module for detecting the communication state of an uplink communication channel between the host computer and each of the slave computers and a second monitoring module for detecting the communication state of a downlink communication channel between the host computer and each of the slave computers; Wherein, for each of the lower computers, the second monitoring module detects the communication status of the downlink communication channel between the upper computer and the lower computer, including: The upper computer periodically sends a heartbeat instruction to the lower computer, and detects the communication status 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 status of the uplink communication channel between the upper computer and the lower computer, including: The lower computer periodically uploads a status update instruction to the upper computer, and the status update instruction is used to instruct the upper computer to update the display value corresponding to the lower computer to a first value. The upper computer is also used to execute the received status update instruction, and periodically update the display value corresponding to the lower computer to a second value, and detect the communication status of the uplink communication channel between the upper computer and the lower computer according to the length of time the display value corresponding to the lower computer remains at the second value.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the detection method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Master-slave equipment communication system and method and terminal equipment

    CN110445700A

  • Heartbeat mechanism detection method, terminal equipment and storage medium

    CN111371631A

  • Method and system for automatically detecting identity information of lower computer in master-slave network

    CN114462004A

  • Communication connection monitoring method, medical system and storage medium

    CN116669810A

  • Method, system and apparatus for monitoring and interacting with a remote device

    WO2010099324A1