Device numbering method, device and storage medium
By utilizing the fabric port and message exchange of the ASIC chip in a decentralized DDC system, the device automatically determines the number, solving the problem of cumbersome device numbering and improving the system's usability and scalability.
Patent Information
- Application Number
- CN202310563491.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2043-05-18
AI Technical Summary
In the decentralized DDC system, the device numbering operation process is cumbersome, and the device number needs to be manually configured when expanding capacity, resulting in poor system usability.
In the DDC system, devices send and receive messages to other devices, automatically determine the device number based on the port number, and use the fabric port of the ASIC chip to achieve information synchronization and device numbering, supporting automatic configuration and expansion.
It realizes the automation of device numbering, simplifies the operation process, improves the usability and scalability of the system, and avoids the errors and complexities caused by manual configuration.
Smart Images

Figure CN119011358B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a device numbering method, apparatus, and storage medium. Background Art
[0002] Traditional distributed disaggregate chassis (DDC) network equipment systems include a network cloud controller (NCC), a network cloud fabric (NCF), and a network cloud packet forwarder (NCP). In a DDC system, the NCC controls communication between the NCF and NCP. This centralized system architecture carries the risk of system failure due to NCC disconnection.
[0003] Based on the traditional DDC system architecture, a decentralized DDC system has evolved. This decentralized DDC system eliminates the NCC, retaining the NCP and NCF. NCPs synchronize information through the NCF without the involvement of the NCC, eliminating the issue of system failures caused by NCC loss. However, the decentralized DDC system architecture has a large number of NCP / NCF devices, and without the NCC automatically assigning device numbers, the process of determining a device number is cumbersome. Summary of the Invention
[0004] The present application provides a device numbering method, apparatus and storage medium to solve the problem of complicated operation procedures when numbering devices in the prior art.
[0005] In a first aspect, the present application provides a device numbering method applicable to a distributed split-rack network device (DDC) system. The DDC system includes a first device and at least one second device. Taking the first device as an example, the method specifically comprises: the first device sends M first messages to each of at least one second device. Each of the M ports in each second device is connected to M ports in the first device. The M first messages corresponding to the i-th second device are used to request the numbers of the M ports in the i-th second device connected to the first device. The M first messages correspond one-to-one with the M ports, where M is a positive integer greater than or equal to 1. The first device is an NCF and the second device is an NCP, or the first device is an NCP and the second device is an NCF. The first device receives M second messages from each of the at least one second device. The M second messages corresponding to the i-th second device include the numbers of the M ports in the i-th second device. The M second messages correspond one-to-one with the M ports. All second messages received by the first device from the at least one second device correspond to a total of N port numbers, where N is a positive integer greater than or equal to 1. If the N port numbers are the same, the first device determines that the number of the first device is any one of the N port numbers.
[0006] Optionally, when the N port numbers are inconsistent and M=1, the method further includes: the first device determining the port number that appears the most times among the N port numbers as the number of the first device.
[0007] Optionally, the method further includes: outputting prompt information, where the prompt information is used to prompt that there is a connection error between the first device and at least one second device.
[0008] Optionally, when the N port numbers are inconsistent and M is greater than 1, the method further includes: the first device determining the number of the first device as a ratio of any one of the N port numbers to M rounded up.
[0009] Optionally, after the first device determines that the number of the first device is any port number among N port numbers, the method further includes: the first device stores the number of the first device in the configuration information, and the number of the first device in the configuration information is the number used after the first device is restarted next time.
[0010] In a second aspect, the present application provides a device numbering apparatus, comprising: a sending module, a receiving module, and a determining module. The sending module is configured to send M first messages to each of at least one second device. The M ports in each second device are connected to M ports in the first device. The M first messages corresponding to the i-th second device are used to request the numbers of the M ports in the i-th second device connected to the first device. The M first messages correspond one-to-one with the M ports, where M is a positive integer greater than or equal to 1. The first device is an NCF and the second device is an NCP, or the first device is an NCP and the second device is an NCF. The receiving module is configured to receive M second messages from each of at least one second device. The M second messages corresponding to the i-th second device include the numbers of the M ports in the i-th second device. The M second messages correspond one-to-one with the M ports. All second messages received by the first device from at least one second device correspond to a total of N port numbers, where N is a positive integer greater than or equal to 1. The determining module is configured to determine that the number of the first device is any one of the N port numbers if the N port numbers are the same.
[0011] Optionally, the determining module is further configured to: determine the port number that appears the most times among the N port numbers as the number of the first device.
[0012] Optionally, the determination module is further used to: output prompt information, where the prompt information is used to prompt that there is a connection error between the first device and at least one second device.
[0013] Optionally, the determination module is further configured to determine that the number of the first device is a ratio of any one of the N port numbers to M, rounded up.
[0014] Optionally, the determination module is further configured to: store the number of the first device in the configuration information, where the number of the first device in the configuration information is the number used by the first device after the next restart.
[0015] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory communicatively connected to the processor, wherein the memory stores computer-executable instructions, which are executed by the processor to enable the processor to perform any of the methods described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes any one of the methods described in the first aspect above.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor can read the computer program from the computer-readable storage medium, and when the processor executes the computer program, it can implement any of the methods described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the system architecture of the DDC system provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the system architecture of a decentralized DDC system provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of the fabric channel architecture provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of a device numbering method provided in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of the numbering and connection of NCPs and NCFs provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of the device numbering device provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] This application relates to a device numbering method, which can be used to number devices in a decentralized DDC system. Since the decentralized DDC system is evolved from the traditional DDC system, a brief introduction to the DDC system is first given.
[0026] like Figure 1 The DDC system is a separate rack network device system developed based on an application-specific integrated circuit (ASIC) chip. The DDC system separates the NCC, NCF, and NCP, making the NCP, NCF, and NCC physically independent devices, interconnected by cables to form a logical rack switch. The NCP is equivalent to a line card in a rack system, the NCF is equivalent to a switching network board in a rack system, and the NCC is equivalent to a management board in a rack system. The NCC can be connected to the NCP and / or NCF via a management network device.
[0027] The NCC can control the NCP and / or NCF by managing network devices. For example, the NCC can aggregate global table entry information and distribute it to the NCP and / or NCF through the management network devices. Global table entry information includes media access control layer (MAC) information, address resolution protocol (ARP) messages, and routing information. Accordingly, the NCP and / or NCF can report global table entry information to the NCC through the management network devices.
[0028] In this system, information synchronization between NCPs is performed through the NCC. For example, an NCP must report global table entries, device information, and port numbers to the NCC via the management network device. The NCC then forwards this information to the other NCP using the device information and port numbers provided by the NCP.
[0029] Because NCPs, NCFs, and NCCs are physically independent, the number of NCPs, NCFs, and NCCs in the system is not limited by the number of slots in the switch rack and can be flexibly expanded. For example, the number of NCPs in a DDC system can be increased to 100 or even more. However, as the number of NCPs in a DDC system increases, the risk of failure in the DDC system gradually increases. For example, when an NCC manages a large number of NCPs, it is prone to failures on the network nodes connected to the NCPs and / or NCFs, causing the NCC to lose connection with the NCPs and / or NCFs. Once the NCC loses connection with the NCPs and / or NCFs, the DDC system will lose control, affecting the normal operation of the NCPs and / or NCFs in the network.
[0030] like Figure 2 As shown in the figure, based on the shortcomings of the DDC system, a decentralized DDC system architecture is proposed.
[0031] This decentralized DDC system eliminates the NCC and management network devices, retaining the NCP and NCF. NCPs and NCFs are fully connected: one NCP connects to all NCFs in the system, and similarly, one NCF connects to all NCPs in the system. Global table entry information, previously aggregated and distributed by the NCC to individual devices, is now directly processed by the NCP for distributed processing. This allows the NCP in this system to have control (also known as the control plane) and management (also known as the management plane) functions similar to those of the NCC, allowing the NCP to communicate with other devices independently of the NCC.
[0032] Considering that the NCC, NCP, and NCF devices in the DDC system are designed based on ASIC chips, the ASIC chips support adding a header layer to messages forwarded between chips, forming a fabric message. The ASIC chips configure registers to designate the chip interconnect ports as fabric ports, which are used to forward fabric messages encapsulated with the header. In other words, the ASIC-based NCP and NCF can send fabric messages through the fabric ports. Specifically, to minimize bandwidth usage, the ASIC chip header occupies an 8-byte preamble and a 4-byte interpacket gap (IPG).
[0033] like Figure 3 As shown in the figure, the NCP and NCF are connected through fabric ports, and the NCF is connected to the NCP through fabric ports. This NCP-NCF-NCP fabric channel forms a fabric channel. When an NCP needs to synchronize information with another NCP, it sends global table entry information, device information, and port numbers to the NCF connected to it through the NCP-NCF-NCP fabric channel. The NCF then forwards the information to the other NCP, ultimately achieving information synchronization.
[0034] However, this decentralized DDC system has a large number of devices, and without an NCC to number the NCPs and / or NCFs, determining device numbers is a complex process. Furthermore, when new NCPs and / or NCFs are added to the system, device numbers must be manually assigned to avoid conflicts with other devices. This makes expansion of the system difficult.
[0035] In view of this, embodiments of the present application provide a device numbering method. This method allows devices in the system to automatically determine their device numbers based on their connections to other devices, making it more convenient. Furthermore, there's no need to manually configure device numbers for newly added devices, making the system easier to expand.
[0036] See Figure 4 , shows that based on Figure 3Flowchart of the device numbering method of the system architecture shown. The method can be applied to an electronic device with processing capabilities, which can be an NCP, NCF, etc. in the above-mentioned decentralized DDC system. Of course, the electronic device can also be other types of devices, such as a tablet computer (PAD), a personal computer (PC), etc., and the types of electronic devices in the embodiments of the present invention are not limited to this. In the subsequent introduction, considering that the electronic device establishes a connection with other electronic devices in the system, in order to distinguish the electronic device for which the device number needs to be determined from the other electronic devices connected to it, the electronic device for which the device number needs to be determined is referred to as the first device, and the other electronic devices connected to the first device are referred to as the second device.
[0037] S401. The first device sends M first messages to each of the at least one second device, wherein the M ports in each second device are connected to the M ports in the first device, and the M first messages corresponding to the i-th second device are used to request the numbers of the M ports in the i-th second device connected to the first device. The M first messages correspond one-to-one to the M ports, and M is a positive integer greater than or equal to 1; the first device is an NCF, and the second device is an NCP, or the first device is an NCP and the second device is an NCF.
[0038] The connection between multiple devices in the system is more complicated. One device usually needs to establish connections with multiple other devices, such as Figure 5 As shown, the connection between multiple devices in the decentralized DDC system is shown. Usually, a full connection is established between the NCP and the NCF in the system, that is, an NCP in the system needs to establish a connection with all NCFs, and similarly, an NCF needs to establish a connection with all NCPs. A connection is established between an NCP and at least one NCF. When it is necessary to determine the device number of the NCP, the NCP can be regarded as the first device, and the at least one NCF connected to it can be regarded as the second device, that is, corresponding to at least one second device. Alternatively, a connection is established between an NCF and at least one NCP. When it is necessary to determine the device number of the NCF, the NCF can be regarded as the first device, and the at least one NCP connected to it can be regarded as the second device. For the convenience of description, the process of determining the NCP device number will be explained below using NCP as the first device as an example. When the first device is NCF, the process of determining the device number is similar and will not be repeated.
[0039] Typically, the first device and the second device are provided with multiple ports (for example, multiple fabric ports), and the M ports in the first device can establish connections with the M ports of each second device to achieve networking of multiple first devices and multiple second devices. Here, M can be considered as the number of port connections between the first device and the second device, and M is a positive integer greater than or equal to 1. Since the port connection has a one-to-one correspondence, and the number of ports of each first device and second device is limited, different numbers of port connections M between the first device and the second device can be set according to different connection strategies. For example, in order to achieve the maximum scale networking of the system, one port connection between the first device and the second device can be set, that is, M is 1, so that the system can accommodate as many devices as possible. The maximum number of first devices in the system is the number of ports set on the second device, and the maximum number of second devices is the number of ports set on the first device. For another example, in order to achieve better bandwidth utilization, the first device can be set to be connected to at least two ports of each second device, that is, M is greater than 1. In this way, the system can accommodate a relatively small number of first devices, but the first devices are connected to more ports of the second devices. Therefore, each first device can occupy more resources of the second device. When the ports of the second device are not fully occupied, the utilization of the idle bandwidth of the second device can be improved.
[0040] Based on this networking mode of the first device and the second device, it is necessary to number the devices in the system to prevent conflicts between devices. Figure 5 , multiple NCPs can be numbered NCP1, NCP2, NCP3, NCP4..., and multiple NCFs can be numbered NCF1, NCF2, NCF3, NCF4.... When a first device (for example, NCP1) communicates with an NCP in the system (for example, NCP2) through a fabric channel, NCP1 reports information to the NCF. The information reported by NCP1 includes the number of NCP1's communication partner, that is, the number of NCP2. The NCF can forward the information reported by NCP1 to NCP2 based on the number of NCP2 in the information reported by NCP1. Correspondingly, NCP2 needs to feedback information to NCP1 based on the number of NCP1. Therefore, each device in the system should have its own independent number, which is used to uniquely identify the device to prevent communication conflicts between devices in the system.
[0041] Similarly, to prevent conflicts between ports during communication between devices, which could lead to information transmission errors, the ports on each device can be numbered. For example, the ports of NCP1 could be numbered 1_1, 1_2, 1_3, 1_4, etc., and the ports of NCP2 could be numbered 2_1, 2_2, 2_3, 2_4, etc. After the ports of each device are numbered, the devices can communicate through fixed ports.
[0042] Therefore, each device in the system should have a device number that is unique to other devices, and only devices assigned a device number can be used in the system. However, in some cases, a device number may not exist. For example, a first device may not have a device number when it is newly added to the system. Another example is when the configuration information related to the device number is manually deleted, the first device's device number may no longer exist. In related technologies, when a device number does not exist, it is necessary to manually assign a device number to the device.
[0043] In an embodiment of the present application, considering that the M ports in the first device are connected to the M ports of each second device, the first device can send a request to at least one connected second device to request the numbers of the M ports in the i-th second device that are connected to the first device. Since the ports on the second devices are usually occupied in sequence, that is, when each first device occupies a port on the second device, it occupies the port immediately adjacent to the previously occupied port. Therefore, the first device can determine the occupancy status of the ports on the second device based on the M port numbers requested in the first message, and further determine the number of the first device in the system based on the occupancy status of the ports on the second device.
[0044] The first device edits a first message and requests the numbers of the M ports connected to the first device in the i-th second device through the first message. For the number of each port of the second device, the first device requests the number of the port by sending a first message, that is, for each second device, the first device sends M first messages, and the M first messages correspond one-to-one to the M ports. The first device can send M first messages to each second device in at least one second device connected to it. Since the first device and the second device are connected through a fabric port, the first message sent by the first device can be a fabric message. There are many ways for the first device to send the first message. For example, it can be detected through the serdes connection detection method provided by the ASIC chip, or a detection protocol similar to lldp. Before sending the first message, in order to prevent conflicts with other devices, the first device can set a default device number that does not conflict with other devices, such as number 0.
[0045] S402: The first device receives M second messages from each of the at least one second device. All second messages received by the first device from the at least one second device correspond to a total of N port numbers. If the N port numbers are the same, the first device determines that the number of the first device is any one of the N port numbers. The M second messages corresponding to the i-th second device include the numbers of the M ports. The M second messages correspond one-to-one to the M ports, and N is a positive integer greater than or equal to 1.
[0046] The first device sends M first messages to each second device. Accordingly, for each first message, the i-th second device sends back a second message to the first device. The first device can then receive M second messages sent by each of the at least one second device, with the M second messages corresponding one-to-one to the M ports. The M first messages sent by the first device request the numbers of the M ports connected to the first device on the i-th second device. The second message, which carries the port number of the i-th second device, serves as a response to the first message. The M second messages include the port numbers of the M second devices. A total of N port numbers correspond to all second messages received by the first device from at least one second device, meaning that at least one second device corresponds to N port numbers. The first device can determine its own device number based on these N port numbers. When determining its own device number based on the N port numbers, the first device can categorize the port number determination into various situations, depending on the number M of port connections between the first device and each second device.
[0047] Case 1: The first device is connected to one port of each second device, that is, M is 1. In this case, the first device only requests one port number of the i-th second device, and the number of port numbers N in the second message received by the first device is the same as the number of second devices. The first device can compare whether these N port numbers are consistent. For example, it can be determined based on the comparison whether these N port numbers are all m at the same time. If these N port numbers are all m at the same time, it can be considered that the first device is the m-th device occupying the port of the second device. Before this, there is already an m-1-th device occupying the port of each second device in sequence. And when each device occupies the port of the second device, it occupies the port immediately after the last occupied port. In this way, the N port numbers obtained by the first device are all m at the same time. Therefore, the first device can determine that the device number of the first device is any port number m among the N port numbers.
[0048] Of course, the N port numbers obtained by the first device may be inconsistent. This is because the first device may have made a connection error when connecting to a port of the second device and may not have occupied the ports of the second device in the correct order, resulting in an inconsistency in the N port numbers obtained by the first device. In this case, the first device may indicate a connection error. Specifically, the first device may output a prompt indicating that a connection error has occurred between the first device and at least one second device.
[0049] In this case, it can be assumed that a few ports have connection errors, while the majority of ports are connected normally. In this case, the device number of the first device can still be determined. The first device can determine the device number of the first device based on the port number that appears the most times among the N port numbers. For example, if the port number that appears the most times is m, then m can be determined as the device number of the first device.
[0050] After the device number of the first device is determined, the determined device number is saved in the configuration information of the first device. After the device number is saved, it is necessary to restart the device or restart the process to reinitialize all services that rely on the device number. After the first device is restarted again, the first device uses the device number included in the configuration information. This allows the first device to use this device number to conduct services when communicating with other devices in the system.
[0051] Case 2: The first device is connected to at least two ports of the second device, that is, M is greater than 1. In this case, the number N of port numbers in the second message received by the first device is M times the number of second devices.
[0052] Since the number of port connections between the first device and each second device is M, and the number of port connections between other devices and each second device is also M, when each first device is connected to a port of a second device, it occupies the port immediately after the last occupied port. Even if there are many differences between the N port numbers obtained by the first device, for example, when M is 3, the N port numbers obtained by the first device include 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5..., the device number of the first device can also be determined.
[0053] The first device determines the device number of the first device as the ratio of any one of the N port numbers to M, rounded up. For example, when M is 3 and the N port numbers obtained by the first device include 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, ..., the ratio of any one of the N port numbers to the number of port connections M is rounded up to 2. That is, in this example, the device number of the first device is 2.
[0054] Similarly, after the device number of the first device is determined, the determined device number is saved in the configuration information of the first device. After the device number is saved, it is necessary to restart the device or restart the process to reinitialize all services that rely on the device number so that the first device can use the device number to perform services when communicating with other devices in the system.
[0055] See Figure 6 Based on the same inventive concept, an embodiment of the present application also provides a device numbering device 600. The device 600 includes: a sending module 601, a receiving module 602 and a determining module 603. The sending module 601 is used to send M first messages to each of the second devices in at least one second device. The M ports in each second device are connected to the M ports in the first device, and the M first messages corresponding to the i-th second device are used to request the numbering of the M ports in the i-th second device connected to the first device. The M first messages correspond one-to-one to the M ports, and M is a positive integer greater than or equal to 1. The first device is an NCF, the second device is an NCP, or the first device is an NCP and the second device is an NCF. The receiving module 602 is configured to receive M second messages from each of at least one second device, where the M second messages corresponding to the i-th second device include the numbers of the M ports in the i-th second device. The M second messages correspond one-to-one to the M ports. All second messages received by the first device from the at least one second device correspond to a total of N port numbers, where N is a positive integer greater than or equal to 1. The determining module 603 is configured to determine that the number of the first device is any one of the N port numbers if the N port numbers are the same.
[0056] Optionally, the determining module 603 is further configured to: determine the port number that appears the most times among the N port numbers as the number of the first device.
[0057] Optionally, the determination module 603 is further configured to output prompt information, where the prompt information is configured to prompt that a connection error exists between the first device and at least one second device.
[0058] Optionally, the determining module 603 is further configured to determine that the number of the first device is a ratio of any one of the N port numbers to M, rounded up.
[0059] Optionally, the determination module 603 is further configured to: store the number of the first device in the configuration information, where the number of the first device in the configuration information is the number used by the first device after the next restart.
[0060] Based on the same inventive concept, an embodiment of the present application provides an electronic device, comprising at least one processor 701 and a memory 702 communicatively connected to the at least one processor. The memory stores instructions executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any of the above embodiments.
[0061] The embodiment of the present application does not limit the specific connection medium between the processor 701 and the memory 702. Figure 7 In the example, the processor 701 and the memory 702 are connected via a bus 700. Figure 7 The bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0062] The computing device in the embodiment of the present application may further include a communication interface 703 , which is, for example, a network port, and the computing device may receive or send data through the communication interface 703 .
[0063] The processor 701 is the control center of the computing device. It can connect the various parts of the entire device using various interfaces and lines. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, the various functions of the computing device and processing data are performed, thereby monitoring the computing device as a whole. Optionally, the processor 701 may include one or more processing units. The processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system and application programs, and the modem processor mainly processes wireless communications. It is understood that the above-mentioned modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.
[0064] Optionally, the processor 701 can specifically be a general-purpose processor, such as a central processing unit, an application-specific integrated circuit (ASIC), one or more integrated circuits for controlling program execution, a hardware circuit developed using a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the device numbering method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0065] By designing and programming the processor 701, the code corresponding to the device numbering method introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned device numbering method during operation. How to design and program the processor 701 is a technology well known to those skilled in the art and will not be repeated here.
[0066] Optionally, in an embodiment of the present application, the memory 702 stores instructions that can be executed by at least one processor 701, and at least one processor 701 can perform the steps included in the aforementioned device numbering method by executing the instructions stored in the memory 702. The memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The memory 702 may include at least one type of storage medium, for example, a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 702 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data. The number of memories 702 is one or more. Figure 7 It is shown together with the above, but it should be noted that the memory 702 is not a required functional module, so Figure 7 Shown in dashed lines.
[0067] Based on the same inventive concept, embodiments of the present application provide a computer storage medium storing computer program instructions for executing the method of any of the above embodiments. In a specific implementation, the computer-readable storage medium includes: a Universal Serial Bus flash drive (USB), a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other storage media capable of storing program code.
[0068] In some possible implementations, various aspects of the device numbering method provided in the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on a computing device, the program code is used to enable the computing device to execute the steps of the device numbering method according to various exemplary implementations of the present application described above in this specification.
[0069] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the division of the above-mentioned functional modules is only used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0070] In the several embodiments provided in this application, 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 schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0071] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0072] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0073] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a universal serial bus flash disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0074] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A device numbering method, characterized in that: Applied to a distributed split-rack network device DDC system, the DDC system includes at least one network cloud message forwarder (NCP) and at least one network cloud switching fabric (NCF), the method comprising: A first device sends M first messages to each of at least one second device, wherein the M ports in each of the second devices are connected to the M ports in the first device, and the M first messages corresponding to the i-th second device are used to request the numbers of the M ports in the i-th second device connected to the first device, the M first messages correspond one-to-one to the M ports, and M is a positive integer greater than or equal to 1; the first device is an NCF and the second device is an NCP, or the first device is an NCP and the second device is an NCF; The first device receives M second messages from each of the at least one second device, the M second messages corresponding to the i-th second device include numbers of the M ports in the i-th second device, the M second messages correspond one-to-one to the M ports, and all the second messages received by the first device from the at least one second device correspond to a total of N port numbers, where N is a positive integer greater than or equal to 1; If the N port numbers are the same, the first device determines that the number of the first device is any one of the N port numbers.
2. The method according to claim 1, wherein When the N port numbers are inconsistent and M=1, the method further includes: The first device determines the port number that appears the most times among the N port numbers as the number of the first device.
3. The method according to claim 2, wherein The method further comprises: Outputting prompt information, where the prompt information is used to prompt that a connection error exists between the first device and the at least one second device.
4. The method according to claim 1, wherein When the N port numbers are inconsistent and M is greater than 1, the method further includes: The first device determines the number of the first device as a ratio of any one of the N port numbers to M, rounded up.
5. The method according to claim 1, wherein After the first device determines that the number of the first device is any one of the N port numbers, the method further includes: The first device stores the number of the first device in configuration information, where the number of the first device in the configuration information is the number used by the first device after the first device is restarted next time.
6. A device numbering device, characterized in that: The device comprises: a sending module, configured to send M first messages to each second device in at least one second device, respectively, wherein the M ports in each second device are connected to the M ports in the first device, and the M first messages corresponding to the i-th second device are used to request the numbers of the M ports in the i-th second device connected to the first device, the M first messages corresponding to the M ports one-to-one, and M being a positive integer greater than or equal to 1; the first device is an NCF and the second device is an NCP, or the first device is an NCP and the second device is an NCF; a receiving module, configured to receive M second messages from each of the at least one second device, the M second messages corresponding to the i-th second device including the numbers of the M ports, the M second messages corresponding one-to-one to the M ports, and all second messages received by the first device from the at least one second device corresponding to a total of N port numbers, where N is a positive integer greater than or equal to 1; The determining module is configured to determine that the number of the first device is any one of the N port numbers if the N port numbers are the same.
7. The device according to claim 6, characterized in that When the N port numbers are inconsistent and M=1, the determining module is further configured to: The port number that appears the most times among the N port numbers is determined as the number of the first device.
8. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Identifier ID configuration method and device, and identifier ID acquisition method and device
CN112188482A
Communication method and device
CN114640973A