Medical instrument master-slave system and communication verification method
By splitting the large data packet into sub-packets and performing integrity verification on the receiving end, the network congestion and data loss problems of traditional medical instrument master and slave system when transmitting large data packets are solved, and communication efficiency and stability are improved. Achieve higher data transmission accuracy and system reliability.
Patent Information
- Application Number
- CN202411325833.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-20
AI Technical Summary
Traditional medical instrument master-slave systems are prone to cause network congestion and data loss when transmitting large data packets, affecting communication performance and system stability.
By splitting large data packets into multiple sub-packets for transmission and performing integrity verification on the receiving end, only failed sub-packets are retransmitted, and the communication and verification process is optimized to ensure the accuracy and integrity of data transmission.
It reduces the risk of network congestion, improves data transmission efficiency and system stability, reduces data loss and communication failures, and improves overall communication performance.
Smart Images

Figure CN119172328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical technology, and in particular to a medical instrument master-slave system and a communication verification method. Background Art
[0002] In medical instruments, master-slave system communication is a key factor to ensure the normal operation of the instrument and the reliability of data.
[0003] At present, the traditional medical instrument master-slave system communication has the following challenges: when the data packets transmitted between the host and multiple slaves are too large, it is easy to cause network congestion, resulting in reduced data transmission efficiency. In the case of data packet transmission failure, data retransmission is required, which will further increase the network load and worsen network congestion, thus affecting the overall communication performance and system stability. Summary of the invention
[0004] The purpose of the present invention is to provide a medical instrument master-slave system and a communication verification method, aiming to solve the problems of communication congestion and data loss that may be caused when traditional medical instrument master-slave transmits too large data packets.
[0005] To achieve the above-mentioned object, in a first aspect, the present invention provides a medical instrument master-slave system communication verification method, comprising the following steps:
[0006] The slave side obtains the data to be transmitted to the host side from the hardware module;
[0007] The slave end packages and processes the data to be sent;
[0008] The slave end transmits the processed data to the host end, and the host end verifies the sub-packet data;
[0009] The host side processes the corresponding complete data packet according to specific business requirements.
[0010] Among them, “the slave end subpackets and processes the data to be sent” includes:
[0011] Determine the number of sub-packets appropriately based on the network;
[0012] The sub-packet data is processed based on the sub-packet quantity.
[0013] Among them, in “the slave end transmits the processed data to the host end, and the host end verifies the sub-packaged data”, it includes:
[0014] The slave transmits the packetized data to the host through the network. If the host does not respond within 3 seconds, it is considered that the transmission has failed and attempts to retransmit. If there is no response for 3 times, it is considered that the communication has failed and the connection with the host is disconnected.
[0015] The host performs a frame header check on the data, and if the frame headers do not match, no response command is returned;
[0016] The host performs communication ID verification on the data, and if there is no match, no response command is returned;
[0017] The host performs sub-packet length check on the data. If they are inconsistent, it means that an error occurs during data transmission and no response command is returned;
[0018] The host performs a sub-packet legality check on the data. If the sub-packet legality is illegal, it indicates that an error has occurred during the transmission process and no response command is returned;
[0019] The host performs a cyclic redundancy check on the data, and if the calculation result is inconsistent with the last byte of the data, it is considered that an error occurs in the data transmission process and no response command is returned;
[0020] The host side checks whether the data is the last sub-packet. If not, a response command is returned to the slave side and the current data is stored in the cache. If yes, an integrity check step is performed.
[0021] Among them, in "the host side checks whether the data is the last sub-packet. If not, it returns a response command to the slave side and stores the current data in the cache; if so, it performs an integrity verification step", the integrity verification step includes: parameter quantity verification and parameter consistency verification. If the parameter quantity verification and the parameter consistency verification are passed, the transmission is considered successful.
[0022] Among them, "the host end processes the corresponding complete data packet according to specific business requirements" includes:
[0023] The host terminal stores the data that has been transmitted and verified;
[0024] The software module on the host side decodes and analyzes the stored data;
[0025] The decoded data is subjected to layered processing.
[0026] Among them, in "performing layered processing on the decoded data", the layered processing includes a data layer, a logic layer and a view layer.
[0027] In a second aspect, a medical instrument master-slave system is provided, which is used in the medical instrument master-slave system communication verification method described in the first aspect, and comprises a host end and a plurality of slave ends, wherein the plurality of slave ends are respectively connected to the host end.
[0028] A medical instrument master-slave system communication verification method of the present invention comprises the following steps: the slave end obtains data to be transmitted to the host end from the hardware module; the slave end sub-packets and processes the data to be transmitted; the slave end transmits the processed data to the host end, and the host end verifies the sub-packet data; the host end processes the corresponding complete data packet according to specific business requirements. The present invention reduces the risk of network congestion and improves data transmission efficiency by dividing a large data packet into multiple sub-packets for transmission. When the sub-packet transmission fails, only the failed sub-packet needs to be retransmitted, avoiding the burden of retransmission of the entire data packet and reducing the possibility of data loss. All sub-packets are assembled at the receiving end and integrity verification is performed to ensure the accuracy and integrity of the transmitted data. Through the optimized communication and verification method, the stability and reliability of the master-slave system communication are enhanced, and the occurrence of communication failures is reduced. Not only the success rate of a single communication is improved, but also the overall communication performance is improved by reducing the number of retransmissions and optimizing the network load, thereby solving the problem of communication congestion and data loss that may be caused by the traditional medical instrument master-slave when transmitting an overly large data packet. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0030] Figure 1 The present invention provides a flow chart of a medical instrument master-slave system communication verification method.
[0031] Figure 2 It is a flow chart of how the slave terminal subpackets and processes the data to be sent.
[0032] Figure 3 It is a flowchart in which the slave end transmits the processed data to the host end, and the host end verifies the sub-packet data.
[0033] Figure 4 It is a flowchart of the host end processing the corresponding complete data packet according to specific business requirements.
[0034] Figure 5 It is the data processing flow sent from the machine.
[0035] Figure 6 It is the host side receiving data processing flow.
[0036] Figure 7 It is the process of receiving data and processing it on the host side - the process of checking the legality of data in sub-packets.
[0037] Figure 8 It is the host-side data receiving processing process - data integrity detection process.
[0038] Fig. 9 It is the communication response process.
[0039] Fig.10 It is a schematic diagram of a medical instrument master-slave system provided by the present invention.
[0040] In the figure: 1-host side, 2-slave side. DETAILED DESCRIPTION
[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0042] See also Figures 1 to 9 In a first aspect, the present invention provides a medical instrument master-slave system communication verification method, comprising the following steps:
[0043] S1 obtains data to be transmitted to the host terminal 1 from the hardware module from the slave terminal 2;
[0044] Specifically, the INC software of the slave end 2 obtains the data to be transmitted to the host end 1 from the hardware module. The photoelectric signals obtained by various hardware components such as sensors are transmitted to the processing unit of the slave end 2 through a specific interface. The processing unit processes the data to generate the original image data to be transmitted.
[0045] S2: The slave terminal 2 subpackets and processes the data to be sent;
[0046] S21 appropriately determines the number of sub-packets based on the network;
[0047] Specifically, evaluate the network quality: by calculating the round-trip time and packet loss rate, determine the current network quality as high, medium, and low, and the maximum length of the subpacket is 8192, 4096, and 1024 bytes respectively. For example, if the current network quality is medium, the maximum length of the subpacket is 4096 bytes, and each subpacket is no longer than the maximum length of 4096 bytes, and the number of subpackets N is obtained.
[0048] S22 processes the sub-packet data based on the sub-packet quantity.
[0049] Specifically, add a fixed frame header of 2 bytes; add a unique communication ID of slave end 2 of 2 bytes; add a sub-packet data length of 4 bytes; add a 1-byte mark to indicate whether it is the last sub-packet; for sub-packet data processing, each parameter length mark occupies 4 bytes and indicates the length of the subsequent parameter data. For example, for the two parameters "parameter A" and "parameter B", the lengths are L1 and L2 bytes respectively. At this time, the sub-packet data contains: a 4-byte "parameter A" length mark (value is L1), followed by the L1-byte parameter A content, plus a 4-byte "parameter B" length mark (value is L2), and finally the L2-byte parameter B content.
[0050] All previous data are cyclically redundancy checked, a checksum is generated and added to the end, 1 byte
[0051] S3 the slave end 2 transmits the processed data to the host end 1, and the host end 1 verifies the sub-packet data;
[0052] S31 The slave end 2 transmits the packetized data to the host end 1 through the network. If the host end 1 does not respond within 3 seconds, it is considered that the transmission has failed and attempts to retransmit. If there is no response for 3 times, it is considered that the communication has failed and the connection with the host end 1 is disconnected;
[0053] Specifically, the machine end transmits the packetized data to the host end 1 through the network. During the transmission process, the slave end 2 monitors the data transmission status. If the host end 1 does not return any response signal within 3 seconds, the slave end 2 will consider the transmission failed and try to retransmit the data packet. In order to ensure reliable data transmission, the slave end 2 will retransmit up to 3 times. If the confirmation response from the host end 1 is still not received after 3 retransmissions, the slave end 2 will consider the communication failed and actively disconnect from the host end 1.
[0054] S32: the host end 1 performs a frame header check on the data, and if the frame headers do not match, no response command is returned;
[0055] Specifically, the host end 1 checks whether the received frame data contains a 2-byte fixed frame header. If the frame header does not match, it means that the data may have a transmission error, and no response command is returned at this time.
[0056] S33 the host end 1 performs communication ID verification on the data, and if there is no match, does not return a response command;
[0057] Specifically, the host 1 checks the communication ID contained in the data packet. To avoid interference from duplicate data packets, the host 1 ensures that the ID has not been repeated in the past 24 hours. If the ID is repeated, it means that the data may be retransmitted. For the same communication ID, only the first one received is used, and no response command is returned.
[0058] S34 The host end 1 performs sub-packet length check on the data. If they are inconsistent, it means that an error occurs during data transmission and no response command is returned;
[0059] Specifically, the host 1 checks bytes 5-8 of the data to ensure that the sub-packet data length they identify is consistent with the actual received length. This check can effectively prevent incomplete data caused by data loss or damage during network transmission. If there is inconsistency, it means that an error occurred during the transmission process, and no response command is returned at this time.
[0060] S35: the host end 1 performs a sub-packet legality check on the data. If it is illegal, it indicates that an error has occurred during the transmission process and no response command is returned;
[0061] Specifically, to check the legality of the sub-packet data, the host end 1 will check one by one according to the steps in the flowchart "Host end 1 receiving data processing process-sub-packet data legality check process". If it is illegal, it means that an error occurred during the transmission process, and no response command is returned at this time. For example, at this time, the sub-packet containing the parameters "parameter A" and "parameter B" is checked. When checking, the host end 1 first extracts the 4-byte length identifier from the sub-packet and obtains the value L1. After skipping the subsequent L1 length bytes, the 4-byte length identifier L2 is extracted, and the byte length of the remaining data is checked to see if it is consistent with L2. If the byte length matches, it means that the sub-packet data is legal; otherwise, the data is determined to be illegal.
[0062] S36 The host end 1 performs a cyclic redundancy check on the data. If the calculation result is inconsistent with the last byte of the data, it is considered that an error occurs in the data transmission process and no response command is returned;
[0063] Specifically, the host end 1 performs CRC calculation on the received frame data (except the last bit), and compares the result with the last byte in the frame data. If the two are inconsistent, it means that an error occurred during the data transmission process, and no response command is returned at this time.
[0064] S37 The host end 1 checks whether the data is the last sub-packet. If not, it returns a response command to the slave end 2 and stores the current data in the cache; if so, it performs an integrity check step.
[0065] The integrity check step includes: parameter quantity check and parameter consistency check. If the parameter quantity check and the parameter consistency check are passed, the transmission is considered successful.
[0066] Specifically, check whether it is the last sub-packet. If not, return a response command to the slave 2 and store the current data in the cache. If yes, perform an integrity check step.
[0067] Integrity check:
[0068] The host 1 will check the spliced data packet to ensure that the number of all parameters is consistent with the number specified in the document. If the number of parameters is inconsistent, the verification fails;
[0069] The host 1 checks each parameter in the spliced data one by one to ensure that the byte length of its value type is consistent with the length of the actual transmitted data. If any inconsistency is found, the check will fail, which may indicate that the data has been damaged or tampered with during transmission;
[0070] If all parameter checks pass, the host 1 will consider the transmission of the original image data to be successful. At this point, the data packet will be formally stored or used for subsequent processing.
[0071] S4 The host end 1 processes the corresponding complete data packet according to specific business requirements.
[0072] S41: the host end 1 stores the data that has been transmitted and verified;
[0073] Specifically, data reception and storage: After completing data transmission and verification, the host 1 formally receives and stores the data packets that have passed the integrity check. The data packets will be moved from the cache to the storage layer, usually a database or other persistent storage device, for subsequent processing and access.
[0074] S42: the software module of the host end 1 decodes and analyzes the stored data;
[0075] Specifically, after storage, the software module (such as IPU software) of the host end 1 starts decoding and parsing the original image data, converting it into an internally usable format and organizing it according to business logic. Parsing includes extracting the image name, content and related metadata (such as timestamp, corresponding sample, etc.).
[0076] S43 performs hierarchical processing on the decoded data.
[0077] The layered process includes a data layer, a logic layer and a view layer.
[0078] Specifically, the decoded data will be processed at multiple levels on the host side 1, and the layered processing includes:
[0079] The data layer is responsible for data access, query and preliminary processing, such as format conversion and archiving;
[0080] The logic layer applies business rules for further processing, such as image enhancement, feature extraction, and analytical calculations, for business decision-making or scientific analysis;
[0081] The view layer displays the processed data visually to the user for real-time monitoring, historical data backtracking, or report generation;
[0082] Data analysis and application: Users can conduct in-depth analysis and application of image data through host-side application software, such as medical analysis, generation of diagnostic reports, statistical analysis of scientific research experiments, etc., to help extract valuable information and support decision-making and innovation.
[0083] See also Fig.10 In the second aspect, a medical instrument master-slave system is provided, which is used for the medical instrument master-slave system communication verification method described in the first aspect, and comprises a host end 1 and multiple slave ends 2, wherein the multiple slave ends 2 are respectively connected to the host end 1.
[0084] Beneficial effects:
[0085] 1. Reduce communication congestion: By dividing large data packets into multiple sub-packets for transmission, the risk of network congestion is reduced and data transmission efficiency is improved.
[0086] 2. Reduce the risk of data loss: When a sub-packet transmission fails, only the failed sub-packet needs to be retransmitted, avoiding the burden of retransmitting the entire data packet and reducing the possibility of data loss.
[0087] 3. Improve the accuracy and integrity of data transmission: Assemble all sub-packets at the receiving end and perform integrity checks to ensure the accuracy and integrity of transmitted data.
[0088] 4. Improve system stability: Through optimized communication and verification methods, the stability and reliability of the master-slave system communication are enhanced, and the occurrence of communication failures is reduced.
[0089] 5. Improve overall communication performance: This method not only improves the success rate of a single communication, but also improves the overall communication performance by reducing the number of retransmissions and optimizing the network load.
[0090] The above disclosure is only a preferred embodiment of a medical instrument master-slave system and a communication verification method of the present invention. Of course, this cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A medical instrument master-slave system communication verification method, It is characterized in that The following steps are involved: The slave side obtains the data to be transmitted to the host side from the hardware module; The slave end packages and processes the data to be sent; The slave end transmits the processed data to the host end, and the host end verifies the sub-packet data; The host side processes the corresponding complete data packet according to specific business requirements.
2. The medical instrument master-slave system communication verification method according to claim 1, It is characterized in that In "the slave end performs packetization and processing on the data to be sent", it includes: Determine the number of sub-packets appropriately based on the network; The sub-packet data is processed based on the sub-packet quantity.
3. The medical instrument master-slave system communication verification method as claimed in claim 2, It is characterized in that In “the slave end transmits the processed data to the host end, and the host end verifies the sub-packaged data”, it includes: The slave transmits the packetized data to the host through the network. If the host does not respond within 3 seconds, it is considered that the transmission has failed and attempts to retransmit. If there is no response for 3 times, it is considered that the communication has failed and the connection with the host is disconnected. The host performs a frame header check on the data, and if the frame headers do not match, no response command is returned; The host performs communication ID verification on the data, and if there is no match, no response command is returned; The host performs sub-packet length check on the data. If they are inconsistent, it means that an error occurs during data transmission and no response command is returned; The host performs a sub-packet legality check on the data. If the sub-packet legality is illegal, it indicates that an error has occurred during the transmission process and no response command is returned; The host performs a cyclic redundancy check on the data, and if the calculation result is inconsistent with the last byte of the data, it is considered that an error occurs in the data transmission process and no response command is returned; The host side checks whether the data is the last sub-packet. If not, a response command is returned to the slave side and the current data is stored in the cache. If yes, an integrity check step is performed.
4. The medical instrument master-slave system communication verification method as claimed in claim 3, It is characterized in that The host checks whether the data is the last sub-packet, and if not, returns a response command to the slave, and stores the current data in a cache; If yes, then perform an integrity check step”, the integrity check step includes: parameter quantity check and parameter consistency check. If the parameter quantity check and the parameter consistency check are passed, the transmission is considered successful.
5. The medical instrument master-slave system communication verification method as claimed in claim 4, It is characterized in that In "the host end processes the corresponding complete data packet according to specific business requirements", it includes: The host terminal stores the data that has been transmitted and verified; The software module on the host side decodes and analyzes the stored data; The decoded data is subjected to layered processing.
6. The medical instrument master-slave system communication verification method as claimed in claim 5, It is characterized in that In “performing layered processing on the decoded data”, the layered processing includes a data layer, a logic layer, and a view layer.
7. A medical instrument master-slave system, used in the medical instrument master-slave system communication verification method according to any one of claims 1 to 6, It is characterized in that It includes a host end and multiple slave ends, and the multiple slave ends are respectively connected to the host end.
