Surgical robot working method and device, electronic equipment and storage medium
By calculating the delay time between the surgical robot end and the doctor end, ensuring that the surgical action is performed when preset conditions are met, the problem of low reliability of the UDP protocol is solved and the accuracy and safety of the surgical robot operation is improved.
Patent Information
- Application Number
- CN202411007098.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-22
AI Technical Summary
The User Datagram Protocol (UDP) used in existing surgical robot communications is low in reliability, affecting the accuracy and safety of surgical operations.
By receiving the operation response data sent by the doctor, determine the counter value between the operation response data and the operation request data, calculate the delay time, and perform the corresponding surgical action when the delay time meets the preset conditions to avoid errors caused by data delays. operate.
It improves the accuracy and safety of surgical operations, avoids erroneous operations caused by data delays, and enhances the reliability of the surgical process.
Smart Images

Figure CN119007974A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of robot control technology, and in particular, to a surgical robot working method, device, electronic equipment and storage medium. Background Art
[0002] Compared with traditional manual surgery, the operation process of surgical robots is more flexible and improves the accuracy and safety of surgery. In order to effectively improve the skewed distribution of medical resources and save medical resources, the use of remotely controlled surgical robots for surgical operations has become one of the important research directions at present.
[0003] In the prior art, the surgical robot performs surgery based on the communication data with the doctor. The User Datagram Protocol (UDP) is used in the communication between the doctor and the surgical robot. However, UDP is a connectionless transport layer protocol with low reliability, which affects the accuracy and safety of the operation during the operation. Summary of the invention
[0004] The embodiments of the present invention provide a surgical robot working method, device, electronic device and storage medium to achieve the purpose of improving the accuracy and safety of the operation process.
[0005] According to one aspect of the present invention, there is provided a surgical robot working method, comprising:
[0006] Received operation response data sent by the doctor end, determine a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data; wherein the operation response data and the operation request data are both data generated according to the user datagram protocol;
[0007] determining a delay time between the operation response data and the operation request data based on the first counter value and the second counter value;
[0008] When the delay time meets a preset delay condition, a surgical action corresponding to the operation response data is performed.
[0009] According to another aspect of the present invention, there is provided a surgical robot working device, the device comprising:
[0010] A data receiving module, configured to receive operation response data sent by a doctor, determine a first counter value corresponding to the operation response data and a second counter value of operation request data corresponding to the operation response data; wherein both the operation response data and the operation request data are data generated according to a user datagram protocol;
[0011] a delay duration determining module, configured to determine a delay duration between the operation response data and the operation request data based on the first counter value and the second counter value;
[0012] The surgical action execution module is used to execute the surgical action corresponding to the operation response data when the delay time meets the preset delay condition.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the surgical robot working method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the surgical robot working method described in any embodiment of the present invention when executed by a processor.
[0018] The technical solution of the embodiment of the present invention determines a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data by receiving the operation response data sent by the doctor's end; wherein the operation response data and the operation request data are both data generated in accordance with the user datagram protocol; and, based on the first counter value and the second counter value, determines the delay duration between the operation response data and the operation request data; finally, when the delay duration meets the preset delay condition, executes the surgical action corresponding to the operation response data, so that before executing the surgical action, the delay duration is considered as a factor to avoid erroneous operations caused by data delays, which is beneficial to improving the accuracy and safety of the operation process.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a surgical robot working method provided according to an embodiment of the present invention;
[0022] Figure 2 is a flow chart of another surgical robot working method provided according to an embodiment of the present invention;
[0023] Figure 3 is a port connection schematic diagram provided according to an embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a communication connection process provided according to an embodiment of the present invention;
[0025] Figure 5 is a schematic structural diagram of a surgical robot working device provided according to an embodiment of the present invention;
[0026] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the surgical robot working method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.
[0030] Before introducing the technical solution, an example description of the application scenario can be given. This technical solution can be applied to the scenario where a surgical robot is remotely controlled by at least one doctor terminal so that the surgical robot performs surgical actions. Exemplarily, the surgical robot may be a laparoscopic surgical robot used to perform laparoscopic surgery. Through this technical solution, when the operation response data sent by the doctor terminal is received, the delay time corresponding to the operation response data can be first determined, and the delay time factor can be combined to determine whether the surgical robot needs to perform the surgical operation corresponding to the operation response data, thereby avoiding misoperation and improving the safety and accuracy of the surgical operation.
[0031] Figure 1 This is a flow chart of a surgical robot working method provided according to an embodiment of the present invention. This embodiment is applicable to the case where a doctor controls a surgical robot to perform a surgical action. The method can be performed by a surgical robot working device, which can be implemented in the form of hardware and / or software.
[0032] like Figure 1 As shown, the method of this embodiment may specifically include:
[0033] S110. Receive the operation response data sent by the doctor, and determine the first counter value corresponding to the operation response data and the second counter value of the operation request data corresponding to the operation response data.
[0034] The operation response data and the operation request data are both data generated according to the User Datagram Protocol.
[0035] It should be noted that a surgical robot end can establish a communication connection with at least one doctor end, and the doctor end sends data to the surgical robot end to control the surgical robot to perform surgical actions according to the received data.
[0036] In this embodiment, the doctor side and the surgical robot side can generate a data packet based on the user datagram protocol, and the data packet includes a header and a data portion, and the operation response data and the operation request data belong to the data portion. The header includes a data packet confirmation mark (ACK), a disconnection mark (FIN), a connection establishment mark (SYN), a check value, a data packet number (seq), a data packet confirmation number (ack), and a 128-bit device unique identifier (UUID).
[0037] In a specific implementation, the surgical robot side may send operation request data to the doctor side to request the doctor side to give an operation instruction. After receiving the operation request data sent by the surgical robot side, the doctor side generates operation response data corresponding to the operation request data. Specifically, a counter may be set on the surgical robot side and the doctor side respectively, and the counter set on the surgical robot side is used as a local counter. Exemplarily, the counter is updated every one millisecond.
[0038] In this embodiment, the method of determining the first counter value and the second counter value includes: when sending operation request data, obtaining the counter value corresponding to the local counter as the second counter value; when receiving operation response data, obtaining the counter value corresponding to the local counter as the first counter value.
[0039] Alternatively, the implementation method of determining the first counter value corresponding to the operation response data and the second counter value of the operation request data corresponding to the operation response data includes: determining the numerical value corresponding to the local counter as the first counter value when the operation response data is received; determining the numerical value corresponding to the data packet confirmation number corresponding to the operation response data as the second counter value; wherein the numerical value corresponding to the data packet confirmation number is the numerical value corresponding to the local counter when the operation request data is sent.
[0040] Specifically, when the surgical robot generates operation request data, the count value corresponding to the local counter at this time can be used as the value of seq, and a request data packet is generated based on the operation request data and the value of seq, and the request data packet is sent to the doctor. After receiving the request data packet, the doctor parses the request data packet to obtain the operation request data, generates corresponding operation response data based on the operation request data, and generates a feedback data packet containing the operation response data. The value of seq in the request data packet is used as the value of ack in the feedback data packet, and the feedback data packet is sent to the surgical robot. The surgical robot uses the value of the local counter when receiving the feedback data packet as the first counter value. The surgical robot parses the feedback data packet and uses the value of ack in the feedback data packet as the second counter value.
[0041] This embodiment determines the value of the second counter effectively and quickly by determining the value corresponding to the data packet confirmation number in the feedback data packet.
[0042] S120 , determining a delay time between the operation response data and the operation request data based on the first counter value and the second counter value.
[0043] Among them, the delay duration is used to reflect the communication delay between the surgical robot and the doctor.
[0044] In this embodiment, the delay duration is equal to half of the count value difference, and the count value difference is equal to the difference between the first counter value and the second counter value. Exemplarily, if the first counter value is m1 and the second counter value is m2, the delay duration is (m1-m2) / 2. The count value difference can reflect the time taken by the surgical robot from sending data to receiving data fed back by the doctor. Using half of the count value difference as the delay duration can effectively reflect the one-way delay between the surgical robot and the doctor.
[0045] S130. When the delay time meets a preset delay condition, execute a surgical action corresponding to the operation response data.
[0046] The preset delay condition includes that the delay duration is less than a preset duration value. Those skilled in the art may set the preset duration value according to actual application conditions.
[0047] In a specific implementation, it can be determined whether the delay duration is less than the preset duration value. If it is less than, it means that the delay duration meets the preset delay condition, and the surgical action corresponding to the operation response data can be executed; if it is greater than or equal to, it means that the delay duration does not meet the preset delay condition. In order to ensure the safety of the surgical execution process, the surgical robot end can control the robot arm to suspend work to avoid operation errors.
[0048] The technical solution of the embodiment of the present invention determines a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data by receiving the operation response data sent by the doctor's end; wherein the operation response data and the operation request data are both data generated in accordance with the user datagram protocol; and, based on the first counter value and the second counter value, determines the delay duration between the operation response data and the operation request data; finally, when the delay duration meets the preset delay condition, executes the surgical action corresponding to the operation response data, so that before executing the surgical action, the delay duration is considered as a factor to avoid erroneous operations caused by data delays, which is beneficial to improving the accuracy and safety of the operation process.
[0049] Figure 2is a flowchart of another surgical robot working method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment also includes: sending target port information of the target port to the target doctor end based on the user datagram protocol to establish a communication connection with the target doctor end based on the target port information. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:
[0050] S210. Create a listening socket based on the first Internet Protocol address corresponding to the surgical robot end and the pre-created listening port to receive a request sent by the doctor end based on the listening socket.
[0051] It should be noted that in order to realize multi-doctor cooperative remote surgery, the surgical robot side can provide multiple communication ports to establish connections with multiple doctor sides. Since there are multiple doctor sides, it is necessary to allocate communication ports to the doctor sides. In order to avoid the problem of easy errors and low efficiency caused by manual port allocation, this embodiment provides a listening port on the surgical robot side for allocating communication ports to the doctor sides.
[0052] In order to clearly understand the port status of the surgical robot and the doctor, please refer to Figure 3 . The surgical robot end includes a listening port PORT0 and multiple different communication ports PORT1. The doctor end includes doctor end 1, doctor end 2 and doctor end 3. Different doctor ends have different Internet Protocol addresses. Each doctor end corresponds to a communication interface PORT2. Specifically, obtain the first Internet Protocol address IP1 of the surgical robot end and the pre-created listening port PORT0, create a listening socket, start the listening program, and wait for the connection request sent by the doctor end. Different doctor ends can connect to different communication ports PORT1.
[0053] S220. When the listening port receives a connection request, verify whether the target doctor end sending the connection request is a legitimate device.
[0054] Among them, the connection request is a request for requesting to establish a communication connection with the surgical robot end, and the doctor end that sends the connection request to the listening port is regarded as the target doctor end.
[0055] In a specific implementation, when the listening port receives a connection request, in order to ensure the safety of the surgical operation, it is necessary to verify whether the target doctor end is a legal device. Specifically, the device with control authority over the surgical robot end can be regarded as a legal device, and the legal device information of the doctor end with control authority can be pre-recorded. For example, the device information can be the device number and the Internet Protocol address of the device. The connection request contains the target device information of the target device; after receiving the connection request, the target device information of the target doctor end that sent the connection request can be compared with the legal device information. If there is legal device information that is consistent with the target device information, it means that the target doctor end is a legal device; if there is no legal device information that is consistent with the target device information, it means that the target doctor end is not a legal device. Furthermore, in the case that the target doctor end is not a legal device, the surgical robot end does not need to respond.
[0056] S230. When the target doctor end is a legitimate device, determine the target port in at least one communication port corresponding to the surgical robot, and send the target port information of the target port to the target doctor end based on the user datagram protocol to establish a communication connection with the target doctor end based on the target port information.
[0057] In this embodiment, when the target doctor end is a legitimate device, a communication connection can be established between the target doctor end and the surgical robot end. Specifically, among the communication ports of the surgical robot end, a communication port in an idle state is determined as the target port for establishing a communication connection with the target doctor end, and the target port information of the target port is obtained. Among them, the target port information includes the port number of the target port. Based on the user datagram protocol, the target port information is sent from the listening port to the target doctor end, so that the target doctor end establishes a communication connection between the target doctor end and the surgical robot end through the target port after receiving the target port information.
[0058] In this embodiment, when the target doctor end is a legitimate device, the target port information is sent to the target doctor end, thereby ensuring that the device establishing a connection with the surgical robot end is a legitimate device, thereby improving the security of the communication process.
[0059] In this embodiment, a communication connection is established with a target doctor end based on the target port information, including: when it is detected that the target port has received a first connection data packet, determining whether the sender information corresponding to the first connection data packet is the target end information corresponding to the target doctor end; when the sender information is the target end information, parsing the first connection data packet, and determining whether the value corresponding to the connection establishment identifier is a preset connection establishment value based on the parsing result; when the value of the connection establishment identifier is the preset connection establishment value, generating a first response data packet corresponding to the first connection data packet based on the user datagram protocol, and sending the first response data packet to the target doctor end, so that the target doctor end verifies the first response data packet, and when the first response data packet meets the first preset verification condition, generating a second connection data packet and sending it to the target port of the surgical robot; after receiving the second connection data packet, when the second connection data packet meets the second preset verification condition, establishing a communication connection between the surgical robot end and the target doctor end.
[0060] In the process of establishing a communication connection with the target doctor end through the target port, the target doctor end sends a first connection data packet to the target port based on the user datagram protocol. When the surgical robot end detects that the target port receives the first connection data packet, it verifies whether the sender information of the first connection data packet is the target end information. Among them, the target end information includes information such as the Internet Protocol address and port number of the target doctor end. If the sender information is not the target end information, the first connection data packet is discarded. If the sender information is the target end information, the first connection data packet can be parsed, and the parsing result is the value of the data packet confirmation mark, the value of the disconnection mark, the value of the connection establishment mark, the check value, the value of the data packet number, the value of the data packet confirmation number, and the value of the 128-bit device unique identifier in the first connection data packet. When the value of the connection establishment mark is the preset connection establishment value, it means that the target doctor end currently requests to establish a communication connection with the surgical robot end; when the value of the connection establishment mark is not the preset connection establishment value, the first connection data packet can be discarded. Exemplarily, the preset connection establishment value is 1.
[0061] When the value of the connection establishment identifier is a preset connection establishment value, a response can be made to the first connection data packet, that is, a first response data packet corresponding to the first connection data packet is generated based on the user datagram protocol, and the first response data packet is sent to the target doctor end. When the first response data packet is generated, the value of SYN in the first response data packet is set to a first preset value, the value of ACK is set to a second preset value, the value of ack is set to a third preset value, and the value of seq is set to a fourth preset value.
[0062] After the target doctor determines the received first response data packet, the received first response data packet is parsed to determine whether the received first response data packet meets the first preset verification condition; wherein the first preset verification condition includes: the value of SYN in the received first response data packet is the first preset value, the value of ACK is the second preset value, and the value of ack is set to the third preset value. The first preset value and the second preset value can both be 1.
[0063] When the first preset verification condition is met, a second connection data packet can be generated and sent to the target port of the surgical robot. After the surgical robot receives the second connection data packet, it verifies whether the sender information of the second connection data packet is the target end information; if so, it determines whether the second connection data packet meets the second preset verification condition. If so, a communication connection is established between the surgical robot and the target doctor. If the sender information of the second connection data packet is not the target end information; or, if the second connection data packet does not meet the second preset verification condition, the second connection data packet can be discarded. Among them, the second preset verification condition includes that the value of SYN in the received second connection data packet is the first preset value, the value of ACK is the second preset value, and the value of ack is set to the fifth preset value. The fifth preset value is the sum of the fourth preset value and 1.
[0064] For a clearer and more detailed description of the process of establishing a connection between the surgical robot and the target doctor, see Figure 4 . The surgical robot end uses the first Internet Protocol address and the target port to establish communication; the target doctor end sends a first connection data packet to the target port, in which SYN=1 and seq=x; wherein x is a positive integer. After receiving the first connection data packet, the surgical robot end verifies whether the sender information of the first connection data packet is the target end information and whether the value of SYN is 1; if so, a first response data packet is generated, in which SYN=1, ACK=1, ack=x+1 and seq=y; wherein y is a positive integer. The target doctor end determines whether the values of SYN and ACK in the received first response data packet are 1, and whether the value k of ac is x+1; if so, a second request data packet is generated and sent to the surgical robot end; wherein SYN=1, ACK=1, ack=y+1 and seq=x+1 in the second request data packet. After determining that SYN=1, ACK=1 and ack=y+1 are in the received second request data packet, the surgical robot end determines to establish a communication connection between the surgical robot end and the target doctor end.
[0065] In this embodiment, a "three-way handshake" connection mechanism is adopted to effectively establish a communication connection between the surgical robot end and the target doctor end.
[0066] S240. Receive the operation response data sent by the doctor, and determine the first counter value corresponding to the operation response data and the second counter value of the operation request data corresponding to the operation response data.
[0067] S250 , determining a delay time between the operation response data and the operation request data based on the first counter value and the second counter value.
[0068] S260: When the delay time meets the preset delay condition, execute the surgical action corresponding to the operation response data.
[0069] Among them, the delay duration is equal to half of the count value difference, and the count value difference is equal to the difference between the first counter value and the second counter value; the preset delay condition includes that the delay duration is less than the preset duration value.
[0070] During the operation, the surgical robot is controlled to complete the operation through the interaction between the surgical robot and the target doctor. The interaction process also includes: determining the sending sequence value of the first data packet that has been sent and the receiving sequence value of the second data packet corresponding to the first data packet fed back by the doctor; if the receiving sequence value does not match the sending sequence value, the second data packet is discarded.
[0071] Among them, the first data packet is the operation request data packet sent by the surgical robot during the operation; the second data packet is the operation response data packet fed back by the doctor during the operation.
[0072] In the specific implementation, in the process of sending and receiving data based on the UDP protocol, disorder may occur, that is, the sending order of the data packets is inconsistent with the receiving order. Exemplarily, the surgical robot sends three first data packets to the doctor's end, and the sending order is the first data packet 1, the first data packet 2 and the first data packet 3; when receiving the second data packet corresponding to the first data packet, the receiving order is the second data packet 1, the second data packet 3 and the second data packet 2; wherein, the second data packet 1 is used to respond to the first data packet 1, the second data packet 2 is used to respond to the first data packet 2, and the second data packet 3 is used to respond to the first data packet 3. It can be seen that the sending order value corresponding to the first data packet 2 is 2, and the receiving order value of the second data packet 2 is 3, that is, the receiving order value does not match the sending order value, and the second data packet 2 can be discarded.
[0073] This embodiment discards data packets that arrive out of order, thereby avoiding errors during surgical operations and improving the safety and accuracy of the surgical process.
[0074] In addition, before sending the first data packet, the surgical robot can calculate the CRC (Cyclic redundancy check) value corresponding to the first data packet. The doctor can perform a cyclic redundancy check on the received first data packet and discard the first data packet that fails the check. If the check passes, a second data packet corresponding to the first data packet is generated, and the CRC value corresponding to the second data packet is calculated. The second data packet is sent to the surgical robot, and the surgical robot performs a cyclic redundancy check on the second data packet and discards the first data packet that fails the check.
[0075] In this embodiment, after executing the surgical action corresponding to the operation response data, it also includes: when the received data packet sent by the target doctor end meets the preset disconnection condition, a first response data packet is generated according to a first preset response method, and the response data packet is sent to the target doctor end; a disconnection data packet is generated according to a preset disconnection method, and the disconnection data packet is sent to the target doctor end, so that the target doctor end generates a second response data packet based on the disconnection data packet and the second preset response method, and sends the second response data packet to the surgical robot end; after receiving the second response data packet, the communication connection with the target doctor end is disconnected.
[0076] It should be noted that a "four-wave" disconnection mechanism can be used. When both parties no longer need data transmission, the connection between the two parties can be disconnected to release resources. Exemplarily, the disconnection process includes:
[0077] 1. The target doctor sends a data packet for disconnection, in which FIN=1, seq=u, where u is a positive integer.
[0078] 2. The surgical robot receives a data packet for disconnection, and generates a first response data packet according to a first preset response method when the data packet sent by the target doctor satisfies the preset disconnection condition. The preset disconnection condition may be that FIN=1 of the received data packet. The first preset response method may be to set the value of ACK in the first response data packet to 1, the value of ack to u+1, and the value of seq to v; where v is a positive integer.
[0079] 3. The surgical robot generates a disconnection data packet according to the preset disconnection method and sends the disconnection data packet to the target doctor. The preset disconnection method includes setting the value of FIN in the disconnection data packet to 1, the value of ack to u+1, and the value of seq to w; where w is a positive integer.
[0080] 4. After receiving the disconnection data packet, the target doctor determines the value of ack and the value of seq in the disconnection data packet, generates a second response data packet based on the value of ack, the value of seq and the second preset response method, and sends the second response data packet to the surgical robot. The second preset response method may be: using the value of ack in the disconnection data packet as the value of seq in the second response data packet, adding 1 to the value of seq in the disconnection data packet to obtain the sum as the value of ack in the second response data packet, and setting the value of ACK in the second response data packet to 1.
[0081] 5. After receiving the second response data packet, the surgical robot disconnects the bidirectional connection.
[0082] This embodiment uses a "four-wave" mechanism to disconnect the communication connection, so that both parties can understand each other's status and reduce the waste of computing resources.
[0083] Figure 5 1 is a schematic diagram of the structure of a surgical robot working device provided according to an embodiment of the present invention, and the device is used to execute the surgical robot working method provided by any of the above embodiments. The device and the surgical robot working method of the above embodiments belong to the same inventive concept, and the details not fully described in the embodiment of the surgical robot working device can refer to the embodiment of the above surgical robot working method. Figure 5 As shown, the device comprises:
[0084] The data receiving module 10 is used to receive the operation response data sent by the doctor end, determine the first counter value corresponding to the operation response data and the second counter value of the operation request data corresponding to the operation response data; wherein the operation response data and the operation request data are both data generated according to the user datagram protocol;
[0085] A delay duration determining module 11, configured to determine a delay duration between the operation response data and the operation request data based on the first counter value and the second counter value;
[0086] The surgical action execution module 12 is used to execute the surgical action corresponding to the operation response data when the delay time meets the preset delay condition.
[0087] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0088] A listening socket creation module, used for creating a listening socket based on a first Internet Protocol address corresponding to the surgical robot end and a pre-created listening port before receiving the operation response data sent by the doctor end, so as to receive a request sent by the doctor end based on the listening socket;
[0089] The target port determination module is used to verify whether the target doctor end sending the connection request is a legitimate device when the listening port receives the connection request; when the target doctor end is a legitimate device, the target port is determined in at least one communication port corresponding to the surgical robot, and the target port information of the target port is sent to the target doctor end based on the user datagram protocol, so as to establish a communication connection with the target doctor end based on the target port information.
[0090] Based on any optional technical solution in the embodiments of the present invention, optionally, the target port determination module includes:
[0091] A first connection data packet parsing unit is used to determine whether the sending end information corresponding to the first connection data packet is the target end information corresponding to the target doctor end when it is detected that the target port has received the first connection data packet; if the sending end information is the target end information, parse the first connection data packet, and determine whether the value corresponding to the connection establishment identifier is a preset connection establishment value based on the parsing result;
[0092] A first response data packet generating unit is used to generate a first response data packet corresponding to the first connection data packet based on the user datagram protocol when the value of the connection establishment identifier is a preset connection establishment value, and send the first response data packet to the target doctor end so that the target doctor end verifies the first response data packet, and generates a second connection data packet and sends it to the target port of the surgical robot when the first response data packet meets the first preset verification condition;
[0093] The communication connection establishing unit is used to establish a communication connection between the surgical robot end and the target doctor end after receiving the second connection data packet and if the second connection data packet meets the second preset verification condition.
[0094] Based on any optional technical solution in the embodiment of the present invention, optionally, the data receiving module 10 includes:
[0095] A first counter value determining unit, configured to determine, when receiving the operation response data, a value corresponding to the local counter as a first counter value;
[0096] The second counter value determination unit is used to parse the operation response data and determine the value corresponding to the data packet confirmation number corresponding to the operation response data as the second counter value; wherein the value corresponding to the data packet confirmation number is the value corresponding to the local counter when sending the operation request data.
[0097] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0098] A sequence value determination module, used to determine the sending sequence value of the first data packet that has been sent and the receiving sequence value of the second data packet corresponding to the first data packet fed back by the doctor;
[0099] The data packet discarding module is used to discard the second data packet when the receiving sequence value does not match the sending sequence value.
[0100] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0101] A first sending module is used to generate a first response data packet according to a first preset response mode after performing a surgical action corresponding to the operation response data, if the received data packet sent by the target doctor terminal meets the preset disconnection condition, and send the response data packet to the target doctor terminal;
[0102] A second sending module is used to generate a disconnection data packet according to a preset disconnection method, and send the disconnection data packet to the target doctor end, so that the target doctor end generates a second response data packet based on the disconnection data packet and the second preset response method, and sends the second response data packet to the surgical robot end;
[0103] The communication connection disconnection module is used to disconnect the communication connection with the target doctor end after receiving the second response data packet.
[0104] Based on any optional technical solution in the embodiments of the present invention, optionally, the delay duration is equal to half of the count value and the count value, and the count value and the count value are equal to the difference between the first counter value and the second counter value; the preset delay condition includes the delay duration being less than the preset duration value.
[0105] The technical solution of the embodiment of the present invention determines a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data by receiving the operation response data sent by the doctor's end; wherein the operation response data and the operation request data are both data generated in accordance with the user datagram protocol; and, based on the first counter value and the second counter value, determines the delay duration between the operation response data and the operation request data; finally, when the delay duration meets the preset delay condition, executes the surgical action corresponding to the operation response data, so that before executing the surgical action, the delay duration is considered as a factor to avoid erroneous operations caused by data delays, which is beneficial to improving the accuracy and safety of the operation process.
[0106] It is worth noting that in the above-mentioned embodiment of the surgical robot working device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0107] Figure 6 1 is a schematic diagram of the structure of an electronic device for implementing the working method of the surgical robot of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0108] like Figure 6 As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.
[0109] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as the surgical robot working method.
[0111] In some embodiments, the surgical robot working method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 20 via ROM 22 and / or communication unit 29. When the computer program is loaded into RAM 23 and executed by the processor 21, one or more steps of the surgical robot working method described above can be performed. Alternatively, in other embodiments, the processor 21 can be configured to execute the surgical robot working method in any other appropriate manner (for example, by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A surgical robot working method, characterized in that: include: Received operation response data sent by the doctor end, determine a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data; wherein the operation response data and the operation request data are both data generated according to the user datagram protocol; determining a delay time between the operation response data and the operation request data based on the first counter value and the second counter value; When the delay time meets a preset delay condition, a surgical action corresponding to the operation response data is performed.
2. The method according to claim 1, characterized in that Before the received operation response data sent by the doctor, it also includes: Creating a listening socket based on the first Internet Protocol address corresponding to the surgical robot end and the pre-created listening port to receive a request sent by the doctor end based on the listening socket; In the case where the listening port receives a connection request, verifying whether the target doctor end sending the connection request is a legitimate device; In the case that the target doctor end is the legitimate device, a target port is determined in at least one communication port corresponding to the surgical robot, and target port information of the target port is sent to the target doctor end based on the user datagram protocol to establish a communication connection with the target doctor end based on the target port information.
3. The method according to claim 2, characterized in that The establishing of a communication connection with the target doctor terminal based on the target port information includes: In the case of detecting that the target port receives the first connection data packet, determining whether the sending end information corresponding to the first connection data packet is the target end information corresponding to the target doctor end; In a case where the sending end information is the target end information, parsing the first connection data packet, and determining based on the parsing result whether the value corresponding to the connection establishment identifier is a preset connection establishment value; In a case where the value of the connection establishment identifier is the preset connection establishment value, a first response data packet corresponding to the first connection data packet is generated based on the user datagram protocol, and the first response data packet is sent to the target doctor end, so that the target doctor end verifies the first response data packet, and in a case where the first response data packet meets a first preset verification condition, a second connection data packet is generated and sent to the target port of the surgical robot; After receiving the second connection data packet, if the second connection data packet meets a second preset verification condition, a communication connection is established between the surgical robot end and the target doctor end.
4. The method according to claim 1, characterized in that: The determining a first counter value corresponding to the operation response data and a second counter value of the operation request data corresponding to the operation response data comprises: When the operation response data is received, the value corresponding to the local counter is determined as the first counter value; The value corresponding to the data packet confirmation number corresponding to the operation response data is determined as the second counter value; wherein the value corresponding to the data packet confirmation number is the value corresponding to the local counter when sending the operation request data.
5. The method according to claim 1, characterized in that Also includes: Determine a sending sequence value of a first data packet that has been sent and a receiving sequence value of a second data packet that is fed back by a doctor and corresponds to the first data packet; In a case where the received sequence value does not match the sent sequence value, the second data packet is discarded.
6. The method according to claim 2, characterized in that After the performing of the surgical action corresponding to the operation response data, the method further includes: When the received data packet sent by the target doctor terminal meets the preset disconnection condition, a first response data packet is generated according to a first preset response mode, and the response data packet is sent to the target doctor terminal; Generate a disconnection data packet according to a preset disconnection mode, and send the disconnection data packet to the target doctor end, so that the target doctor end generates a second response data packet based on the disconnection data packet and the second preset response mode, and sends the second response data packet to the surgical robot end; After receiving the second response data packet, the communication connection with the target doctor end is disconnected.
7. The method according to claim 1, characterized in that The delay duration is equal to half of the count value and the count value and the count value and the count value are equal to the difference between the first counter value and the second counter value; the preset delay condition includes that the delay duration is less than the preset duration value.
8. A surgical robot working device, characterized in that: include: A data receiving module, configured to receive operation response data sent by a doctor, determine a first counter value corresponding to the operation response data and a second counter value of operation request data corresponding to the operation response data; wherein both the operation response data and the operation request data are data generated according to a user datagram protocol; a delay duration determining module, configured to determine a delay duration between the operation response data and the operation request data based on the first counter value and the second counter value; The surgical action execution module is used to execute the surgical action corresponding to the operation response data when the delay time meets the preset delay condition.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the surgical robot working method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the surgical robot working method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Surgical robot system and control method therefor
WO2026130252A1
