A dual-NIC IP automatic allocation system and method for medical equipment production lines
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-14
AI Technical Summary
[0006]现有技术中,DHCP协议要求网络中必须存在DHCP服务器,这在医疗设备组成的独立内网(没有DHCP服务器)场景下存在问题,部署专用DHCP服务器增加了成本和复杂度,且DHCP服务器故障会导致整个网络瘫痪
[0036] This invention discloses a dual-NIC automatic IP address allocation system and method for medical equipment pipelines. The core technical concepts include: First, deploying a lightweight IP address allocation system within the device's internal network, eliminating the need for a dedicated DHCP server; Second, electing a master control device (i.e., address manager) from multiple devices through a distributed negotiation mechanism; Third, the master control device assigns IP addresses to other devices in the network, achieving zero-configuration deployment; Fourth, internal network IP configuration is independent of external network DHCP configuration, avoiding DHCP conflicts between Windows dual-NIC systems. This invention solves the problem of automatic IP address configuration when multiple medical devices form a pipeline in a hospital laboratory setting. It can automatically assign an IP address to another NIC connected to the device's internal network when one NIC has already automatically obtained an IP address via DHCP and connected to the hospital's LIS system, enabling rapid networking and pipeline deployment of multiple medical devices.
Smart Images

Figure CN122578583A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to a dual-NIC automatic IP allocation system and method for medical equipment production lines. Background Technology
[0002] In the field of computer network management, automatic IP address allocation primarily relies on the DHCP (Dynamic Host Configuration Protocol) protocol. DHCP is a local area network (LAN) protocol that operates using UDP and has two main uses: automatically assigning IP addresses to internal networks or network service providers, and providing users or internal network administrators with a means of centrally managing all computers. The DHCP protocol uses a client / server model, where the server dynamically assigns IP addresses and other network configuration parameters to network devices. Its process includes the following four steps: DHCPDISCOVER (discovery), where the client broadcasts a request for an IP address; DHCPOFFER (offer), where the DHCP server offers an IP address; DHCPREQUEST (request), where the client selects to accept a particular IP address; and DHCPACK (acknowledgment), where the server confirms the IP address lease. When the DHCP server and client are on different network segments, a DHCP relay agent is also needed to achieve cross-segment IP address allocation.
[0003] Besides the DHCP protocol, other automatic IP address allocation schemes exist in existing technologies. For example, APIPA (Automatic Private IP Addressing) is a built-in automatic IP address allocation mechanism in Windows systems. When a DHCP server is unavailable, the system automatically assigns an IP address within the 169.254.0.0 / 16 subnet to the network card. APIPA's IP address range is from 169.254.0.1 to 169.254.255.254, with a subnet mask of 255.255.0.0 ( / 16). It only allows communication within the local subnet and cannot access the internet, as defined by the RFC 3927 standard. Furthermore, IPv4 Link-Local Addressing (RFC 3927) is a zero-configuration networking (Zeroconf) technology that allows devices to automatically configure IP addresses without a DHCP server. Its features include the use of the 169.254 / 16 prefix, and devices allocating addresses through random selection and conflict detection. It is suitable for communication between devices on the same physical link but not for communication with devices on different links.
[0004] However, in practical applications, especially in medical device networking scenarios, the DHCP protocol has some limitations, necessitating additional technical means to resolve IP address allocation issues. Windows systems have known technical limitations when handling multi-NIC DHCP configurations. According to Microsoft's official documentation (KB974ea96f), when the following conditions are met: there is a multi-homed DHCP client and a DHCP server; both network adapters on the DHCP client and the network adapter on the DHCP server are connected to the same network segment; both network adapters on the DHCP client are configured to automatically obtain IP addresses; and conflict detection is enabled on the DHCP server, executing the `ipconfig / release` and `ipconfig / renew` commands will generate a "bad_address" entry on the DHCP server. This entry contains the IP address previously assigned to the second network adapter. Furthermore, when configuring multiple network interfaces in Windows, if each interface has a default gateway, it can cause network connectivity problems. This is because Windows' routing table contains multiple routes to the same destination, and the system selects the preferred network through the "automatic hop" function. Multiple default gateways can lead to network traffic routing confusion.
[0005] In modern hospital laboratories, medical equipment typically needs to be connected to the hospital's Laboratory Information System (LIS). The LIS system is a laboratory information management system specifically designed for hospital laboratories. It networks laboratory instruments with computers to enable functions such as patient sample registration, automatic collection of test results, report generation and transmission, quality control management, and equipment operation monitoring. In practical applications, hospital laboratory equipment networking usually adopts the following methods: In a single-device scenario, a testing device is connected via dual network interface cards (NICs). NIC 1 connects to the hospital's intranet, obtains an IP address via DHCP, and communicates with the LIS system; NIC 2 connects to the manufacturer's intranet, uses a static IP address, and communicates with other devices. In a pipeline scenario (multi-device networking), multiple devices from the same manufacturer form a pipeline. These devices need to be interconnected through independent intranets. Each device connects to the hospital's LIS system via a second NIC, and the devices need to coordinate their work and share samples and test results.
[0006] In existing technologies, the DHCP protocol requires the presence of a DHCP server in the network. This presents problems in scenarios where medical devices form an independent intranet (without a DHCP server). Deploying a dedicated DHCP server increases cost and complexity, and a DHCP server failure can paralyze the entire network. Furthermore, the normal operation of the DHCP protocol requires routers or switches to support DHCP relay, network devices to support broadcast message forwarding, and proper network planning and VLAN configuration. These conditions are difficult to meet in temporary or isolated network scenarios. On the other hand, manually configuring static IP addresses in medical device scenarios suffers from low deployment efficiency (requiring engineers to configure each device individually, resulting in time-consuming and labor-intensive large-scale deployments), high risk of IP address conflicts (manual configuration may lead to duplicate IP addresses), and difficulty in troubleshooting. While APIPA and Link-Local Addressing offer some automatic configuration capabilities, they only use the 169.254.0.0 / 16 network segment, resulting in limited address space. They only support communication between devices on the same link, cannot communicate across routers, and offer random address allocation without centralized management and control, making them unsuitable for complex network topologies.
[0007] Therefore, in the context of dual-NIC isolated networks for medical devices, where one NIC of a device has already automatically obtained an IP address via DHCP and connected to the hospital's LIS system, how to automatically assign an IP address to the other NIC connected to the device's intranet in order to achieve rapid networking and pipeline deployment of multiple medical devices remains a pressing technical problem that needs to be solved. Summary of the Invention
[0008] The purpose of this invention is to provide a dual-NIC IP automatic allocation system and method for medical equipment pipelines, which can automatically allocate an IP address to another NIC connected to the intranet of a hospital LIS system when one NIC of a device has already automatically obtained an IP address through DHCP. This enables rapid networking and pipeline deployment of multiple medical devices.
[0009] To achieve the above objectives, in a first aspect, the present invention provides a dual-NIC IP automatic allocation system for medical equipment production lines, including IP allocation client software deployed on multiple medical devices, each medical device being equipped with dual NICs, one NIC being used to connect to the hospital network and the other NIC being used to connect to the device's intranet;
[0010] The IP allocation client software includes a network card identification module, a device discovery module, a device election module, an IP address allocation module, an IP address request module, a conflict detection module, and a configuration persistence module. The network card identification module, the device discovery module, the device election module, and the IP address allocation module are connected in sequence. The IP address request module is connected to both the device election module and the IP address allocation module. The conflict detection module is connected to both the IP address allocation module and the IP address request module. The configuration persistence module is connected to both the IP address allocation module, the IP address request module, and the network card identification module.
[0011] The network card identification module is used to identify dual network cards, identifying the network card with DHCP enabled as an external network card, and the network card without DHCP enabled or configured with a static IP as an internal network card.
[0012] The device discovery module is used to send device discovery messages via UDP broadcast within the device intranet to discover other devices in the network;
[0013] The device election module is used to elect one device as the master device and the remaining devices as slave devices in the device intranet through a distributed election algorithm.
[0014] The IP address allocation module is deployed on the master control device and is used to maintain the IP address pool, respond to IP address requests from slave devices, and allocate IP addresses to slave devices.
[0015] The IP address request module is deployed on the slave device and is used to send IP address requests to the master device, receive and apply the assigned IP address;
[0016] The conflict detection module is used to perform IP address conflict detection before IP address allocation, after allocation, and during operation.
[0017] The configuration persistence module is used to persistently store IP address configuration information, and the configuration is automatically restored after the device restarts.
[0018] The external network card obtains an IP address from the hospital network using a Windows DHCP client, while the internal network card uses an IP address allocated by the IP address allocation module. The IP configurations of the external network card and the internal network card are independent of each other and do not interfere with each other.
[0019] The device discovery module sends device discovery messages via UDP broadcast. The message format includes: version number, message type, device type, device ID, MAC address, device name, and timestamp. The message types include: device discovery request, device discovery response, master device announcement, and heartbeat message.
[0020] The device election module uses an improved Bully algorithm for distributed election, which includes: device priority = device type priority × 100 + performance score; sending election messages to devices with higher priority; if no response is received from a higher priority device, sending a master device announcement message after a random delay.
[0021] The IP address pool maintained by the IP address allocation module includes: the default address range 192.168.1.0 / 24; the allocatable range 192.168.1.10-192.168.1.250; the reserved address range 192.168.1.1-192.168.1.9; and the allocation is segmented according to device type, with different device types using different address ranges.
[0022] The conflict detection module includes a three-layer detection mechanism: the first layer is proactive detection before allocation, sending 3 ARP requests with a 1-second interval, and listening for 2 seconds to wait for ARP responses; the second layer is immediate detection after configuration, sending a gratuitous ARP declaration immediately after configuring the IP address; the third layer is continuous monitoring during runtime, sending a gratuitous ARP every 5 minutes and continuously listening for ARP packets in the network.
[0023] The configuration persistence module employs a dual persistence mechanism, specifically including: storing configuration information in the Windows registry and configuration files; reading the persistent configuration after the device restarts; and applying the configuration directly if the configuration is valid and the lease period has not expired, skipping the IP address allocation process.
[0024] Secondly, the present invention also provides a method for automatic IP allocation for dual network cards in a medical equipment production line, comprising:
[0025] Each medical device is equipped with dual network cards, one for connecting to the hospital network and the other for connecting to the device's internal network;
[0026] After the device starts up, it recognizes the two network cards and uses the network card with DHCP enabled as the external network card, and the network card without DHCP enabled or configured with a static IP as the internal network card.
[0027] The external network card uses a Windows DHCP client to obtain an IP address from the hospital network;
[0028] Discover other devices on the network by sending UDP broadcast messages through the device's internal network;
[0029] A master device is elected in the device intranet using a distributed election algorithm, with the remaining devices serving as slave devices.
[0030] The master control device maintains an IP address pool, and slave devices send IP address requests to the master control device.
[0031] The master control device responds to the IP address request and selects an available IP address from the IP address pool;
[0032] After selecting an IP address, the main control device performs ARP collision detection.
[0033] If a conflict is detected, select the next IP address and re-perform the conflict detection; if no conflict is detected, send an IP address allocation response to the slave device.
[0034] The slave device receives the IP address allocation response, configures the internal network card IP address, and sends a gratuitous ARP statement;
[0035] Slave devices persistently store IP address configuration information.
[0036] This invention discloses a dual-NIC automatic IP address allocation system and method for medical equipment pipelines. The core technical concepts include: First, deploying a lightweight IP address allocation system within the device's internal network, eliminating the need for a dedicated DHCP server; Second, electing a master control device (i.e., address manager) from multiple devices through a distributed negotiation mechanism; Third, the master control device assigns IP addresses to other devices in the network, achieving zero-configuration deployment; Fourth, internal network IP configuration is independent of external network DHCP configuration, avoiding DHCP conflicts between Windows dual-NIC systems. This invention solves the problem of automatic IP address configuration when multiple medical devices form a pipeline in a hospital laboratory setting. It can automatically assign an IP address to another NIC connected to the device's internal network when one NIC has already automatically obtained an IP address via DHCP and connected to the hospital's LIS system, enabling rapid networking and pipeline deployment of multiple medical devices. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0038] Figure 1 This is a schematic diagram of the structure of a dual-NIC IP automatic allocation system for a medical equipment production line according to the present invention.
[0039] Figure 2 This is an architecture diagram of a dual-NIC IP automatic allocation system for a medical equipment production line according to the present invention.
[0040] Figure 3 This is a flowchart of the IP address allocation process for an automatic IP allocation method for dual network cards in a medical equipment production line according to the present invention.
[0041] Figure 4 This is a flowchart of the overall process of a dual-NIC automatic IP allocation method for a medical equipment production line according to the present invention.
[0042] 101-Network Card Identification Module, 102-Device Discovery Module, 103-Device Election Module, 104-IP Address Allocation Module, 105-IP Address Request Module, 106-Conflict Detection Module, 107-Configuration Persistence Module. Detailed Implementation
[0043] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, but should not be construed as limiting the present invention.
[0044] Firstly, please refer to Figures 1-3 The present invention provides a dual-NIC IP automatic allocation system for medical equipment production lines, including IP allocation client software deployed on multiple medical devices. Each medical device is equipped with dual NICs, one of which is used to connect to the hospital network and the other is used to connect to the device's internal network.
[0045] The IP allocation client software includes a network card identification module 101, a device discovery module 102, a device election module 103, an IP address allocation module 104, an IP address request module 105, a conflict detection module 106, and a configuration persistence module 107. The network card identification module 101, the device discovery module 102, the device election module 103, and the IP address allocation module 104 are connected in sequence. The IP address request module 105 is connected to the device election module 103 and the IP address allocation module 104, respectively. The conflict detection module 106 is connected to the IP address allocation module 104 and the IP address request module 105, respectively. The configuration persistence module 107 is connected to the IP address allocation module 104, the IP address request module 105, and the network card identification module 101, respectively.
[0046] The network card identification module 101 is used to identify dual network cards, identify the network card with DHCP enabled as an external network card, and identify the network card without DHCP enabled or configured with a static IP as an internal network card.
[0047] The device discovery module 102 is used to send device discovery messages via UDP broadcast in the device intranet to discover other devices in the network;
[0048] The device election module 103 is used to elect one device as the master device and the remaining devices as slave devices in the device intranet through a distributed election algorithm.
[0049] The IP address allocation module 104 is deployed on the master control device and is used to maintain the IP address pool, respond to IP address requests from slave devices, and allocate IP addresses to slave devices.
[0050] The IP address request module 105 is deployed on the slave device and is used to send IP address requests to the master device, receive and apply the assigned IP address;
[0051] The conflict detection module 106 is used to perform IP address conflict detection before, after, and during IP address allocation.
[0052] The configuration persistence module 107 is used to persistently store the IP address configuration information, and the configuration is automatically restored after the device restarts.
[0053] The external network card obtains an IP address from the hospital network using a Windows DHCP client, while the internal network card uses an IP address allocated by the IP address allocation module 104. The IP configurations of the external network card and the internal network card are independent of each other and do not interfere with each other.
[0054] Secondly, the device discovery module 102 sends device discovery messages via UDP broadcast. The message format includes: version number, message type, device type, device ID, MAC address, device name, and timestamp. The message types include: device discovery request, device discovery response, master device announcement, and heartbeat message.
[0055] Meanwhile, the device election module 103 uses an improved Bully algorithm for distributed election, which specifically includes: device priority = device type priority × 100 + performance score; sending election messages to devices with higher priority; if no response is received from a higher priority device, waiting for a random delay before sending a master device announcement message.
[0056] In addition, the IP address pool maintained by the IP address allocation module 104 includes: the default address range 192.168.1.0 / 24; the allocatable range 192.168.1.10-192.168.1.250; the reserved address range 192.168.1.1-192.168.1.9; and the address pool is divided into segments according to device type, with different device types using different address ranges.
[0057] Furthermore, the conflict detection module 106 includes a three-layer detection mechanism: the first layer is proactive detection before allocation, sending 3 ARP requests with a 1-second interval, and listening for 2 seconds to wait for ARP responses; the second layer is immediate detection after configuration, sending a gratuitous ARP declaration immediately after configuring the IP address; the third layer is continuous monitoring during runtime, sending a gratuitous ARP every 5 minutes and continuously listening for ARP packets in the network.
[0058] Finally, the configuration persistence module 107 adopts a dual persistence mechanism, which includes: storing configuration information in the Windows registry and configuration file; reading the persistent configuration after the device restarts; and applying the configuration directly if the configuration is valid and the lease period has not expired, skipping the IP address allocation process.
[0059] This invention discloses a dual-NIC IP automatic allocation system for a medical equipment production line. The core technical modules of this system include seven parts. First, the NIC identification module 101 is responsible for identifying the dual NIC configuration of the device, distinguishing between the external NIC and the internal NIC. Its identification algorithm is based on DHCP status NIC identification. The input is a list of all network adapters in the system, and the output is the external NIC and the internal NIC. The specific steps include: traversing all network adapters, checking the DHCP status of each adapter, identifying adapters with DHCP enabled as external NICs, identifying adapters with DHCP disabled or static IPs as internal NICs, and verifying the identification results (checking the network connection status).
[0060] Second, the device discovery module 102 is responsible for discovering other devices in the device's intranet, establishing a network topology view, and using a UDP broadcast-based heartbeat mechanism to achieve device discovery. The protocol format is: version number (1 byte) | message type (1 byte) | device type (1 byte) | device ID (8 bytes) | MAC address (6 bytes) | device name (variable length) | timestamp (8 bytes); message types include device discovery request (DISCOVERY_REQUEST), device discovery response (DISCOVERY_RESPONSE), master device announcement (MASTER_ANNOUNCE), and heartbeat message (HEARTBEAT).
[0061] Third, the device election module 103 is responsible for electing a master control device within the device intranet, ensuring that there is only one master control device in the network. The election algorithm adopts a modified Bully algorithm, with the input being a list of all devices in the network and the output being the master control device. Specific steps include: device priority is defined as device type priority multiplied by 100 plus a performance score, where the device type priority is: dedicated control device > analysis device > pre-processing device; and the performance priority is: CPU performance > memory size > ... Disk space, device ID priority is based on MAC address; the device with the smaller MAC address has higher priority. Election triggering conditions include: no master device in the network, master device offline, new device joining with higher priority, or manual triggering of re-election. The election process is as follows: a candidate device initiates an election, calculates its own priority, sends an ELECTION message to the device with higher priority, and waits for a response (timeout: 3 seconds). The device receiving the ELECTION message: if its own priority is higher, it replies with an OK message and initiates its own election; if its own priority is lower, it ignores the message. Becoming a candidate master device: if it does not receive a response from a higher priority device, it waits for a random delay of 0-2 seconds and then sends a MASTER_ANNOUNCE broadcast message. The device receiving the MASTER_ANNOUNCE message: records the master device information; if it is a candidate device with higher priority, it re-initiates the election; otherwise, it accepts the master device and ends the election.
[0062] Fourth, the IP address allocation module 104 is responsible for allocating IP addresses to slave devices and maintaining the address pool status. The IP address allocation protocol used has the following format: Version Number (1 byte) | Message Type (1 byte) | Transaction ID (4 bytes) | Reserved (2 bytes) | Options (variable length). Message types include IP address discovery request (IP_DISCOVER), IP address offer (IP_OFFER), IP address request (IP_REQUEST), IP address confirmation (IP_ACK), IP address rejection (IP_NACK), IP address release (IP_RELEASE), and IP address renewal (IP_RENEW).
[0063] Fifth, the IP address request module 105, deployed on the slave device, is used to send IP address requests to the master device and to receive and apply the assigned IP address.
[0064] refer to Figure 3This diagram illustrates the complete IP address allocation process, employing the standard 4-step DHCP handshake protocol and including an ARP conflict detection mechanism. The process begins with the slave device starting up and sending an IP_DISCOVER broadcast; the master device receives the request, selects an available IP address, and performs ARP conflict detection (sending three ARP requests, listening for 2 seconds each); if a conflict is detected, the next IP address is selected for re-detection; otherwise, an IP_OFFER message (containing IP address, subnet mask, and lease information) is sent; the slave device receives the IP_OFFER and sends an IP_REQUEST confirmation; the master device receives the IP_REQUEST and sends an IP_ACK confirmation; the slave device receives the IP_ACK, configures its internal network card IP address, and sends a gratuitous ARP declaration; finally, a lease renewal timer is started, completing the IP address allocation. This process ensures IP address uniqueness through ARP conflict detection, ensures other devices on the network are aware of the new IP address through gratuitous ARP declarations, and achieves dynamic IP address management through lease management.
[0065] Sixth, the IP address conflict detection module 106 is responsible for detecting IP address conflicts and ensuring that the assigned IP address is unique in the network. It adopts an ARP-based conflict detection algorithm. The input is the candidate IP address and the network card interface, and the output is whether a conflict exists. The specific steps include: Step (1), constructing an ARP probe packet: the sender MAC address is the local MAC address, the sender IP address is 0.0.0.0 (indicating that it is not configured), the target MAC address is 00:00:00:00:00:00 (unknown), the target IP address is the candidate IP address, and the operation code is 0x0001 (ARP request); Step (2), sending an ARP probe: through the original The first socket sends an ARP broadcast message, with a 1-second interval and 3 sends; Step (3) Listen for ARP responses: The listening time is 2 seconds after each send, and the listening content is an ARP reply message. The judgment criterion is receiving an ARP reply from the target IP address; Step (4) Conflict judgment: If an ARP reply is received and the sender's IP address in the reply is equal to the candidate IP address, and the sender's MAC address in the reply is not equal to the local MAC address, then a conflict is determined to exist; otherwise, no conflict is determined; Step (5) Conflict handling: Record the MAC address and IP address of the conflicting device, mark the candidate IP address as a conflict state, and select the next candidate IP address for re-detection. This module also provides a three-layer conflict detection mechanism: The first layer is active detection before allocation (ARP probe). The master device performs ARP probe before allocating IP, sends 3 ARP requests with a 1-second interval, and listens for 2 seconds to wait for ARP responses. If there is a response, a conflict is determined, and the next address is selected; The second layer is immediate detection after configuration (gratuitous ARP). After configuring the IP, the slave device immediately sends a gratuitous ARP to declare its right to use the IP address. If a conflict response is received, immediately cease use, report the conflict to the main control device, and reapply. During Layer 3 runtime, continuous monitoring (passive listening) is maintained, constantly listening for ARP packets in the network to detect if other devices are using the same IP address. A gratuitous ARP statement is proactively sent every 5 minutes. Conflicts are handled immediately upon detection.
[0066] Seventh, configure persistent module 107, which is responsible for persistently storing IP address configurations to ensure that the configuration remains unchanged after the device restarts. The persistent storage strategy includes: storing basic device information (including unique device ID, device name, device type, and MAC address), network configuration information (including assigned IP address, subnet mask, allocation time, lease expiration time, and master device ID), and system status information (including device role (master / slave), last update time, and configuration version number); the storage location includes the Windows registry (HKEY_LOCAL_MACHINE\SOFTWARE\MedicalDeviceIPConfig), the configuration file (C:\ProgramData\MedicalDeviceIPConfig\config.json), and the backup location (C:\ProgramData\MedicalDeviceIPConfig\backup\).
[0067] This invention addresses the challenge of automatic IP address allocation in dual-NIC networking scenarios for medical equipment production lines. It provides a lightweight automatic IP address allocation system that eliminates the need for a DHCP server. Through distributed negotiation mechanisms, intelligent conflict detection, and persistent configuration, it achieves zero-configuration deployment, significantly improving the efficiency and reliability of medical equipment networking. Key benefits include: achieving true zero-configuration deployment, with devices automatically acquiring IP addresses upon power-up; completely resolving DHCP conflicts in Windows dual-NIC systems, enabling independent configuration of internal and external NICs; improving deployment efficiency by over 90%, reducing deployment time from 2-3 hours to 5-10 minutes; reducing IP address conflict rate from 5-10% to <1%, significantly improving system reliability; reducing deployment costs by over 80%, decreasing reliance on professional personnel; and providing intelligent functions such as automatic device discovery, master controller election, and fault self-healing.
[0068] To better understand this invention, four specific embodiments are listed below to illustrate it. The embodiments of this invention provide a complete technical solution for automatic IP address allocation in a dual-NIC isolated network environment for medical devices. This solution is implemented through a software system, requiring no additional hardware investment and can run stably on the Windows operating system. The implementation principles include five points: zero-configuration principle—all network configurations are automatically completed after the device is powered on without manual intervention; compatibility principle—compatible with Windows 7 / 10 / 11 operating systems, without affecting existing medical device software; reliability principle—ensuring stable system operation through multi-layer conflict detection and configuration persistence; isolation principle—complete isolation between internal and external NICs to avoid DHCP conflicts and network traffic chaos; and scalability principle—supporting networking of 2-254 devices to adapt to different scale requirements. The hardware requirements for the implementation environment are as follows: each medical device must be equipped with dual network cards (10 / 100 / 1000Mbps adaptive). The device's internal network is connected via a switch, and the external network card is connected to the hospital's internal network. The software requirements are: operating system Windows 7 / 10 / 11 (32-bit or 64-bit), .NET Framework 4.0 or later, and Administrator privileges (for network configuration). The network requirements are: the device's internal network must be in the 192.168.1.0 / 24 network segment (configurable), and the hospital's internal network must automatically obtain IP addresses via DHCP.
[0069] In this embodiment, the network card identification module 101 is responsible for distinguishing between external network cards and internal network cards, and identifies them based on DHCP status and network configuration. The key implementation points include: the characteristics of external network cards are DHCP enabled, have a default gateway, and are connected to the hospital network; the characteristics of internal network cards are DHCP not enabled or static IP, no default gateway or private gateway; the key code implementation points are: using Windows API to obtain network adapter information, reading network configuration through the registry, and identifying network card type based on DHCP status and default gateway.
[0070] The device discovery module 102 uses a UDP broadcast-based device discovery mechanism to achieve automatic identification between devices. The protocol format is: version number (1 byte) | message type (1 byte) | device ID (8 bytes) | MAC address (6 bytes) | device name (variable length) | timestamp (8 bytes). The discovery process is as follows: send a DISCOVERY_REQUEST broadcast, wait for a response (timeout of 5 seconds), receive a MASTER_ANNOUNCE record of the master device, and complete the device discovery.
[0071] The IP address allocation module 104 implements a dedicated IP address allocation protocol, supporting address pool management, lease management, and conflict detection. Address pool management is as follows: the default address range is 192.168.1.0 / 24, the allocable range is 192.168.1.10 to 192.168.1.250, and reserved addresses are 192.168.1.1 (system) and 192.168.1.2 to 192.168.1.9 (master control equipment), allocated in segments according to device type.
[0072] The conflict detection module 106 is based on a three-layer conflict detection mechanism of the ARP protocol: the first layer is active detection before allocation (ARP probe), which sends 3 ARP requests with an interval of 1 second; the second layer is immediate detection after configuration (gratuitous ARP), which sends gratuitous ARP declarations immediately after configuration; the third layer is continuous monitoring during runtime (periodic gratuitous ARP), which is sent once every 5 minutes.
[0073] The configuration persistence module 107 employs a dual persistence mechanism: the registry location is HKEY_LOCAL_MACHINE\SOFTWARE\MedicalDeviceIPConfig, the configuration file location is C:\ProgramData\MedicalDeviceIPConfig\config.json, and the backup location is C:\ProgramData\MedicalDeviceIPConfig\backup\. The configuration content includes basic device information (device ID, device name, MAC address), network configuration information (IP address, subnet mask, lease period), and system status information (device role, master device ID).
[0074] The device election module 103 employs a distributed election mechanism based on an improved Bully algorithm: Device priority = Type priority × 100 + Performance score; it sends an ELECTION message to higher-priority devices; if there is no response, it becomes the master device; and it sends a MASTER_ANNOUNCE declaration. The device type priorities are: control device 100, analysis device 80, pre-processing device 60, post-processing device 50, and storage device 40.
[0075] Example 1: Deployment of a small-scale pipeline (3 devices). The implementation environment consists of device A (biochemical analyzer, priority 80), device B (immunoassay analyzer, priority 80), and device C (sample processing system, priority 60). Implementation steps: Step 1, Device A starts (T0). The system starts and loads the IP allocation service, identifies the dual network cards (NICs). The external NIC obtains an IP address via DHCP, and the internal NIC uses an APIPA address. Device A discovers that there are no other devices on the network and automatically becomes the master device if there is no response to its broadcast. It configures the internal IP address as 192.168.1.2, initializes the address pool, starts the address allocation service, and persists the configuration. Step 2, Device B starts (T0+30 seconds). It discovers that the master device A skipped the election, requests an IP address of 192.168.1.10, configures the NIC, sends a gratuitous ARP declaration, starts lease renewal, and persists the configuration. Step 3, Device C starts (T0+60 seconds). It discovers that the master device A skipped the election, requests an IP address, is assigned 192.168.1.100, configures the NIC, and starts the service. The deployment results were: total deployment time of approximately 2-3 minutes, 100% configuration success rate, and 0% IP conflict rate.
[0076] Example 2: Deployment of a large-scale automated system (10 devices). The implementation environment consists of 2 biochemical analyzers, 3 immunoassay analyzers, 2 hematology analyzers, and 3 sample processing systems. Address segment planning: 192.168.1.2-9 is the main control equipment segment (8 addresses), 192.168.1.10-39 is the biochemical analyzer segment (30 addresses), 192.168.1.40-69 is the immunoassay analyzer segment (30 addresses), 192.168.1.70-99 is the hematology analyzer segment (30 addresses), and 192.168.1.100-149 is the sample processing system segment (50 addresses). Implementation steps: Biochemical analyzer A is the first to start as the master device (192.168.1.2); the remaining 9 devices start sequentially, each at 10-30 second intervals; each device automatically discovers the master device and requests an IP address; IP addresses are assigned to the corresponding address range according to the device type; configuration of all devices is completed. Implementation results: total deployment time is approximately 3-5 minutes, averaging 20-30 seconds per device, with a 100% configuration success rate.
[0077] Example 3: Switching over the master control device in case of a sudden power outage of the master control device A. Switching process: (1) Fault detection (30 seconds): The master control device is offline if the slave device fails to respond to the heartbeat three times in a row; (2) Re-election (3 seconds): Device B initiates an election to become the new master control device, and devices C and D accept the election; (3) Service recovery: The slave devices continue to use their original IP addresses, and the lease period remains valid. The switching result is a total switching time of 33 seconds, no data loss, no change in IP address, and no service interruption.
[0078] Example 4: IP address conflict detection and handling. The conflict scenario is that device B uses IP address 192.168.1.40, and manually configured device C accesses the network and uses the same IP address. The detection and handling include: pre-allocation detection: the master device performs ARP probing before allocating the IP address and if a conflict is found, an alternative IP address is selected; runtime detection: device B periodically sends gratuitous ARP requests, and device C's network card is automatically disabled after detecting the conflict; conflict isolation: the conflicting device is isolated, while normal devices are unaffected. The result is that the conflict was successfully isolated, and device B continues to operate normally.
[0079] The implementation considerations include three parts: network environment considerations, system configuration considerations, and deployment considerations. Specifically, regarding the network environment considerations: First, physical isolation: ensure physical isolation between the device's internal network and the hospital's internal network, using a dedicated switch; second, switch configuration: support broadcast packet forwarding, disable port security and DHCP Snooping; third, network cable specifications: use Cat 5e or Cat 6 cables, with a length not exceeding 100 meters. Regarding system configuration considerations: First, firewall rules: add allow rules for UDP ports 6789, 6790, and 6791; second, service permissions: Windows services need to use the Local System account to configure the network; third, address range planning: avoid using the APIPA range (169.254.0.0 / 16) and enterprise network ranges. Deployment Notes: First, for the initial deployment, start the devices in priority order, with an interval of 10-30 seconds between each device; Second, when replacing a device, it can automatically obtain the original IP address, or you can manually configure a static allocation; Third, when expanding the network, the new device will automatically discover the master controller and obtain an IP address without manual intervention; Fourth, in abnormal scenarios, the system will remain stable under abnormal scenarios such as network interruptions and frequent device online / offline cycles.
[0080] The core innovation of this invention lies in its design of a dedicated automatic IP address allocation system and method to address the DHCP conflict problem of dual network cards in Windows, enabling zero-configuration deployment of medical equipment pipelines in isolated network environments. The three core innovations are: First, a separate IP allocation architecture for internal and external network cards. The external network card continues to use a Windows DHCP client to connect to the hospital network, while the internal network card uses a dedicated IP allocation protocol, completely avoiding DHCP conflicts. The two network cards are configured independently without interference. Second, a distributed serverless IP allocation mechanism automatically elects a master device (address manager) among devices, eliminating the need for a dedicated DHCP server, reducing deployment costs, and automatically electing a master device in case of failure, improving system reliability. Third, a three-layer IP conflict detection mechanism, including proactive detection before allocation (ARP probing), immediate detection after configuration (gratuitous ARP), and continuous monitoring during operation (periodic gratuitous ARP), reducing the IP conflict rate from 5-10% to <1%. This invention can automatically allocate an IP address to another network card connected to the internal network of a device when one network card has already automatically obtained an IP address via DHCP and connected to the hospital LIS system, enabling rapid networking and pipeline deployment of multiple medical devices.
[0081] Secondly, please refer to Figures 1-4 The present invention also provides a method for automatic IP allocation for dual network cards in a medical equipment production line, comprising:
[0082] Each S1 medical device is equipped with dual network cards, one for connecting to the hospital network and the other for connecting to the device's internal network;
[0083] After the S2 device starts up, it recognizes the two network cards and uses the network card with DHCP enabled as the external network card, and the network card without DHCP enabled or configured with a static IP as the internal network card.
[0084] The S3 external network card uses a Windows DHCP client to obtain an IP address from the hospital network;
[0085] S4 discovers other devices on the network by sending UDP broadcast messages through the device's internal network;
[0086] S5 uses a distributed election algorithm to elect a master device in the device intranet, with the remaining devices acting as slave devices;
[0087] The S6 master device maintains the IP address pool, and slave devices send IP address requests to the master device.
[0088] The S7 master device responds to the IP address request and selects an available IP address from the IP address pool;
[0089] After selecting an IP address, the S8 master control device performs ARP collision detection.
[0090] If S9 detects a conflict, it selects the next IP address and re-executes the conflict detection; if no conflict is detected, it sends an IP address allocation response to the slave device.
[0091] The S10 slave device receives the IP address allocation response, configures the internal network card IP address, and sends a gratuitous ARP statement;
[0092] The S11 slave device persistently stores the IP address configuration information.
[0093] This invention relates to a method for automatic IP allocation using dual network cards in a medical equipment production line. See [link to relevant documentation]. Figure 1 The overall system architecture comprises five layers: the hospital network layer, the master control device, the slave device group, the device intranet layer, and the protocol layer. The master control device connects to both the hospital network and the device intranet via dual network interface cards (NICs), achieving network isolation. The master control device is primarily responsible for IP address pool management, device discovery services, and IP conflict detection. Slave devices are connected via intranet switches, with IP addresses uniformly allocated by the master control device. The three main innovations of this architecture are: physical isolation of the device intranet to avoid interference with the hospital network; a three-layer IP conflict detection mechanism to ensure address uniqueness; and unified management of the IP address pool by the master control device for dynamic allocation.
[0094] Regarding the effectiveness of zero-configuration deployment, traditional solutions require professional engineers to manually configure parameters such as IP address, subnet mask, and default gateway for each device in the system settings. This requires recording the configuration information of each device and testing network connectivity, with a configuration time of 10-15 minutes per device. In contrast, the configuration process of this invention is that the system runs automatically after the device is powered on, automatically discovers the master control device in the network, automatically requests and obtains the IP address, and automatically configures the network card parameters, with a configuration time of 1-2 minutes per device. The quantitative comparison of technical effects is as follows: Static IP manual configuration takes 10-15 minutes per device, and 2-2.5 hours for 10 devices, requiring continuous manual intervention, with an error rate of 5-10%; DHCP server configuration takes 5-8 minutes per device, and 1-1.5 hours for 10 devices, requiring initial manual intervention, with an error rate of 2-5%; APIPA automatic configuration takes 2-3 minutes per device, and 20-30 minutes for 10 devices, requiring no manual intervention, with an error rate of 10-15%; the solution of this invention takes 1-2 minutes per device, and 10-20 minutes for 10 devices, requiring no manual intervention, with an error rate of <1%.
[0095] Regarding the independent configuration of dual network cards, the DHCP conflict problem is completely resolved. According to Microsoft's official documentation, when two network cards use DHCP simultaneously, both cards send DHCPDISCOVER broadcast messages at the same time. The DHCP server may confuse the requests from the two network cards, generating a "bad_address" entry on the server, leading to IP address allocation failure or network connection abnormalities. In the solution of this invention, the traditional solution causes conflict when the external and internal network cards connect to the DHCP server simultaneously. However, in the solution of this invention, the external network card works normally when connected to the DHCP server (hospital network), while the internal network card works independently when connected to the dedicated IP allocation system (device intranet). The technical effect is that the internal and external network cards use completely different IP allocation mechanisms. The external network card continues to use the Windows DHCP client to connect to the hospital LIS system, while the internal network card uses the dedicated IP allocation protocol to work independently in the device intranet. The IP configurations of the two network cards do not interfere with each other, completely avoiding conflicts.
[0096] Regarding the effectiveness of IP address conflict detection, the multi-layered conflict detection mechanism includes: Layer 1: Pre-allocation proactive detection (ARP probing). Before allocating an IP address, the master device performs ARP probing, sending three ARP requests with a 1-second interval, listening for 2 seconds to wait for an ARP response. If a response is received, a conflict is determined, and the next address is selected. Layer 2: Post-configuration immediate detection (Greedy ARP). After configuring an IP address, the slave device immediately sends a gratuitous ARP declaration, declaring its right to use the IP address. If a conflict response is received, it immediately stops using the address and reports the conflict to the master device to reapply. Layer 3: Continuous monitoring during operation (passive listening). The system continuously listens for ARP packets in the network to detect whether other devices are using the same IP address. It proactively sends a gratuitous ARP declaration every 5 minutes and immediately handles any conflicts found. The technical performance comparison is as follows: Traditional static configuration detection is performed manually after configuration, resulting in low accuracy (dependent on manual intervention), conflict resolution time of 30-60 minutes, and low system overhead; DHCP server detection is performed before allocation, with medium accuracy (90-95%), conflict resolution time of 5-10 minutes, and medium system overhead; APIPA / Link-Local detection is performed randomly after configuration, resulting in low accuracy (70-80%), conflict resolution time of 10-20 minutes, and low system overhead; The solution of this invention performs detection before allocation + after configuration + during runtime, resulting in high accuracy (>99%), conflict resolution time of <1 minute, and low to medium system overhead.
[0097] This invention enhances the informatization level of medical equipment and promotes its interconnectivity. Specifically, it lowers the technical barriers to medical equipment networking, facilitating interoperability; supports the rapid establishment of automated testing lines, improving automation levels; enables data sharing between devices, increasing testing efficiency; and lays the foundation for the development of the Internet of Things (IoMT) for medical devices. Industry impacts include driving the development of medical equipment from stand-alone operation to networked collaboration, promoting the digital transformation of hospital laboratories, enhancing the intelligence level of medical equipment, and providing technical support for the construction of smart hospitals.
[0098] Regarding improving the efficiency of laboratory testing, the efficiency improvement data is as follows: Traditional deployment methods have a deployment cycle of 2-3 days, impacting testing operations for 2-3 days, and require an additional 1-2 days to resume normal testing, for a total impact time of 3-5 days. The proposed solution has a deployment cycle of 0.5-1 day, impacting testing operations for 0.5-1 day, and resumes normal testing immediately, for a total impact time of 0.5-1 day. The efficiency improvement is reduced from 3-5 days to 0.5-1 day, representing an 80-90% increase. Social benefits include reduced patient waiting time, improving the medical experience; faster test report issuance, facilitating rapid diagnosis and treatment; reduced downtime in the laboratory, ensuring continuity of medical services; and improved efficiency in the utilization of medical resources. The essential differences between this invention and existing technologies are shown in the table below.
[0099]
[0100] This invention fills the technical gap in automatic IP address allocation in dual-NIC isolated networks, and for the first time realizes controllable IP address allocation in a serverless environment, integrating device discovery, election, allocation, conflict detection, and persistence into one system.
[0101] The above-disclosed embodiments are merely one or more preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art can understand that all or part of the processes for implementing the above embodiments and equivalent changes made in accordance with the claims of this application still fall within the scope of this application.
Claims
1. A dual-NIC IP automatic allocation system for a medical equipment production line, characterized in that, This includes IP allocation client software deployed on multiple medical devices, each equipped with dual network cards, one for connecting to the hospital network and the other for connecting to the device's internal network; The IP allocation client software includes a network card identification module, a device discovery module, a device election module, an IP address allocation module, an IP address request module, a conflict detection module, and a configuration persistence module. The network card identification module, the device discovery module, the device election module, and the IP address allocation module are connected in sequence. The IP address request module is connected to both the device election module and the IP address allocation module. The conflict detection module is connected to both the IP address allocation module and the IP address request module. The configuration persistence module is connected to both the IP address allocation module, the IP address request module, and the network card identification module. The network card identification module is used to identify dual network cards, identifying the network card with DHCP enabled as an external network card, and identifying the network card without DHCP enabled or configured with a static IP as an internal network card. The device discovery module is used to send device discovery messages via UDP broadcast within the device intranet to discover other devices in the network; The device election module is used to elect one device as the master device and the remaining devices as slave devices in the device intranet through a distributed election algorithm. The IP address allocation module is deployed on the master control device and is used to maintain the IP address pool, respond to IP address requests from slave devices, and allocate IP addresses to slave devices. The IP address request module is deployed on the slave device and is used to send IP address requests to the master device, receive and apply the assigned IP address; The conflict detection module is used to perform IP address conflict detection before, after, and during IP address allocation. The configuration persistence module is used to persistently store IP address configuration information, and the configuration is automatically restored after the device restarts.
2. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The external network card obtains an IP address from the hospital network using a Windows DHCP client, while the internal network card uses an IP address assigned by the IP address allocation module. The IP configurations of the external network card and the internal network card are independent of each other and do not interfere with each other.
3. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The device discovery module sends device discovery messages via UDP broadcast. The message format includes: version number, message type, device type, device ID, MAC address, device name, and timestamp. The message types include: device discovery request, device discovery response, master device announcement, and heartbeat message.
4. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The device election module uses an improved Bully algorithm for distributed election, which includes: device priority = device type priority × 100 + performance score; sending election messages to devices with higher priority; if no response is received from a higher priority device, sending a master device announcement message after a random delay.
5. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The IP address pool maintained by the IP address allocation module includes: the default address range 192.168.1.0 / 24; the allocatable range 192.168.1.10-192.168.1.250; the reserved address range 192.168.1.1-192.168.1.9; and the IP address pool is divided into segments according to device type, with different device types using different address ranges.
6. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The conflict detection module includes a three-layer detection mechanism: the first layer is proactive detection before allocation, sending 3 ARP requests with a 1-second interval, and listening for 2 seconds to wait for ARP responses; the second layer is immediate detection after configuration, sending a gratuitous ARP declaration immediately after configuring the IP address; the third layer is continuous monitoring during runtime, sending a gratuitous ARP every 5 minutes and continuously listening for ARP packets in the network.
7. The medical equipment production line dual-NIC IP automatic allocation system as described in claim 1, characterized in that, The configuration persistence module adopts a dual persistence mechanism, which includes: storing configuration information in the Windows registry and configuration files; reading the persistent configuration after the device restarts; and applying the configuration directly if the configuration is valid and the lease period has not expired, skipping the IP address allocation process.
8. A method for automatic IP allocation for dual network cards in a medical equipment production line, applied to the automatic IP allocation system for dual network cards in a medical equipment production line as described in any one of claims 1-7, characterized in that, include: Each medical device is equipped with dual network cards, one for connecting to the hospital network and the other for connecting to the device's internal network; After the device starts up, it recognizes the two network cards and uses the network card with DHCP enabled as the external network card, and the network card without DHCP enabled or configured with a static IP as the internal network card. The external network card uses a Windows DHCP client to obtain an IP address from the hospital network; Discover other devices on the network by sending UDP broadcast messages through the device's internal network; A master device is elected in the device intranet using a distributed election algorithm, with the remaining devices serving as slave devices. The master control device maintains an IP address pool, and slave devices send IP address requests to the master control device. The main control device responds to the IP address request and selects an available IP address from the IP address pool; After selecting an IP address, the main control device performs ARP collision detection. If a conflict is detected, select the next IP address and re-perform the conflict detection; If no conflict is detected, send an IP address allocation response to the slave device; The slave device receives the IP address allocation response, configures the internal network card IP address, and sends a gratuitous ARP statement; Slave devices persistently store IP address configuration information.