WO2022140961A1 - Method for monitoring communication connection, medical system and storage medium - Google Patents

Method for monitoring communication connection, medical system and storage medium Download PDF

Info

Publication number
WO2022140961A1
WO2022140961A1 PCT/CN2020/140319 CN2020140319W WO2022140961A1 WO 2022140961 A1 WO2022140961 A1 WO 2022140961A1 CN 2020140319 W CN2020140319 W CN 2020140319W WO 2022140961 A1 WO2022140961 A1 WO 2022140961A1
Authority
WO
WIPO (PCT)
Prior art keywords
computer
lower computer
communication connection
heartbeat
upper computer
Prior art date
Application number
PCT/CN2020/140319
Other languages
French (fr)
Chinese (zh)
Inventor
付凯强
李超
Original Assignee
西安大医集团股份有限公司
武汉数码刀医疗有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安大医集团股份有限公司, 武汉数码刀医疗有限公司 filed Critical 西安大医集团股份有限公司
Priority to CN202080108272.7A priority Critical patent/CN116669810A/en
Priority to PCT/CN2020/140319 priority patent/WO2022140961A1/en
Publication of WO2022140961A1 publication Critical patent/WO2022140961A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N5/00Radiation therapy
    • A61N5/01Devices for producing movement of radiation source during therapy

Definitions

  • the present application relates to the field of medical technology, and in particular, to a monitoring method for communication connection, a medical system, and a storage medium.
  • the medical system usually includes: upper computer, lower computer and radiotherapy equipment.
  • the upper computer usually refers to a computer that can directly send control commands
  • the lower computer usually refers to a computer that directly controls the operation state of the radiotherapy equipment.
  • the upper computer can send control commands to the lower computer
  • the lower computer can control the operation state of the radiotherapy equipment after receiving the control command, so as to diagnose or treat the patient.
  • the embodiments of the present application provide a communication connection monitoring method, medical system, and storage medium, which can monitor in real time whether the communication connection between the upper computer and the lower computer is normal when the medical system is working.
  • the technical solution is as follows:
  • a first aspect provides a method for monitoring a communication connection, the method is applied to a host computer, and the method includes: after the host computer establishes a communication connection with a lower computer, periodically writing to the lower computer Heartbeat number, and the heartbeat number written to the lower computer is different each time; if the upper computer fails to write the heartbeat number to the lower computer at least once, then determine the relationship between the upper computer and the lower computer.
  • the communication connection is abnormal; wherein, the heartbeat number is used for periodic reading by the lower computer, so that after the lower computer reads the same heartbeat number several times in a row, it is determined that the lower computer is the same as that of the lower computer.
  • the communication connection between the above host computers is abnormal.
  • the method further includes: after each time writing the heartbeat number to the lower computer, receiving a feedback mark sent by the lower computer, the feedback mark is used to instruct the upper computer to send the lower computer to the lower computer. Whether writing the heartbeat number was successful.
  • the method further includes: if it is determined that the feedback sign is a sign used to instruct the upper computer to write the heartbeat number to the lower computer successfully, then determine the relationship between the upper computer and the lower computer. The communication connection between them is normal.
  • the method further includes: if it is determined that the feedback sign is a sign for indicating that the host computer fails to write the heartbeat number to the lower computer, then it is determined that the heartbeat is written to the lower computer this time. Numbers fail.
  • the method also includes: before writing the heartbeat number to the lower computer each time, checking whether a communication connection is successfully established with the lower computer; if it is checked that the communication connection is successfully established with the lower computer, executing The operation of writing the heartbeat number to the lower computer; if it is checked that no communication connection is established with the lower computer, it is determined that writing the heartbeat number to the lower computer this time fails.
  • the upper computer is communicatively connected to the lower computer through middleware, and after each time the heartbeat number is written to the lower computer, receiving a feedback identifier sent by the lower computer, including: in the upper computer After each time the heartbeat number is written to the lower computer by the middleware, the feedback identifier sent by the middleware is received, and the middleware is used to generate all the heartbeat numbers after each time the heartbeat number is written to the lower computer. and the checking whether the communication connection with the lower computer is successfully established includes: checking whether the communication connection with the lower computer is successfully established through the middleware.
  • the upper computer fails to write the heartbeat number to the lower computer at least once, it is determined that the communication connection between the upper computer and the lower computer is abnormal, including: if the upper computer is consecutively multiple times If it fails to write the heartbeat number to the lower computer, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the method further includes: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, outputting prompt information.
  • the periodically writing the heartbeat number to the lower computer includes: periodically writing the heartbeat number to the controller of the lower computer.
  • the heartbeat numbers periodically written by the upper computer to the lower computer are arranged in an arithmetic progression or an arithmetic progression.
  • the period length of the upper computer writing the heartbeat numbers to the lower computer is less than or equal to the period length of the lower computer reading the heartbeat numbers.
  • a communication connection monitoring method is provided, the method is applied to a lower computer, and the method includes: after the lower computer establishes a communication connection with the upper computer, periodically reading the writing of the upper computer The heartbeat number entered, the heartbeat number is periodically written by the host computer, and the heartbeat number written by the host computer to the lower computer is different each time; if the lower computer reads at least twice consecutively If the heartbeat numbers are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the method further includes: if the heartbeat number currently read by the lower computer is different from the heartbeat number read last time, determining that the communication connection with the upper computer is normal.
  • the heartbeat numbers read by the lower computer at least twice in a row are the same, then it is determined that the communication connection between the upper computer and the lower computer is abnormal, including: if the lower computer currently reads The heartbeat number is the same as the heartbeat number read last time, then continue to read the heartbeat number at least once, when the heartbeat number read each time is the same as the heartbeat number read last time, determine the host computer and The communication connection between the lower computers is abnormal.
  • the periodically reading the heartbeat number written by the upper computer includes: periodically reading the heartbeat number written by the upper computer from the controller of the lower computer.
  • the method further includes: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, controlling the radiotherapy equipment to issue an alarm signal, and controlling the radiotherapy equipment to stop working.
  • a medical system in a third aspect, includes: an upper computer and a lower computer; the upper computer includes: a first processor, and a first processor for storing executable instructions of the first processor a memory, wherein the first processor is configured to execute the communication connection monitoring method according to any one of claims 1 to 11; the lower computer comprises: a second processor, and is configured to store the second A second memory of executable instructions of a processor, wherein the second processor is configured to perform the method of monitoring a communication connection of any one of claims 12 to 16.
  • the medical system further includes: radiotherapy equipment, the radiotherapy equipment has an alarm buzzer; the lower computer is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal Then, the alarm buzzer is controlled to emit an alarm sound.
  • the radiotherapy equipment further has an operation panel; the lower computer is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, control a fault alarm in the operation panel Lights on.
  • a computer-readable storage medium stores instructions that, when the readable storage medium runs on a processing component, cause the processing component to execute The monitoring method for a communication connection according to any one of the first aspect or the second aspect.
  • the upper computer can periodically write the heartbeat number to the lower computer, and after the upper computer fails to write the heartbeat number to the lower computer at least once, the upper computer can determine that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • FIG. 1 is a schematic structural diagram of a medical system involved in a method for monitoring a communication connection provided by an embodiment of the present application;
  • FIG. 2 is a flowchart of a method for monitoring a communication connection provided by an embodiment of the present application
  • FIG. 3 is a flowchart of another method for monitoring a communication connection provided by an embodiment of the present application.
  • FIG. 5 is a structural block diagram of a communication connection monitoring device provided by an embodiment of the present application.
  • FIG. 6 is a structural block diagram of another communication connection monitoring apparatus provided by an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a medical system involved in a method for monitoring a communication connection provided by an embodiment of the present application.
  • the medical system 100 may include: an upper computer 101 and a lower computer 102 .
  • the upper computer 101 and the lower computer 102 can be communicatively connected.
  • the medical system 100 may further include: a radiotherapy device 103 connected to the lower computer 102 .
  • the radiotherapy equipment 103 may include: a gamma knife or an executive accelerator.
  • the host computer 101 may be a computer that directly sends control commands.
  • the host computer 101 may be a desktop computer or a notebook computer.
  • the lower computer 102 usually refers to a computer that directly controls the operation state of the radiotherapy equipment.
  • the lower computer 102 may be a motion control component of the radiotherapy equipment. In this way, the lower computer 102 can control the movement of the treatment couch and/or the rotating gantry in the radiotherapy equipment.
  • the upper computer 101 is installed with upper computer software, and the lower computer 102 is installed with lower computer software.
  • the upper computer 101 can send control commands to the upper computer 102 through the upper computer software.
  • the lower computer 102 can control the operation state of the radiotherapy equipment 103 through the software of the lower computer, so that the radiotherapy equipment 103 can diagnose or treat the patient.
  • the upper computer 101 may be connected to the lower computer 102 for communication through middleware.
  • the middleware refers to software that connects two independent application programs (that is, the upper computer software and the lower computer software).
  • FIG. 2 is a flowchart of a method for monitoring a communication connection provided by an embodiment of the present application.
  • the communication connection monitoring method is applied to the host computer 101 in the treatment system 100 shown in FIG. 1 .
  • the monitoring method of the communication connection includes:
  • Step 201 After the upper computer is connected to the lower computer for communication, periodically write the heartbeat number to the lower computer, and the heartbeat number written to the lower computer is different each time.
  • Step 202 If the upper computer fails to write numbers to the lower computer at least once, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the heartbeat number is used for periodic reading by the lower computer, so that the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal after reading the same heartbeat number several times in a row.
  • the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • FIG. 3 is a flowchart of another communication connection monitoring method provided by an embodiment of the present application.
  • the communication connection monitoring method is applied to the lower computer 102 in the treatment system 100 shown in FIG. 1 .
  • the monitoring method of the communication connection includes:
  • Step 301 After the lower computer establishes a communication connection with the upper computer, periodically read the heartbeat number written by the upper computer.
  • the heartbeat number is periodically written by the host computer, and the heartbeat number written by the host computer to the host computer is different each time.
  • Step 302 If the heartbeat numbers read by the lower computer at least twice in a row are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • FIG. 4 is a flowchart of another communication connection monitoring method provided by an embodiment of the present application.
  • the monitoring method of the communication connection is applied to the treatment system 100 shown in FIG. 1 .
  • the monitoring method of the communication connection includes:
  • Step 401 After the upper computer establishes a communication connection with the lower computer, the upper computer periodically writes heartbeat numbers to the lower computer, and the heartbeat numbers written to the lower computer are different each time.
  • the heartbeat numbers periodically written by the host computer to the host computer are arranged in an arithmetic progression or an arithmetic progression.
  • the heartbeat numbers that the host computer periodically writes to the host computer are arithmetic progressions
  • the heartbeat numbers that the host computer periodically writes to the host computer can be sequentially: n, n+1, n+2 Wait.
  • the n may be an integer greater than or equal to 0.
  • the host computer periodically writes the heartbeat number to the host computer, including: the host computer periodically writes the heartbeat number to the controller in the host computer.
  • the controller may be a central processing unit (CPU), a microprocessor (MPU), a field programmable gate array (FPGA), or the like.
  • the controller has a storage address for storing the heartbeat number, and the host computer can write the heartbeat number into the storage address.
  • heartbeat number is stored in this storage address. Every time the host computer writes the heartbeat number to the storage address of the host computer, the storage address will erase the heartbeat number written by the host computer last time, and Store the heartbeat number that the host computer needs to write this time.
  • the monitoring method for the communication connection may further include the step of: after the upper computer writes the heartbeat number to the lower computer each time, the upper computer receives the feedback identifier sent by the lower computer.
  • the feedback flag is used to indicate whether the heartbeat number written by the host computer to the host computer is successful.
  • the upper computer may be connected to the lower computer through middleware for communication.
  • the host computer receives the feedback identification sent by the host computer may include: after the host computer writes the heartbeat number to the host computer through the middleware every time, receiving the middleware sent Feedback logo.
  • the middleware is used to generate a feedback identifier after each heartbeat number is written to the lower computer.
  • the feedback flag is used to indicate whether the upper computer successfully writes the heartbeat number to the lower computer.
  • the feedback identification may include: writing success identification or writing failure identification.
  • the middleware cannot write the heartbeat number to the lower computer.
  • the middleware can generate a write failure flag and send it to the upper computer to inform the upper computer of this time.
  • the computer fails to write the heartbeat number; when the lower computer can work normally, the middleware can write the heartbeat number to the lower computer.
  • the middleware can generate a write success flag and send it to the upper computer to inform the upper computer.
  • the heartbeat number is successfully written to the lower computer.
  • the phenomenon that the lower computer is abnormal and cannot work usually means: the lower computer is down or stuck and other abnormal phenomena.
  • the upper computer cannot send control commands to the lower computer.
  • the upper computer and the lower computer The communication connection between them is abnormal.
  • the monitoring method for the communication connection may further include the following steps:
  • Step A Before the upper computer writes the heartbeat number to the lower computer each time, the upper computer checks whether the communication connection is successfully established with the lower computer.
  • the upper computer can check whether the communication connection with the lower computer is successfully established through the middleware. If the upper computer detects that a communication connection with the lower computer is established through the middleware, step B is performed; if the upper computer detects that the communication connection is not established with the lower computer through the middleware, step C is performed.
  • Step B If the upper computer detects that a communication connection is established with the lower computer, the operation of writing the heartbeat number to the lower computer is performed.
  • Step C If the upper computer does not establish a communication connection with the lower computer, the upper computer determines that there is no communication connection between it and the lower computer, and determines that writing the heartbeat number to the lower computer this time fails.
  • the upper computer each time the upper computer writes the heartbeat number to the lower computer, the upper computer needs to determine whether there is a communication connection between the upper computer and the lower computer by calling a specified function in the middleware.
  • the upper computer can determine that it has successfully established a communication connection with the lower computer, that is, the upper computer can determine that there is a communication connection between it and the lower computer, After that, the upper computer will perform the operation of writing the heartbeat number to the lower computer; if the upper computer does not call the specified function from the middleware, the upper computer can determine that it has not established a communication connection with the lower computer, that is, The upper computer can determine that there is no communication connection between it and the lower computer, the upper computer will not perform the operation of writing the heartbeat number to the lower computer, and it will determine that writing the heartbeat number to the lower computer this time fails.
  • the host computer needs to repeatedly perform the operation of calling the specified function from the middleware.
  • Step 402 After the upper computer writes the heartbeat number to the lower computer each time, the upper computer determines whether the writing of the heartbeat number to the lower computer this time is successful.
  • the upper computer after the upper computer writes the heartbeat number to the lower computer each time, the upper computer can receive the feedback identifier sent by the middleware, and based on the feedback identifier, determine whether the writing of the heartbeat number to the lower computer is successful.
  • the host computer After the host computer receives the feedback mark sent by the middleware, if the host computer determines that the feedback mark is the mark used to instruct the host computer to write the heartbeat number to the host computer, that is, the feedback mark is to write. Enter the success sign, then the host computer determines that writing the heartbeat number to the host computer this time is successful, and executes the following step 403; , that is, if the feedback sign is a write failure sign, the upper computer determines that writing the heartbeat number to the lower computer this time fails, and the communication connection between the upper computer and the lower computer may be abnormal, and the following step 404 is performed.
  • Step 403 If the upper computer determines that the heartbeat number is successfully written to the lower computer this time, the upper computer determines that the communication connection between the upper computer and the lower computer is normal.
  • the host computer determines that the heartbeat number is successfully written to the host computer this time based on the feedback identifier sent by the middleware, for example, when the host computer receives the write success identifier sent by the middleware, the host computer can determine that this time. The next time the heartbeat number is written to the lower computer successfully. Then, the upper computer can determine that the communication connection between it and the lower computer is normal.
  • Step 404 If the upper computer determines that writing the heartbeat number to the lower computer fails at least once, the upper computer determines that the communication connection between the upper computer and the lower computer is abnormal.
  • the upper computer can determine that the communication connection between it and the lower computer is abnormal.
  • the host computer determines based on the feedback identifier sent by the middleware that the heartbeat number has failed to be written to the host computer this time, for example, when the host computer receives the write failure identifier sent by the middleware, the host computer can determine that this time. The next time to write the heartbeat number to the lower computer failed. Then, the upper computer can determine that the communication connection between it and the lower computer is abnormal.
  • the upper computer needs to determine the failure to write the heartbeat number to the lower computer several times in a row, and then the upper computer can determine that the communication connection between it and the lower computer is abnormal.
  • the upper computer determines that it fails to write the heartbeat number to the lower computer in the following two situations:
  • the The host computer can determine that writing the heartbeat number to the host computer this time fails.
  • the host computer can determine that the heartbeat number is failed to be written to the host computer this time.
  • the upper computer can record the failure once. In this way, the upper computer can determine whether the number of heartbeats written to the lower computer by the upper computer has failed several times in a row through the number of consecutive failures recorded, and after the upper computer determines that the number of heartbeats written to the lower computer has failed for many times in a row, Confirm that the traffic connection between it and the lower computer is abnormal.
  • the upper computer determines that the heartbeat number is written to the lower computer three times in a row, the upper computer can determine that the communication connection between the upper computer and the lower computer is abnormal.
  • Step 405 the upper computer outputs prompt information.
  • the upper computer after the upper computer determines that the communication connection between it and the lower computer is abnormal, the upper computer can output prompt information.
  • the prompt information may be text message information
  • the host computer may display the prompt information output by the host computer on the display interface of the host computer to prompt the staff that the communication connection between the host computer and the lower computer is abnormal.
  • Step 406 The lower computer periodically reads the heartbeat number written by the upper computer.
  • the lower computer can periodically read the stored heartbeat number.
  • the lower computer since the upper computer can periodically write the heartbeat number into the controller in the lower computer, the lower computer periodically reads the heartbeat number written by the upper computer, including: the lower computer periodically reads the heartbeat number from the lower computer.
  • the controller of the lower computer reads the heartbeat number written by the upper computer.
  • the cycle duration of the upper computer writing the heartbeat numbers to the lower computer is less than or equal to the cycle duration of the lower computer reading the heartbeat numbers. That is, if the upper computer periodically writes the heartbeat number to the lower computer with the first duration as the period, and the lower computer periodically reads the heartbeat number stored by the reader with the second duration as the period, then the first The duration is less than or equal to the second duration.
  • the first duration may be 200 milliseconds
  • the second duration may be 2 seconds.
  • the subsequent lower computer can use the read heartbeat number to determine its relationship with the upper computer. Whether the communication connection between them is normal.
  • Step 407 After the lower computer reads the heartbeat number each time, the lower computer compares whether the currently read heartbeat number is the same as the last read heartbeat number.
  • step 408 if the lower computer determines that the currently read heartbeat number is different from the last read heartbeat number, then execute step 408; if the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number , the communication connection between the lower computer and the upper computer may be abnormal, and step 409 is executed.
  • Step 408 If the lower computer determines that the heartbeat number currently read is different from the heartbeat number read last time, the lower computer determines that the communication connection between it and the upper computer is normal.
  • the cycle duration of the upper computer writing the heartbeat number to the lower computer is less than or equal to the cycle duration of the lower computer reading the heartbeat number, and when the communication connection between the upper computer and the lower computer is normal, the upper computer The computer can normally write the heartbeat number into the lower computer every time. Therefore, when the communication connection between the upper computer and the lower computer is normal, the heartbeat numbers read by the lower computer each time are different. In this way, if the lower computer determines that the currently read heartbeat number is different from the last read heartbeat number, the lower computer can determine that the communication connection between it and the upper computer is normal.
  • Step 409 If the heartbeat numbers read by the lower computer at least twice in a row are the same, the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal.
  • the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
  • the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number, the lower computer determines that the communication connection between it and the upper computer is abnormal.
  • the lower computer needs to determine the failure to write the heartbeat number to the lower computer several times (three or more) consecutively, so that the lower computer can determine that the communication connection between it and the upper computer is abnormal. .
  • the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number, it continues to read the heartbeat number at least once, when the heartbeat number read each time is the same as the last read heartbeat number.
  • the lower computer determines that the communication connection between it and the upper computer is abnormal.
  • the upper computer when the communication connection between the upper computer and the lower computer is abnormal, the upper computer cannot write the new heartbeat number into the lower computer, and the lower computer has always stored the information that the upper computer has stored in the lower computer.
  • the last heartbeat number written when the communication connection with the lower computer is normal. Therefore, when the communication connection between the upper computer and the lower computer is abnormal, the heartbeat numbers read by the lower computer each time are the same. In this way, if the heartbeat numbers read by the lower computer for many times are the same, the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
  • the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
  • Step 410 the lower computer controls the radiotherapy equipment to issue an alarm signal, and controls the radiotherapy equipment to stop working.
  • the lower computer after the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal, the lower computer can control the radiotherapy equipment to send an alarm signal, and control the radiotherapy equipment to stop working.
  • the radiotherapy equipment has an alarm buzzer and a control panel. After the lower computer determines that the communication connection between it and the upper computer is abnormal, the lower computer can control the alarm buzzer of the radiotherapy equipment to emit an alarm sound and control the radiotherapy.
  • the fault alarm light on the control panel of the equipment lights up to alert the staff and the patients on the radiotherapy equipment that the communication connection between the upper computer and the lower computer is abnormal.
  • the lower computer controls the radiotherapy equipment to stop working, so as to avoid the problem of medical accidents caused by the uncontrolled continuous operation of the radiotherapy equipment.
  • the communication connection method between the upper computer and the lower computer in the medical system is usually as follows: the upper computer periodically sends the heartbeat packet from the lower computer; every time the lower computer receives the heartbeat packet sent by the upper computer , generate a heartbeat feedback packet based on the heartbeat packet, and send it to the upper computer.
  • the lower computer can determine that the communication connection between it and the upper computer is abnormal; the upper computer has not received the heartbeat feedback sent by the upper computer for a period of time.
  • the upper computer determines that the communication connection between it and the lower computer is abnormal.
  • the upper computer periodically writes the heartbeat number to the lower computer through the middleware, and the heartbeat value written each time is different.
  • the upper computer only needs the feedback identification sent by the middleware, and can determine whether the communication connection between it and the lower computer is normal; and the lower computer only needs to read the heartbeat number stored in it to determine whether it is connected with the upper computer. Whether the communication connection between the machines is normal.
  • the upper computer only performs the writing operation, and the lower computer only performs the reading operation, and the lower computer does not need to generate a feedback information according to the heartbeat number to feed back to the upper computer.
  • the communication connection monitoring method provided by the embodiment of the present application does not occupy the computing resources of the lower computer, and can ensure that the communication connection between the upper computer and the lower computer has high efficiency.
  • the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • FIG. 5 is a structural block diagram of a communication connection monitoring apparatus provided by an embodiment of the present application.
  • the communicatively connected monitoring device 500 may be integrated into the upper computer 101 in the treatment system 100 shown in FIG. 1 .
  • the communicatively connected monitoring device 500 may include:
  • the writing module 501 is used for periodically writing heartbeat numbers to the lower computer after the upper computer establishes a communication connection with the lower computer, and the heartbeat numbers written to the lower computer are different each time.
  • the first determination module 502 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the upper computer fails to write the heartbeat number to the lower computer at least once.
  • the heartbeat number is used for periodic reading by the lower computer, so that the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal after reading the same heartbeat number several times in succession.
  • the monitoring device 500 of the communication connection may further include:
  • the receiving module 503 is configured to receive the feedback identifier sent by the lower computer after each heartbeat number is written to the lower computer.
  • the feedback flag is used to indicate whether the upper computer successfully writes the heartbeat number to the lower computer.
  • the monitoring device 500 of the communication connection may further include:
  • the third determination module 504 is configured to determine that the communication connection between the upper computer and the lower computer is normal if it is determined that the feedback identifier is an identifier used to indicate that the upper computer successfully writes the heartbeat number to the lower computer.
  • the monitoring device 500 of the communication connection may further include:
  • the fourth determination module 505 is configured to determine that the writing of the heartbeat number to the lower computer this time fails if the feedback identifier is determined to be an identifier for indicating that the upper computer fails to write the heartbeat number to the lower computer.
  • the detection device for the communication connection may further include:
  • the checking module is used to check whether the communication connection with the lower computer is successfully established before each writing the heartbeat number to the lower computer; It is checked that the communication connection with the lower computer is not established, and it is determined that the writing of the heartbeat number to the lower computer this time fails.
  • the upper computer is connected to the lower computer for communication through the middleware, and the receiving module 503 is used to receive the feedback identifier sent by the middleware after the upper computer writes the heartbeat number to the lower computer through the middleware each time, and the middleware uses After each heartbeat number is written to the lower computer, a feedback identification is generated;
  • the checking module is used to check whether the communication connection with the lower computer is successfully established through the middleware.
  • the first determining module 502 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the upper computer fails to write the heartbeat number to the lower computer several times in a row.
  • the monitoring device 500 of the communication connection may further include:
  • the output module 506 is configured to output prompt information after it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the writing module 501 is used to periodically write the heartbeat number to the controller of the lower computer.
  • the heartbeat numbers periodically written by the upper computer to the lower computer are arranged in an arithmetic progression or an arithmetic progression.
  • the period length of the upper computer writing the heartbeat number to the lower computer is less than or equal to the period length of the lower computer reading the heartbeat number.
  • the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • FIG. 6 is a structural block diagram of another communication connection monitoring apparatus provided by an embodiment of the present application.
  • the communicatively connected monitoring device 600 may be integrated into the lower computer 102 in the treatment system 100 shown in FIG. 1 .
  • the communicatively connected monitoring device 500 may include:
  • the reading module 601 is used for periodically reading the heartbeat number written in the upper computer after the lower computer establishes a communication connection with the upper computer.
  • the heartbeat number is written by the host computer periodically, and the heartbeat number written by the host computer to the host computer is different each time.
  • the second determination module 602 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the heartbeat numbers read by the lower computer at least twice in a row are the same.
  • the monitoring device 600 of the communication connection may further include:
  • the fifth determination module 603 is configured to determine that the communication connection with the upper computer is normal if the heartbeat number currently read by the lower computer is different from the heartbeat number read last time.
  • this second determination module 602 is used for if the heartbeat number currently read by the lower computer is the same as the heartbeat number read last time, then continue to read the heartbeat number at least once, when the heartbeat number read every time is equal to When the heartbeat number read last time is the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the reading module 601 is configured to periodically read the heartbeat number written by the upper computer from the controller of the lower computer.
  • the monitoring device 600 of the communication connection may further include:
  • the control module 604 is configured to control the radiotherapy equipment to send an alarm signal and stop the operation of the radiotherapy equipment after it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  • the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal.
  • the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
  • the embodiment of the present application also provides a medical system, and the structure of the medical system may refer to FIG. 1 .
  • the medical system 100 may include: an upper computer 101 and a lower computer 102 .
  • the monitoring device 500 for communication connection shown in FIG. 5 may be integrated in the upper computer 101
  • the monitoring device for communication connection shown in FIG. 6 may be integrated in the lower computer 102 .
  • the host computer may include: a first processor, and a first memory for storing executable instructions of the first processor.
  • the first processor is configured to perform the monitoring method of the communication connection shown in FIG. 2 or FIG. 4 .
  • the lower computer may include: a second processor, and a second memory for storing executable instructions of the second processor.
  • the second processor is configured to execute the monitoring method of the communication connection shown in FIG. 3 or FIG. 4 .
  • the medical system further includes: radiotherapy equipment, the radiotherapy equipment has an alarm buzzer.
  • the lower computer in the medical system is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, the alarm buzzer that controls the radiotherapy equipment emits an alarm sound.
  • the radiotherapy equipment also has an operation panel.
  • the lower computer in the medical system is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, the fault alarm light in the operation panel of the radiotherapy equipment is controlled to light up.
  • each module in this embodiment can be composed of a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA) on the monitoring device that is communicatively connected. ) and device implementations such as modems.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores instructions that, when the computer-readable storage medium runs on the processing component, cause the processing component to perform the communication connection monitoring method shown in FIG. 2 , FIG. 3 or FIG. 4 .

Abstract

A method for monitoring a communication connection, a medical system (100) and a storage medium, related to the field of medical technologies. The method comprises: after a communication connection is established between an upper computer (101) and a lower computer (102), the upper computer (101) periodically writes heartbeat digits to the lower computer (102), and the heartbeat digits written to the lower computer (102) each time are different (201); if the upper computer (101) fails to write the heartbeat digits to the lower computer (102) at least once, the upper computer (101) determines that the communication connection between the upper computer (101) and the lower computer (102) is abnormal (202); the lower computer (102) periodically reads the heartbeat digits written by the upper computer (101) (301); and if the heartbeat digits read by the lower computer (102) at least twice in a row are the same, the lower computer (102) determines that the communication connection between the lower computer (102) and the upper computer (101) is abnormal (302). By means of the method for monitoring communication connection, it can be ensured that when the medical system (100) works, the upper computer (101) can monitor whether the communication connection between the upper computer (101) and the lower computer (102) is normal or not in real time, and the lower computer (102) can monitor whether the communication connection between the lower computer (102) and the upper computer (101) is normal or not in real time.

Description

通信连接的监测方法、医疗系统、存储介质Communication connection monitoring method, medical system, storage medium 技术领域technical field
本申请涉及医疗技术领域,特别涉及一种通信连接的监测方法、医疗系统、存储介质。The present application relates to the field of medical technology, and in particular, to a monitoring method for communication connection, a medical system, and a storage medium.
背景技术Background technique
随着医疗科技的不断发展,越来越多的医院使用医疗系统对患者进行诊断或治疗。With the continuous development of medical technology, more and more hospitals use the medical system to diagnose or treat patients.
该医疗系统通常包括:上位机、下位机和放疗设备。其中,该上位机通常是指可以直接发送控制命令的计算机,该下位机通常是指直接对放疗设备的运行状态进行控制的计算机。在使用医疗系统对患者进行诊断或治疗时,上位机可以向下位机发送控制命令,下位机在接收到控制命令后可以控制放疗设备的运行状态,以实现对患者进行诊断或治疗。The medical system usually includes: upper computer, lower computer and radiotherapy equipment. Wherein, the upper computer usually refers to a computer that can directly send control commands, and the lower computer usually refers to a computer that directly controls the operation state of the radiotherapy equipment. When using the medical system to diagnose or treat a patient, the upper computer can send control commands to the lower computer, and the lower computer can control the operation state of the radiotherapy equipment after receiving the control command, so as to diagnose or treat the patient.
为了保证采用医疗系统对患者进行诊断或治疗时的安全性,需要保证上位机与下位机之间的通信连接正常。如此,亟需一种在医疗系统工作时,实时监测上位机与下位机之间的通信连接是否正常的方法。In order to ensure the safety of using the medical system to diagnose or treat patients, it is necessary to ensure that the communication connection between the upper computer and the lower computer is normal. In this way, there is an urgent need for a method for monitoring in real time whether the communication connection between the upper computer and the lower computer is normal when the medical system is working.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种通信连接的监测方法、医疗系统、存储介质,能够在医疗系统工作时,实时监测上位机与下位机之间的通信连接是否正常,所述技术方案如下:The embodiments of the present application provide a communication connection monitoring method, medical system, and storage medium, which can monitor in real time whether the communication connection between the upper computer and the lower computer is normal when the medical system is working. The technical solution is as follows:
第一方面,提供了一种通信连接的监测方法,所述方法应用于上位机,所述方法包括:在所述上位机与下位机建立通信连接后,周期性的向所述下位机写入心跳数字,且每次向所述下位机写入的心跳数字不同;若所述上位机至少一次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常;其中,所述心跳数字用于供所述下位机进行周期性的读取,以使所述下位机在连续多次读取到相同的心跳数字后,确定所述下位机与所述上 位机之间的通信连接异常。A first aspect provides a method for monitoring a communication connection, the method is applied to a host computer, and the method includes: after the host computer establishes a communication connection with a lower computer, periodically writing to the lower computer Heartbeat number, and the heartbeat number written to the lower computer is different each time; if the upper computer fails to write the heartbeat number to the lower computer at least once, then determine the relationship between the upper computer and the lower computer. The communication connection is abnormal; wherein, the heartbeat number is used for periodic reading by the lower computer, so that after the lower computer reads the same heartbeat number several times in a row, it is determined that the lower computer is the same as that of the lower computer. The communication connection between the above host computers is abnormal.
可选的,所述方法还包括:在每次向所述下位机写入心跳数字之后,接收所述下位机发送的反馈标识,所述反馈标识用于指示所述上位机向所述下位机写入心跳数字是否成功。Optionally, the method further includes: after each time writing the heartbeat number to the lower computer, receiving a feedback mark sent by the lower computer, the feedback mark is used to instruct the upper computer to send the lower computer to the lower computer. Whether writing the heartbeat number was successful.
可选的,所述方法还包括:若确定出所述反馈标识为用于指示所述上位机向所述下位机写入心跳数字成功的标识,则确定所述上位机与所述下位机之间的通信连接正常。Optionally, the method further includes: if it is determined that the feedback sign is a sign used to instruct the upper computer to write the heartbeat number to the lower computer successfully, then determine the relationship between the upper computer and the lower computer. The communication connection between them is normal.
可选的,所述方法还包括:若确定出所述反馈标识为用于指示所述上位机向所述下位机写入心跳数字失败的标识,则确定本次向所述下位机写入心跳数字失败。Optionally, the method further includes: if it is determined that the feedback sign is a sign for indicating that the host computer fails to write the heartbeat number to the lower computer, then it is determined that the heartbeat is written to the lower computer this time. Numbers fail.
可选的,所述方法还包括:在每次向所述下位机写入心跳数字之前,检查与所述下位机是否成功建立通信连接;若检查出与所述下位机成功建立通信连接,执行向所述下位机写入心跳数字的操作;若检查出未与所述下位机建立通信连接,确定本次向所述下位机写入心跳数字失败。Optionally, the method also includes: before writing the heartbeat number to the lower computer each time, checking whether a communication connection is successfully established with the lower computer; if it is checked that the communication connection is successfully established with the lower computer, executing The operation of writing the heartbeat number to the lower computer; if it is checked that no communication connection is established with the lower computer, it is determined that writing the heartbeat number to the lower computer this time fails.
可选的,所述上位机通过中间件与所述下位机通信连接,在每次向所述下位机写入心跳数字之后,接收所述下位机发送的反馈标识,包括:在所述上位机通过所述中间件每次向所述下位机写入心跳数字之后,接收所述中间件发送的反馈标识,所述中间件用于在每次向所述下位机写入心跳数字后,生成所述反馈标识;所述检查与所述下位机是否成功建立通信连接,包括:通过所述中间件检查与所述下位机是否成功建立通信连接。Optionally, the upper computer is communicatively connected to the lower computer through middleware, and after each time the heartbeat number is written to the lower computer, receiving a feedback identifier sent by the lower computer, including: in the upper computer After each time the heartbeat number is written to the lower computer by the middleware, the feedback identifier sent by the middleware is received, and the middleware is used to generate all the heartbeat numbers after each time the heartbeat number is written to the lower computer. and the checking whether the communication connection with the lower computer is successfully established includes: checking whether the communication connection with the lower computer is successfully established through the middleware.
可选的,若所述上位机至少一次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常,包括:若所述上位机连续多次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常。Optionally, if the upper computer fails to write the heartbeat number to the lower computer at least once, it is determined that the communication connection between the upper computer and the lower computer is abnormal, including: if the upper computer is consecutively multiple times If it fails to write the heartbeat number to the lower computer, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
可选的,所述方法还包括:在确定所述上位机与所述下位机之间的通信连接异常后,输出提示信息。Optionally, the method further includes: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, outputting prompt information.
可选的,所述周期性的向所述下位机写入心跳数字,包括:周期性的向所述下位机的控制器写入心跳数字。Optionally, the periodically writing the heartbeat number to the lower computer includes: periodically writing the heartbeat number to the controller of the lower computer.
可选的,所述上位机周期性的向所述下位机写入的心跳数字呈等差数列或等比数列排列。Optionally, the heartbeat numbers periodically written by the upper computer to the lower computer are arranged in an arithmetic progression or an arithmetic progression.
可选的,所述上位机向所述下位机写入心跳数字的周期时长,小于或等于所述下位机读取心跳数字的周期时长。Optionally, the period length of the upper computer writing the heartbeat numbers to the lower computer is less than or equal to the period length of the lower computer reading the heartbeat numbers.
第二方面,提供了一种通信连接的监测方法,所述方法应用于下位机,所述方法包括:在所述下位机与上位机建立通信连接后,周期性的读取所述上位机写入的心跳数字,所述心跳数字由所述上位机周期性写入,且所述上位机每次向所述下位机写入的心跳数字不同;若所述下位机连续至少两次读取到的心跳数字均相同,则确定所述上位机与所述下位机之间的通信连接异常。In a second aspect, a communication connection monitoring method is provided, the method is applied to a lower computer, and the method includes: after the lower computer establishes a communication connection with the upper computer, periodically reading the writing of the upper computer The heartbeat number entered, the heartbeat number is periodically written by the host computer, and the heartbeat number written by the host computer to the lower computer is different each time; if the lower computer reads at least twice consecutively If the heartbeat numbers are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
可选的,所述方法还包括:若所述下位机当前读取的心跳数字与上一次读取的心跳数字不相同,则确定与所述上位机之间的通信连接正常。Optionally, the method further includes: if the heartbeat number currently read by the lower computer is different from the heartbeat number read last time, determining that the communication connection with the upper computer is normal.
可选的,若所述下位机连续至少两次读取到的心跳数字均相同,则确定所述上位机与所述下位机之间的通信连接异常,包括:若所述下位机当前读取的心跳数字与上一次读取的心跳数字相同,则继续读取至少一次心跳数字,当每次读取的心跳数字均与所述上一次读取的心跳数字相同时,确定所述上位机与所述下位机之间的通信连接异常。Optionally, if the heartbeat numbers read by the lower computer at least twice in a row are the same, then it is determined that the communication connection between the upper computer and the lower computer is abnormal, including: if the lower computer currently reads The heartbeat number is the same as the heartbeat number read last time, then continue to read the heartbeat number at least once, when the heartbeat number read each time is the same as the heartbeat number read last time, determine the host computer and The communication connection between the lower computers is abnormal.
可选的,所述周期性的读取所述上位机写入的心跳数字,包括:周期性的从所述下位机的控制器读取所述上位机写入的心跳数字。Optionally, the periodically reading the heartbeat number written by the upper computer includes: periodically reading the heartbeat number written by the upper computer from the controller of the lower computer.
可选的,所述方法还包括:在确定所述上位机与所述下位机之间的通信连接异常后,控制放疗设备发出报警信号,并控制所述放疗设备停止工作。Optionally, the method further includes: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, controlling the radiotherapy equipment to issue an alarm signal, and controlling the radiotherapy equipment to stop working.
第三方面,提供了一种医疗系统,所述医疗系统包括:上位机和下位机;所述上位机包括:第一处理器,以及用于存储所述第一处理器的可执行指令的第一存储器,其中,所述第一处理器被配置为执行权利要求1至11任一所述的通信连接的监测方法;所述下位机包括:第二处理器,以及用于存储所述第二处理器的可执行指令的第二存储器,其中,所述第二处理器被配置为执行权利要求12至16任一所述的通信连接的监测方法。In a third aspect, a medical system is provided, the medical system includes: an upper computer and a lower computer; the upper computer includes: a first processor, and a first processor for storing executable instructions of the first processor a memory, wherein the first processor is configured to execute the communication connection monitoring method according to any one of claims 1 to 11; the lower computer comprises: a second processor, and is configured to store the second A second memory of executable instructions of a processor, wherein the second processor is configured to perform the method of monitoring a communication connection of any one of claims 12 to 16.
可选的,所述医疗系统还包括:放疗设备,所述放疗设备具有报警蜂鸣器;所述下位机被配置为:在确定出所述上位机与所述下位机之间的通信连接异常后,控制所述报警蜂鸣器发出报警音频。Optionally, the medical system further includes: radiotherapy equipment, the radiotherapy equipment has an alarm buzzer; the lower computer is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal Then, the alarm buzzer is controlled to emit an alarm sound.
可选的,所述放疗设备还具有操作面板;所述下位机被配置为:在确定出所述上位机与所述下位机之间的通信连接异常后,控制所述操作面板中的故障报警灯点亮。Optionally, the radiotherapy equipment further has an operation panel; the lower computer is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, control a fault alarm in the operation panel Lights on.
第四方面,提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述可读存储介质在处理组件上运行时,使得所述处理组件执行如第一方面或第二方面任一所述的通信连接的监测方法。In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions that, when the readable storage medium runs on a processing component, cause the processing component to execute The monitoring method for a communication connection according to any one of the first aspect or the second aspect.
本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include at least:
上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字,并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。The upper computer can periodically write the heartbeat number to the lower computer, and after the upper computer fails to write the heartbeat number to the lower computer at least once, the upper computer can determine that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本申请实施例提供的一种通信连接的监测方法所涉及的医疗系统的结构示意图;FIG. 1 is a schematic structural diagram of a medical system involved in a method for monitoring a communication connection provided by an embodiment of the present application;
图2是本申请实施例提供的一种通信连接的监测方法的流程图;2 is a flowchart of a method for monitoring a communication connection provided by an embodiment of the present application;
图3是本申请实施例提供的另一种通信连接的监测方法的流程图;3 is a flowchart of another method for monitoring a communication connection provided by an embodiment of the present application;
图4是本申请实施例提供的又一种通信连接的监测方法的流程图;4 is a flowchart of another communication connection monitoring method provided by an embodiment of the present application;
图5是本申请实施例提供的一种通信连接的监测装置的结构框图;5 is a structural block diagram of a communication connection monitoring device provided by an embodiment of the present application;
图6是本申请实施例提供的另一种通信连接的监测装置的结构框图。FIG. 6 is a structural block diagram of another communication connection monitoring apparatus provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
请参考图1,图1是本申请实施例提供的一种通信连接的监测方法所涉及的 医疗系统的结构示意图。该医疗系统100可以包括:上位机101和下位机102。该上位机101和下位机102之间可以通信连接。Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of a medical system involved in a method for monitoring a communication connection provided by an embodiment of the present application. The medical system 100 may include: an upper computer 101 and a lower computer 102 . The upper computer 101 and the lower computer 102 can be communicatively connected.
在本申请实施例中,该医疗系统100还可以包括:与下位机102连接的放疗设备103。其中,该放疗设备103可以包括:伽玛刀或执行加速器。In this embodiment of the present application, the medical system 100 may further include: a radiotherapy device 103 connected to the lower computer 102 . Wherein, the radiotherapy equipment 103 may include: a gamma knife or an executive accelerator.
示例的,该上位机101可以为直接发送控制命令的计算机,例如,该上位机101可以为台式电脑或笔记本电脑等。该下位机102通常是指直接对放疗设备的运行状态进行控制的计算机,例如,该下位机102可以为放疗设备的运动控制组件。如此,通过该下位机102可以控制放疗设备中的治疗床和/或旋转机架移动。For example, the host computer 101 may be a computer that directly sends control commands. For example, the host computer 101 may be a desktop computer or a notebook computer. The lower computer 102 usually refers to a computer that directly controls the operation state of the radiotherapy equipment. For example, the lower computer 102 may be a motion control component of the radiotherapy equipment. In this way, the lower computer 102 can control the movement of the treatment couch and/or the rotating gantry in the radiotherapy equipment.
该上位机101中安装有上位机软件,该下位机102中安装有下位机软件。该上位机101可以通过上位机软件向下位机102发送控制命令。该下位机102在接收到控制命令后可以通过下位机软件控制放疗设备103的运行状态,使得放疗设备103可以对患者进行诊断或治疗。The upper computer 101 is installed with upper computer software, and the lower computer 102 is installed with lower computer software. The upper computer 101 can send control commands to the upper computer 102 through the upper computer software. After receiving the control command, the lower computer 102 can control the operation state of the radiotherapy equipment 103 through the software of the lower computer, so that the radiotherapy equipment 103 can diagnose or treat the patient.
在本申请中,该上位机101可以通过中间件与下位机102通信连接。其中,该中间件是指连接两个独立的应用程序(也即,上位机软件和下位机软件)的软件。In the present application, the upper computer 101 may be connected to the lower computer 102 for communication through middleware. The middleware refers to software that connects two independent application programs (that is, the upper computer software and the lower computer software).
请参考图2,图2是本申请实施例提供的一种通信连接的监测方法的流程图。该通信连接的监测方法应用于图1示出的治疗系统100中的上位机101。该通信连接的监测方法包括:Please refer to FIG. 2 , which is a flowchart of a method for monitoring a communication connection provided by an embodiment of the present application. The communication connection monitoring method is applied to the host computer 101 in the treatment system 100 shown in FIG. 1 . The monitoring method of the communication connection includes:
步骤201、在上位机与下位机通信连接后,周期性的向下位机写入心跳数字,且每次向下位机写入的心跳数字不同。Step 201: After the upper computer is connected to the lower computer for communication, periodically write the heartbeat number to the lower computer, and the heartbeat number written to the lower computer is different each time.
步骤202、若上位机至少一次向下位机写入数字失败,则确定上位机与下位机之间的通信连接异常。Step 202: If the upper computer fails to write numbers to the lower computer at least once, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
其中,该心跳数字用于供下位机进行周期性的读取,以使该下位机在连续多次读取到相同的心跳数字后,确定下位机与上位机之间的通信连接异常。The heartbeat number is used for periodic reading by the lower computer, so that the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal after reading the same heartbeat number several times in a row.
综上所述,本申请实施例提供的通信连接的监测方法,上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字, 并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。To sum up, in the communication connection monitoring method provided by the embodiment of the present application, the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
请参考图3,图3是本申请实施例提供的另一种通信连接的监测方法的流程图。该通信连接的监测方法应用于图1示出的治疗系统100中的下位机102。该通信连接的监测方法包括:Please refer to FIG. 3 , which is a flowchart of another communication connection monitoring method provided by an embodiment of the present application. The communication connection monitoring method is applied to the lower computer 102 in the treatment system 100 shown in FIG. 1 . The monitoring method of the communication connection includes:
步骤301、在下位机与上位机建立通信连接后,周期性的读取上位机写入的心跳数字。该心跳数字由上位机周期性写入,且该上位机每次向下位机写入的心跳数字不同。Step 301: After the lower computer establishes a communication connection with the upper computer, periodically read the heartbeat number written by the upper computer. The heartbeat number is periodically written by the host computer, and the heartbeat number written by the host computer to the host computer is different each time.
步骤302、若下位机连续至少两次读取到的心跳数字均相同,则确定上位机与下位机之间的通信连接异常。Step 302: If the heartbeat numbers read by the lower computer at least twice in a row are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
综上所述,本申请实施例提供的通信连接的监测方法,上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字,并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。To sum up, in the communication connection monitoring method provided by the embodiment of the present application, the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
请参考图4,图4是本申请实施例提供的又一种通信连接的监测方法的流程图。该通信连接的监测方法应用于图1示出的治疗系统100。该通信连接的监测方法包括:Please refer to FIG. 4 . FIG. 4 is a flowchart of another communication connection monitoring method provided by an embodiment of the present application. The monitoring method of the communication connection is applied to the treatment system 100 shown in FIG. 1 . The monitoring method of the communication connection includes:
步骤401、在上位机与下位机建立通信连接后,上位机周期性的向下位机写入心跳数字,且每次向下位机写入的心跳数字不同。Step 401: After the upper computer establishes a communication connection with the lower computer, the upper computer periodically writes heartbeat numbers to the lower computer, and the heartbeat numbers written to the lower computer are different each time.
示例的,上位机周期性的向下位机写入的心跳数字呈等差数列或等比数列 排列。例如,假设,上位机周期性的向下位机写入心跳数字呈等差数列,则,该上位机周期性的向下位机写入的心跳数字可以依次为:n,n+1,n+2等。其中,该n可以为大于或等于0的整数。For example, the heartbeat numbers periodically written by the host computer to the host computer are arranged in an arithmetic progression or an arithmetic progression. For example, assuming that the heartbeat numbers that the host computer periodically writes to the host computer are arithmetic progressions, then the heartbeat numbers that the host computer periodically writes to the host computer can be sequentially: n, n+1, n+2 Wait. Wherein, the n may be an integer greater than or equal to 0.
可选的,上位机周期性的向下位机写入心跳数字,包括:上位机周期性的向下位机中的控制器写入心跳数字。例如,该控制器可以为中央处理器(CPU)、微处理器(MPU)或现场可编程门阵列(FPGA)等。Optionally, the host computer periodically writes the heartbeat number to the host computer, including: the host computer periodically writes the heartbeat number to the controller in the host computer. For example, the controller may be a central processing unit (CPU), a microprocessor (MPU), a field programmable gate array (FPGA), or the like.
示例的,该控制器具有用于存储心跳数字的存储地址,该上位机可以将心跳数字写入该存储地址中。Exemplarily, the controller has a storage address for storing the heartbeat number, and the host computer can write the heartbeat number into the storage address.
需要说明的是,该存储地址中仅存储了一个心跳数字,在上位机每次向下位机的存储地址写入心跳数字时,该存储地址会擦除上一次上位机写入的心跳数字,并存储本次上位机需要写入的心跳数字。It should be noted that only one heartbeat number is stored in this storage address. Every time the host computer writes the heartbeat number to the storage address of the host computer, the storage address will erase the heartbeat number written by the host computer last time, and Store the heartbeat number that the host computer needs to write this time.
在本申请实施例中,该通信连接的监测方法还可以包括步骤:在上位机每次向下位机写入心跳数字之后,上位机接收下位机发送的反馈标识。该反馈标识用于指示上位机向下位机写入的心跳数字是否成功。In the embodiment of the present application, the monitoring method for the communication connection may further include the step of: after the upper computer writes the heartbeat number to the lower computer each time, the upper computer receives the feedback identifier sent by the lower computer. The feedback flag is used to indicate whether the heartbeat number written by the host computer to the host computer is successful.
示例的,该上位机可以通过中间件与下位机通信连接。如此,该上位机每次向下位机写入心跳数字之后,上位机接收下位机发送的反馈标识可以包括:在上位机通过中间件每次向下位机写入心跳数字之后,接收中间件发送的反馈标识。For example, the upper computer may be connected to the lower computer through middleware for communication. In this way, after the host computer writes the heartbeat number to the host computer each time, the host computer receives the feedback identification sent by the host computer may include: after the host computer writes the heartbeat number to the host computer through the middleware every time, receiving the middleware sent Feedback logo.
其中,该中间件用于在每次向下位机写入心跳数字后,生成反馈标识。该反馈标识用于指示上位机向下位机写入心跳数字是否成功。Wherein, the middleware is used to generate a feedback identifier after each heartbeat number is written to the lower computer. The feedback flag is used to indicate whether the upper computer successfully writes the heartbeat number to the lower computer.
例如,该反馈标识可以包括:写入成功标识或写入失败标识。当下位机出现异常而无法进行工作时,中间件无法向下位机写入心跳数字,此时,该中间件可以生成写入失败标识,并发送给上位机,以向上位机告知本次向下位机写入心跳数字失败;当下位机能够正常工作时,中间件可以向下位机写入心跳数字,此时,该中间件可以生成写入成功标识,并发送给上位机,以向上位机告知本次向下位机写入心跳数字成功。For example, the feedback identification may include: writing success identification or writing failure identification. When the upper computer fails to work due to an abnormality, the middleware cannot write the heartbeat number to the lower computer. At this time, the middleware can generate a write failure flag and send it to the upper computer to inform the upper computer of this time. The computer fails to write the heartbeat number; when the lower computer can work normally, the middleware can write the heartbeat number to the lower computer. At this time, the middleware can generate a write success flag and send it to the upper computer to inform the upper computer. This time, the heartbeat number is successfully written to the lower computer.
需要说明的是,下位机出现异常而无法进行工作的现象通常是指:下位机出现宕机或卡死等异常现象,此时,上位机无法向下位机发送控制命令,该上位机与下位机之间的通信连接异常。It should be noted that the phenomenon that the lower computer is abnormal and cannot work usually means: the lower computer is down or stuck and other abnormal phenomena. At this time, the upper computer cannot send control commands to the lower computer. The upper computer and the lower computer The communication connection between them is abnormal.
在本申请实施例中,该通信连接的监测方法还可以包括以下几个步骤:In the embodiment of the present application, the monitoring method for the communication connection may further include the following steps:
步骤A、在上位机每次向下位机写入心跳数字之前,该上位机检查与下位机是否成功建立通信连接。Step A. Before the upper computer writes the heartbeat number to the lower computer each time, the upper computer checks whether the communication connection is successfully established with the lower computer.
示例的,该上位机可以通过中间件检查与下位机是否成功建立通信连接。若上位机通过中间件检查出与下位机建立通信连接,执行步骤B;若上位机通过中间件检出未与下位机建立通信连接,执行步骤C。For example, the upper computer can check whether the communication connection with the lower computer is successfully established through the middleware. If the upper computer detects that a communication connection with the lower computer is established through the middleware, step B is performed; if the upper computer detects that the communication connection is not established with the lower computer through the middleware, step C is performed.
步骤B、若上位机检查出与下位机建立通信连接,则执行向下位机写入心跳数字的操作。Step B. If the upper computer detects that a communication connection is established with the lower computer, the operation of writing the heartbeat number to the lower computer is performed.
步骤C、若上位机未与下位机建立通信连接,则上位机确定其与下位机之间不存在通信连接,并确定本次向下位机写入心跳数字失败。Step C. If the upper computer does not establish a communication connection with the lower computer, the upper computer determines that there is no communication connection between it and the lower computer, and determines that writing the heartbeat number to the lower computer this time fails.
在本申请实施例中,上位机每次在向下位机写入心跳数字之前,上位机需要通过调取中间件中的指定函数的方式,确定上位机与下位机之间的通信连接是否存在。In the embodiment of the present application, each time the upper computer writes the heartbeat number to the lower computer, the upper computer needs to determine whether there is a communication connection between the upper computer and the lower computer by calling a specified function in the middleware.
示例的,若上位机从中间件中调取到了指定函数,则上位机可以确定出其与下位机成功建立通信连接,也即是,上位机可以确定出其与下位机之间存在通信连接,之后,上位机才会执行向下位机写入心跳数字的操作;若上位机从中间件中未调取到指定函数,则上位机可以确定出其未与下位机建立通信连接,也即是,上位机可以确定出其与下位机之间不存在通信连接,该上位机并不会执行向下位机写入心跳数字的操作,且会确定本次向下位机写入心跳数字失败,之后,该上位机需要重复执行从中间件中调取指定函数的操作。For example, if the upper computer calls the specified function from the middleware, the upper computer can determine that it has successfully established a communication connection with the lower computer, that is, the upper computer can determine that there is a communication connection between it and the lower computer, After that, the upper computer will perform the operation of writing the heartbeat number to the lower computer; if the upper computer does not call the specified function from the middleware, the upper computer can determine that it has not established a communication connection with the lower computer, that is, The upper computer can determine that there is no communication connection between it and the lower computer, the upper computer will not perform the operation of writing the heartbeat number to the lower computer, and it will determine that writing the heartbeat number to the lower computer this time fails. The host computer needs to repeatedly perform the operation of calling the specified function from the middleware.
步骤402、在上位机每次向下位机写入心跳数字后,上位机确定本次向下位机写入心跳数字是否成功。Step 402: After the upper computer writes the heartbeat number to the lower computer each time, the upper computer determines whether the writing of the heartbeat number to the lower computer this time is successful.
在本申请实施例中,在上位机每次向下位机写入心跳数字后,该上位机可以接收中间件发送的反馈标识,并基于该反馈标识确定向下位机写入心跳数字是否成功。In the embodiment of the present application, after the upper computer writes the heartbeat number to the lower computer each time, the upper computer can receive the feedback identifier sent by the middleware, and based on the feedback identifier, determine whether the writing of the heartbeat number to the lower computer is successful.
示例的,上位机在接收到中间件发送的反馈标识后,若上位机确定出该反馈标识为用于指示上位机向下位机写入心跳数字成功的标识,也即是,该反馈标识为写入成功标识,则上位机确定出本次向下位机写入心跳数字成功,执行下述步骤403;若上位机确定出该反馈标识为用于指示上位机向下位机写入心跳数字失败的标识,也即是,该反馈标识为写入失败标识,则上位机确定本次向下位机写入心跳数字失败,上位机可能与下位机之间的通信连接异常,执行下 述步骤404。For example, after the host computer receives the feedback mark sent by the middleware, if the host computer determines that the feedback mark is the mark used to instruct the host computer to write the heartbeat number to the host computer, that is, the feedback mark is to write. Enter the success sign, then the host computer determines that writing the heartbeat number to the host computer this time is successful, and executes the following step 403; , that is, if the feedback sign is a write failure sign, the upper computer determines that writing the heartbeat number to the lower computer this time fails, and the communication connection between the upper computer and the lower computer may be abnormal, and the following step 404 is performed.
步骤403、若上位机确定出本次向下位机写入心跳数字成功,则上位机确定其与下位机之间的通信连接正常。Step 403: If the upper computer determines that the heartbeat number is successfully written to the lower computer this time, the upper computer determines that the communication connection between the upper computer and the lower computer is normal.
示例的,若上位机基于中间件发送的反馈标识确定出本次向下位机写入心跳数字成功,例如,当上位机收到中间件发送的写入成功标识时,该上位机可以确定出本次向下位机写入心跳数字成功。则,该上位机可以确定出其与下位机之间的通信连接正常。For example, if the host computer determines that the heartbeat number is successfully written to the host computer this time based on the feedback identifier sent by the middleware, for example, when the host computer receives the write success identifier sent by the middleware, the host computer can determine that this time. The next time the heartbeat number is written to the lower computer successfully. Then, the upper computer can determine that the communication connection between it and the lower computer is normal.
步骤404、若上位机至少一次确定出向下位机写入心跳数字失败,则上位机确定其与下位机之间的通信连接异常。Step 404: If the upper computer determines that writing the heartbeat number to the lower computer fails at least once, the upper computer determines that the communication connection between the upper computer and the lower computer is abnormal.
在第一种可能的实现方式中,只要上位机确定出一次向下位机写入心跳数字失败,该上位机即可确定出其与下位机之间的通信连接异常。In the first possible implementation manner, as long as the upper computer determines that writing the heartbeat number to the lower computer fails once, the upper computer can determine that the communication connection between it and the lower computer is abnormal.
示例的,若上位机基于中间件发送的反馈标识确定出本次向下位机写入心跳数字失败,例如,当上位机收到中间件发送的写入失败标识时,该上位机可以确定出本次向下位机写入心跳数字失败。则,该上位机可以确定出其与下位机之间的通信连接异常。For example, if the host computer determines based on the feedback identifier sent by the middleware that the heartbeat number has failed to be written to the host computer this time, for example, when the host computer receives the write failure identifier sent by the middleware, the host computer can determine that this time. The next time to write the heartbeat number to the lower computer failed. Then, the upper computer can determine that the communication connection between it and the lower computer is abnormal.
在第二种可能的实现方式中,上位机需要连续多次确定出向下位机写入心跳数字失败,该上位机才可以确定出其与下位机之间的通信连接异常。In the second possible implementation manner, the upper computer needs to determine the failure to write the heartbeat number to the lower computer several times in a row, and then the upper computer can determine that the communication connection between it and the lower computer is abnormal.
示例的,根据上述实施例可知,上位机确定其向下位机写入心跳数字失败有以下两种情况:Exemplarily, according to the above-mentioned embodiment, it can be known that the upper computer determines that it fails to write the heartbeat number to the lower computer in the following two situations:
第一种情况,上位机在每次向下位机写入心跳数字之前,当上位机通过调取中间件中的指定函数的方式确定出上位机与下位机之间的通信连接不存在时,该上位机即可确定出本次向下位机写入心跳数字失败。In the first case, before the upper computer writes the heartbeat number to the lower computer each time, when the upper computer determines that the communication connection between the upper computer and the lower computer does not exist by calling the specified function in the middleware, the The host computer can determine that writing the heartbeat number to the host computer this time fails.
第二种情况,上位机在每次向下位机写入心跳数字之后,若上位机基于中间件发送的反馈标识确定出向下位机写入心跳数字失败,例如,当上位机收到中间件发送的写入失败标识时,该上位机即可确定出本次向下位机写入心跳数字失败。In the second case, after the upper computer writes the heartbeat number to the lower computer each time, if the upper computer determines that writing the heartbeat number to the lower computer fails based on the feedback identifier sent by the middleware, for example, when the upper computer receives the message sent by the middleware. When writing the failure flag, the host computer can determine that the heartbeat number is failed to be written to the host computer this time.
结合以上两种情况,上位机每次在确定出其向下位机写入心跳数字失败后,该上位机可以记录失败一次。如此,上位机可以通过记录的连续失败的次数,确定该上位机是否连续多次向下位机写入的心跳数字失败,并在上位机连续多次确定出向下位机写入的心跳数字失败后,确定其与下位机之间的通行连接异 常。Combining the above two situations, each time the upper computer determines that it fails to write the heartbeat number to the lower computer, the upper computer can record the failure once. In this way, the upper computer can determine whether the number of heartbeats written to the lower computer by the upper computer has failed several times in a row through the number of consecutive failures recorded, and after the upper computer determines that the number of heartbeats written to the lower computer has failed for many times in a row, Confirm that the traffic connection between it and the lower computer is abnormal.
例如,若上位机连续3次确定出向下位机写入心跳数字,则该上位机可以确定其与下位机之间的通信连接异常。For example, if the upper computer determines that the heartbeat number is written to the lower computer three times in a row, the upper computer can determine that the communication connection between the upper computer and the lower computer is abnormal.
步骤405、上位机输出提示信息。 Step 405, the upper computer outputs prompt information.
在本申请实施例中,在上位机确定出其与下位机之间的通信连接异常后,该上位机可以输出的提示信息。In the embodiment of the present application, after the upper computer determines that the communication connection between it and the lower computer is abnormal, the upper computer can output prompt information.
示例的,该提示信息可以为文字报信息,该上位机可以将其输出的提示信息在上位机的显示界面上进行显示,以向工作人员提示上位机与下位机之间的通信连接异常。For example, the prompt information may be text message information, and the host computer may display the prompt information output by the host computer on the display interface of the host computer to prompt the staff that the communication connection between the host computer and the lower computer is abnormal.
步骤406、下位机周期性的读取上位机写入的心跳数字。Step 406: The lower computer periodically reads the heartbeat number written by the upper computer.
在本申请实施例中,在上位机周期性的向下位机写入心跳数字后,该下位机可以周期性的读取其存储的心跳数字。In the embodiment of the present application, after the upper computer periodically writes the heartbeat number to the lower computer, the lower computer can periodically read the stored heartbeat number.
可选的,由于上位机可以周期性的将心跳数字写入下位机中的控制器中,因此,该下位机周期性的读取上位机写入的心跳数字,包括:下位机周期性的从该下位机的控制器读取上位机写入的心跳数字。Optionally, since the upper computer can periodically write the heartbeat number into the controller in the lower computer, the lower computer periodically reads the heartbeat number written by the upper computer, including: the lower computer periodically reads the heartbeat number from the lower computer. The controller of the lower computer reads the heartbeat number written by the upper computer.
在本申请中,该上位机向下位机写入心跳数字的周期时长,小于或等于下位机读取心跳数字的周期时长。也即是,若上位机以第一时长为周期,周期性的向下位机写入心跳数字,下位机以第二时长为周期,周期性的读取器存储的心跳数字,则,该第一时长小于或等于第二时长。例如,该第一时长可以为200毫秒,第二时长可以为2秒。In the present application, the cycle duration of the upper computer writing the heartbeat numbers to the lower computer is less than or equal to the cycle duration of the lower computer reading the heartbeat numbers. That is, if the upper computer periodically writes the heartbeat number to the lower computer with the first duration as the period, and the lower computer periodically reads the heartbeat number stored by the reader with the second duration as the period, then the first The duration is less than or equal to the second duration. For example, the first duration may be 200 milliseconds, and the second duration may be 2 seconds.
需要说明的是,当上位机向下位机写入心跳数字的周期时长,小于或等于下位机读取心跳数字的周期时长时,后续下位机可以通过读取到的心跳数字来确定其与上位机之间的通信连接是否正常。It should be noted that when the cycle duration of the upper computer writing the heartbeat number to the lower computer is less than or equal to the cycle duration of the lower computer reading the heartbeat number, the subsequent lower computer can use the read heartbeat number to determine its relationship with the upper computer. Whether the communication connection between them is normal.
步骤407、在下位机每次读取心跳数字后,下位机比较当前读取的心跳数字与上一次读取的心跳数字是否相同。Step 407: After the lower computer reads the heartbeat number each time, the lower computer compares whether the currently read heartbeat number is the same as the last read heartbeat number.
示例的,若下位机确定出当前读取的心跳数字与上一次读取的心跳数字不相同,则执行步骤408;若下位机确定出当前读取的心跳数字与上一次读取的心跳数字相同,则下位机可能与上位机之间的通信连接异常,执行步骤409。Example, if the lower computer determines that the currently read heartbeat number is different from the last read heartbeat number, then execute step 408; if the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number , the communication connection between the lower computer and the upper computer may be abnormal, and step 409 is executed.
步骤408、若下位机确定出当前读取的心跳数字与上一次读取的心跳数字不相同,则下位机确定其与上位机之间的通信连接正常。Step 408: If the lower computer determines that the heartbeat number currently read is different from the heartbeat number read last time, the lower computer determines that the communication connection between it and the upper computer is normal.
在本申请实施例中,由于上位机向下位机写入心跳数字的周期时长,小于或等于下位机读取心跳数字的周期时长,且在上位机与下位机之间的通信连接正常时,上位机每次均能够正常将心跳数字写入下位机中。因此,在上位机与下位机之间的通信连接正常时,该下位机每次读取到的心跳数字均是不同的。如此,若下位机确定出当前读取的心跳数字与上一次读取的心跳数字不相同,则,该下位机可以确定出其与上位机之间的通信连接正常。In the embodiment of the present application, because the cycle duration of the upper computer writing the heartbeat number to the lower computer is less than or equal to the cycle duration of the lower computer reading the heartbeat number, and when the communication connection between the upper computer and the lower computer is normal, the upper computer The computer can normally write the heartbeat number into the lower computer every time. Therefore, when the communication connection between the upper computer and the lower computer is normal, the heartbeat numbers read by the lower computer each time are different. In this way, if the lower computer determines that the currently read heartbeat number is different from the last read heartbeat number, the lower computer can determine that the communication connection between it and the upper computer is normal.
步骤409、若下位机连续至少两次读取到的心跳数字均相同,则下位机确定其与上位机之间的通信连接异常。Step 409: If the heartbeat numbers read by the lower computer at least twice in a row are the same, the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal.
在第一种示例性的实现方式中,只要下位机连续两次读取到的心跳数字均相同,该下位机即可确定出其与上位机之间的通信连接异常。In the first exemplary implementation manner, as long as the heartbeat numbers read by the lower computer for two consecutive times are the same, the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
示例的,若下位机确定出当前读取的心跳数字与上一次读取的心跳数字相同,则下位机确定其与上位机之间的通信连接异常。For example, if the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number, the lower computer determines that the communication connection between it and the upper computer is abnormal.
在第二种示例性的实现方式中,下位机需要连续多次(三次或三次以上)确定出向下位机写入心跳数字失败,该下位机才可以确定出其与上位机之间的通信连接异常。In the second exemplary implementation manner, the lower computer needs to determine the failure to write the heartbeat number to the lower computer several times (three or more) consecutively, so that the lower computer can determine that the communication connection between it and the upper computer is abnormal. .
示例的,若下位机确定出当前读取的心跳数字与上一次读取的心跳数字相同,则继续读取至少一次心跳数字,当每次读取的心跳数字均与该上一次读取的心跳数字相同时,下位机确定其与上位机之间的通信连接异常。For example, if the lower computer determines that the currently read heartbeat number is the same as the last read heartbeat number, it continues to read the heartbeat number at least once, when the heartbeat number read each time is the same as the last read heartbeat number. When the numbers are the same, the lower computer determines that the communication connection between it and the upper computer is abnormal.
在本申请实施例中,由于在上位机与下位机之间的通信连接异常时,该上位机能够无法将新的心跳数字写入下位机中,该下位机中一直存储的是上位机在其与下位机之间的通信连接正常时最后一次写入的心跳数字。因此,在上位机与下位机之间的通信连接异常时,该下位机每次读取到的心跳数字均是相同的。如此,若下位机连续多次读取到的心跳数字相同,则,该下位机可以确定出其与上位机之间的通信连接异常。In the embodiment of the present application, when the communication connection between the upper computer and the lower computer is abnormal, the upper computer cannot write the new heartbeat number into the lower computer, and the lower computer has always stored the information that the upper computer has stored in the lower computer. The last heartbeat number written when the communication connection with the lower computer is normal. Therefore, when the communication connection between the upper computer and the lower computer is abnormal, the heartbeat numbers read by the lower computer each time are the same. In this way, if the heartbeat numbers read by the lower computer for many times are the same, the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
例如,若下位机连续3次读取到的心跳数相同,则该下位机可以确定出其与上位机之间的通信连接异常。For example, if the number of heartbeats read by the lower computer for three consecutive times is the same, the lower computer can determine that the communication connection between the lower computer and the upper computer is abnormal.
步骤410、下位机控制放疗设备发出报警信号,并控制放疗设备停止工作。 Step 410 , the lower computer controls the radiotherapy equipment to issue an alarm signal, and controls the radiotherapy equipment to stop working.
在本申请实施例中,在下位机确定出其与上位机之间的通信连接异常后,该下位机可以控制放疗设备发出报警信号,并控制放疗设备停止工作。In the embodiment of the present application, after the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal, the lower computer can control the radiotherapy equipment to send an alarm signal, and control the radiotherapy equipment to stop working.
示例的,放疗设备具有报警蜂鸣器和操控面板,在下位机确定出其与上位 机之间的通信连接异常后,该下位机可以控制放疗设备的报警蜂鸣器发出报警音频,并控制放疗设备的操控面板的故障报警灯点亮,以向工作人员和放疗设备上的患者提示上位机与下位机之间的通信连接异常。For example, the radiotherapy equipment has an alarm buzzer and a control panel. After the lower computer determines that the communication connection between it and the upper computer is abnormal, the lower computer can control the alarm buzzer of the radiotherapy equipment to emit an alarm sound and control the radiotherapy. The fault alarm light on the control panel of the equipment lights up to alert the staff and the patients on the radiotherapy equipment that the communication connection between the upper computer and the lower computer is abnormal.
在上位机与下位机之间的通信连接异常后,该下位机通过控制放疗设备停止工作,可以避免出现放疗设备不受控制的持续工作而出现的医疗事故的问题。After the communication connection between the upper computer and the lower computer is abnormal, the lower computer controls the radiotherapy equipment to stop working, so as to avoid the problem of medical accidents caused by the uncontrolled continuous operation of the radiotherapy equipment.
在相关技术中,医疗系统中的上位机与下位机之间的通信连接的方法通常为:上位机周期性的性下位机发送心跳包;下位机每次在接收到上位机发送的心跳包后,基于该心跳包生成心跳反馈包,并发送给上位机。如此,在下位机持续一段时间没有接收到上位机发送的心跳包后,该下位机可以确定其与上位机之间的通信连接异常;在上位机持续一段时间没有接收到上位机发送的心跳反馈包后,该上位机确定其与下位机之间的通信连接异常。但是,通过这种通信连接的检测方式,需要保证下位机实时根据接收到的心跳包生成心跳反馈包,这样会占用下位机的计算资源,导致该下位机对放疗设备进行控制时能够调用的计算资源降低,且会导致上位机与下位机之间需要传输的数据较多,降低了上位机与下位机之间的通信连接的效率。In the related art, the communication connection method between the upper computer and the lower computer in the medical system is usually as follows: the upper computer periodically sends the heartbeat packet from the lower computer; every time the lower computer receives the heartbeat packet sent by the upper computer , generate a heartbeat feedback packet based on the heartbeat packet, and send it to the upper computer. In this way, after the lower computer has not received the heartbeat packet sent by the upper computer for a period of time, the lower computer can determine that the communication connection between it and the upper computer is abnormal; the upper computer has not received the heartbeat feedback sent by the upper computer for a period of time. After the package, the upper computer determines that the communication connection between it and the lower computer is abnormal. However, through this communication connection detection method, it is necessary to ensure that the lower computer generates a heartbeat feedback packet according to the received heartbeat packet in real time, which will occupy the computing resources of the lower computer and cause the lower computer to control the radiotherapy equipment. The resources are reduced, and more data needs to be transmitted between the upper computer and the lower computer, which reduces the efficiency of the communication connection between the upper computer and the lower computer.
而在本申请实施例中,上位机通过中间件周期性的向下位机写入心跳数字,且每次写入的心跳数值不同。该上位机仅需要通过中间件发送的反馈标识,并能够确定出其与下位机之间的通信连接是否正常;而下位机仅需要通过读取其存储的心跳数字,便能够确定出其与上位机之间的通信连接是否正常。在此过程中,上位机仅进行了写入操作,下位机仅进行了读取操作,该下位机并不需要根据心跳数字生成一个反馈信息反馈给上位机。如此,本申请实施例提供的通信连接的监测方法,并不会占用下位机的计算资源,且可以保证上位机与下位机之间的通信连接的效率较高。However, in the embodiment of the present application, the upper computer periodically writes the heartbeat number to the lower computer through the middleware, and the heartbeat value written each time is different. The upper computer only needs the feedback identification sent by the middleware, and can determine whether the communication connection between it and the lower computer is normal; and the lower computer only needs to read the heartbeat number stored in it to determine whether it is connected with the upper computer. Whether the communication connection between the machines is normal. In this process, the upper computer only performs the writing operation, and the lower computer only performs the reading operation, and the lower computer does not need to generate a feedback information according to the heartbeat number to feed back to the upper computer. In this way, the communication connection monitoring method provided by the embodiment of the present application does not occupy the computing resources of the lower computer, and can ensure that the communication connection between the upper computer and the lower computer has high efficiency.
需要说明的是,本申请实施例提供的通信连接的监测方法步骤的先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。It should be noted that the sequence of steps of the communication connection monitoring method provided by the embodiments of the present application can be appropriately adjusted, and the steps can also be correspondingly increased or decreased according to the situation. Within the scope of the present application, any method that can be easily conceived of changes should be covered within the protection scope of the present application, and thus will not be repeated.
综上所述,本申请实施例提供的通信连接的监测方法,上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机 写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字,并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。To sum up, in the communication connection monitoring method provided by the embodiment of the present application, the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
请参考图5,图5是本申请实施例提供的一种通信连接的监测装置的结构框图。该通信连接的监测装置500可以集成在图1示出的治疗系统100中的上位机101中。该通信连接的监测装置500可以包括:Please refer to FIG. 5 , which is a structural block diagram of a communication connection monitoring apparatus provided by an embodiment of the present application. The communicatively connected monitoring device 500 may be integrated into the upper computer 101 in the treatment system 100 shown in FIG. 1 . The communicatively connected monitoring device 500 may include:
写入模块501,用于在上位机与下位机建立通信连接后,周期性的向下位机写入心跳数字,且每次向下位机写入的心跳数字不同。The writing module 501 is used for periodically writing heartbeat numbers to the lower computer after the upper computer establishes a communication connection with the lower computer, and the heartbeat numbers written to the lower computer are different each time.
第一确定模块502,用于若上位机至少一次向下位机写入心跳数字失败,则确定上位机与下位机之间的通信连接异常。The first determination module 502 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the upper computer fails to write the heartbeat number to the lower computer at least once.
其中,该心跳数字用于供下位机进行周期性的读取,以使下位机在连续多次读取到相同的心跳数字后,确定下位机与上位机之间的通信连接异常。The heartbeat number is used for periodic reading by the lower computer, so that the lower computer determines that the communication connection between the lower computer and the upper computer is abnormal after reading the same heartbeat number several times in succession.
可选的,如图5所示,该通信连接的监测装置500还可以包括:Optionally, as shown in FIG. 5 , the monitoring device 500 of the communication connection may further include:
接收模块503,用于在每次向下位机写入心跳数字之后,接收下位机发送的反馈标识。该反馈标识用于指示上位机向下位机写入心跳数字是否成功。The receiving module 503 is configured to receive the feedback identifier sent by the lower computer after each heartbeat number is written to the lower computer. The feedback flag is used to indicate whether the upper computer successfully writes the heartbeat number to the lower computer.
可选的,如图5所示,该通信连接的监测装置500还可以包括:Optionally, as shown in FIG. 5 , the monitoring device 500 of the communication connection may further include:
第三确定模块504,用于若确定出反馈标识为用于指示上位机向下位机写入心跳数字成功的标识,则确定上位机与下位机之间的通信连接正常。The third determination module 504 is configured to determine that the communication connection between the upper computer and the lower computer is normal if it is determined that the feedback identifier is an identifier used to indicate that the upper computer successfully writes the heartbeat number to the lower computer.
可选的,如图5所示,该通信连接的监测装置500还可以包括:Optionally, as shown in FIG. 5 , the monitoring device 500 of the communication connection may further include:
第四确定模块505,用于若确定出反馈标识为用于指示上位机向下位机写入心跳数字失败的标识,则确定本次向下位机写入心跳数字失败。The fourth determination module 505 is configured to determine that the writing of the heartbeat number to the lower computer this time fails if the feedback identifier is determined to be an identifier for indicating that the upper computer fails to write the heartbeat number to the lower computer.
可选的,该通信连接的检测装置还可以包括:Optionally, the detection device for the communication connection may further include:
检查模块,用于在每次向下位机写入心跳数字之前,检查与下位机是否成功建立通信连接;若检查出与下位机成功建立通信连接,执行向下位机写入心跳数字的操作;若检查出未与下位机建立通信连接,确定本次向下位机写入心跳数字失败。The checking module is used to check whether the communication connection with the lower computer is successfully established before each writing the heartbeat number to the lower computer; It is checked that the communication connection with the lower computer is not established, and it is determined that the writing of the heartbeat number to the lower computer this time fails.
可选的,上位机通过中间件与下位机通信连接,该接收模块503,用于在上位机通过中间件每次向下位机写入心跳数字之后,接收中间件发送的反馈标识,中间件用于在每次向下位机写入心跳数字后,生成反馈标识;Optionally, the upper computer is connected to the lower computer for communication through the middleware, and the receiving module 503 is used to receive the feedback identifier sent by the middleware after the upper computer writes the heartbeat number to the lower computer through the middleware each time, and the middleware uses After each heartbeat number is written to the lower computer, a feedback identification is generated;
可选的,该检查模块,用于通过中间件检查与下位机是否成功建立通信连接。Optionally, the checking module is used to check whether the communication connection with the lower computer is successfully established through the middleware.
可选的,该第一确定模块502,用于若上位机连续多次向下位机写入心跳数字失败,则确定上位机与下位机之间的通信连接异常。Optionally, the first determining module 502 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the upper computer fails to write the heartbeat number to the lower computer several times in a row.
可选的,如图5所示,该通信连接的监测装置500还可以包括:Optionally, as shown in FIG. 5 , the monitoring device 500 of the communication connection may further include:
输出模块506,用于在确定上位机与下位机之间的通信连接异常后,输出提示信息。The output module 506 is configured to output prompt information after it is determined that the communication connection between the upper computer and the lower computer is abnormal.
可选的,写入模块501,用于周期性的向下位机的控制器写入心跳数字。Optionally, the writing module 501 is used to periodically write the heartbeat number to the controller of the lower computer.
可选的,上位机周期性的向下位机写入的心跳数字呈等差数列或等比数列排列。Optionally, the heartbeat numbers periodically written by the upper computer to the lower computer are arranged in an arithmetic progression or an arithmetic progression.
可选的,上位机向下位机写入心跳数字的周期时长,小于或等于下位机读取心跳数字的周期时长。Optionally, the period length of the upper computer writing the heartbeat number to the lower computer is less than or equal to the period length of the lower computer reading the heartbeat number.
综上所述,本申请实施例提供的通信连接的监测装置,上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字,并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。To sum up, in the monitoring device for communication connection provided by the embodiment of the present application, the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
请参考图6,图6是本申请实施例提供的另一种通信连接的监测装置的结构框图。该通信连接的监测装置600可以集成在图1示出的治疗系统100中的下位机102中。该通信连接的监测装置500可以包括:Please refer to FIG. 6. FIG. 6 is a structural block diagram of another communication connection monitoring apparatus provided by an embodiment of the present application. The communicatively connected monitoring device 600 may be integrated into the lower computer 102 in the treatment system 100 shown in FIG. 1 . The communicatively connected monitoring device 500 may include:
读取模块601,用于在下位机与上位机建立通信连接后,周期性的读取上位机中写入的心跳数字。该心跳数字由上位机周期性写入,且上位机每次向下位 机写入的心跳数字不同。The reading module 601 is used for periodically reading the heartbeat number written in the upper computer after the lower computer establishes a communication connection with the upper computer. The heartbeat number is written by the host computer periodically, and the heartbeat number written by the host computer to the host computer is different each time.
第二确定模块602,用于若下位机连续至少两次读取到的心跳数字均相同,则确定上位机与下位机之间的通信连接异常。The second determination module 602 is configured to determine that the communication connection between the upper computer and the lower computer is abnormal if the heartbeat numbers read by the lower computer at least twice in a row are the same.
可选的,如图6所示,该通信连接的监测装置600还可以包括:Optionally, as shown in FIG. 6 , the monitoring device 600 of the communication connection may further include:
第五确定模块603,用于若下位机当前读取的心跳数字与上一次读取的心跳数字不相同,则确定与上位机之间的通信连接正常。The fifth determination module 603 is configured to determine that the communication connection with the upper computer is normal if the heartbeat number currently read by the lower computer is different from the heartbeat number read last time.
可选的,该第二确定模块602,用于若下位机当前读取的心跳数字与上一次读取的心跳数字相同,则继续读取至少一次心跳数字,当每次读取的心跳数字均与上一次读取的心跳数字相同时,确定上位机与下位机之间的通信连接异常。Optionally, this second determination module 602 is used for if the heartbeat number currently read by the lower computer is the same as the heartbeat number read last time, then continue to read the heartbeat number at least once, when the heartbeat number read every time is equal to When the heartbeat number read last time is the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
可选的,读取模块601,用于周期性的从下位机的控制器读取上位机写入的心跳数字。Optionally, the reading module 601 is configured to periodically read the heartbeat number written by the upper computer from the controller of the lower computer.
可选的,如图6所示,该通信连接的监测装置600还可以包括:Optionally, as shown in FIG. 6 , the monitoring device 600 of the communication connection may further include:
控制模块604,用于在确定上位机与下位机之间的通信连接异常后,控制放疗设备发出报警信号,并控制放疗设备停止工作。The control module 604 is configured to control the radiotherapy equipment to send an alarm signal and stop the operation of the radiotherapy equipment after it is determined that the communication connection between the upper computer and the lower computer is abnormal.
综上所述,本申请实施例提供的通信连接的监测装置,上位机能够周期性的向下位机写入心跳数字,且该上位机至少一次向下位机写入心跳数字失败后,该上位机即可确定出其与下位机之间通信连接异常。由于上位机每次向下位机写入的心跳数字不同,因此该下位机可以周期性的读取上位机写入的心跳数字,并在连接至少两次读取到相同的心跳数字后,该下位机即可确定出其与上位机之间的通信连接异常。如此,通过该通信连接的监测方法可以保证在医疗系统工作时,上位机能够实时监测其与下位机之间的通信连接是否正常,下位机也能够实时监测其与上位机之间的通信连接是否正常,保证采用该医疗系统对患者进行诊断或治疗时的安全性较高。To sum up, in the monitoring device for communication connection provided by the embodiment of the present application, the host computer can periodically write the heartbeat number to the host computer, and after the host computer fails to write the heartbeat number to the host computer at least once, the host computer fails to write the heartbeat number to the host computer at least once. It can be determined that the communication connection between it and the lower computer is abnormal. Since the heartbeat number written by the host computer to the host computer is different each time, the host computer can periodically read the heartbeat number written by the host computer, and after the connection reads the same heartbeat number twice at least, the host computer can read the heartbeat number written by the host computer periodically. The computer can determine that the communication connection between it and the upper computer is abnormal. In this way, the monitoring method of the communication connection can ensure that when the medical system is working, the upper computer can monitor in real time whether the communication connection between it and the lower computer is normal, and the lower computer can also monitor in real time whether the communication connection between it and the upper computer is normal. It is normal to ensure that the medical system is used to diagnose or treat patients with high safety.
本申请实施例还提供了一种医疗系统,该医疗系统的结构可以参考图1。该医疗系统100可以包括:上位机101和下位机102。图5示出的通信连接的监测装置500可以集成在该上位机101中,图6示出的通信连接的监测装置可以集成在该下位机102中。The embodiment of the present application also provides a medical system, and the structure of the medical system may refer to FIG. 1 . The medical system 100 may include: an upper computer 101 and a lower computer 102 . The monitoring device 500 for communication connection shown in FIG. 5 may be integrated in the upper computer 101 , and the monitoring device for communication connection shown in FIG. 6 may be integrated in the lower computer 102 .
示例的,该上位机可以包括:第一处理器,以及用于存储该第一处理器的可执行指令的第一存储器。其中,该第一处理器被配置为执行图2或图4示出 的通信连接的监测方法。Exemplarily, the host computer may include: a first processor, and a first memory for storing executable instructions of the first processor. Wherein, the first processor is configured to perform the monitoring method of the communication connection shown in FIG. 2 or FIG. 4 .
该下位机可以包括:第二处理器,以及用于存储该第二处理器的可执行指令的第二存储器。其中,该第二处理器被配置为执行图3或图4示出的通信连接的监测方法。The lower computer may include: a second processor, and a second memory for storing executable instructions of the second processor. Wherein, the second processor is configured to execute the monitoring method of the communication connection shown in FIG. 3 or FIG. 4 .
可选的,该医疗系统还包括:放疗设备,该放疗设备具有报警蜂鸣器。该医疗系统中的下位机被配置为:在确定出上位机与下位机之间的通信连接异常后,控制该放疗设备的报警蜂鸣器发出报警音频。Optionally, the medical system further includes: radiotherapy equipment, the radiotherapy equipment has an alarm buzzer. The lower computer in the medical system is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, the alarm buzzer that controls the radiotherapy equipment emits an alarm sound.
可选的,该放疗设备还具有操作面板。该医疗系统中的下位机被配置为:在确定出上位机与下位机之间的通信连接异常后,控制该放疗设备的操作面板中的故障报警灯点亮。Optionally, the radiotherapy equipment also has an operation panel. The lower computer in the medical system is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, the fault alarm light in the operation panel of the radiotherapy equipment is controlled to light up.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and module described above can refer to the corresponding process in the foregoing method embodiments, which is not repeated here.
在实际应用中,本实施例中各个模块均可以由通信连接的监测装置上的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)和调制解调器等器件实现等器件实现。In practical applications, each module in this embodiment can be composed of a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA) on the monitoring device that is communicatively connected. ) and device implementations such as modems.
本申请实施例还提供了一种计算机可读存储介质。该计算机可读存储介质中存储有指令,当该计算机可读存储介质在处理组件上运行时,使得该处理组件执行图2、图3或图4示出的通信连接的监测方法。Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores instructions that, when the computer-readable storage medium runs on the processing component, cause the processing component to perform the communication connection monitoring method shown in FIG. 2 , FIG. 3 or FIG. 4 .
在本申请中,术语“第一”和“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“多个”指两个或两个以上,除非另有明确的限定。In this application, the terms "first" and "second" are used for descriptive purposes only, and should not be construed to indicate or imply relative importance. The term "plurality" refers to two or more, unless expressly limited otherwise.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的可选的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请 的保护范围之内。The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of the present application. within the scope of protection.

Claims (20)

  1. 一种通信连接的监测方法,其特征在于,所述方法应用于上位机,所述方法包括:A method for monitoring communication connection, characterized in that the method is applied to a host computer, and the method comprises:
    在所述上位机与下位机建立通信连接后,周期性的向所述下位机写入心跳数字,且每次向所述下位机写入的心跳数字不同;After the upper computer and the lower computer establish a communication connection, the heartbeat numbers are periodically written to the lower computer, and the heartbeat numbers written to the lower computer are different each time;
    若所述上位机至少一次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常;If the upper computer fails to write the heartbeat number to the lower computer at least once, it is determined that the communication connection between the upper computer and the lower computer is abnormal;
    其中,所述心跳数字用于供所述下位机进行周期性的读取,以使所述下位机在连续多次读取到相同的心跳数字后,确定所述下位机与所述上位机之间的通信连接异常。The heartbeat number is used for periodic reading by the lower computer, so that after the lower computer reads the same heartbeat number several times in a row, it determines the relationship between the lower computer and the upper computer. The communication connection between the two is abnormal.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在每次向所述下位机写入心跳数字之后,接收所述下位机发送的反馈标识,所述反馈标识用于指示所述上位机向所述下位机写入心跳数字是否成功。After each heartbeat number is written to the lower computer, a feedback identifier sent by the lower computer is received, and the feedback identifier is used to indicate whether the upper computer succeeds in writing the heartbeat number to the lower computer.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若确定出所述反馈标识为用于指示所述上位机向所述下位机写入心跳数字成功的标识,则确定所述上位机与所述下位机之间的通信连接正常。If it is determined that the feedback identifier is an identifier used to instruct the upper computer to successfully write the heartbeat number to the lower computer, it is determined that the communication connection between the upper computer and the lower computer is normal.
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若确定出所述反馈标识为用于指示所述上位机向所述下位机写入心跳数字失败的标识,则确定本次向所述下位机写入心跳数字失败。If it is determined that the feedback identifier is an identifier used to indicate that the upper computer fails to write the heartbeat number to the lower computer, it is determined that writing the heartbeat number to the lower computer this time fails.
  5. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    在每次向所述下位机写入心跳数字之前,检查与所述下位机是否成功建立通信连接;Before writing the heartbeat number to the lower computer each time, check whether the communication connection is successfully established with the lower computer;
    若检查出与所述下位机成功建立通信连接,执行向所述下位机写入心跳数字的操作;If it is checked that the communication connection is successfully established with the lower computer, the operation of writing the heartbeat number to the lower computer is performed;
    若检查出未与所述下位机建立通信连接,确定本次向所述下位机写入心跳 数字失败。If it is checked that the communication connection is not established with the lower computer, it is determined that writing the heartbeat number to the lower computer this time fails.
  6. 根据权利要求5所述的方法,其特征在于,所述上位机通过中间件与所述下位机通信连接,在每次向所述下位机写入心跳数字之后,接收所述下位机发送的反馈标识,包括:The method according to claim 5, wherein the upper computer is connected to the lower computer through middleware for communication, and after each heartbeat number is written to the lower computer, the feedback sent by the lower computer is received. identification, including:
    在所述上位机通过所述中间件每次向所述下位机写入心跳数字之后,接收所述中间件发送的反馈标识,所述中间件用于在每次向所述下位机写入心跳数字后,生成所述反馈标识;After the upper computer writes the heartbeat number to the lower computer through the middleware each time, it receives the feedback identifier sent by the middleware, and the middleware is used to write the heartbeat to the lower computer every time. After digitizing, generating the feedback identification;
    所述检查与所述下位机是否成功建立通信连接,包括:The checking whether a communication connection is successfully established with the lower computer includes:
    通过所述中间件检查与所述下位机是否成功建立通信连接。Check whether the communication connection with the lower computer is successfully established through the middleware.
  7. 根据权利要求1至6任一所述的方法,其特征在于,若所述上位机至少一次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常,包括:The method according to any one of claims 1 to 6, wherein, if the upper computer fails to write the heartbeat number to the lower computer at least once, determining the communication between the upper computer and the lower computer Connection exceptions, including:
    若所述上位机连续多次向所述下位机写入心跳数字失败,则确定所述上位机与所述下位机之间的通信连接异常。If the upper computer fails to write the heartbeat number to the lower computer several times in succession, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, wherein the method further comprises:
    在确定所述上位机与所述下位机之间的通信连接异常后,输出提示信息。After it is determined that the communication connection between the upper computer and the lower computer is abnormal, prompt information is output.
  9. 根据权利要求1至6任一所述的方法,其特征在于,所述周期性的向所述下位机写入心跳数字,包括:The method according to any one of claims 1 to 6, wherein the periodically writing heartbeat numbers to the lower computer comprises:
    周期性的向所述下位机的控制器写入心跳数字。Periodically write the heartbeat number to the controller of the lower computer.
  10. 根据权利要求1至6任一所述的方法,其特征在于,所述上位机周期性的向所述下位机写入的心跳数字呈等差数列或等比数列排列。The method according to any one of claims 1 to 6, wherein the heartbeat numbers periodically written by the upper computer to the lower computer are arranged in an arithmetic progression or an arithmetic progression.
  11. 根据权利要求1至6任一所述的方法,其特征在于,所述上位机向所述下位机写入心跳数字的周期时长,小于或等于所述下位机读取心跳数字的周期时长。The method according to any one of claims 1 to 6, characterized in that, the period length of the upper computer writing the heartbeat numbers to the lower computer is less than or equal to the period length of the lower computer reading the heartbeat numbers.
  12. 一种通信连接的监测方法,其特征在于,所述方法应用于下位机,所述方法包括:A method for monitoring communication connection, characterized in that the method is applied to a lower computer, and the method comprises:
    在所述下位机与上位机建立通信连接后,周期性的读取所述上位机写入的心跳数字,所述心跳数字由所述上位机周期性写入,且所述上位机每次向所述下位机写入的心跳数字不同;After the lower computer establishes a communication connection with the upper computer, the heartbeat number written by the upper computer is periodically read, and the heartbeat number is periodically written by the upper computer, and the upper computer sends a message to the upper computer every time. The heartbeat numbers written by the lower computer are different;
    若所述下位机连续至少两次读取到的心跳数字均相同,则确定所述上位机与所述下位机之间的通信连接异常。If the heartbeat numbers read by the lower computer at least twice in a row are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method of claim 12, wherein the method further comprises:
    若所述下位机当前读取的心跳数字与上一次读取的心跳数字不相同,则确定与所述上位机之间的通信连接正常。If the heartbeat number currently read by the lower computer is different from the heartbeat number read last time, it is determined that the communication connection with the upper computer is normal.
  14. 根据权利要求12所述的方法,其特征在于,若所述下位机连续至少两次读取到的心跳数字均相同,则确定所述上位机与所述下位机之间的通信连接异常,包括:The method according to claim 12, wherein if the heartbeat numbers read by the lower computer at least twice in a row are the same, it is determined that the communication connection between the upper computer and the lower computer is abnormal, comprising: :
    若所述下位机当前读取的心跳数字与上一次读取的心跳数字相同,则继续读取至少一次心跳数字,当每次读取的心跳数字均与所述上一次读取的心跳数字相同时,确定所述上位机与所述下位机之间的通信连接异常。If the heartbeat number currently read by the lower computer is the same as the heartbeat number read last time, then continue to read the heartbeat number at least once, when the heartbeat number read each time is the same as the heartbeat number read last time At the same time, it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  15. 根据权利要求12所述的方法,其特征在于,所述周期性的读取所述上位机写入的心跳数字,包括:The method according to claim 12, wherein the periodical reading of the heartbeat number written by the host computer comprises:
    周期性的从所述下位机的控制器读取所述上位机写入的心跳数字。Periodically read the heartbeat number written by the upper computer from the controller of the lower computer.
  16. 根据权利要求12至15任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 12 to 15, wherein the method further comprises:
    在确定所述上位机与所述下位机之间的通信连接异常后,控制放疗设备发出报警信号,并控制所述放疗设备停止工作。After it is determined that the communication connection between the upper computer and the lower computer is abnormal, the radiotherapy equipment is controlled to issue an alarm signal, and the radiotherapy equipment is controlled to stop working.
  17. 一种医疗系统,其特征在于,所述医疗系统包括:上位机和下位机;A medical system, characterized in that, the medical system comprises: an upper computer and a lower computer;
    所述上位机包括:第一处理器,以及用于存储所述第一处理器的可执行指令的第一存储器,其中,所述第一处理器被配置为执行权利要求1至11任一所述的通信连接的监测方法;The host computer includes: a first processor, and a first memory for storing executable instructions of the first processor, wherein the first processor is configured to execute any one of claims 1 to 11. the monitoring method of the communication connection described;
    所述下位机包括:第二处理器,以及用于存储所述第二处理器的可执行指令的第二存储器,其中,所述第二处理器被配置为执行权利要求12至16任一所述的通信连接的监测方法。The lower computer includes: a second processor, and a second memory for storing executable instructions of the second processor, wherein the second processor is configured to execute any one of claims 12 to 16. The monitoring method of the communication connection described above.
  18. 根据权利要求17所述的医疗系统,其特征在于,所述医疗系统还包括:放疗设备,所述放疗设备具有报警蜂鸣器;The medical system according to claim 17, wherein the medical system further comprises: radiotherapy equipment, the radiotherapy equipment has an alarm buzzer;
    所述下位机被配置为:在确定出所述上位机与所述下位机之间的通信连接异常后,控制所述报警蜂鸣器发出报警音频。The lower computer is configured to: after it is determined that the communication connection between the upper computer and the lower computer is abnormal, control the alarm buzzer to emit an alarm sound.
  19. 根据权利要求18所述的医疗系统,其特征在于,所述放疗设备还具有操作面板;The medical system according to claim 18, wherein the radiotherapy equipment further has an operation panel;
    所述下位机被配置为:在确定出所述上位机与所述下位机之间的通信连接异常后,控制所述操作面板中的故障报警灯点亮。The lower computer is configured to control the fault alarm light in the operation panel to light up after it is determined that the communication connection between the upper computer and the lower computer is abnormal.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述可读存储介质在处理组件上运行时,使得所述处理组件执行如权利要求1至16任一所述的通信连接的监测方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions that, when the readable storage medium runs on a processing component, cause the processing component to perform the execution of claims 1 to 16 The monitoring method of any one of the described communication connections.
PCT/CN2020/140319 2020-12-28 2020-12-28 Method for monitoring communication connection, medical system and storage medium WO2022140961A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080108272.7A CN116669810A (en) 2020-12-28 2020-12-28 Communication connection monitoring method, medical system and storage medium
PCT/CN2020/140319 WO2022140961A1 (en) 2020-12-28 2020-12-28 Method for monitoring communication connection, medical system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140319 WO2022140961A1 (en) 2020-12-28 2020-12-28 Method for monitoring communication connection, medical system and storage medium

Publications (1)

Publication Number Publication Date
WO2022140961A1 true WO2022140961A1 (en) 2022-07-07

Family

ID=82258969

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140319 WO2022140961A1 (en) 2020-12-28 2020-12-28 Method for monitoring communication connection, medical system and storage medium

Country Status (2)

Country Link
CN (1) CN116669810A (en)
WO (1) WO2022140961A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120143957A1 (en) * 2010-12-03 2012-06-07 International Business Machines Corporation Inter-Node Communication Scheme for Node Status Sharing
CN108446250A (en) * 2018-03-12 2018-08-24 上海燊星机器人科技有限公司 A kind of method communicated between multi -CPU
CN108964977A (en) * 2018-06-05 2018-12-07 平安科技(深圳)有限公司 Node abnormality eliminating method and system, storage medium and electronic equipment
CN109743399A (en) * 2019-01-14 2019-05-10 浙江外国语学院 Network data transmission method and system inside and outside a kind of medical center based on complicated multi-task scheduling
CN110111551A (en) * 2019-05-07 2019-08-09 南京富岛信息工程有限公司 Multichannel intelligent anti-running system, data communications method and communication data frame format
CN111541715A (en) * 2020-05-11 2020-08-14 青岛海信网络科技股份有限公司 Method and device for improving communication between traffic signal controller and upper computer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120143957A1 (en) * 2010-12-03 2012-06-07 International Business Machines Corporation Inter-Node Communication Scheme for Node Status Sharing
CN108446250A (en) * 2018-03-12 2018-08-24 上海燊星机器人科技有限公司 A kind of method communicated between multi -CPU
CN108964977A (en) * 2018-06-05 2018-12-07 平安科技(深圳)有限公司 Node abnormality eliminating method and system, storage medium and electronic equipment
CN109743399A (en) * 2019-01-14 2019-05-10 浙江外国语学院 Network data transmission method and system inside and outside a kind of medical center based on complicated multi-task scheduling
CN110111551A (en) * 2019-05-07 2019-08-09 南京富岛信息工程有限公司 Multichannel intelligent anti-running system, data communications method and communication data frame format
CN111541715A (en) * 2020-05-11 2020-08-14 青岛海信网络科技股份有限公司 Method and device for improving communication between traffic signal controller and upper computer

Also Published As

Publication number Publication date
CN116669810A (en) 2023-08-29

Similar Documents

Publication Publication Date Title
TWI417891B (en) Memory mirroring apparatus and method
US8108582B2 (en) Notifying asynchronous events to a host of a data storage system and apparatus for the same
JP2007109238A (en) System and method for logging recoverable error
JP5998764B2 (en) Information processing apparatus, log output method, and log output program
CN109683970A (en) A kind of amending method of server FRU information, modification system and relevant apparatus
US7673178B2 (en) Break and optional hold on failure
JP4836732B2 (en) Information processing device
WO2022140961A1 (en) Method for monitoring communication connection, medical system and storage medium
JP6504610B2 (en) Processing device, method and program
CN109388563A (en) Safe and reliable nuclear safe level DCS software execution sequence monitoring method and system
US20150067252A1 (en) Communicating outstanding maintenance tasks to improve disk data integrity
TWI529525B (en) System and method for handling system failure
CN111124833A (en) Method, device, equipment and storage medium for controlling gpio port
CN114328138B (en) Data display method and device of server, server and storage medium
JPS62249259A (en) Computer system
JP2014146110A (en) Information processing device, method for diagnosing error detection function, and computer program
CN113821387B (en) KVM function keep-alive test method, device, equipment and medium
JP5842655B2 (en) Information processing apparatus, program, and error processing method
JP2023177118A (en) Abnormal log acquisition device, abnormal log storage method, and program
JP2844361B2 (en) Error recovery processing method
JPH076103A (en) Fault processing system for input/output channel
JP3241662B2 (en) Diagnostic control method and program recording medium thereof
JPH05134938A (en) Memory controller
CN115168097A (en) Method, device, equipment and medium for automatically tracing controlled condition of source port in abnormal condition
JPH0253143A (en) Pseudo fault generating system

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202080108272.7

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20967313

Country of ref document: EP

Kind code of ref document: A1