Remote medical system and method
By utilizing the cross-network transmission of Ethercat messages and the preprocessing of custom protocol frames in the telemedicine system, the problem of low-cost and reliable transmission of the remote surgery system on the Internet is solved, and low-cost and reliable telemedicine data interaction and Improved system reliability.
Patent Information
- Application Number
- PCT/CN2024/085550
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-13
- Filing Date
- 2024-04-02
- Publication Date
- 2024-10-17
AI Technical Summary
Existing remote surgery systems require dedicated networks for communication, resulting in high costs and long preparation cycles, making it difficult to use the widely available Internet to perform low-cost and reliable remote surgery.
The first remote host receives the Ethercat message sent by the first master station, discards the Ethernet frame header, encapsulates it into a UDP message, and transmits it through the Internet. After the second remote host receives it, it re-encapsulates it into an Ethercat message to realize the Ethercat message. For cross-network transmission, custom protocol frames are used for packet preprocessing to improve reliability.
It realizes low-cost and reliable data interaction using the Internet, reduces network bandwidth occupation, and improves the reliability and real-time performance of data transmission. It is suitable for two-way communication of telemedicine systems.
Smart Images

Figure CN2024085550_17102024_PF_FP_ABST
Abstract
Description
Telemedicine system and method thereof
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 13, 2023, with application number 202310431600.2 and application name “Telemedicine System and Method Thereof”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of medical devices, and in particular to a telemedicine system and method thereof. Background Art
[0003] Minimally invasive surgery refers to a procedure performed inside the human body using modern medical devices such as laparoscopes and thoracoscopes. Compared to traditional surgical methods, minimally invasive surgery offers advantages such as less trauma, less pain, and faster recovery.
[0004] With technological advancements, minimally invasive surgical robotic systems have matured and are now widely used. A surgical robotic system consists of a master console and slave operating devices. The slave operating devices contain multiple medical instruments with end-use instruments, including imaging instruments with image end-use instruments and surgical instruments with manipulation end-use instruments. The master console includes a display and an operating unit. The surgeon manipulates the operating unit to control the imaging or surgical instruments, within the field of view provided by the imaging instrument, as displayed on the monitor.
[0005] Remote surgery has become increasingly popular in recent years, allowing doctors to perform surgeries in real time on patients thousands of kilometers away. This effectively alleviates the uneven distribution of medical resources across regions and reduces both the time and financial costs for both doctors and patients. To ensure the reliable implementation of remote surgery, operators typically need to establish a dedicated network to enable communication between the master console and slave devices. However, this process is time-consuming and expensive. Therefore, there is an urgent need for a method to reliably perform remote surgery using the now widely available Internet.
[0006] Summary of the Invention
[0007] Based on this, it is necessary to provide a telemedicine system and a control method thereof that can realize remote surgery at low cost and reliably.
[0008] The present application provides a telemedicine system, comprising:
[0009] A first surgical device, including a first master station;
[0010] a second surgical device, including a second master station;
[0011] A first remote host is connected to the first master station via industrial Ethernet;
[0012] and a second remote host connected to the second master station via industrial Ethernet and remotely connected to the first remote host via the Internet;
[0013] The first remote host is configured to:
[0014] receiving an Ethercat message sent by the first master station, discarding an Ethernet frame header of the Ethercat message and obtaining an Ethercat data frame;
[0015] and encapsulating the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sending the UDP message to the second remote host, wherein the custom protocol frame writes a sending timestamp of the UDP message;
[0016] The second remote host is configured to:
[0017] Receive the UDP message, discard the UDP header of the UDP message and obtain a data packet, wherein the data packet includes the custom protocol frame and the Ethercat data frame;
[0018] obtaining a valid data packet from the data packet based on the sending timestamp;
[0019] and discarding the custom protocol frame of the valid data packet, obtaining the Ethercat data frame of the valid data packet, encapsulating the Ethercat data frame of the valid data packet to generate a target Ethercat message including a target Ethernet frame header, and sending the target Ethercat message to the second master station.
[0020] The present application also provides a method applied to a telemedicine system, the telemedicine system comprising:
[0021] A first surgical device, including a first master station;
[0022] a second surgical device, including a second master station;
[0023] A first remote host is connected to the first master station via industrial Ethernet;
[0024] and a second remote host connected to the second master station via industrial Ethernet and remotely connected to the first remote host via the Internet;
[0025] The control method includes:
[0026] The first remote host receives the Ethercat message sent by the first master station, discards the Ethernet frame header of the Ethercat message and obtains an Ethercat data frame;
[0027] The first remote host encapsulates the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sends the UDP message to the second remote host, where the custom protocol frame writes a sending timestamp of the UDP message;
[0028] The second remote host receives the UDP message, discards the UDP header of the UDP message and obtains a data packet, wherein the data packet includes the custom protocol frame and the Ethercat data frame;
[0029] The second remote host obtains a valid data packet from the data packet based on the sending timestamp;
[0030] The second remote host discards the custom protocol frame of the valid data packet, obtains the Ethercat data frame of the valid data packet, encapsulates the Ethercat data frame of the valid data packet to generate a target Ethercat message including a target Ethernet frame header, and sends the target Ethercat message to the second master station.
[0031] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to be loaded by a processor and executed to implement the steps of the method described in any one of the above embodiments.
[0032] The present application also provides a computer program product, comprising computer instructions, which, when executed on a computer, enable the computer to execute the method described in any one of the above embodiments.
[0033] The telemedicine system and method of the present application have the following beneficial effects:
[0034] The first remote host is used to convert the Ethercat message sent by the first main station into a UDP message for Internet transmission between the first remote host and the second remote host, and the second remote host is used to convert the received UDP message back into an Ethercat message for transmission between the second remote host and the second main station, so that low-cost data interaction can be carried out using the Internet; and by encapsulating a custom protocol frame with a sending timestamp in the UDP message, and using the custom protocol frame to pre-process the obtained data packet including the custom protocol and Ethercat data frame to obtain a valid data packet, the reliability of subsequent further processing based on the valid data packet can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] FIG1 is a schematic diagram showing the principles of an embodiment of a telemedicine system of the present application;
[0036] FIG2 is a schematic diagram of a message processing process according to an embodiment of the present invention;
[0037] FIG3 is a flow chart of an embodiment of the method of the present application;
[0038] FIG4 is a flow chart of another embodiment of the method of the present application;
[0039] FIG5 is a flow chart of another embodiment of the method of the present application;
[0040] FIG6 is a flow chart of another embodiment of the method of the present application;
[0041] FIG7 is a schematic structural diagram of an embodiment of a telemedicine system of the present application.
[0042] FIG8 is a flow chart of an embodiment of the method of the present application;
[0043] FIG9 is a flow chart of another embodiment of the method of the present application;
[0044] FIG10 is a flow chart of another embodiment of the method of the present application;
[0045] FIG11 is a schematic diagram showing the principle of the control device of the telemedicine system of the present application. DETAILED DESCRIPTION
[0046] To facilitate understanding of the present application, a more comprehensive description of the present application will be provided below with reference to the accompanying drawings. The accompanying drawings illustrate preferred embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the disclosure of the present application.
[0047] It should be noted that when an element is referred to as being "disposed on" another element, it may be directly on the other element or there may also be an element centered. When an element is considered to be "connected" to another element, it may be directly connected to the other element or there may be an element centered at the same time. When an element is considered to be "coupled" to another element, it may be directly coupled to the other element or there may be an element centered at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this application are for illustrative purposes only and do not represent the only implementation method. The terms "distal end" and "proximal end" used in this application are used as directional words, which are commonly used terms in the field of interventional medical devices, where "distal end" refers to the end close to the patient during surgery and "proximal end" refers to the end away from the patient during surgery. The terms "first / second" and the like used in this application refer to a component and a class of two or more components with common characteristics.
[0048] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The term "and / or" used in this application includes any and all combinations of one or more related listed items. The term "each" used in this application includes one or more. The term "plurality" used in this application refers to two or more.
[0049] This application provides a method for achieving low-cost and reliable two-way communication between two devices. For example, this method can be applied to a telemedicine system. For ease of understanding, this application uses the application of this method to a telemedicine system as an example for explanation.
[0050] In some embodiments, the telemedicine system includes a first surgical device and a second surgical device, and the two devices can utilize this method to achieve unidirectional and / or bidirectional communication. Because the data exchange process from the first surgical device to the second surgical device is substantially the same as the data exchange process from the second surgical device to the first surgical device, this application uses the data exchange process from the first surgical device to the second surgical device as an example to illustrate the method.
[0051] Referring to Figure 1 , a first surgical device includes a first master station 110, and a second surgical device includes a second master station 210. Both first and second master stations 110 and 210 can be EtherCAT masters, capable of capturing and processing EtherCAT messages. For example, both first and second master stations 110 and 210 can utilize Beckhoff controllers.
[0052] In order to utilize the aforementioned method, the telemedicine system further includes a first remote host 300 and a second remote host 400. The first remote host 300 can be integrated with the first surgical device or can be independent of the first surgical device; the second remote host 400 can be integrated with the second surgical device or can be independent of the second surgical device.
[0053] The first master station 110 and the first remote host 300 are connected via Industrial Ethernet. The second master station 210 and the second remote host 400 are also connected via Industrial Ethernet. Furthermore, the first remote host 300 and the second remote host 400 are connected via the Internet. At least in this application, the connection via Industrial Ethernet can be considered a local connection, while the connection via the Internet can be considered a remote connection.
[0054] In some embodiments, referring to FIG. 2 and FIG. 3 , the method may include:
[0055] Step S1: The first remote host receives an Ethercat message sent by the first master station, discards the Ethernet frame header of the Ethercat message and obtains an Ethercat data frame.
[0056] Among them, the Ethercat message sent by the first master station 110 is an unprocessed Ethercat message, which can be understood as a source Ethercat message or an initial Ethercat message. Generally, an Ethercat message includes an Ethernet frame header, an Ethercat header and Ethercat data. For the convenience of description, the present application defines the Ethercat header and the Ethercat data together as an Ethercat data frame. After processing in step S1, the Ethercat message discards the Ethernet frame header and only retains the Ethercat data frame. Since the Ethernet frame header is no longer needed in the future, the Ethernet frame header is discarded to avoid occupying network bandwidth. Among them, the Ethernet frame header includes a destination address segment and a source address segment. The destination address segment is written with the physical address of the first remote host 300, and the source address segment is written with the physical address of the first master station 110.
[0057] Step S2: The first remote host encapsulates the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sends the UDP message to the second remote host.
[0058] The UDP header includes a source port segment and a destination port segment. The source port segment contains the communication port of the first remote host 300, and the destination port segment contains the communication port of the second remote host 400. In some embodiments, the communication port of the first remote host 300 and the communication port of the second remote host 400 can be determined based on NAT traversal (Network Address Translation) technology in WebRTC. After determining the two communication ports, the UDP message generated in step S2 can be transparently transmitted between the two ports on the Internet using protocols such as IP, thereby solving the problem that Ethercat messages cannot be transmitted on the Internet.
[0059] The custom protocol frame is written with the sending timestamp of the UDP message, which is written when the UDP message is sent to the second remote host 400. In some embodiments, the custom protocol frame includes 8 bytes.
[0060] In some embodiments, the principle of NAT penetration is briefly described as follows:
[0061] 1. Establishing a persistent connection between the first remote host 300A and the second remote host 400B and the intermediary server S. To simplify the description, in this embodiment, A represents the first remote host 300A, B represents the second remote host, and S represents the intermediary server.
[0062] 2. A initiates a request to S to establish a direct connection with B;
[0063] 3. After receiving A's application, S saves the IP and port of NAT-A, the public network where A is located, and sends it to B, requesting B to send a message to A;
[0064] 4. After receiving S's instruction, B sends a message to NAT-A, instructing NAT-B to open a port for NAT-A, allowing subsequent messages from NAT-A to be received by B. Although B still cannot connect to A at this point, the penetration hole of the second remote host 400B has been opened, and A can connect to device B through NAT-B.
[0065] 5. After B sends the message to NAT-A, it tells S: "I am ready." After S receives the message that B is ready, it notifies A and asks A to send the message to B.
[0066] 6. After receiving S's instruction, A sends a message to NAT-B. Because NAT-B opened a port for A in step 4, the connection is established. Simultaneously, while A is sending the message to B, NAT-A also opens a port to receive B's response. This completes the hole-punching process between A and B, allowing A and B to communicate directly through NAT-A and NAT-B.
[0067] Step S3: The second remote host receives the UDP message, discards the UDP header of the UDP message and obtains the data packet.
[0068] For ease of description, this application defines the custom protocol frame and the Ethercat data frame as a data packet. After the UDP message is received by the second remote host 400, since the subsequent UDP message is no longer applicable to the industrial Ethernet, the UDP header can be discarded and only the data packet to be used can be retained.
[0069] In step S4, the second remote host obtains a valid data packet from the data packet based on the sending timestamp.
[0070] Among them, although UDP messages have various advantages in transmitting on the Internet, their disadvantages are also extremely obvious. For example, there may be a problem of disorder in the transmission of UDP messages on the Internet. Therefore, step S4 can use the sending timestamp of the custom protocol frame to pre-process the obtained data packets. For example, at least the disorder problem can be overcome and valid data packets can be filtered out from the data packets, and the valid data packets at least meet the timing requirements.
[0071] Step S5: The second remote host discards the custom protocol frame of the valid data packet, obtains the Ethercat data frame of the valid data packet, encapsulates the Ethercat data frame of the valid data packet to generate a target Ethercat message including a target Ethernet frame header, and sends the target Ethercat message to the second master station.
[0072] After preprocessing to obtain a valid data packet, the custom protocol frame with the transmission timestamp is no longer used and can be discarded. After discarding the custom protocol frame, only the Ethercat data frame remains in the data packet. The critical data generated by the first surgical device written into the Ethercat data frame remains unchanged, thus providing high reliability. Furthermore, since the second master station 210 still operates on an industrial Ethernet network, the Ethercat data frame sent from the second remote host 400 to the second master station 210 needs to be re-encapsulated into an Ethercat message for transmission over the industrial Ethernet network. The Ethercat message obtained by encapsulating the Ethercat data frame of the valid data packet can be defined as the target Ethercat message.
[0073] The target Ethernet frame header included in the target Ethercat message includes a destination address segment and a source address segment. The destination address segment is written with the physical address of the second master station 210 , and the source address segment is written with the physical address of the second remote host 400 .
[0074] Through the above steps S1 to S5, that is, using the first remote host 300 to convert the Ethercat message sent by the first main station 110 into a UDP message for Internet transmission between the first remote host 300 and the second remote host 400, and using the second remote host 400 to convert the received UDP message back into an Ethercat message for transmission between the second remote host 400 and the second main station 210, low-cost data interaction can be carried out using the Internet; and, by encapsulating a custom protocol frame with a sending timestamp in the UDP message, and using the custom protocol frame to pre-process the obtained data packet including the custom protocol and Ethercat data frame to obtain a valid data packet, the reliability of subsequent further processing based on the valid data packet can be improved; therefore, when this method is applied to a telemedicine system, it has the huge advantages of low cost and reliability.
[0075] The step S4 executed by the second remote host 400 may be implemented in a variety of ways.
[0076] In some embodiments, as shown in FIG4 , step S4 may include:
[0077] Step S411: Initialize the data packet of the UDP message received at the current moment as a valid data packet and obtain the valid data packet.
[0078] In this application, the current moment generally refers to a moment that is currently occurring or has just arrived; the next moment is a future moment, generally referring to the moment that is closest and will soon arrive. This application uses the current moment and the next moment to distinguish the received UDP message to simplify the description of the above method or process.
[0079] In step S411, the data packet corresponding to the UDP message at the current moment (the data packet is obtained by parsing the UDP message at the current moment) is taken as a valid data packet and is obtained for subsequent use.
[0080] Step S412: determining a jitter value between a data packet and a valid data packet of a UDP message received at the next moment based on the sending timestamp and the receiving timestamp.
[0081] In this application, for example, assume that at the sending end, the sending timestamp of the UDP message received at the current moment is st1, and the sending timestamp of the UDP message received at the next moment is st2; and assume that at the receiving end, the receiving timestamp of the UDP message received at the current moment is rt1, and the receiving timestamp of the UDP message received at the next moment is rt2. Since the sending time interval Δts = st1 - st2, and the receiving time interval Δtr = rt1 - rt2 of the UDP messages at these two adjacent moments, the jitter value Δt between the two is Δtr - Δts. The second remote host 400 can obtain the receiving timestamp in real time when receiving the UDP message.
[0082] Among them, since the Internet may have one or more network problems such as network congestion, routing failure, etc., if the interval between UDP messages received at two adjacent moments is sometimes large and sometimes small, it may easily lead to jitter problems such as sometimes fast and sometimes slow when the first surgical device controls the second surgical device to execute motion control instructions. Therefore, the jitter value between the UDP messages received at the two adjacent moments can be determined to overcome this problem.
[0083] Step S413: Determine whether the jitter value reaches a jitter threshold.
[0084] Among them, the jitter threshold of the present application can be used to reflect the requirements of the telemedicine system for the real-time nature of data interaction. For example, the jitter threshold can be used to reflect the maximum tolerance of the telemedicine system for the real-time nature of data interaction. The unit is a time unit, such as 10 to 80 ms. The higher the real-time requirement, the lower the jitter threshold is set. In some embodiments, when the jitter value reaches the jitter threshold, the system may consider that the jitter value is too large and does not meet the usage requirements; when the jitter value does not reach the jitter threshold, the system may consider that the jitter value is small and can be tolerated and thus meet the usage requirements. For example, reaching can include the meaning of greater than, and correspondingly, not reaching can include the meaning of less than or equal to; for another example, reaching can include the meaning of greater than or equal to, and correspondingly, not reaching can include the meaning of less than.
[0085] Step S414: When the jitter value reaches the jitter threshold, the data packet of the UDP message received at the next moment is discarded.
[0086] The data packets of the UDP messages received at the next moment that do not meet the jitter threshold cannot be used because they are intolerable, and thus can be discarded.
[0087] After executing step S414, the method returns to executing step S411. The process of entering step S411 from step S414 can be understood as the end of one process of the method and the re-entry of a new process.
[0088] Step S415: When the jitter value does not reach the jitter threshold, it is determined based on the sending timestamp whether the data packet of the UDP message received at the next moment is later than the valid data packet.
[0089] The jitter value not reaching the jitter threshold is only one of the necessary conditions for whether the data packet of the UDP message received at the next moment meets the usage requirements. In fact, it also needs to meet at least another necessary condition: specifically, its occurrence time sequence should not be earlier than the data packet of the UDP message received at the previous moment (i.e., the current moment). Therefore, the sending timestamps of two UDP messages received at adjacent moments can be used to determine the earlier or later occurrence time sequence between the two.
[0090] Step S416: When the data packet is later than the valid data packet, the data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment.
[0091] It can be seen that in step S416, the data packet of the UDP message received at the next moment is retained instead of being discarded.
[0092] After executing step S416, the process returns to step S411. The process of entering step S11 from step S416 can be understood as retaining the data packet of the UDP message received at the next moment as a valid data packet and acquiring it for subsequent use.
[0093] Step S417: If the data packet is earlier than the valid data packet, the data packet of the UDP message received at the next moment is discarded.
[0094] Among them, the data packets of the UDP message received at the next moment that does not meet the sending timing cannot be used because of the disorder problem, so they can be discarded.
[0095] After executing step S417, the method returns to step S411. The process of entering step S411 from step S417 can be understood as the end of one process of the method and the re-entry of a new process.
[0096] Through the above steps S411 to S417, the data packets of the received UDP messages not only meet the real-time requirements but also meet the sequential requirements, and thus have high reliability when applied to a telemedicine system.
[0097] The above steps S411 to S417 are described below with an example.
[0098] In the first example, assume that the UDP packets sent are packets 1 to 7, and their corresponding data packets are packets 1 to 7; and assume that the order of receiving packets 1 to 7 is: packet 1, packet 2, packet 3, packet 4, packet 6, packet 5, and packet 7. Among them:
[0099] The UDP message received at the current moment is message 1. At this time, its corresponding data packet 1 is initialized as valid data packet 1 and the valid data packet 1 is obtained;
[0100] The next UDP message received is message 2. At this time, if the jitter value between message 2 (or data packet 2) and message 1 (or data packet 1) meets the jitter threshold (that is, the jitter does not reach the jitter threshold s), and it is obvious that message 2 is later than message 1, then message 2 is used as the message at the current moment, and its corresponding data packet 2 is initialized as valid data packet 2 and obtained.
[0101] The next UDP message received is message 3. At this time, if the jitter value between message 3 and message 2 meets the jitter threshold, and it is obvious that message 3 is later than message 2, then message 3 is used as the message at the current moment, and its corresponding data packet 3 is initialized as valid data packet 3 and obtained.
[0102] The next UDP message received is message 4. At this time, if the jitter value between message 4 and message 3 meets the jitter threshold, and it is obvious that message 4 is later than message 3, message 4 is used as the message at the current moment, and its corresponding data packet 4 is initialized as valid data packet 4 and obtained.
[0103] The next UDP message received is message 6. At this time, if the jitter value between message 6 and message 4 does not meet the jitter threshold, data packet 6 corresponding to message 6 is discarded.
[0104] The UDP message received at the current moment is message 5. At this time, its corresponding data packet 5 is initialized as valid data packet 5 and the valid data packet 5 is obtained;
[0105] The UDP message received at the next moment is message 7. At this time, if the jitter value between message 7 and message 5 meets the jitter threshold, and it is obvious that message 7 is later than message 5, then message 7 is used as the message at the current moment, and its corresponding data packet 7 is initialized as valid data packet 7 and the valid data packet 7 is obtained.
[0106] Furthermore, the acquired valid data packets include valid data packets 1, 2, 3, 4, 5, and 7, and data packet 6 is discarded.
[0107] In the second example, assume that messages 1 to 7 are sent in sequence, and their corresponding data packets are data packets 1 to 7; and assume that the receiving order of messages 1 to 7 is: message 2, message 1, message 3, message 4, message 6, message 7, and message 5.
[0108] The UDP message received at the current moment is message 2. At this time, its corresponding data packet 2 is initialized as valid data packet 2 and the valid data packet 2 is obtained;
[0109] The next UDP message received is message 1. At this time, if the jitter value between message 1 and message 2 meets the jitter threshold, and it is obvious that message 1 is earlier than message 2, then data packet 1 corresponding to message 1 is discarded.
[0110] The UDP message received at the current moment is message 3. At this time, its corresponding data packet 3 is initialized as valid data packet 3 and the valid data packet 3 is obtained;
[0111] The next UDP message received is message 4. At this time, if the jitter value between message 4 and message 3 does not meet the jitter threshold, data packet 4 corresponding to message 4 is discarded.
[0112] The UDP message received at the current moment is message 6. At this time, its corresponding data packet 6 is initialized as valid data packet 6 and the valid data packet 6 is obtained;
[0113] The next UDP message received is message 5. At this time, if the jitter value between messages 5 and 6 meets the jitter threshold, and it is obvious that message 5 is earlier than message 6, then data packet 5 corresponding to message 5 is discarded.
[0114] The UDP message received at the current moment is message 7. At this time, its corresponding data packet 7 is initialized as a valid data packet 7 and the valid data packet 7 is obtained.
[0115] Furthermore, the acquired valid data packets include valid data packets 2, 3, 6, and 7, and data packets 1, 4, and 5 are discarded.
[0116] In the first and second examples above, the jitter value between the UDP packets received at two adjacent moments may not reach the jitter threshold, or may reach the jitter threshold. After the processing of the above steps S411 to S417, valid data packets that meet the jitter requirements and timing requirements can be screened out. In one embodiment, it is also possible to first determine whether the sending timestamp of the data packet of the UDP packet at the next moment is later than the sending timestamp of the valid data packet. If it is later, it is also feasible to determine whether the jitter value between the data packet of the UDP packet received at the next moment and the valid data packet reaches the jitter threshold.
[0117] In some embodiments, as shown in FIG5 , step S4 may include:
[0118] Step S421: allocate a buffer area.
[0119] Step S422: Initialize the buffer area.
[0120] Initializing the cache also clears the cache.
[0121] Step S423: Write the data packet of the UDP message currently received into the buffer area.
[0122] Step S424: Based on the sending timestamp and the receiving timestamp, determine the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area.
[0123] Step S425: Determine whether the jitter value reaches a jitter threshold.
[0124] Step S426: When the jitter value reaches the jitter threshold, it is determined based on the sending timestamp whether the data packet of the UDP message received at the next moment is later than the data packet stored in the buffer.
[0125] In step S426, if it is determined that the data packet is later than the data packet stored in the cache, step S427 is executed; if it is determined that the data packet is earlier than the data packet stored in the cache, step S428 is executed.
[0126] Step S427: The data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment. After executing step S427, the process returns to execute step S421.
[0127] Step S428, discard the data packet of the UDP message received at the next moment. After executing step S428, return to execute step S424.
[0128] Step S429: When the jitter value does not reach the jitter threshold, the data packet of the UDP message received at the next moment is written into the buffer area.
[0129] In step S430, based on the transmission timestamp, the data packet with the earlier transmission time stored in the buffer is identified as a valid data packet and the valid data packet is retrieved. After executing step S430, the process returns to step S424. The buffer is primarily used to sort the received out-of-order data packets, and then, based on the sorting within the buffer, the data packet with the earlier transmission time is identified as a valid data packet and retrieved.
[0130] Among them, using the cache area for sorting will inevitably introduce delay, so the size of the cache area should not be too large. It is generally appropriate to correspond to the time range of 2 or 3 data packets. Data packets that have not arrived can be considered as timed-out packets and will usually be discarded to ensure the real-time performance of remote surgery in the telemedicine system.
[0131] The above steps S421 to S430 are mainly described based on the situation that the buffer area can store two data packets, and are described with examples as follows.
[0132] Assume that the UDP messages sent are messages 1 to 8, and their corresponding data packets are packets 1 to 8. Assume that the order in which messages 1 to 8 are received is: message 1, message 2, message 3, message 4, message 6, message 8, message 5, and message 7. [0,0] is used to represent an empty buffer, which contains the size of two data packets.
[0133] The message received at the current moment is message 1. If data packet 1 is written into the buffer [0,0], the buffer is updated to [0, data packet 1].
[0134] The next packet received is packet 2. If the jitter between packet 2 and packet 1 meets the jitter threshold, packet 2 is written to the cache [0, packet 1]. The cache is then updated (including sorting) to [packet 2, packet 1]. At this point, packet 1, which is older, is retrieved, and the cache is updated to [0, packet 2]. The cycles for writing packets to the cache and retrieving packets from the cache are essentially the same. Typically, one thread writes packets to the cache, and another thread retrieves packets from the cache.
[0135] The next packet received is packet 3. If the jitter between packet 3 and packet 2 meets the jitter threshold, packet 3 is written to the buffer [0, packet 2]. The buffer is then updated to [packet 3, packet 2]. At this point, the earlier packet 2 is retrieved, and the buffer is updated to [0, packet 3].
[0136] The next packet received is packet 4. If the jitter between packet 4 and packet 3 meets the jitter threshold, packet 4 is written to the buffer [0, packet 3]. The buffer is then updated to [packet 4, packet 3]. At this point, the earlier packet 3 is retrieved, and the buffer is updated to [0, packet 4].
[0137] The next packet received is packet 6. If the jitter between packet 6 and packet 4 does not meet the jitter threshold, the buffer is initialized to [0, 0], and packet 6 is written into the buffer [0, 0] as the currently received packet 6. The buffer is then updated to [0, packet 6].
[0138] The next packet received is packet 8. If the jitter between packet 8 and packet 6 does not meet the jitter threshold, the buffer is initialized to [0, 0]. That is, the premature packet 6 is discarded, and packet 8 is written into the buffer [0, 0] as the currently received packet 8. The buffer is then updated to [0, packet 8].
[0139] The next packet received is packet 5. If the jitter between packet 5 and packet 8 does not meet the jitter threshold, and it is obvious that packet 5 is earlier than packet 8, the earlier packet 5 is discarded, so the buffer area is not updated and remains [0, packet 8].
[0140] The next packet received is packet 7. If the jitter between packet 7 and packet 8 meets the jitter threshold, packet 7 is written into the cache [0, 0] as the packet 7 received at the current moment, and the cache is updated to [packet 8, packet 7]. At this time, the earlier packet 7 is taken out and the cache is updated to [0, packet 8].
[0141] Furthermore, the acquired valid data packets include valid data packets 1, 2, 3, 4, and 7. Data packets 1, 5, and 6 are discarded. Whether data packet 8 is discarded is determined by the message received immediately after data packet 7. As can be seen, the buffer area can retain as many data packets as possible within a tolerable delay, preventing subsequent jitter, such as during motion control.
[0142] In some embodiments, as shown in FIG6 , step S4 may include:
[0143] Step S441: allocate a buffer area.
[0144] The buffer area includes storage space for at least two data packet overheads. In some embodiments, the storage space of the buffer area can store 2 or 3 data packets.
[0145] Step S442, initialize the buffer area.
[0146] Step S443: Write the data packet of the UDP message received at the current moment into the buffer area.
[0147] Step S444: Based on the sending timestamp and the receiving timestamp, determine the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area.
[0148] Step S445: Determine whether the jitter value reaches a jitter threshold.
[0149] Step S446: When the jitter value reaches the jitter threshold, it is determined based on the sending timestamp whether the data packet of the UDP message received at the next moment is later than the data packet stored in the buffer area.
[0150] In step S446, if it is determined that the data packet is later than the data packet stored in the cache, step S447 is executed; if it is determined that the data packet is earlier than the data packet stored in the cache, step S448 is executed.
[0151] Step S447: The data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment. After executing step S447, the process returns to execute step S441.
[0152] Step S448, discard the data packet of the UDP message received at the next moment. After executing step S448, return to execute step S444.
[0153] Step S449: When the jitter value does not reach the jitter threshold, the data packet of the UDP message received at the next moment is written into the buffer area.
[0154] Step S450: Determine whether the cache area is full.
[0155] In step S450 , if the buffer area is not full, the process returns to step S444 ; if the buffer area is full, the process proceeds to step S451 .
[0156] Step S451: Based on the sending timestamp, the data packet of the UDP message with the earliest sending time stored in the buffer area is taken as a valid data packet and the valid data packet is obtained.
[0157] After executing step S451, return to execute step S444.
[0158] The above steps S441 to S451 are mainly described based on the situation that the buffer area can store three data packets, and are illustrated as follows.
[0159] Assume that the UDP messages sent are messages 1 to 8, and their corresponding data packets are packets 1 to 8; and assume that the order of receiving messages 1 to 8 is: message 1, message 2, message 3, message 4, message 7, message 5, and message 6; and use [0,0,0] to represent an empty buffer area, which includes the size of three data packets. Among them:
[0160] The message received at the current moment is message 1. If data packet 1 is written into the buffer [0, 0, 1], the buffer is updated to [0, 0, data packet 1].
[0161] The next message received at this moment is message 2. If the jitter between message 2 and message 1 meets the jitter threshold, message 2 is written to the buffer [0, 0, message 1]. The buffer is then updated (including the order) to [0, message 2, message 1]. At this point, it is detected that the buffer is not full and the system continues to wait for the message to be received at the next moment.
[0162] The next message received is message 3. If the jitter between message 3 and message 2 meets the jitter threshold (the data packet of the newly received message is compared with the data packet of the message with a relatively later sending timestamp in the buffer), message 3 is written into the buffer [0, message 2, message 1], and the buffer is updated to [message 3, message 2, message 1]. At this time, it is detected that the buffer is full, and the earlier message packet 1 is taken out, and the buffer is updated to [0, message packet 3, message packet 2]. Usually, one thread is used to write the message into the buffer, and another thread is used to take the message out of the buffer.
[0163] The next packet received is packet 4. If the jitter between packet 4 and packet 3 meets the jitter threshold, packet 4 is written to the buffer [0, packet 3, packet 2]. The buffer is then updated to [packet 4, packet 3, packet 2]. At this point, the buffer is detected to be full, and the earlier packet, packet 2, is retrieved. The buffer is then updated to [0, packet 4, packet 3].
[0164] The next packet received is packet 7. If the jitter between packet 7 and packet 4 does not meet the jitter threshold, the buffer is cleared to [0, 0, 0], and packet 7 is written to the buffer [0, 0, 0] as the packet 7 received at the current moment. The buffer is then updated to [0, 0, packet 7].
[0165] The next message received at this moment is message 5. If the jitter between message 5 and message 7 meets the jitter threshold, message 5 is written to the buffer [0, 0, message 7]. The buffer is then updated to [0, message 7, message 5]. At this point, it is detected that the buffer is not full and the system continues to wait for the message to be received at the next moment.
[0166] The next message received is message 6. If the jitter between data packets 6 and 7 meets the jitter threshold, data packet 6 is written to the cache [0, data packet 7, data packet 5], and the cache is updated to [data packet 7, data packet 6, data packet 5]. At this time, it is detected that the cache is full, and the earlier data packet, namely data packet 5, is taken out, and the cache is updated to [0, data packet 7, data packet 6], and waits for the message received at the next moment.
[0167] Furthermore, the acquired valid data packets include valid data packets 1, 2, and 5. Data packets 3 and 4 are discarded. Whether data packets 6 and 7 are discarded is determined based on the message received immediately after receiving data packet 6. Generally, the larger the buffer area, the longer the tolerable delay. That is, the jitter threshold can be determined based on the tolerable delay.
[0168] It can be seen that the various implementations of the above step S4 can obtain valid data packets that meet jitter requirements and timing requirements, which can improve the reliability of remote surgery. In some embodiments, in the above step S4, each valid data packet can be output and sent to the second master station.
[0169] In some embodiments, the telemedicine system includes a main operating console 100 and a slave operating device 200. The main operating console 100 is located at the doctor's end for remote operation by the doctor, and the slave operating device 200 is located at the patient's end for performing surgery on the patient. The first surgical device includes one of the main operating console 100 and the slave operating device 200, and the second surgical device includes the other of the main operating console 100 and the slave operating device 200.
[0170] In some embodiments, in an Ethercat message, a standard Ethernet frame header generally includes 14 bytes. Under normal circumstances, the master console 100 sends 2000 messages per second to the slave device 200, that is, the interval between two messages is 0.5ms; corresponding to 2 to 3 messages, the buffering time is 1 to 1.5 milliseconds; the slave device 200 sends 1000 messages per second to the master console 100, that is, the interval between two messages is 1ms; corresponding to 2 to 3 messages, the buffering time is 2 to 3 milliseconds; when transmitting on the Internet, due to the discarding of the Ethernet frame header (standard Ethernet frame header packet Each message is reduced by 14 bytes. In the first direction from the main console 100 to the slave operating device 200, 2000x14b=28kb is reduced, and in the second direction from the slave operating device 200 to the main console 100, 1000x14b=14kb bytes are reduced. If converted into bandwidth, it is less than normal: the first direction is reduced by 28x8=224kbps, and the second direction is reduced by 14x8=112kbps, for a total reduction of 336kbps of network bandwidth. Even considering that the message transmitted on the Internet adds an 8-byte custom protocol frame for obtaining valid data packets, the network bandwidth can actually be significantly reduced. Therefore, the method and telemedicine system of the present application are suitable for lower network bandwidth environments.
[0171] In some embodiments, referring to FIG7 , the first surgical device includes a master operating table 100, and the second surgical device includes a slave operating device 200. The master operating table 100 includes a motion input mechanism 120 for generating motion control instructions based on the doctor's input, and the motion input mechanism 120 is connected to the first master station 110 via industrial Ethernet. The slave operating device 200 includes a motion actuator for moving according to the motion control instructions, and the motion actuator is connected to the second master station 210 via industrial Ethernet. The first master station 110 can be integrated with the master operating table 100 or independently of the master operating table 100; the second master station 210 can be integrated with the slave operating device 200 or independently of the slave operating device 200. In other embodiments, the second surgical device may also include an operating table for the patient to lie on or other equipment that can be controlled during surgery.
[0172] For example, the motion input mechanism 120 includes a mechanical handle and a touch screen. For example, the motion execution mechanism includes at least one manipulator assembly 220 (230), for example, the manipulator assembly 220 includes a manipulator 221 and a medical device mounted on the manipulator 221, the manipulator 221 includes a parallel four-bar linkage mechanism to define a remote motion center, and the medical device includes an imaging device 222 or a surgical instrument 232, which can move around the remote motion center, and at least its end effector penetrates into the patient's body to perform imaging or surgery.
[0173] The Ethercat data frame of the Ethercat message generated by the main console 100 includes a motion control instruction, which includes a position instruction and / or a posture instruction. The second master station 210 can be configured to execute the following method:
[0174] Receive the target Ethercat message, parse the target Ethercat message to obtain the motion control instruction, and then control the motion actuator to move according to the motion control instruction.
[0175] In some embodiments, the second remote host 400 may send each valid data packet to the second master station 210 after obtaining it. In some embodiments, when the Ethercat data frame of the valid data packet includes a motion control instruction, as shown in FIG8 , the second master station 210 may be configured to execute the following method:
[0176] Step S101: Obtain the number of interval data packets between a valid data packet received at a current moment and a valid data packet received at a previous moment, and determine whether the number reaches an interval threshold.
[0177] Step S102 : When the number reaches the interval threshold, interpolation processing is performed based on the motion control instructions included in the valid data packet received at the current moment and the motion control instructions included in the valid data packet received at the previous moment to obtain an intermediate motion control instruction.
[0178] The motion trajectory of the distal end of the motion actuator (i.e., the end effector in the medical device) can be planned based on the position and / or posture expressed by the motion control instructions corresponding to the valid data packets at the two moments. The motion trajectory is then time-divided and interpolated to obtain the intermediate motion control instructions.
[0179] For example, the motion trajectory can be planned using an online planning method. For example, the motion trajectory can be designed as an S-shaped curve. For another example, the motion trajectory can be designed as a polynomial curve such as a cubic curve or a quintic curve. For another example, the motion trajectory can be designed as a trapezoidal curve. For example, a quintic curve with second-order continuity can be selected.
[0180] The number of interpolations can be determined based on requirements. For example, the number of interpolations can be equal to the number of packets between the two moments. In another example, the number of interpolations can be greater or less than the number of packets between the two moments. For example, in a process, if the valid packet received at the current moment is packet 7, and the valid packet received at the previous moment is packet 3, for example, 1, 2, 3, 4, or 5 intermediate motion control instructions can be obtained through interpolation.
[0181] Step S103 : Controlling the motion execution mechanism to move according to the intermediate motion control instruction and the motion control instruction included in the valid data packet received at the current moment.
[0182] In step S103, the motion control command included in the valid data packet received at the previous moment is pre-executed. Because the processing in step S4 filters out many data packets that do not meet jitter and timing requirements between two adjacent moments, abrupt changes in the motion trajectory of the distal end of the motion actuator can occur. However, steps S101 to S103 improve the smoothness of the motion trajectory of the distal end of the motion actuator.
[0183] In some embodiments, referring to FIG7 , the motion actuator includes a first manipulator assembly 220 having an imaging instrument 222 and a second manipulator assembly 230 having a surgical instrument 232. The motion input mechanism 120 can generate motion control instructions for controlling the movement of the first manipulator assembly 220 and / or the second manipulator assembly 230. During remote surgery, the doctor controls the movement of the imaging instrument 222 or the surgical instrument 232 while observing the image captured by the surgical instrument 232 on the display screen of the main operating console 100. In some embodiments, the Ethercat data frame of the Ethercat message generated by the main operating console 100 also includes the network delay of the image frame captured by the surgical instrument 232 from the second main station 210 to the first main station 110. As shown in FIG9 , the second main station 210 can be configured to perform the following method:
[0184] Step S201 : receiving a target Ethercat message, parsing the target Ethercat message to obtain a motion control instruction and a network delay of an image frame.
[0185] Step S202: Determine the type of the motion control instruction.
[0186] The motion control instructions include a first motion control instruction for controlling the movement of the first manipulator assembly 220, and a second motion control instruction for controlling the movement of the second manipulator assembly 230. The first motion control instruction specifically controls the movement of the imaging device 222 to adjust the field of view, while the second motion control instruction specifically controls the movement of the surgical instrument 232 to perform surgical operations such as clamping, cutting, suturing, and suctioning.
[0187] The type of the motion control instruction may be determined, for example, according to a mapping relationship between the motion input mechanism 120 and the motion execution mechanisms 220 and 230 .
[0188] Step S203 : When the type of the motion control instruction is the second motion control instruction and the network delay of the image frame reaches the delay threshold, control the second manipulator component to stop responding to the motion control instruction.
[0189] The network delay of the image frame includes multiple factors, such as delays caused by encoding, transmission, and decoding. The delay threshold is exemplarily set to 80ms. If it is too long, problems such as image lag can be easily perceived. The network delay can be determined, for example, by calculating the time from the start of encoding to the completion of decoding. In step S203, controlling the second manipulator component 230 to stop responding to the control instruction includes various implementation methods, such as the second master station 210 stopping receiving or parsing the target Ethercat message, the second master station 210 generating an emergency braking instruction to instruct the second manipulator component 230 to perform an emergency braking, or the second master station 210 generating an interrupt instruction to the second remote host 400 to disconnect the second remote host 400 from the first remote host 300. In some embodiments, the connection between the first remote host 300 and the second remote host 400 may not be interrupted, allowing the main console 100 to continue receiving and displaying image frames, but disabling the motion input mechanism 120 of the main console 100, allowing the remote doctor to provide guidance without personally operating the device.
[0190] Through steps S201 , S202 and S203 , when the network delay of the image frame of the remote surgery does not meet the requirement, the remote surgery is interrupted to ensure the safety of the patient.
[0191] In some further embodiments, referring to FIG. 7 , the telemedicine system further includes another master console 100' located at the patient end for local operation by the doctor. The master console 100' includes another motion input mechanism 120' and another master station 110' connected via industrial Ethernet. The master station 110' is locally connected to a second master station 210 via industrial Ethernet. As shown in FIG. 10 , the second master station 210 can be configured to execute the following method:
[0192] Step S201 : receiving a target Ethercat message, parsing the target Ethercat message to obtain a motion control instruction and a network delay of an image frame.
[0193] Step S202: Determine the type of the motion control instruction.
[0194] Step S204 : When the type of the motion control instruction is the second motion control instruction and the network delay reaches the delay threshold, switching the remote response of the second master station to the first master station to a local response to another master station.
[0195] Among them, switching the second master station 210's remote response to the first master station 110 to a local response to the other master station 110' includes multiple implementation methods. For example, the remote connection between the first remote host 300 and the second remote host 400 can be interrupted, and a local connection between the other master station 110' and the second master station 210 can be established. For another example, the remote connection between the first remote host 300 and the second remote host 400 can be kept unchanged, but the motion input mechanism 120 of the main operating console 100 can be prohibited from being enabled, and a local connection between the other master station 110' and the second master station 210 can be established, and the motion input mechanism 120 of the other master operating console 100' can be enabled.
[0196] Through steps S201, S202 and S204, that is, when the network delay of the image frame of the remote surgery does not meet the requirements, the remote surgery mode is switched to the local surgery mode, which can not only ensure the safety of the patient, but also ensure that the surgery can continue to be performed.
[0197] In some embodiments, based on the description of the above-mentioned one-way data interaction process, when the slave operating device 200 serves as the first surgical device and the master operating console 100 serves as the second surgical device, the slave operating device 200 includes a status feedback mechanism connected to the first master station 110 via industrial Ethernet, and the master operating console 100 includes a human-computer interaction device connected to the second master station 210 via industrial Ethernet and used to respond to the input of the status feedback mechanism and perform status feedback.
[0198] For example, the state feedback mechanism includes, but is not limited to, various sensors for sensing the motion state or force condition of the motion actuator, and various detection units for sensing software or hardware failures. For example, the human-computer interaction device includes an audio-visual device, such as a display screen or speaker, for feedback on the motion state or software or hardware failure of the motion actuator, and a drive motor provided in the motion input mechanism 120 for feedback on the force condition.
[0199] The Ethercat data frame of the Ethercat message generated by the operating device 200 is written with a state feedback instruction. The second master station 210 can be configured to execute the following method:
[0200] Receive the target Ethercat message, parse the target Ethercat message to obtain the status feedback instruction, and then control the human-computer interaction device to provide status feedback according to the status feedback instruction.
[0201] The present application also provides a control device for a telemedicine system. As shown in FIG11 , the control system may include: a processor 501 , a communications interface 502 , a memory 503 , and a communication bus 504 .
[0202] The processor 501 , the communication interface 502 , and the memory 503 communicate with each other via the communication bus 504 .
[0203] The communication interface 502 is used to communicate with other devices such as various sensors, rotating motors, solenoid valves, or network elements of other clients or servers.
[0204] The processor 501 is configured to execute a program 505 , and specifically may execute the relevant steps in the above method embodiment.
[0205] Specifically, the program 505 may include program codes, which include computer operation instructions.
[0206] The processor 505 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), one or more integrated circuits configured to implement the embodiments of the present application, an FPGA, or a graphics processing unit (GPU). The one or more processors included in the control device may be processors of the same type, such as one or more CPUs or one or more GPUs; or they may be processors of different types, such as one or more CPUs and one or more GPUs.
[0207] The memory 503 is used to store the program 505. The memory 503 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0208] The program 505 may be specifically configured to cause the processor 501 to perform the following operations:
[0209] The first remote host receives the Ethercat message sent by the first master station, discards the Ethernet frame header of the Ethercat message and obtains the Ethercat data frame;
[0210] The first remote host encapsulates the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sends the UDP message to the second remote host, where the custom protocol frame is written with a sending timestamp of the UDP message;
[0211] The second remote host receives the UDP message, discards the UDP header of the UDP message and obtains a data packet, which includes a custom protocol frame and an Ethercat data frame;
[0212] The second remote host obtains a valid data packet from the data packet based on the sending timestamp;
[0213] The second remote host discards the custom protocol frame of the valid data packet, obtains the Ethercat data frame of the valid data packet, encapsulates the Ethercat data frame of the valid data packet to generate a target Ethercat message including a target Ethernet frame header, and sends the target Ethercat message Ethernet frame header to the second master station.
[0214] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to be loaded by a processor and executed to implement the steps of the method described in any one of the above embodiments.
[0215] The present application also provides a computer program product, comprising computer instructions, which, when executed on a computer, enable the computer to execute the method described in any one of the above embodiments.
[0216] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0217] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A telemedicine system, It is characterized in that include: A first surgical device, including a first master station; a second surgical device, including a second master station; A first remote host is connected to the first master station via industrial Ethernet; and A second remote host, connected to the second master station via industrial Ethernet, and remotely connected to the first remote host via the Internet; The first remote host is configured to: receiving an Ethercat message sent by the first master station, discarding an Ethernet frame header of the Ethercat message and obtaining an Ethercat data frame; and Encapsulating the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sending the UDP message to the second remote host, wherein the custom protocol frame is written with a sending timestamp of the UDP message; The second remote host is configured as: Receive the UDP message, discard the UDP header of the UDP message and obtain a data packet, wherein the data packet includes the custom protocol frame and the Ethercat data frame; obtaining a valid data packet from the data packet based on the sending timestamp; and The custom protocol frame of the valid data packet is discarded, the Ethercat data frame of the valid data packet is obtained, the Ethercat data frame of the valid data packet is encapsulated to generate a target Ethercat message including a target Ethernet frame header, and the target Ethercat message is sent to the second master station.
2. The telemedicine system according to claim 1, It is characterized in that Obtaining a valid data packet from the data packet based on the sending timestamp, comprising: Initialize the data packet of the UDP message received at the current moment as the valid data packet; Determine a jitter value between a data packet of the UDP message received at the next moment and the valid data packet; Determining whether the jitter value reaches a jitter threshold; When the jitter value reaches the jitter threshold, discard the UDP message received at the next moment and returns to execute the step of initializing the data packet of the UDP message received at the current moment as the valid data packet; When the jitter value does not reach the jitter threshold, determining whether the sending timestamp of the data packet of the UDP message received at the next moment is later than the sending timestamp of the valid data packet; When it is later than the valid data packet, the data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment, and the step of initializing the data packet of the UDP message received at the current moment as the valid data packet is returned to be executed; When it is earlier than the valid data packet, the data packet of the UDP message received at the next moment is discarded, and the step of initializing the data packet of the UDP message received at the current moment as the valid data packet is returned to be executed.
3. The telemedicine system according to claim 1, It is characterized in that Obtaining a valid data packet from the data packet based on the sending timestamp, comprising: Allocating a buffer area, the buffer area including storage space for two of the data packets; Initializing the buffer area; Writing the data packet of the UDP message received at the current moment into the buffer area; Determine a jitter value between a data packet of the UDP message received at a next moment and the data packet stored in the buffer area; Determining whether the jitter value reaches a jitter threshold; When the jitter value reaches the jitter threshold, determining whether the sending timestamp of the data packet of the UDP message received at the next moment is later than the sending timestamp of the data packet stored in the buffer area; When the data packet is later than the data packet stored in the buffer area, the data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment, and the step of initializing the buffer area is returned to execute; When the data packet is earlier than the data packet stored in the buffer area, discard the data packet of the UDP message received at the next moment, and return to the step of determining the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area; When the jitter value does not reach the jitter threshold, writing the data packet of the UDP message received at the next moment into the buffer area; The data packet with an earlier sending timestamp stored in the buffer area is taken as the valid data packet, and the step of determining the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area is returned to be executed.
4. The telemedicine system according to claim 1, It is characterized in that Obtaining a valid data packet from the data packet based on the sending timestamp, comprising: Allocating a buffer area, the buffer area including storage space for at least two of the data packets; Initializing the buffer area; Writing the data packet of the UDP message received at the current moment into the buffer area; Determine a jitter value between a data packet of the UDP message received at a next moment and the data packet stored in the buffer area; Determining whether the jitter value reaches a jitter threshold; When the jitter value reaches the jitter threshold, determining whether the sending timestamp of the data packet of the UDP message received at the next moment is later than the sending timestamp of the data packet stored in the buffer area; When the data packet is later than the data packet stored in the buffer area, the data packet of the UDP message received at the next moment is used as the data packet of the UDP message received at the current moment, and the step of initializing the buffer area is returned to execute; When the data packet is earlier than the data packet stored in the buffer area, discard the data packet of the UDP message received at the next moment, and return to the step of determining the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area; When the jitter value does not reach the jitter threshold, writing the data packet of the UDP message received at the next moment into the buffer area; Determine whether the cache is full; If the buffer area is not full, return to the step of determining the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer area; If the buffer is full, the data packet of the UDP message with the earliest sending timestamp stored in the buffer is taken as the valid data packet, and the step of determining the jitter value between the data packet of the UDP message received at the next moment and the data packet stored in the buffer is returned.
5. The telemedicine system according to claim 4, It is characterized in that The buffer area has storage space for two or three data packets of the UDP message; the custom protocol frame has 8 bytes of storage space.
6. The telemedicine system according to claim 1, It is characterized in that The Ethernet frame header includes a destination address segment in which the physical address of the first remote host is written, and a source address segment in which the physical address of the first host is written; The target Ethernet frame header includes a destination address segment in which the physical address of the second host is written, and a source address segment in which the physical address of the second remote host is written; The UDP header includes a source port segment written to the communication port of the first remote host, and a destination port segment written to the communication port of the second remote host, and the communication port of the first remote host and the communication port of the second remote host are determined based on network address translation technology.
7. The telemedicine system according to claim 1, It is characterized in that The telemedicine system includes a first master operating console and a slave operating device. The first master operating console is located at the doctor's end for remote operation by the doctor, and the slave operating device is located at the patient's end for performing surgery on the patient. The first surgical device includes one of the first master operating console and the slave operating device, and the second surgical device includes the other of the first master operating console and the slave operating device.
8. The telemedicine system according to claim 7, It is characterized in that The first surgical device includes the first master operating table, and the second surgical device includes the slave operating device. The first master operating table includes a first motion input mechanism connected to the first master station via industrial Ethernet. The slave operating device includes a first manipulator component with an imaging instrument and a second manipulator component with a surgical instrument connected to the second master station via industrial Ethernet. The first motion input mechanism generates motion control instructions for controlling the movement of the first manipulator component and / or the second manipulator component. The Ethercat data frame includes the motion control instructions and the network delay of the image frame captured by the imaging instrument from the second master station to the first master station.
9. The telemedicine system according to claim 8, It is characterized in that The second master station is configured as: Receiving the target Ethercat message, parsing the target Ethercat message to obtain the motion control instruction and the network delay; When the type of the motion control instruction is a motion control instruction for controlling the second manipulator component and the network delay reaches a delay threshold, the second manipulator component is controlled to stop responding to the motion control instruction.
10. The telemedicine system according to claim 8, It is characterized in that The telemedicine system further comprises a second main operation console located at the patient end for local operation by the doctor, wherein the second main operation console comprises a second motion input mechanism and a third main station connected via industrial Ethernet, wherein the third main station is locally connected to the second main station via industrial Ethernet; the second main station is configured as follows: When the type of the motion control instruction is a motion control instruction for controlling the second manipulator component and the network delay reaches a delay threshold, the remote response of the second master station to the first master station is switched to a local response to the third master station.
11. The telemedicine system according to claim 8, It is characterized in that The second master station is configured as: Get the number of interval data packets between the valid data packets received at the current moment and the valid data packets received at the previous moment; When the number of interval data packets reaches an interval threshold, interpolation processing is performed based on the motion control instructions included in the valid data packet received at the current moment and the motion control instructions included in the valid data packet received at the previous moment to obtain intermediate motion control instructions to improve the smoothness of the motion trajectory of the first manipulator component and / or the second manipulator component.
12. The telemedicine system according to claim 11, It is characterized in that Performing interpolation processing based on the motion control instructions included in the valid data packet received at the current moment and the motion control instructions included in the valid data packet received at the previous moment, including: The position and / or posture planning is performed according to the motion control instructions included in the valid data packet received at the current moment and the motion control instructions included in the valid data packet received at the previous moment. A motion trajectory of at least one of the first manipulator component and the second manipulator component is obtained, and the intermediate motion control instruction is obtained by time-segmented interpolation of the motion trajectory.
13. The telemedicine system according to claim 12, It is characterized in that The motion trajectory is planned online into one of an S-shaped curve, a polynomial curve and a trapezoidal curve.
14. The telemedicine system according to claim 11, It is characterized in that The number of the intermediate motion control instructions obtained by interpolation processing is greater than or equal to the number of the interval data packets.
15. A method, applied to a telemedicine system, It is characterized in that The telemedicine system comprises: A first surgical device, including a first master station; a second surgical device, including a second master station; A first remote host connected to the first master station via industrial Ethernet; and A second remote host, connected to the second master station via industrial Ethernet, and remotely connected to the first remote host via the Internet; The control method comprises: The first remote host receives the Ethercat message sent by the first master station, discards the Ethernet frame header of the Ethercat message and obtains the Ethercat data frame; The first remote host encapsulates the Ethercat data frame to generate a UDP message including a UDP header and a custom protocol frame, and sends the UDP message to the second remote host, wherein the custom protocol frame writes a sending timestamp of the UDP message; The second remote host receives the UDP message, discards the UDP header of the UDP message and obtains a data packet, wherein the data packet includes the custom protocol frame and the Ethercat data frame; The second remote host obtains a valid data packet from the data packet based on the sending timestamp; The second remote host discards the custom protocol frame of the valid data packet, obtains the Ethercat data frame of the valid data packet, encapsulates the Ethercat data frame of the valid data packet to generate a target Ethercat message including a target Ethernet frame header, and sends the target Ethercat message to the second master station.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is configured to be loaded and executed by a processor to implement the steps of the method according to claim 15 .
Citation Information
Patent Citations
Telemedicine system and method thereof
CN118803080A
NTP server time service implementation method based on hardware timestamp
CN106506107A
Field bus and Ethernet conversion method and device and computer storage medium
CN112887277A
Data transmission method and device, computing equipment and storage medium
CN113497767A
IP unvarnished transmission gateway transmission system and method based on UDP
CN114172948A
Cited By
Master-slave control device, system and method for cataract ophthalmic surgery
CN119655900A
Master-slave control device, system and method applicable to cataract eye surgery
CN119655900B
Communication method and apparatus
WO2026118869A1
