Multi-network equipment configuration method and device, electronic equipment and storage medium

By loading the network device driver module and preset naming rule scripts, multiple network devices are initially named and renamed, which solves the problem of naming conflicts between multiple network devices in the operating system and improves the reliability of device communication.

CN120021203APending Publication Date: 2025-05-20SONOSCAPE MEDICAL (WUHAN) CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311562379.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

Existing operating systems are prone to naming conflicts when configuring multiple network devices, resulting in naming failures and affecting the reliability of device communication.

Method used

By loading the network device driver module, identifying and initially naming multiple network devices, and renaming the network devices through preset naming rules scripts to ensure that the target names do not conflict.

Benefits of technology

It effectively avoids name conflicts in the renaming process of multiple network devices, ensures that multiple network devices can communicate smoothly, and improves the reliability and robustness of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120021203A_ABST
    Figure CN120021203A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-network equipment configuration method and device, electronic equipment and a storage medium. The method is applied to a target electronic device, the target electronic device comprises a device host and a plurality of network devices, and the method comprises the following steps: starting an operating system on the device host, and loading a network device driving module in the process of starting the operating system; identifying a plurality of network devices through a network device driving module and initially naming the identified network devices; and in the process of identifying the plurality of network devices, loading a preset naming rule script, and renaming the identified network devices through the preset naming rule script to determine target names of the plurality of network devices. According to the scheme, the problem of name conflict in the process of renaming multiple network devices can be effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a multi-network device configuration method, a multi-network device configuration device, an electronic device, and a storage medium. Background Art

[0002] As a bridge for the interaction between application software and hardware, the operating system provides a running environment for application software and can also provide a unified interface for accessing hardware externally. The operating system on an electronic device can either support network communication by itself or provide a general configuration interface for network communication with other electronic devices. Users can reasonably configure and design the network devices in the electronic device according to business requirements.

[0003] For an electronic device provided with multiple network devices, in currently common operating systems, such as the Linux operating system, the Windows operating system, etc., when naming network devices, naming conflicts are likely to occur, which may lead to naming failures. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed. The present invention provides a multi-network device configuration method, a multi-network device configuration device, an electronic device, and a storage medium.

[0005] According to an aspect of the present invention, there is provided a multi-network device configuration method, which is applied to a target electronic device. The target electronic device includes a device host and multiple network devices, and the device host is communicatively connected to the multiple network devices respectively. The method includes: starting the operating system on the device host, and loading a network device driver module during the process of starting the operating system, where the network device driver module is used to drive the operation of the multiple network devices; identifying the multiple network devices through the network device driver module and performing an initial naming on the identified network devices to determine the initial names of the identified network devices; during the process of identifying the multiple network devices, loading a preset naming rule script, and renaming the identified network devices through the preset naming rule script to determine the target names of the multiple network devices, where the preset naming rule script is used to indicate the respective target names of the multiple network devices. For a group of network devices that have completed the initial naming before the target renaming moment, if the number of network devices in the group exceeds one, then at least one of the target names corresponding to the group of network devices is prohibited from being assigned as the initial name to the group of network devices, where the target renaming moment is the renaming moment corresponding to the network device that is renamed earliest in the group of network devices.

[0006] Exemplarily, before the operating system is started, disable the network device naming service built into the operating system and prohibit the operating system from automatically starting the network driver module. The network device naming service is used to name the network devices in the target electronic device, and the network driver module is used to drive the operation of each network device in the target electronic device. The network driver module includes a network device driver module.

[0007] Exemplarily, after renaming multiple network devices, the method further includes: configuring the Internet protocol addresses and media access control addresses of the multiple network devices respectively according to the target names of the multiple network devices.

[0008] Exemplarily, the number of network device driver modules is at least one. Loading the network device driver module during the process of starting the operating system includes: loading at least one network device driver module in sequence according to the preset loading order of the at least one network device driver module during the process of starting the operating system, where the at least one network device driver module is used to drive the operation of at least one type of network device one by one; where the identification of any type of network device is performed after renaming the previously identified previous type of network device; where if the number of network devices belonging to the first type is one, the number of network devices belonging to the second type exceeds one, and the target name of the network device belonging to the first type is arranged between the initial names of any two network devices belonging to the second type when the initial naming is assigned, then in the preset loading order, first load the network device driver module corresponding to the network device belonging to the second type, and then load the network device driver module corresponding to the network device belonging to the first type.

[0009] Exemplarily, the target electronic device further includes a data acquisition module for acquiring observation data of a target object. The observation data includes ultrasonic data or image data. The multiple network devices include a first network device, a second network device, and a third network device. The first network device is used to communicate with another electronic device, the second network device is used to communicate with a local area network, and the third network device is used to communicate with the data acquisition module. The first network device and the second network device belong to the second type, and the third network device belongs to the first type.

[0010] Exemplarily, the network devices identified are renamed through a preset naming rule script to determine the target names of multiple network devices, including: for a group of network devices that have completed initial naming before the target renaming moment, the following operations are repeatedly executed until the renaming of this group of network devices is completed: select any target network device from this group of network devices, and rename the target network device to the corresponding target name based on the preset naming rule script, where the target network device is a network device whose initial name does not conform to the target name specified in the preset naming rule script and the corresponding target name is not occupied by other network devices.

[0011] Exemplarily, the network devices identified are renamed through a preset naming rule script to determine the target names of multiple network devices, including: if the renaming of any network device fails, wait for the renaming of the previous network device to complete and then trigger a network overlay event to rename the network device with the failed renaming again based on the preset naming rule script.

[0012] Exemplarily, during the process of identifying multiple network devices, load the preset naming rule script, and rename the network devices identified through the preset naming rule script to determine the target names of multiple network devices, including: start the target naming service, where the target naming service includes the preset naming rule script; find the device identification information corresponding to each of the network devices identified; based on the device identification information and the preset naming rule script, rename the network devices identified to determine the target names of multiple network devices.

[0013] Exemplarily, the target electronic device also includes a data acquisition module for acquiring observation data of the target object, the observation data including ultrasound data or image data, and configuring the Internet Protocol addresses and media access control addresses of the multiple network devices according to the target names of the multiple network devices, including: when determining that the network device is a network device for communicating with the data acquisition module based on the target name of any network device, configuring the Internet Protocol address and media access control address of the network device according to the preset communication requirements of the data acquisition module; and / or, when determining that the network device is a network device for communicating with the data acquisition module based on the target name of any network device, saving the original default media access control address of the network device to the target storage device. storage location; when determining that the network device is a network device for communicating with a local area network based on the target name of any network device, determining the media access control address stored in the target storage location as the media access control address of the network device, and determining the Internet Protocol address of the network device based on the first address configuration information; and / or, when determining that the network device is a network device for communicating with a second network device in a device host of another electronic device based on the target name of any first network device, determining the Internet Protocol address and the media access control address of the first network device based on the second address configuration information, wherein the Internet Protocol address and the media access control address of the first network device are different from the Internet Protocol address and the media access control address of the second network device.

[0014] Exemplarily, starting the operating system on the device host includes: starting a multi-operating system startup program, and starting the operating system through the multi-operating system startup program; wherein, in the process of starting the operating system through the multi-operating system startup program, based on the boot parameters in the multi-operating system startup program, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module, and the boot parameters are used to indicate the shielding of the network device naming service and the network driver module.

[0015] Exemplarily, the network driver module includes a network device driver module in the initialization disk image file and a network device driver module in the kernel of the operating system, wherein the network device driver module loaded during the process of starting the operating system is the network device driver module in the kernel of the operating system.

[0016] According to another aspect of the present invention, there is also provided a multi-network device configuration apparatus, which is applied to a target electronic device. The target electronic device includes a device host and multiple network devices. The device host is communicatively connected to the multiple network devices respectively. The apparatus includes: a startup module, configured to start the operating system on the device host and load a network device driver module during the startup process of the operating system, where the network device driver module is used to drive the operation of the multiple network devices; an initial naming module, configured to identify the multiple network devices through the network device driver module and perform initial naming on the identified network devices to determine the initial names of the identified network devices; a renaming module, configured to load a preset naming rule script during the process of identifying the multiple network devices and rename the identified network devices through the preset naming rule script to determine the target names of the multiple network devices, where the preset naming rule script is used to indicate the respective target names of the multiple network devices. For a group of network devices that have completed initial naming before the target renaming moment, if the number of network devices in the group exceeds one, then at least one of the target names corresponding to the group of network devices is prohibited from being assigned as an initial name to the group of network devices, where the target renaming moment is the renaming moment corresponding to the network device that is the earliest to be renamed in the group of network devices.

[0017] According to yet another aspect of the present invention, there is also provided an electronic device, including a processor and a memory. A computer program is stored in the memory, and when the computer program instructions are run by the processor, they are used to execute the above-mentioned multi-network device configuration method.

[0018] According to still another aspect of the present invention, there is also provided a storage medium storing a computer program / instructions, and the computer program / instructions are used to execute the above-mentioned multi-network device configuration method when running.

[0019] According to the multi-network device configuration method, multi-network device configuration apparatus, electronic device, and storage medium according to the embodiments of the present invention, initial naming is performed on the identified network devices when identifying the multiple network devices through the network device driver module, and the identified network devices are renamed through the preset naming rule script. Among them, for a group of network devices that have completed initial naming before the target renaming moment, if the number of network devices in the group exceeds one, then at least one of the target names corresponding to the group of network devices is prohibited from being assigned as an initial name to the group of network devices. This solution can effectively avoid the problem of name conflicts during the process of renaming multiple network devices, thereby ensuring that the multiple network devices can communicate smoothly, and thus effectively improving the reliability and robustness of communication through the multiple network devices.

[0020] The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the content of the specification. And in order to make the above and other objects, features and advantages of the present invention more obvious and understandable, the following specifically illustrates the embodiments of the present invention. Brief Description of the Drawings

[0021] By describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings, the above and other objects, features and advantages of the present invention will become more obvious. The drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings, the same reference numerals generally represent the same components or steps.

[0022] Figure 1 Fig. shows a schematic block diagram of a multi-network device configuration method according to an embodiment of the present invention;

[0023] Figure 2 Fig. shows a communication schematic diagram of multiple network devices according to an embodiment of the present invention;

[0024] Figure 3 Fig. shows a schematic flowchart of identifying and naming network devices in sequence according to an embodiment of the present invention;

[0025] Figure 4 Fig. shows a schematic flowchart of configuring Internet protocol addresses and media access control addresses for multiple network devices according to an embodiment of the present invention;

[0026] Figure 5 Fig. shows a schematic block diagram of a multi-network device configuration apparatus according to an embodiment of the present invention; and

[0027] Figure 6 Fig. shows a schematic block diagram of an electronic device according to an embodiment of the present invention. Detailed Embodiments

[0028] In order to make the objectives, technical solutions and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments of the present invention. It should be understood that the present invention is not limited by the exemplary embodiments described herein. Based on the embodiments described in the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

[0029] In order to solve the above technical problems, the present invention provides a multi-network device configuration method. The method can be applied to any target electronic device, for example, an ultrasound device, an endoscope device, etc. The target electronic device may include one or more device hosts and multiple network devices. For example, the target electronic device is an ultrasound device, and the ultrasound device may include a device host and multiple network devices. The network device may be any device that can be used to establish communication, including but not limited to one or more of the following: a network card, a hub, a router, etc. The device host is communicatively connected to multiple network devices. Exemplarily, any one or more of the multiple network devices may be a network device that comes with the device host, or any one or more of the multiple network devices may be an external network device. Exemplarily, a part of the multiple network devices is a network device that comes with the device host and another part is an external network device. Multiple network devices may be network devices that realize communication connection through any connection method such as a network port, a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE) interface, and a universal serial bus (Universal Serial Bus, USB) interface. For example, in the application scenario of diagnostic equipment, ultrasound equipment and endoscope equipment can usually only view the external state and internal state of biological organs or tissues respectively. If the user wants to view the internal and external states of biological organs or tissues at the same time, it is necessary to summarize the image data collected by the two devices. The distance between the device host of the ultrasound device and the device host of the endoscope device is usually relatively long, so the two can use network communication to exchange data. In addition, during the communication process, the image data collected by the endoscope device often needs to be sent to the ultrasound device to be synthesized with the ultrasound image and displayed on the display device of the ultrasound device, so that the user can view the internal and external states of the biological organs or tissues on one display interface at the same time.

[0030] Figure 1 Shows a schematic block diagram of a multi-network device configuration method 100 according to an embodiment of the present invention, as shown in Figure 1 As shown in , the method 100 may include the following steps S110, S120 and S130.

[0031] Step S110, starting the operating system on the device host, and loading the network device driver module during the process of starting the operating system, wherein the network device driver module is used to drive the operation of multiple network devices.

[0032] For the convenience of description and understanding, the following takes the target electronic device as an ultrasonic device as an example for description. It can be understood that in addition to the ultrasonic device, the target electronic device can also be any other type of electronic device such as an endoscope device.

[0033] Exemplarily, the operating system of the ultrasonic device can be started through the power on / off key on the device host of the ultrasonic device. The operating system can be any operating system, such as an operating system based on the arm64 architecture or an operating system based on the x86 architecture, etc. Specifically, it can be an operating system such as Linux or Windows. The network device driver module loaded during the process of starting the operating system can be the network device driver module in the kernel of the operating system. In one embodiment, if the network device is a network card, such as an igc network card, then the network device driver module is the igc network card driver module; if the network device is an igc network card and an igb network card, then the network device driver module is the igc network card driver module and the igb network card driver module. Among them, the igc network card driver module is used to drive the igc network card to run, and the igb network card driver module is used to drive the igb network card to run.

[0034] During the process of starting the operating system on the device host, the network device driver module can be loaded. In the case where the number of network device driver modules is multiple, the network device driver modules can be loaded in any suitable order. For example, the network device driver modules can be loaded simultaneously or sequentially. Preferably, the network device driver modules are loaded sequentially according to a preset loading order (which can be called the first preset loading order). For example, if the preset loading order is to load the igb network card driver module first and then the igc network card driver module, then during the process of starting the operating system, the igb network card driver module can be loaded first and then the igc network card driver module.

[0035] Step S120, identify multiple network devices through the network device driver module and perform an initial naming on the identified network devices to determine the initial names of the identified network devices.

[0036] Exemplarily, through the network device driver module, multiple network devices can be recognized. In one embodiment, during the process of starting the operating system, the igb network card driver module is loaded first and then the igc network card driver module is loaded. Then, one or more igb network cards can be recognized through the igb network card driver module, and then one or more igc network cards can be recognized through the igc network card driver module. The number of network devices in the target electronic device can be set arbitrarily according to requirements. For example, if there are 2 igb network cards and 1 igc network card in the target electronic device, the recognition order of multiple network devices (network cards) can be igb1 network card, igb2 network card, and igc network card. Among them, the recognition order between multiple network devices driven by the same network device driver module can be not fixed, that is, the recognition order of igb1 network card and igb2 network card can be swapped. For example, the recognition order of multiple network devices (network cards) can also be igb2 network card, igb1 network card, and igc network card. When any network device is recognized, any appropriate rule can be adopted to perform an initial naming on the recognized network device. For example, in one embodiment, the recognized network devices can be initially named according to a preset naming order. For example, the recognized network devices can be initially named in the order from eth0, eth1, eth2... ethN. Since the recognition order of network devices is difficult to control, the assigned initial name may be different from the required target name, and the network device can be renamed later.

[0037] Step S130, during the process of recognizing multiple network devices, load a preset naming rule script to rename the recognized network devices to determine the target names of the multiple network devices. The preset naming rule script is used to indicate the target names of the multiple network devices respectively. For a group of network devices that have completed the initial naming before the target renaming moment, if the number of network devices in this group exceeds one, then at least one of the target names corresponding to this group of network devices is prohibited from being assigned as the initial name to this group of network devices, where the target renaming moment is the renaming moment corresponding to the network device that is renamed earliest in this group of network devices.

[0038] Exemplarily, during the process of identifying multiple network devices, a preset naming rule script can be loaded. Through the preset naming rule script, the identified network devices can be named. The preset naming rule script can include rule scripts corresponding one-to-one to multiple network devices. Exemplarily, the rule scripts corresponding one-to-one to multiple network devices can be loaded in a random manner. Exemplarily, the rule scripts corresponding one-to-one to multiple network devices can also be loaded sequentially according to a preset loading order (which can be referred to as the second preset loading order). For example, after loading the network device driver modules sequentially according to the first preset loading order, the network devices identified sequentially are the igb1 network card, the igb2 network card, and the igc network card. When the igb1 network card is identified, the rule script corresponding to the igb1 network card in the preset naming rule script can be loaded to rename the igb1 network card. Then, when the igb2 network card is identified, the igb2 card can be named through the rule script corresponding to the igb2 network card in the preset naming rule script, and so on. The preset naming rule script is used to indicate the target names of the identified network devices. The naming rules adopted by the preset naming rule script can include, but are not limited to, naming the network devices in the form of "ethx", "enox", or "ensx", etc. Among them, the letter "x" can be any number or letter, and the user can set it arbitrarily according to needs.

[0039] For a group of network devices that have completed initial naming before the target renaming moment, if the number of network devices in the group exceeds one, then at least one of the target names corresponding to the group of network devices is prohibited from being assigned as the initial name to the group of network devices, where the target renaming moment is the renaming moment corresponding to the network device that is renamed earliest in the group of network devices.

[0040] If multiple network devices are initially named uniformly during a first period and renamed uniformly during a second period after the first period (the target renaming moment can be the start moment of the second period), if the initial names of these multiple network devices are set inappropriately, there will be a conflict situation. For example, assume that after the igb1 network card and the igb2 network card are initially named simultaneously or successively, the igb1 network card and the igb2 network card are then renamed. At the same time, assume that the target names corresponding to the igb1 network card and the igb2 network card are eth2 and eth0 respectively. Then, when performing the initial naming, if all the target names of the igb1 network card and the igb2 network card are occupied, there is a possibility of conflict. That is, there are two possible situations for this naming method that occupies all the target names. First, the igb1 network card and the igb2 network card are respectively recognized as eth2 and eth0, that is, the names of the igb1 network card and the igb2 network card are correct and do not need to be renamed. Second, the igb1 network card and the igb2 network card are respectively recognized as eth0 and eth2. At this time, their initial names are opposite to the target names, and since eth0 and eth2 are all occupied, whether the igb1 network card is renamed first or the igb2 network card is renamed first, the renaming will fail. Therefore, the conflict in the second situation will cause the network card to not be named correctly. If the target names of the igb1 network card and the igb2 network card are not all occupied when assigning initial names to the igb1 network card and the igb2 network card, for example, eth0 and eth1 are assigned as the initial names to the igb1 network card and the igb2 network card, this conflict situation can be effectively avoided. There are two possible situations for this naming method. First, the igb1 network card is first recognized as eth0, and the igb2 network card is later recognized as eth1. At this time, although there will be a conflict problem when renaming the igb2 network card to eth0, there is no conflict problem when renaming the igb1 network card to eth2. Therefore, the igb1 network card can be renamed to eth2 first, and then the igb2 network card can be renamed to eth0. Second, the igb2 network card is first recognized as eth0, and igb1 is later recognized as eth1. At this time, the igb2 network card does not need to be renamed, and there is no problem with renaming the igb1 network card to eth2 either.

[0041] Of course, the naming scheme of the above-mentioned igb1 network card and igb2 network card is only an example and not a limitation of the present invention. For example, the number of network devices included in a group of network devices that complete the initial naming before the target renaming moment can be other numbers greater than 2, such as 3, 4, 5, etc. For another example, the network devices included in a group of network devices that complete the initial naming before the target renaming moment can be network devices of the same type or network devices of different types. For example, a group of network devices that complete the initial naming before the target renaming moment may include igb1 network cards, igb2 network cards, igc network cards, etc. That is, even if a group of network devices that complete the initial naming before the target renaming moment includes multiple different types of network devices, since they are uniformly initially named, if all the target names of these network devices are occupied, there is also the possibility of naming conflicts.

[0042] From the above description, it can be understood that when initially naming and renaming the current group of network devices, the network devices that have been renamed previously can be ignored, and the network devices that have not yet been renamed are mainly considered. Because the network devices that have been renamed previously do not participate in the subsequent initial naming and renaming, they do not affect the naming of the group of network devices that are currently being initially named and renamed. Among the remaining network devices that have not yet been renamed, there can be at least one network device whose target name (such as the target name eth2 of the above-mentioned igb1 network card) is not occupied during the initial naming, which provides the possibility of at least one network device being renamed correctly, thereby enabling other network devices to be renamed correctly.

[0043] According to the above technical solution, when multiple network devices are identified by the network device driver module, the identified network devices are initially named, and the identified network devices are renamed by a preset naming rule script. Among them, for a group of network devices that complete the initial naming before the target renaming moment, if the number of network devices in the group of network devices exceeds one, then at least one target name among all the target names corresponding to the group of network devices is prohibited from being assigned to the group of network devices as the initial name. This solution can effectively avoid the problem of name conflicts in the process of renaming multiple network devices, thereby ensuring that multiple network devices can communicate smoothly, thereby effectively improving the reliability and robustness of communication through multiple network devices.

[0044] Exemplarily, before the operating system is started, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module. The network device naming service is used to name the network devices in the target electronic device. The network driver module is used to drive the operation of each network device in the target electronic device. The network driver module includes a network device driver module.

[0045] Before the operating system starts, the processor in the device host can automatically disable the network device naming service built into the operating system and prohibit the operating system from automatically starting the network driver module. Among them, the network device naming service is used to name the network devices in the target electronic device. For example, the "net.ifnames" and "biosdevname" services pre-stored in the operating system can be automatically disabled. Exemplarily, the network driver modules automatically started by the operating system can include the network device driver modules in the initialized RAM disk (initrd) image file and / or the network device driver modules in the kernel of the operating system. The network device driver module loaded during the process of starting the operating system can be the network device driver module in the kernel of the operating system.

[0046] In one embodiment, the network device naming service built into the operating system can be disabled and the operating system can be prohibited from automatically starting the network driver module by modifying the boot parameters in the multi-operating system bootloader (GRandUnifiedBootloader, Grub). Of course, this is only an example, and other methods can also be used to disable the network device naming service built into the operating system and prohibit the operating system from automatically starting the network driver module. For example, the network device naming service built into the operating system can be disabled and the operating system can be prohibited from automatically starting the network driver module by modifying the Basic Input Output System (BIOS) file and other methods.

[0047] For example, the following content can be masked by modifying the boot parameters in Grub:

[0048] Mask net.ifnames and biosdevname, that is, mask the network device naming service built into the operating system, because these built-in network device naming services are difficult to meet the current naming requirements. For example, network devices can be named with names that conform to rules such as "ethx", "enox", or "ensx", such as eth0, eth1, eth2, etc. The naming rules of net.ifnames and biosdevname for network devices are different from the ethx rule. To avoid interference, net.ifnames and biosdevname can be masked in advance.

[0049] Mask the network device driver module in the initrd image file: The initrd image file is the first file system loaded into memory after the kernel of the operating system starts. By default, it contains all driver modules. In order to control the loading order of the network device driver modules according to the current naming requirements subsequently, the network device driver modules in the initrd image file can be masked.

[0050] Shield the network device driver module in the kernel of the operating system: In addition to the network device driver module in the initrd image file, the kernel module will also automatically load the network device driver module, so the network device driver module in the kernel can also be shielded during the startup process of the operating system.

[0051] According to the above technical solution, before the operating system is started, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module. In this way, the loading order of the network device driver module can be controlled as needed, so as to control the identification and initial naming order of multiple network devices as needed, thereby facilitating the initial naming of network devices in a preset manner.

[0052] The above scheme of disabling the operating system's own network device naming service and prohibiting the operating system from automatically starting the network driver module before the operating system starts is only an example and not a limitation of the present invention. For example, optionally, the operating system's own network device naming service and network driver module can also be pre-set in the operating system so that the initial naming method of multiple network devices can comply with the rules described above (that is, for a group of network devices that complete the initial naming before the target renaming moment, if the number of network devices in the group of network devices exceeds one, then at least one target name among all the target names corresponding to the group of network devices is prohibited from being assigned to the group of network devices as the initial name). In this case, there is no need to disable the operating system's own network device naming service and prohibit the operating system from automatically starting the network driver module before the operating system starts.

[0053] Exemplarily, after renaming the multiple network devices, the method further includes: configuring the Internet Protocol Address (IP) addresses and Media Access Control Address (MAC) addresses of the multiple network devices respectively according to the respective target names of the multiple network devices.

[0054] For example, if the network device is an igc network card, the igc network card and the motherboard in the device host have a unique MAC address burned in when they leave the factory. Therefore, the MAC address of the igc network card can use the MAC address burned in when leaving the factory, or it can be a MAC address arbitrarily configured by the user. For another example, if the network device is an igb network card, the igb network card does not have a unique MAC address burned in when leaving the factory, and the MAC addresses of all identical igb network cards are the same, so the user can reconfigure the MAC address of the igb network card. Similarly, the IP addresses of multiple network devices can also be arbitrarily configured.

[0055] The network device can be accurately identified through the target name. Configuring the IP address and MAC address of the network device based on the target name facilitates the configuration of network access addresses that are easy to identify and distinguish for the network device, so as to help reduce the conflicts of network access addresses and further improve the reliability and robustness of communication through multiple network devices.

[0056] Exemplarily, the number of network device driver modules is at least one. Loading the network device driver modules during the process of starting the operating system includes: loading at least one network device driver module in sequence according to the preset loading order of at least one network device driver module during the process of starting the operating system, where at least one network device driver module is used to drive the operation of at least one type of network device one by one; wherein, the identification of any type of network device is performed after renaming the previously identified previous type of network device; wherein, if the number of network devices belonging to the first type is one, the number of network devices belonging to the second type exceeds one, and the target name of the network device belonging to the first type is arranged between the initial names of any two network devices belonging to the second type when used as the initial naming assignment, then in the preset loading order, first load the network device driver module corresponding to the network device belonging to the second type, and then load the network device driver module corresponding to the network device belonging to the first type.

[0057] In one embodiment, the multiple network devices can be network devices of the same type. For example, the multiple network devices are 2 igb network cards. The multiple network devices can also be network devices of different types. For example, the multiple network devices can include 2 igb network cards and 1 igc network card. When the multiple network devices include two or more types of network devices, two or more network device driver modules can be loaded according to the first preset loading order, so as to identify the network devices in sequence according to the types of network devices and perform initial naming. The way of initial naming can be arbitrary, and the present invention does not limit this. For example, the above-mentioned "ethx". For the convenience of description and understanding, the naming method of "ethx" is used as an example in the embodiments of the present invention for description. In one example, assume that the multiple network devices include an igb1 network card, an igb2 network card, and an igc network card, and assume that the target names of these three network devices are respectively: the igb2 network card is eth0, the igb1 network card is eth2, and the igc network card is eth1. The igb1 network card and the igb2 network card belong to the second type, and the igc network card belongs to the first type.

[0058] Exemplarily, the preset naming rule script can be a rule established based on the udev service. The following takes the preset naming rule script being a udev service rule as an example for illustration. Using the above udev service can match network devices with corresponding target names. Exemplarily, it is assumed that during initial naming, they are named eth0, eth1,... respectively according to the recognition order of network devices. If the ethx naming rule is also adopted in the udev service and the network driver module is automatically loaded, it may cause conflict problems during renaming. For example, if the igc network card driver module is loaded first and then the igb network card driver module, when loading the igc network card driver module, the igc network card obtains the name eth1 through initial naming or renaming, causing eth1 to be occupied in advance. At this time, if the initial names of two igb network cards are just the opposite, the renaming will fail due to the lack of an intermediary for name exchange. If the igb network card driver module is loaded first and then the igc network card driver module, then eth1 is not occupied in advance, and the two igb network cards can obtain the names eth0 and eth2 respectively through initial naming or renaming. When the igc network card driver module is loaded subsequently, only eth1 is not occupied, and the igc network card can only be initially named eth1, and there is no naming conflict at this time.

[0059] Therefore, in the case where there are a first type of network device and a second type of network device, the number of network devices belonging to the first type is one. This network device will not have conflicts during renaming because the target name is not occupied by other network devices of the same type. Therefore, this type of network device can be loaded later. The number of network devices belonging to the second type exceeds one, and conflicts are likely to occur during renaming. Therefore, this type of network device can be loaded preferentially. This loading logic of the network device driver module can effectively avoid naming conflicts for the second type of network device.

[0060] Exemplarily, the target electronic device may further include a data acquisition module for acquiring observation data of the target object. The observation data includes ultrasonic data or image data. The multiple network devices include a first network device, a second network device, and a third network device. The first network device is used to communicate with another electronic device. The second network device is used to communicate with a local area network. The third network device is used to communicate with the data acquisition module. The first network device and the second network device belong to the first type, and the third network device belongs to the second type.

[0061] In one embodiment, the target electronic device may further include a data acquisition module (which may be referred to as the front end). The data acquisition module may be used to acquire observation data of the target object. Exemplarily but not restrictively, the observation data may include ultrasonic data or image data. For example, an ultrasonic device is mainly used for acquiring and analyzing ultrasonic images of a target object. The ultrasonic device may include a display, an input device, a device host, and a data acquisition module, etc. The data acquisition module may include, for example, the ultrasonic probe of the ultrasonic device. The ultrasonic probe may acquire ultrasonic data (specifically, ultrasonic echo data) and upload the ultrasonic data to the device host to generate an ultrasonic image. The ultrasonic image may be displayed on the display. Also for example, an endoscope device mainly images a target object through an endoscope lens to obtain image data. The endoscope device may include a display, a device host, and a data acquisition module, etc. The data acquisition module may be, for example, the endoscope lens of the endoscope device. The endoscope lens may acquire image data and upload the image data to the device host to generate an endoscope image. The endoscope image may be displayed on the display.

[0062] The multiple network devices may include a first network device, a second network device, and a third network device. Figure 2 The communication schematic diagram of multiple network devices according to an embodiment of the present invention is shown. As Figure 2 shown, the target electronic device may be an ultrasonic device or an endoscope device. The device hosts of both the ultrasonic device and the endoscope device may come with an igc network card, and to achieve communication with the front end, local area network, and ultrasonic-endoscope network, two additional network cards may be added. Therefore, 2 independent igb network cards can be extended, which can be connected to the hosts of the ultrasonic and endoscope devices through PCIE slots. Specifically, referring to Figure 2 , on the ultrasonic device and the endoscope device, there are respectively provided an igb1 network card, an igb2 network card, and an igc network card. The above-mentioned first network device may be the igb1 network card, the second network device may be the igb2 network card, and the third network device may be the igc network card. The first network device (igb1 network card) may be used to communicate with another electronic device. As Figure 2 shown, the igb1 network card on the ultrasonic device may communicate with the igb1 network card on the endoscope device. The second network device (igb2 network card) may be used to communicate with the local area network. As Figure 2 shown, both the igb2 network card on the ultrasonic device and the igb2 network card on the endoscope device may communicate with the local area network. The third network device (igc network card) may be used to communicate with the data acquisition module. As Figure 2As shown, the igc network card on the ultrasound device can communicate with the ultrasound probe in the ultrasound device, and the igc network card on the endoscope device can communicate with the endoscope lens in the endoscope device. A network port connection can be used between the igc network card on the ultrasound device and the ultrasound probe. A PCIE interface can be used to connect the igc network card on the endoscope device and the endoscope lens. The igb network card and the device host can be connected through a PCIE interface. The igb1 network cards on the ultrasound device and the endoscope device can be connected to each other through a network port. The igc network card can be an on-board PCIE network card, that is, it can be integrated on the motherboard of the device host. The communication reliability and quality of the igc network card are relatively high. Optionally, the on-board igc network card in the endoscope device can be reserved and the function configuration is not done temporarily. The igb network card can be an extended PCIE network card, and its stability is slightly worse than that of the on-board igc network card.

[0063] According to the above technical solution, the first network device that communicates with another electronic device and the second network device that communicates with the local area network are set to the second type, and the network device that communicates with the data acquisition module is set to the second type. In this way, the network devices can be classified according to the communication requirements, and then it is convenient to perform resource configuration on the network devices according to the communication requirements, such as naming and MAC address configuration.

[0064] Exemplarily, the identified network devices are renamed through a preset naming rule script to determine the target names of multiple network devices, including: for a group of network devices that have completed initial naming before the target renaming moment, the following operations are cyclically executed until the renaming of the group of network devices is completed: select any target network device from the group of network devices, and rename the target network device to the corresponding target name based on the preset naming rule script, where the target network device is a network device whose initial name does not conform to the target name specified in the preset naming rule script and the corresponding target name is not occupied by other network devices.

[0065] The target network devices can be renamed in sequence. For example, in an embodiment where the network device includes an igb1 network card and an igb2 network card, assuming that the target names corresponding to the igb1 network card and the igb2 network card are eth2 and eth0 respectively. If the igb1 network card is initially recognized as eth0 and the igb2 network card is initially recognized as eth1, then the igb1 network card can be regarded as the target network device, that is, the igb1 network card is renamed first. After the renaming of the igb1 network card is completed, the target name eth0 of the igb2 network card is released, that is, the igb2 network card also becomes the target network device. At this time, the igb2 network card can be renamed continuously.

[0066] According to the above embodiments, the target network devices can be renamed in sequence until the renaming of a group of network devices is completed. This solution renames in a cyclic manner, which is relatively orderly and can reduce the probability of renaming failure for network devices whose target names are temporarily occupied.

[0067] Exemplarily, the identified network devices are renamed through a preset naming rule script to determine the target names of multiple network devices, including: if the renaming of any network device fails, wait for the renaming of the previous network device to complete and then trigger a network overlay event, and based on the preset naming rule script, rename the network device with the renaming failure again.

[0068] In one embodiment, during the renaming operation, if it is necessary to rename the igb2 network card from eth1 to eth0, but the name eth0 has been occupied by the igb1 network card, the renaming of igb2 will fail due to a naming conflict at this time. After the igb1 network card has been renamed to eth2, the occupation of the name eth0 is released. At this time, a network overlay (add) event can be triggered. For example, the network overlay event can be triggered through "udevadm trigger" in the operating system to try again to rename the ig2 network card to eth0 according to the preset naming rule script.

[0069] Figure 3 Shows a schematic flowchart of identifying and naming network devices in sequence according to an embodiment of the present invention. As Figure 3As shown, the igb network card driver module can be loaded first. Subsequently, it can be determined whether a network device named eth2 is recognized (i.e., whether the igb1 network card is named eth2). Exemplarily, when a network device named eth2 exists, a corresponding device file will be created. Optionally, it can be determined whether a network device named eth2 is recognized by checking whether / sys / class / net / eth2 exists. If the igb1 network card is not successfully named eth2, it can sleep and wait. After waiting for a certain period, such as waiting for 1 s, it can continue to determine whether there is a network device named eth2 and repeat this operation until a network device named eth2 is recognized. After recognizing a network device named eth2, the "udevadm trigger" in the operating system triggers a network overlay event, and it is determined again whether a network device named eth0 is recognized (i.e., whether the igb2 network card is named eth0). Similarly, if the igb2 network card is not successfully named eth0, after sleeping and waiting for a certain period, such as waiting for 1 s, it can continue to determine whether there is a network device named eth0 and repeat this operation until a network device named eth0 is recognized. After recognizing the network device renamed eth0, the igc network card driver module is loaded to name the igc network card.

[0070] According to the above technical solution, in the process of performing the renaming operation, if the renaming of any network device fails, a network overlay event can be triggered to rename the network device again. This can increase the probability of correctly naming the network device.

[0071] Exemplarily, in the process of recognizing multiple network devices, a preset naming rule script is loaded, and the recognized network devices are renamed through the preset naming rule script to determine the target names of the multiple network devices, including: starting the target naming service, where the target naming service includes the preset naming rule script; finding the device identification information corresponding to each of the recognized network devices; and renaming the recognized network devices based on the device identification information and the preset naming rule script to determine the target names of the multiple network devices.

[0072] In one embodiment, the target naming service may be, for example, the udev service in the foregoing embodiments, and the target naming service may include a preset naming rule script. When any network device is recognized, the device identification information corresponding to the network device may be searched for. Each network device has unique device identification information. The device identification information may be any information as long as it can uniquely identify the network device. Preferably, the network device is bound to its physical interface, and the network device is identified by the ID of the physical interface. For example, when the network device is a USB network card, the physical slot and identifier (ID) of the USB interface used by the USB network card may be used as the device identification information. For another example, when the network device is a PCIE device, the DEVPATH and ID_PATH of the PCIE device may be used as the device identification information. Subsequently, based on the device identification information and the preset naming rule script, the recognized network device may be renamed to determine the target names of multiple network devices. The preset naming rule script is a preferentially set rule script, which may use the device identification information as the identifier of the network device and specify the target naming corresponding to each device identification information.

[0073] Exemplarily, at least some of the multiple network devices are PCIE devices, and the device identification information of the PCIE devices is the DEVPATH and IP PATH corresponding to the PCIE devices.

[0074] In one embodiment, all or part of the multiple network devices may be PCIE devices. USB communication can meet the long-distance communication requirements but is prone to interference and disconnection, while PCIE communication, although having a relatively high bandwidth and strong anti-interference ability, has a relatively short communication distance. Network communication has a lower bandwidth than PCIE but has a strong anti-interference ability and a relatively long communication distance. After comparison, the communication between the device host and the front end of the ultrasonic device can use network communication due to its low bandwidth and long distance, while the communication between the device host and the front end of the endoscope device can use PCIE communication due to its high bandwidth.

[0075] The MAC address is not suitable as the device identification information. For example, in an ultrasound-endoscope system (a system including an ultrasonic device and an endoscope device), the MAC addresses of 2 igb network cards are exactly the same when they leave the factory, and the MAC addresses of the igc network cards of different devices are also different. Therefore, it is not suitable to use the MAC address as the device identification information of the network card. For an ultrasound-endoscope system with a fixed hardware structure, the DEVPATH and ID_PATH of each PCIE device are fixed. Therefore, the DEVPATH and IP_PATH corresponding to the PCIE device can be used as the device identification information. This can facilitate the identification of each network device and effectively avoid misidentification.

[0076] In one embodiment, the user can view that the DEVPATH of the igb1 network card is " / devices / pci0000:00 / 0000:00:1c.6 / *" and the ID_PATH is "pci-0000:03:00.0" by looking up the path: udevadm monitor --subsystem-match=net –property. Similarly, the user can view that the DEVPATH of the igb2 network card is " / devices / pci0000:00 / 0000:00:1c.7 / *" and the ID_PATH is "pci-0000:04:00.0" by looking up the path: udevadm monitor --subsystem-match=net –property. The user can view that the DEVPATH of the igc network card is " / devices / pci0000:00 / 0000:00:1d.0 / *" and the ID_PATH is "pci-0000:05:00.0" by looking up the path: udevadm monitor --subsystem-match=net –property. Subsequently, the user can write the DEVPATH and IP_PATH corresponding to each network card found into a preset naming rule script to specify the target naming corresponding to each network card. After writing into the preset naming rule script, each time a network device is recognized, the operating system can automatically search for the device identification information of the network device. Through the device identification information of any network device found and in combination with the preset naming rule script, the target naming of the network device can be determined.

[0077] According to the above technical solution, by sequentially searching for the device identification information corresponding to multiple network devices, multiple network devices can be quickly and accurately identified, and thus the efficiency and accuracy of naming network devices according to the target naming service can be improved.

[0078] Exemplarily, the target electronic device further includes a data acquisition module for acquiring observation data of a target object. The observation data includes ultrasonic data or image data. Configuring the Internet protocol address and media access control address of multiple network devices respectively according to the target names of the multiple network devices may include: when it is determined that a network device is a network device for communicating with the data acquisition module based on the target name of any network device, configuring the Internet protocol address and media access control address of the network device according to the preset communication requirements of the data acquisition module (which may be referred to as the first preset communication requirements).

[0079] In one embodiment, the target electronic device may further include a data acquisition module. The data acquisition module has been described in detail in the previous embodiments. For the sake of brevity, it will not be elaborated here. The target name of any network device can be used to determine which network device, port, etc. the network device is used to communicate with. For example, according to the communication rules of multiple network devices preset by the user, the network device named eth0 is used to communicate with the local area network, the network device named eth1 is used to communicate with the data acquisition module, and the network device named eth2 is used to communicate with other target electronic devices. In one embodiment of the present invention, when the network device named eth1 is recognized, it can be determined that the network device is a network device used to communicate with the data acquisition module. In Figure 2 In the embodiment shown, the network device named eth1 is an igc network card. Since the igc network card is an on-board network card, the communication reliability and communication quality are relatively high, and it can be used to communicate with the data acquisition module to transmit observation data (ultrasound data or image data). The igc network card and the data acquisition module form a one-to-one communication link. Generally speaking, the data collected by the data acquisition module is large in quantity and needs to be transmitted to the device host quickly and stably. Therefore, there are relatively high requirements for the stability and bandwidth of data transmission. In order to enable the igc network card to communicate with the data acquisition module smoothly, the MAC address of the igc network card can be configured as a MAC address that can meet the communication requirements of the data acquisition module (i.e., the preset communication requirements). For the IP address of the igc network card, it can be configured arbitrarily according to the user's needs, or it can be an IP address automatically generated by the operating system. For example, the MAC address of the igc network card can be configured as 00:0a:83:b1:d0:8e, and the IP address can be configured as 10.10.10.10 / 10 through the network interface of the operating system.

[0080] According to the above technical solution, when it is determined that the network device is a network device used to communicate with the data acquisition module based on the target name of any network device, the Internet protocol address and media access control address of the network device are configured according to the preset communication requirements of the data acquisition module. This can ensure that the network device and the data acquisition module can communicate sequentially, so as to further improve the communication reliability of the network device.

[0081] Exemplarily, configuring the Internet Protocol addresses and Media Access Control addresses of multiple network devices respectively according to the respective target names of the multiple network devices may include: when determining, based on the target name of any network device, that the network device is a network device for communicating with the data acquisition module, saving the original default Media Access Control address of the network device to a target storage location; when determining, based on the target name of any network device, that the network device is a network device for communicating with the local area network, determining the Media Access Control address stored in the target storage location as the Media Access Control address of the network device, and determining the Internet Protocol address of the network device based on the first address configuration information.

[0082] In one embodiment, when identifying a network device named eth1, it may be determined that the network device is a network device for communicating with the data acquisition module. Then, the original default MAC address of the igc network card may be obtained through the network interface on the operating system and the address may be stored in the target storage location. For example, it may be saved to the "igc.mac" file. When identifying a network device named eth0 (such as Figure 2 the igb2 network card shown), it may be determined that the network device is a network device for communicating with the local area network. Exemplarily, the original default MAC address of the igc network card stored in the target storage location (i.e., stored in the "igc.mac" file) may be used as the MAC address of the igb2 network card. The on-board igc network card may have a unique MAC address burned in when it is sold and shipped with the motherboard, while the extended igb network card does not have a unique MAC address burned in. Therefore, the MAC addresses of the same igb network card are usually the same. If there are multiple identical igb network cards in the local area network at the same time, MAC address conflicts may occur, resulting in abnormal network communication. Therefore, in order to prevent conflicts with the MAC addresses of other network devices in the local area network, the MAC address of this network device needs to be set to a unique MAC address. If the manufacturer's default MAC address is used, it is difficult to ensure that the MAC address is unique. In this embodiment, using the MAC address of the igc network card as the MAC address of the igb2 network card can better ensure that the MAC address of the igb2 network card does not conflict. In addition, exemplarily, the IP address of the igb2 network card may be determined based on the first address configuration information. The first address configuration information may be input by the user through an input device such as a mouse or keyboard, or may be automatically generated by the operating system. For example, the IP address of the igb2 network card may be configured as 100.100.100.100 through the network interface of the operating system.

[0083] Save the original default media access control address of the network device used to communicate with the data acquisition module, and determine the original default media access control address of the network device as the media access control address of the network device used to communicate with the local area network, so as to ensure the uniqueness of the media access control address of the network device used to communicate with the local area network and avoid access errors.

[0084] Exemplarily, configuring the Internet protocol addresses and media access control addresses of multiple network devices respectively according to the target names of the multiple network devices may include: when determining, based on the target name of any first network device, that the network device is a network device used to communicate with a second network device in the device host of another electronic device, determining the Internet protocol address and media access control address of the first network device based on second address configuration information, where the Internet protocol address and media access control address of the first network device are different from the Internet protocol address and media access control address of the second network device.

[0085] In one embodiment, when identifying a network device named eth2 (such as Figure 2 the igb1 network card shown), it can be determined that the network device is a network device used to communicate with a network device of the same type in the device host of another electronic device. Refer to Figure 2 , there is one-to-one communication between the igb1 network card in the ultrasound device and the igb1 network card in the endoscope device, so the address conflict problem, that is, the uniqueness of the MAC address, does not need to be considered. The MAC addresses of the igb1 network cards of the same type of electronic devices can be the same, and it is only necessary to ensure that the MAC addresses and IP addresses of the igb1 network cards of the two electronic devices communicating with each other are different. For example, if there are two ultrasound devices in the local area network, the MAC addresses of the igb1 network cards of the two ultrasound devices can be the same. The second address configuration information can be input by the user through an input device such as a mouse or a keyboard, or can be automatically generated by the operating system. For example, the user can configure the MAC addresses of the igb1 network cards respectively through the input device, or the operating system can automatically generate the MAC addresses of the igb1 network cards. For example, the MAC address of the igb1 network card can be configured as 00:0a:83:b1:d0:8e and the IP address can be configured as 10.10.10.10 / 10 through the network interface of the operating system. Exemplarily, the Internet protocol address and media access control address of the first network device can be configured according to the preset communication requirements (which can be called the second preset communication requirements) between the target electronic device and another electronic device.

[0086] According to the above technical solution, based on the second address configuration information, the Internet Protocol address and the Media Access Control address of the network device used to communicate with the second network device in the device host of another electronic device are determined. This method can quickly configure the Internet Protocol address and the Media Access Control address of the network device.

[0087] Figure 4 shows a schematic flow chart of configuring the Internet Protocol addresses and media access control addresses of multiple network devices according to an embodiment of the present invention. Figure 4 As shown, you can first obtain the MAC address of the igc network card through the network interface on the operating system and determine whether the MAC address of the current igc network card is the original default MAC address. If the MAC address of the current igc network card is the original default MAC address, that is, the MAC address of the igc network card has not been modified, then the original default MAC address can be stored in the target storage location (igc.mac file). If the MAC address of the current igc network card is not the original default MAC address, or after the original default MAC address is stored in the target storage location, then the MAC address and IP address of the igc network card can be configured according to the preset communication requirements. Then configure the MAC address stored in the igc.mac file to the MAC address of the igb2 network card, and configure the IP address of igb2 based on the first configuration information. Secondly, configure the MAC address and IP address of the igb1 network card according to the preset communication requirements of the ultrasound-endoscope.

[0088] Exemplarily, starting the operating system on the device host may include: starting a multi-operating system startup program, and starting the operating system through the multi-operating system startup program; wherein, in the process of starting the operating system through the multi-operating system startup program, based on the boot parameters in the multi-operating system startup program, disabling the operating system's own network device naming service and prohibiting the operating system from automatically starting the network driver module, and the boot parameters are used to indicate the shielding of the network device naming service and the network driver module.

[0089] In one embodiment, the boot parameters in GRUB can be modified in advance to block the network device naming service, such as blocking "net.ifnames" and "biosdevname". In this way, in the process of starting the operating system through GRUB, based on the modified boot parameters, "net.ifnames" and "biosdevname" can be automatically blocked to disable the network device naming service that comes with the operating system. The disabling of the network driver module is similar and will not be repeated.

[0090] ​According to the above technical solution, by modifying the boot parameters of the multi-operating system boot program, the network device naming service built into the operating system is disabled and the network driver module is prohibited from automatically starting in the operating system. This shielding solution is simple to implement and highly operable.

[0091] Exemplarily, the network driver module may include a network device driver module in the initialized disk image file and a network device driver module in the kernel of the operating system. Among them, the network device driver module loaded during the process of starting the operating system is the network device driver module in the kernel of the operating system.

[0092] Embodiments of shielding the network device driver module in the initrd image file and the network device driver module in the kernel of the operating system have been described above, and will not be elaborated here.

[0093] According to the above technical solution, shielding the network device driver module in the initrd image file and the network device driver module in the kernel of the operating system can ensure that the network device driver module built into the operating system is comprehensively shielded.

[0094] According to another aspect of the present invention, a multi-network device configuration device is further provided. The multi-network device configuration device can be applied to a target electronic device. The target electronic device includes a device host and a plurality of network devices, and the device host is communicatively connected to the plurality of network devices respectively. Figure 5 The schematic diagram of a multi-network device configuration device 500 according to an embodiment of the present invention is shown. As Figure 5 shown, the device 500 may include a start module 510, a primary naming module 520, and a renaming module 530.

[0095] The start module 510 is configured to start the operating system on the device host and load the network device driver module during the process of starting the operating system. Among them, the network device driver module is used to drive the operation of the plurality of network devices.

[0096] The primary naming module 520 is configured to identify the plurality of network devices through the network device driver module and perform initial naming on the identified network devices to determine the initial names of the identified network devices.

[0097] The renaming module 530 is used to load a preset naming rule script in the process of identifying multiple network devices, and rename the identified network devices through the preset naming rule script to determine the target names of the multiple network devices, wherein the preset naming rule script is used to indicate the target names of the multiple network devices respectively, for a group of network devices that complete the initial naming before the target renaming time, if the number of network devices in the group of network devices exceeds one, then at least one target name among all the target names corresponding to the group of network devices is prohibited from being assigned to the group of network devices as the initial name, wherein the target renaming time is the renaming time corresponding to the network device that is renamed earliest in the group of network devices.

[0098] Exemplarily, before the operating system is started, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module. The network device naming service is used to name the network devices in the target electronic device. The network driver module is used to drive the operation of each network device in the target electronic device. The network driver module includes a network device driver module.

[0099] Exemplarily, the multi-network device configuration apparatus 500 may further include a configuration module. The configuration module is used to configure the Internet protocol addresses and media access control addresses of the multiple network devices according to the respective target names of the multiple network devices after the renaming module 530 renames the multiple network devices.

[0100] Exemplarily, the number of network device driver modules is at least one, and the startup module 510 includes a loading submodule, which is used to sequentially load at least one network device driver module according to a preset loading order of at least one network device driver module during the process of starting the operating system, wherein at least one network device driver module is used to drive the operation of at least one type of network device in a one-to-one correspondence; wherein the identification of any type of network device is performed after renaming the previously identified previous type of network device; wherein, if the number of network devices belonging to the first type is one, the number of network devices belonging to the second type is more than one, and the target name of the network device belonging to the first type is arranged between the initial names of any two network devices belonging to the second type when assigned as the initial name, then in the preset loading order, the network device driver module corresponding to the network device belonging to the second type is loaded first, and then the network device driver module corresponding to the network device belonging to the first type is loaded.

[0101] Exemplarily, the target electronic device further includes a data acquisition module for acquiring observation data of the target object. The observation data includes ultrasonic data or image data. The multiple network devices include a first network device, a second network device, and a third network device. The first network device is used to communicate with another electronic device. The second network device is used to communicate with a local area network. The third network device is used to communicate with the data acquisition module. The first network device and the second network device belong to the second type, and the third network device belongs to the first type.

[0102] Exemplarily, the renaming module 530 includes a loop execution sub-module. The loop execution sub-module is configured to loop-execute the following operations for a group of network devices that have completed initial naming before the target renaming moment until the renaming of the group of network devices is completed: select any target network device from the group of network devices, and rename the target network device to the corresponding target name based on a preset naming rule script, where the target network device is a network device whose initial name does not conform to the target name specified in the preset naming rule script and the corresponding target name is not occupied by other network devices.

[0103] Exemplarily, the renaming module 530 further includes a trigger sub-module, which is configured to, if the renaming of any network device fails, wait for the renaming of the previous network device to complete and then trigger a network overlay event to rename the network device with the failed renaming again based on the preset naming rule script.

[0104] Exemplarily, the renaming module 530 further includes a first startup sub-module, a lookup sub-module, and a renaming sub-module. The first startup sub-module is used to start a target naming service, and the target naming service includes a preset naming rule script. The lookup sub-module is used to look up the device identification information corresponding to each of the identified network devices. The renaming sub-module is used to rename the identified network devices based on the device identification information and the preset naming rule script to determine the target names of the multiple network devices.

[0105] Exemplarily, the target electronic device also includes a data acquisition module for acquiring observation data of the target object, the observation data including ultrasound data or image data, the configuration module also includes a configuration submodule, and / or the configuration module also includes a storage submodule and a first determination submodule, and / or the configuration module also includes a second determination submodule. The configuration submodule is used to configure the Internet Protocol address and the Media Access Control address of the network device according to the preset communication requirements of the data acquisition module when the network device is determined to be a network device for communicating with the data acquisition module based on the target name of any network device; and / or the storage submodule is used to save the original default Media Access Control address of the network device to the target storage location when the network device is determined to be a network device for communicating with the data acquisition module based on the target name of any network device; the first determination submodule is used to store the target device in the target storage location when the network device is determined to be a network device for communicating with the local area network based on the target name of any network device. The media access control address stored in the target storage location is determined as the media access control address of the network device, and the Internet Protocol address of the network device is determined based on the first address configuration information; and / or, a second determination submodule is used to determine the Internet Protocol address and the media access control address of the first network device based on the second address configuration information when the network device is determined to be a network device for communicating with a second network device in a device host of another electronic device based on the target name of any first network device, wherein the Internet Protocol address and the media access control address of the first network device are different from the Internet Protocol address and the media access control address of the second network device.

[0106] Exemplarily, the startup module 510 includes a second startup submodule, which is used to start the multi-operating system startup program and start the operating system through the multi-operating system startup program; wherein, in the process of starting the operating system through the multi-operating system startup program, based on the boot parameters in the multi-operating system startup program, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module, and the boot parameters are used to indicate the shielding of the network device naming service and the network driver module.

[0107] Exemplarily, the network driver module includes a network device driver module in the initialization disk image file and a network device driver module in the kernel of the operating system, wherein the network device driver module loaded during the process of starting the operating system is the network device driver module in the kernel of the operating system.

[0108] Through reading the above description of the multi-network device configuration method, ordinary technicians in this field can understand the specific implementation scheme and beneficial effects of the above multi-network device configuration device, and for the sake of brevity, they will not be described here.

[0109] According to another aspect of the present invention, an electronic device is also provided.Figure 6 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. As Figure 6 shown, the electronic device 600 includes a processor 610 and a memory 620. A computer program is stored in the memory 620. When the computer program instructions are run by the processor 610, they are used to execute the above multi-network device configuration method.

[0110] According to another aspect of the present invention, a storage medium is further provided, storing a computer program / instructions. The storage medium may include, for example, a storage component of a tablet computer, a hard disk of a personal computer, an erasable programmable read-only memory (EPROM), a portable read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The storage medium may be any combination of one or more computer-readable storage media. The computer program / instructions are used to execute the above multi-network device configuration method when run by a processor.

[0111] Those of ordinary skill in the art can understand the specific implementation solutions of the above electronic device and storage medium by reading the relevant descriptions of the above multi-network device configuration method. For the sake of brevity, they will not be described in detail here.

[0112] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Those of ordinary skill in the art can make various changes and modifications therein without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as claimed in the appended claims.

[0113] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0114] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0115] In the specification provided herein, a number of specific details are set forth. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

[0116] Similarly, it should be understood that in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the method of the present invention should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected by the corresponding claims, the inventive point lies in that the corresponding technical problem can be solved by features that are fewer than all the features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, where each claim itself serves as a separate embodiment of the present invention.

[0117] Those skilled in the art will appreciate that, except where features are mutually exclusive, any combination may be employed of all the features disclosed in this specification (including the accompanying claims, abstract and drawings) and all the processes or units of any method or apparatus so disclosed. Each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

[0118] In addition, those skilled in the art will be able to understand that although some of the embodiments described herein include certain features included in other embodiments but not others, the combination of features of different embodiments is meant to be within the scope of the present invention and forms different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0119] Each component embodiment of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the multi-network device configuration apparatus according to the embodiments of the present invention. The present invention can also be implemented as a device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0120] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.

[0121] As described above, it is only the specific implementation manner of the present invention or the description of the specific implementation manner. The protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of them should be covered by the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A multi-network device configuration method, applied to a target electronic device, the target electronic device comprising a device host and a plurality of network devices, the device host and the plurality of network devices are communicatively connected, the method comprising: Starting the operating system on the device host, and loading a network device driver module in the process of starting the operating system, wherein the network device driver module is used to drive the operation of the multiple network devices; Identify the plurality of network devices by the network device driver module and initially name the identified network devices to determine initial names of the identified network devices; In the process of identifying the multiple network devices, a preset naming rule script is loaded, and the identified network devices are renamed by the preset naming rule script to determine the target names of the multiple network devices, wherein the preset naming rule script is used to indicate the target names of the multiple network devices respectively. For a group of network devices that complete initial naming before a target renaming moment, if the number of network devices in the group of network devices exceeds one, then there is at least one target name among all the target names corresponding to the group of network devices that is prohibited from being assigned to the group of network devices as an initial name, wherein the target renaming moment is the renaming moment corresponding to the network device that is renamed earliest in the group of network devices.

2. The method of claim 1, wherein: Before the operating system is started, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module. The network device naming service is used to name the network devices in the target electronic device, and the network driver module is used to drive the operation of each network device in the target electronic device. The network driver module includes the network device driver module.

3. The method of claim 1, wherein: After renaming the multiple network devices, the method further includes: According to the respective target names of the plurality of network devices, Internet protocol addresses and media access control addresses of the plurality of network devices are configured respectively.

4. The method according to any one of claims 1 to 3, wherein: The number of the network device driver module is at least one, and the loading of the network device driver module during the process of starting the operating system includes: In the process of starting the operating system, sequentially loading the at least one network device driver module according to a preset loading order of the at least one network device driver module, wherein the at least one network device driver module is used to drive the operation of at least one type of network device in a one-to-one correspondence; wherein the identification of any type of network device is performed after renaming the previously identified network device of the previous type; Among them, if the number of network devices belonging to the first type is one, the number of network devices belonging to the second type is more than one, and the target name of the network device belonging to the first type is arranged between the initial names of any two network devices belonging to the second type when assigned as the initial name, then in the preset loading order, the network device driver module corresponding to the network device belonging to the second type is loaded first, and then the network device driver module corresponding to the network device belonging to the first type is loaded.

5. The method of claim 4, wherein: The target electronic device also includes a data acquisition module for acquiring observation data of the target object, wherein the observation data includes ultrasound data or image data. The multiple network devices include a first network device, a second network device, and a third network device. The first network device is used to communicate with another electronic device, the second network device is used to communicate with a local area network, and the third network device is used to communicate with the data acquisition module. The first network device and the second network device belong to the second type, and the third network device belongs to the first type.

6. The method according to any one of claims 1 to 3, wherein: The step of renaming the identified network devices by using the preset naming rule script to determine target names of the plurality of network devices includes: For a group of network devices that have completed initial naming before the target renaming time, the following operations are performed in a loop until the renaming of the group of network devices is completed: Select any target network device from the group of network devices, and rename the target network device to a corresponding target name based on the preset naming rule script, wherein the target network device is a network device whose initial name does not conform to the target name specified in the preset naming rule script and whose corresponding target name is not occupied by other network devices.

7. The method of claim 6, wherein: The step of renaming the identified network devices by using the preset naming rule script to determine target names of the plurality of network devices includes: If the renaming of any network device fails, a network overlay event is triggered after the renaming of the previous network device is completed, so as to rename the network device that failed to be renamed again based on the preset naming rule script.

8. The method according to any one of claims 1 to 3, wherein: In the process of identifying the plurality of network devices, loading a preset naming rule script, and renaming the identified network devices by using the preset naming rule script to determine target names of the plurality of network devices, comprises: Starting a target naming service, wherein the target naming service includes the preset naming rule script; Find the device identification information corresponding to each of the identified network devices; Based on the device identification information and the preset naming rule script, the identified network devices are renamed to determine target names of the multiple network devices.

9. The method of claim 3, wherein: The target electronic device further includes a data acquisition module for acquiring observation data of the target object, wherein the observation data includes ultrasound data or image data. The configuring of the Internet protocol addresses and media access control addresses of the plurality of network devices respectively according to the respective target names of the plurality of network devices includes: When determining, based on the target name of any network device, that the network device is a network device for communicating with the data acquisition module, configuring the Internet Protocol address and the Media Access Control address of the network device according to the preset communication requirements of the data acquisition module; and / or, When determining, based on the target name of any network device, that the network device is a network device for communicating with the data acquisition module, saving the original default media access control address of the network device to the target storage location; When determining that any network device is a network device for communicating with a local area network based on the target name of any network device, determining the media access control address stored in the target storage location as the media access control address of the network device, and determining the Internet Protocol address of the network device based on the first address configuration information; and / or, When it is determined based on the target name of any first network device that the network device is a network device used to communicate with a second network device in a device host of another electronic device, the Internet Protocol address and the Media Access Control address of the first network device are determined based on the second address configuration information, wherein the Internet Protocol address and the Media Access Control address of the first network device are different from the Internet Protocol address and the Media Access Control address of the second network device.

10. The method of claim 2, wherein: The starting the operating system on the device host includes: Starting a multi-operating system startup program, and starting the operating system through the multi-operating system startup program; Among them, in the process of starting the operating system through the multi-operating system startup program, based on the boot parameters in the multi-operating system startup program, the network device naming service that comes with the operating system is disabled and the operating system is prohibited from automatically starting the network driver module, and the boot parameters are used to indicate the shielding of the network device naming service and the network driver module.

11. The method of claim 2, wherein: The network driver module includes a network device driver module in the initialization disk image file and a network device driver module in the kernel of the operating system, wherein the network device driver module loaded during the process of starting the operating system is the network device driver module in the kernel of the operating system.

12. A multi-network device configuration apparatus, applied to a target electronic device, the target electronic device comprising a device host and a plurality of network devices, the device host and the plurality of network devices are communicatively connected, the apparatus comprising: A startup module, used to start the operating system on the device host and load a network device driver module in the process of starting the operating system, wherein the network device driver module is used to drive the operation of the multiple network devices; An initial naming module, used for identifying the plurality of network devices through the network device driver module and performing initial naming on the identified network devices to determine the initial names of the identified network devices; A renaming module is used to load a preset naming rule script during the process of identifying the multiple network devices, and rename the identified network devices through the preset naming rule script to determine the target names of the multiple network devices, wherein the preset naming rule script is used to indicate the target names of the multiple network devices respectively. For a group of network devices that complete initial naming before a target renaming moment, if the number of network devices in the group of network devices exceeds one, then there is at least one target name among all the target names corresponding to the group of network devices that is prohibited from being assigned to the group of network devices as an initial name, wherein the target renaming moment is the renaming moment corresponding to the network device that is renamed earliest in the group of network devices.

13. An electronic device, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program instructions are used to execute the multi-network device configuration method according to any one of claims 1 to 11 when the processor is running the computer program instructions.

14. A storage medium storing a computer program / instruction, wherein the computer program / instruction is used to execute the multi-network device configuration method according to any one of claims 1 to 11 when running.