Method, device and equipment for automatically identifying position of Ethernet equipment and medium

By connecting multiple Ethernet devices to the processing device, real-time test and automatic adjustment of throughput, the problem of high testing costs and difficult timely detection of equipment with poor throughput in the existing technology is solved, and efficient simultaneous testing and automatic identification of multiple devices is achieved.

CN119484358AInactive Publication Date: 2025-02-18TIANJIN JINHANG COMP TECH RES INST
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411670756.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is costly and difficult to detect devices with poor throughput in a timely manner when testing the throughput of multiple Ethernet devices.

Method used

Connect multiple Ethernet devices through processing devices, assign IP addresses, test throughput in real time, and automatically identify and adjust the device's physical interface throughput based on the test results.

Benefits of technology

It realizes the simultaneous testing of multiple Ethernet devices under the conditions of reducing costs, and automatically identifying the device location, improving the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484358A_ABST
    Figure CN119484358A_ABST
Patent Text Reader

Abstract

The invention discloses an Ethernet equipment position automatic identification method and device, equipment and a medium, and relates to the technical field of communication, and the method comprises the steps that processing equipment is connected with first equipment, second equipment, third equipment and fourth equipment through network cables, and distributes IP addresses to the first equipment, the second equipment, the third equipment and the fourth equipment, if the first device, the second device, the third device and the fourth device are determined to be communicated, running a test program to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result, and judging whether a target device with the Ethernet throughput smaller than an Ethernet throughput threshold exists according to the test result; if yes, the Ethernet throughput of the physical interface of the target equipment is adjusted, and if not, normal information is fed back, and the test is continued. According to the method, simultaneous testing of a plurality of Ethernet devices can be realized, the positions of the Ethernet devices are automatically identified, and the testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aviation computer technology, and in particular to a method, device, equipment and medium for automatically identifying the location of an Ethernet device. Background Art

[0002] In the field of aviation computer technology, the throughput test of Ethernet devices is performed by professional instruments, which can achieve real-time monitoring and timely adjustment of the optimal throughput. In actual experiments, this test method is costly and requires the construction of a complex test environment. If the throughput of multiple Ethernet devices is tested at the same time, if the throughput of one Ethernet device is poor, the corresponding Ethernet device cannot be found in time. Summary of the invention

[0003] The present application provides a method, apparatus, device and medium for automatically identifying the location of an Ethernet device, which can realize simultaneous testing of multiple Ethernet devices while reducing costs, and automatically identify the location of the Ethernet device, thereby improving testing efficiency.

[0004] In order to achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides an Ethernet device location automatic identification method, which is applied to a processing device, wherein the processing device is connected to a first physical interface, a second physical interface, a third physical interface, and a fourth physical interface through a network cable, wherein the first physical interface is connected to a first device, the second physical interface is connected to a second device, the third physical interface is connected to a third device, and the fourth physical interface is connected to a fourth device; the method includes: Allocating IP addresses to the first device, the second device, the third device, and the fourth device to obtain a correspondence between the IP addresses and the physical interfaces; Determine whether the first device, the second device, the third device, and the fourth device are connected to obtain a first determination result; If the first judgment result indicates that the first device, the second device, the third device and the fourth device are connected, a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result; According to the test result, determining whether there is a target device whose Ethernet throughput is less than an Ethernet throughput threshold, and obtaining a second determination result; If the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted.

[0005] In some possible implementations, obtaining the correspondence between the IP address and the physical interface includes: The internal algorithm data table of the switching chip is read through the configuration interface to obtain the corresponding relationship between the MAC address of the switching chip and the physical interface. The mapping from IP address to MAC address is implemented through the address resolution protocol to obtain the corresponding relationship between IP and MAC address, thereby obtaining the corresponding relationship between IP address and physical interface.

[0006] In some possible implementations, the method further includes: The Ethernet throughput threshold is dynamically set according to the test rate, test time, frame length and test mode. In some possible implementations, the method further includes: If the second judgment result indicates that there is no device whose Ethernet throughput is less than the Ethernet throughput threshold, normal information is fed back and the test is continued.

[0007] In some possible implementations, allocating IP addresses to the first device, the second device, the third device, and the fourth device includes: The first device, the second device, the third device and the fourth device are assigned IP addresses by using the dynamic host configuration protocol. In a second aspect, the present application provides an Ethernet device location automatic identification device, the device comprising: A configuration module, used to assign IP addresses to the first device, the second device, the third device, and the fourth device, and obtain a correspondence between the IP addresses and the physical interfaces; A first judgment module is used to judge whether the first device, the second device, the third device and the fourth device are connected to obtain a first judgment result; if the first judgment result indicates that the first device, the second device, the third device and the fourth device are connected, a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result; The second judgment module is used to judge whether there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold according to the test result, and obtain a second judgment result; if the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted.

[0008] In a third aspect, the present application provides a computing device, including a memory and a processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.

[0009] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.

[0010] It can be seen from the above technical solution that the present application has at least the following beneficial effects: In the present application, a processing device is connected to a first physical interface, a second physical interface, a third physical interface and a fourth physical interface through a network cable, the first physical interface is connected to a first device, the second physical interface is connected to a second device, the third physical interface is connected to a third device, and the fourth physical interface is connected to a fourth device. The processing device assigns IP addresses to the first device, the second device, the third device and the fourth device to obtain a correspondence between the IP addresses and the physical interfaces; if it is determined that the first device, the second device, the third device and the fourth device are connected, a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result; based on the test result, it is determined whether there is a target device whose Ethernet throughput is less than an Ethernet throughput threshold; if there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted; if there is no target device whose Ethernet throughput is less than the Ethernet throughput threshold, normal information is fed back and the test continues. In the traditional solution, the throughput test of Ethernet devices is performed by professional instruments, which can monitor in real time and adjust the optimal throughput in time. In actual experiments, this test method is slow. If the throughput of multiple Ethernet devices is tested at the same time, if the throughput of a certain Ethernet device is poor, the corresponding Ethernet device cannot be found in time. It can be seen that this application connects multiple Ethernet devices to the processing device, assigns IP addresses to the Ethernet devices, tests the Ethernet devices in real time, and makes real-time adjustments based on the test results. It can realize the simultaneous testing of multiple Ethernet devices under the condition of reducing costs, and automatically identify the location of Ethernet devices, thereby improving the test efficiency.

[0011] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application; Figure 2 A flowchart of a method for automatically identifying the location of an Ethernet device provided in an embodiment of the present application; Figure 3 A schematic diagram of an Ethernet device location automatic identification device provided in an embodiment of the present application; Figure 4 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] The terms "first", "second", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.

[0014] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0015] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given: Ethernet throughput refers to the maximum data rate that a device can receive and forward without frame loss, and can also be understood as the number of bits or bytes that can be transmitted per second in an actual link. It reflects the device's ability to process data and is an important indicator for measuring network transmission capacity. It indicates the maximum amount of data that a network can transmit without error within a specific period of time. It is generally tested using an Ethernet performance tester.

[0016] The Ethernet performance tester calculates the network throughput by sending a series of data packets to the network under test and measuring the speed at which these data packets are successfully received. High throughput means that the network can process large amounts of data faster, which is suitable for application scenarios with high bandwidth requirements. Some application scenarios require 100% testing of batch products under environmental testing, so it is necessary to find a low-cost, high-efficiency testing method.

[0017] Currently, the throughput test of Ethernet devices is performed by professional instruments, which can achieve real-time monitoring and timely adjustment of the optimal throughput. In actual experiments, this testing method is costly and requires a complex testing environment. If the throughput of multiple Ethernet devices is tested at the same time, if the throughput of one Ethernet device is poor, the corresponding Ethernet device cannot be found in time.

[0018] In view of this, an embodiment of the present application provides a method for automatically identifying the location of an Ethernet device, in which a processing device is connected to a first physical interface, a second physical interface, a third physical interface and a fourth physical interface through a network cable, the first physical interface is connected to a first device, the second physical interface is connected to a second device, the third physical interface is connected to a third device, and the fourth physical interface is connected to a fourth device, and the processing device assigns IP addresses to the first device, the second device, the third device and the fourth device to obtain a correspondence between the IP addresses and the physical interfaces; it is determined that the first device, the second device, the third device and the fourth device are connected, then a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result, and according to the test result, it is determined whether there is a target device whose Ethernet throughput is less than an Ethernet throughput threshold, if there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted, if there is no target device whose Ethernet throughput is less than the Ethernet throughput threshold, normal information is fed back and the test is continued. It can be seen that the present application connects multiple Ethernet devices through a processing device, assigns IP addresses to the Ethernet devices, tests the Ethernet devices in real time, and makes real-time adjustments based on the test results. This can achieve simultaneous testing of multiple Ethernet devices while reducing costs, and automatically identify the locations of Ethernet devices, thereby improving test efficiency.

[0019] In order to make the technical solution of the present application clearer and easier to understand, the application scenarios of the technical solution of the present application are introduced below in conjunction with the accompanying drawings. Figure 1 As shown, the figure is a schematic diagram of an application scenario provided by an embodiment of the present application.

[0020] In this application scenario, the processing device is connected to the first physical interface, the second physical interface, the third physical interface and the fourth physical interface through a network cable, the first physical interface is connected to the first device, the second physical interface is connected to the second device, the third physical interface is connected to the third device, and the fourth physical interface is connected to the fourth device.

[0021] In the embodiment of the present application, the processing device may be a handheld PAD, which uses an 8-inch industrial-grade LCD screen and an infrared touch screen human-computer interaction interface, and the software interface is developed using QT. The handheld PAD hardware circuit includes a handheld PAD including an LCD screen, a touch screen, a main control module, a power module, an interface circuit, etc. The handheld PAD communicates data through the RGMII data interface and communicates with the switching chip through the IIR configuration interface.

[0022] The first device, the second device, the third device and the fourth device may be a network camera (IPC), which supports 100M / 10M adaptive Ethernet and H.264 video compression code stream. The network camera (IPC) is connected to the handheld PAD via Ethernet and transmits the video code stream via the RTSP protocol.

[0023] The handheld PAD and four network cameras (IPC) all use the Linux operating system and support TCP / IP and UDP / IP protocols. To enhance system reliability, communication is implemented using the TCP / IP protocol. To ensure real-time data transmission, video data transmission uses the UDP / IP protocol.

[0024] Thus, the processing device is connected to the first device, the second device, the third device and the fourth device through a network cable. When the first device, the second device, the third device and the fourth device are running, the processing device can monitor the running conditions of the first device, the second device, the third device and the fourth device in real time. It can be seen that this solution can realize the simultaneous testing of multiple Ethernet devices under the condition of reducing costs, and automatically identify the location of Ethernet devices, thereby improving the testing efficiency.

[0025] In order to make the technical solution of the present application clearer and easier to understand, the following describes an Ethernet device location automatic identification method provided by the present application embodiment in combination with the above application scenario. Figure 2 As shown, this figure is a flow chart of a method for automatically identifying the location of an Ethernet device provided in an embodiment of the present application.

[0026] In an embodiment of the present application, the method is applied to a processing device, the processing device is connected to a first physical interface, a second physical interface, a third physical interface, and a fourth physical interface through a network cable, the first physical interface is connected to a first device, the second physical interface is connected to a second device, the third physical interface is connected to a third device, and the fourth physical interface is connected to a fourth device; the method includes: S201: A processing device allocates IP addresses to a first device, a second device, a third device, and a fourth device, and obtains a correspondence between the IP addresses and the physical interfaces.

[0027] The processing device allocates IP addresses to the first device, the second device, the third device, and the fourth device by using the dynamic host configuration protocol.

[0028] Dynamic Host Configuration Protocol (DHCP) is a LAN network protocol, mainly used to automatically assign IP addresses and other network configuration information to devices in the network. DHCP is located in the application layer of the OSI model, uses the UDP protocol for communication, and is usually used in a LAN environment. The working principle of DHCP can be divided into several stages: discovery stage, provision stage, request stage, and confirmation stage.

[0029] In the workflow of DHCP (Dynamic Host Configuration Protocol), the responsibilities of each stage are clear and interconnected. Specifically, in the discovery phase, the DHCP client will send a broadcast message to the network. The purpose of this message is to find an available DHCP server. When the DHCP server receives this broadcast message, it will enter the provision phase. In this phase, the DHCP server will provide an IP address and other related network parameters such as subnet mask, default gateway, DNS server address, etc. to the client based on its own configuration and the current network status. These parameters are packaged into a lease and provided to the client for use. Then it comes to the request phase. In this phase, the DHCP client will select an IP address that matches itself from the multiple IP address options provided by the server (if any), and send a request to the DHCP server, hoping to obtain the right to use this IP address. Finally, it comes to the confirmation phase. In this phase, the DHCP server will confirm the client's request. If everything is normal, it will send an ACK (acknowledgement) packet to the client, indicating that it agrees to allocate the selected IP address and other network parameters to the client for use. At this point, the entire DHCP protocol workflow is completed, and the client has successfully obtained network access rights.

[0030] The advantages of the DHCP protocol include reducing the workload of manual configuration, improving network management efficiency, and the ability to adapt to changes in the network environment.

[0031] The processing device reads the internal algorithm data table of the switching chip through the IIR configuration interface to obtain the corresponding relationship between the MAC address of the switching chip and the physical interface. The switching chip uses a hash table search algorithm to find the relationship between the MAC address and the physical interface; the ARP address resolution protocol is used to implement the mapping from the IP address to the MAC address, and the corresponding relationship between the IP and MAC addresses is obtained, thereby obtaining the corresponding relationship between the IP address and the physical interface.

[0032] In the embodiment of the present application, the ARP protocol is set to obtain the relationship between the MAC address and the IP as follows: the MAC address corresponding to 192.168.1.64 is 7E-7A-91-A3-1C-64, thereby clarifying the one-to-one mapping between the MAC address and the IP; the MAC address of the first physical interface is set to 7E-7A-91-A3-1C-64, and with the MAC address 7E-7A-91-A3-1C-64 as the intermediary, the correspondence between the IP address 192.168.1.64 and the first physical interface can be obtained.

[0033] S202: The processing device determines whether it is connected to the first device, the second device, the third device, and the fourth device.

[0034] After the processing device has allocated the IP address, it is determined whether it is connected to the first device, the second device, the third device, and the fourth device to obtain a first judgment result. If the first judgment result indicates that it is connected to the first device, the second device, the third device, and the fourth device, S203 is executed; if the first judgment result indicates that it is not connected to the first device, the second device, the third device, and the fourth device, the judgment continues.

[0035] In the embodiment of the present application, the processing device sends a PING command to the first device, the second device, the third device and the fourth device, and waits for response information to confirm whether they are connected.

[0036] S203: The processing device runs a test program to test the Ethernet throughput of the first device, the second device, the third device, and the fourth device to obtain a test result.

[0037] If the first determination result indicates that the first device, the second device, the third device, and the fourth device are connected, the processing device runs a test program to test the Ethernet throughput of the first device, the second device, the third device, and the fourth device.

[0038] In an embodiment of the present application, the processing device uses the Iperf tool to test the Ethernet throughput of the first device, the second device, the third device, and the fourth device. Iperf is a performance measurement tool for TCP / IP and UDP / IP that can provide network throughput information, as well as statistical information such as vibration, packet loss rate, maximum segment, and maximum transmission unit size, so as to help us test network performance and locate network bottlenecks. Iperf has two modes: server mode and client mode. The server mode is used to wait for the client to connect, and the client mode is used to establish a connection and send test data.

[0039] The processing device runs the test program and executes the following instructions in sequence: Set the processing device to the server and execute the following command: iperf3 -s, where -s refers to Server; set the first, second, third and fourth devices to the client and execute the following command: iperf3 -u -c192.168.0.101 -b10M -i 1 -t 10, where -u means that the tested Ethernet uses the UDP protocol, -c means that the client needs to enter C, -192.168.0.101 refers to the server IP address, -b10M means setting the Ethernet theoretical rate to 10Mbps, -i 1 refers to the interval between each report in seconds, and -t 10 is the test time: 10s; run the test script to test the Ethernet throughput.

[0040] The test starts from the first physical interface and the test result is recorded in the test log, and then the throughput of the second physical interface, the third physical interface and the fourth physical interface are tested in sequence.

[0041] S204: The processing device determines, based on the test result, whether there is a target device whose Ethernet throughput is less than an Ethernet throughput threshold.

[0042] The Ethernet throughput threshold is dynamically set according to the test rate, test time, frame length and test mode.

[0043] The processing device obtains a second judgment result. If the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, S205 is executed; if the second judgment result indicates that there is no target device whose Ethernet throughput is less than the Ethernet throughput threshold, S206 is executed.

[0044] S205: The processing device adjusts the Ethernet throughput of the physical interface of the target device.

[0045] If the second determination result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the processing device adjusts the Ethernet throughput of the physical interface of the target device.

[0046] S206. The processing device feeds back normal information and continues testing.

[0047] If the second judgment result indicates that there is no target device whose Ethernet throughput is less than the Ethernet throughput threshold, the processing device feeds back normal information and continues the test.

[0048] Based on the above content, the processing device is connected to the first physical interface, the second physical interface, the third physical interface and the fourth physical interface through a network cable, the first physical interface is connected to the first device, the second physical interface is connected to the second device, the third physical interface is connected to the third device, and the fourth physical interface is connected to the fourth device. The processing device assigns IP addresses to the first device, the second device, the third device and the fourth device to obtain the corresponding relationship between the IP address and the physical interface; it is determined that the connection with the first device, the second device, the third device and the fourth device is carried out, and the test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain the test result. According to the test result, it is determined whether there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold. If there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted. If there is no target device whose Ethernet throughput is less than the Ethernet throughput threshold, normal information is fed back and the test is continued. It can be seen that the present application connects multiple Ethernet devices through the processing device, assigns IP addresses to the Ethernet devices, tests the Ethernet devices in real time, and makes real-time adjustments according to the test results. It can realize the simultaneous testing of multiple Ethernet devices under the condition of reducing costs, and automatically identifies the location of the Ethernet devices, thereby improving the test efficiency.

[0049] The present application also provides an Ethernet device location automatic identification device, such as Figure 3 As shown, this figure is a schematic diagram of an Ethernet device location automatic identification device provided by an embodiment of the present application. The device includes: a configuration module 301, a first judgment module 302 and a second judgment module 303; Configuration module 301, used to assign IP addresses to the first device, the second device, the third device and the fourth device, and obtain a correspondence between the IP addresses and the physical interfaces; The first judgment module 302 is used to judge whether the first device, the second device, the third device and the fourth device are connected, and obtain a first judgment result; if the first judgment result indicates that the first device, the second device, the third device and the fourth device are connected, run a test program to test the Ethernet throughput of the first device, the second device, the third device and the fourth device, and obtain a test result; The second judgment module 303 is used to judge whether there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold according to the test result, and obtain a second judgment result; if the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted.

[0050] In some possible implementations, the configuration module 301 is also used to read the internal algorithm data table of the switching chip through the configuration interface, obtain the correspondence between the MAC address of the switching chip and the physical interface, implement the mapping from IP address to MAC address through the address resolution protocol, obtain the correspondence between IP and MAC address, and thereby obtain the correspondence between IP address and physical interface.

[0051] In some possible implementations, the second judgment module 303 is further configured to feedback normal information and continue testing if the second judgment result indicates that there is no device whose Ethernet throughput is less than the Ethernet throughput threshold.

[0052] The present application also provides a computing device. Figure 4 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 400 includes a bus 401, a processor 402, a communication interface 403 and a memory 404. The processor 402, the memory 404 and the communication interface 403 communicate with each other through the bus 401.

[0053] The bus 401 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0054] The processor 402 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0055] The communication interface 403 is used for external communication. For example, when the computing device is a first switch, the communication interface 403 can be used for the first switch to communicate with the first user terminal, or for the first switch to communicate with the second switch.

[0056] The memory 404 may include a volatile memory, such as a random access memory (RAM). The memory 404 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0057] The memory 404 stores executable codes, and the processor 402 executes the executable codes to perform the aforementioned method for automatically identifying the location of an Ethernet device.

[0058] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned method for automatically identifying the location of an Ethernet device.

[0059] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.

[0060] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0061] When the computer program product is executed by a computer, the computer executes any of the aforementioned methods for automatically identifying the location of an Ethernet device. The computer program product may be a software installation package, and when any of the aforementioned methods for automatically identifying the location of an Ethernet device is required, the computer program product may be downloaded and executed on a computer.

[0062] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0063] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A method for automatically identifying the location of an Ethernet device, characterized in that: Applied to a processing device, the processing device is connected to a first physical interface, a second physical interface, a third physical interface and a fourth physical interface through a network cable, the first physical interface is connected to a first device, the second physical interface is connected to a second device, the third physical interface is connected to a third device, and the fourth physical interface is connected to a fourth device; the method comprises: Allocating IP addresses to the first device, the second device, the third device, and the fourth device to obtain a correspondence between the IP addresses and the physical interfaces; Determine whether the first device, the second device, the third device, and the fourth device are connected to obtain a first determination result; If the first judgment result indicates that the first device, the second device, the third device and the fourth device are connected, a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result; According to the test result, determining whether there is a target device whose Ethernet throughput is less than an Ethernet throughput threshold, and obtaining a second determination result; If the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted.

2. The method according to claim 1, characterized in that The obtaining of the correspondence between the IP address and the physical interface includes: The internal algorithm data table of the switching chip is read through the configuration interface to obtain the corresponding relationship between the MAC address of the switching chip and the physical interface. The mapping from IP address to MAC address is implemented through the address resolution protocol to obtain the corresponding relationship between IP and MAC address, thereby obtaining the corresponding relationship between IP address and physical interface.

3. The method according to claim 1, characterized in that The method further comprises: The Ethernet throughput threshold is dynamically set according to the test rate, test time, frame length and test mode.

4. The method according to claim 1, characterized in that: The method further comprises: If the second judgment result indicates that there is no device whose Ethernet throughput is less than the Ethernet throughput threshold, normal information is fed back and the test is continued.

5. The method according to claim 1, characterized in that The allocating IP addresses to the first device, the second device, the third device, and the fourth device includes: The first device, the second device, the third device and the fourth device are assigned IP addresses by using the dynamic host configuration protocol.

6. An Ethernet device location automatic identification device, characterized in that: The device comprises: A configuration module, used to assign IP addresses to the first device, the second device, the third device, and the fourth device, and obtain a correspondence between the IP addresses and the physical interfaces; A first judgment module is used to judge whether the first device, the second device, the third device and the fourth device are connected to obtain a first judgment result; if the first judgment result indicates that the first device, the second device, the third device and the fourth device are connected, a test program is run to test the Ethernet throughput of the first device, the second device, the third device and the fourth device to obtain a test result; The second judgment module is used to judge whether there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold according to the test result, and obtain a second judgment result; if the second judgment result indicates that there is a target device whose Ethernet throughput is less than the Ethernet throughput threshold, the Ethernet throughput of the physical interface of the target device is adjusted.

7. The device according to claim 6, characterized in that The configuration module is also used to read the internal algorithm data table of the switching chip through the configuration interface, obtain the corresponding relationship between the MAC address of the switching chip and the physical interface, realize the mapping from IP address to MAC address through the address resolution protocol, obtain the corresponding relationship between IP and MAC address, and thereby obtain the corresponding relationship between IP address and physical interface.

8. The device according to claim 6, characterized in that The second judgment module is further configured to feedback normal information and continue the test if the second judgment result indicates that there is no device whose Ethernet throughput is less than the Ethernet throughput threshold.

9. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Network equipment handling capacity performance testing system and method

    CN103475542A

  • Automatic test system of throughput of wireless communication equipment and automatic test method of throughput

    CN104519500A

  • System and method for testing optimal throughput of wireless AP (Access Point)

    CN105898781A

  • Throughput test processing method and device

    CN110120894A

  • Self-adaptive switching Ethernet cross redundancy backup system and self-adaptive switching Ethernet cross redundancy backup method

    CN110380916A