Dynamic update method, device and medium based on FC switching network terminal connection status
By assigning addresses to terminals in the FC switch network and building information, and combining the judgment mechanism of the main switch, dynamic updates of multiple FC protocol networks are achieved, solving the problem that FC protocol network updates are not universal in the prior art.
Patent Information
- Application Number
- CN202211235241.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-10-10
AI Technical Summary
The dynamic network information maintenance solution is not universal for different FC protocols, and it is impossible to update network connection information with multiple FC upper-layer protocol networks.
By receiving the terminal's login request, the switch allocates the terminal's terminal address, and constructs terminal information based on the terminal address, name and switch identification, and stores it in the terminal login information table of the switch. Determine whether the switch is the main switch, and adopt different terminal information update methods according to permission positioning to achieve dynamic updates of the entire network.
It realizes dynamic update of network connection information of multiple FC upper-layer protocol networks, solving the commonality problem of dynamic network information maintenance solutions.
Smart Images

Figure CN115550177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data interaction, and in particular to a method, device, electronic device and computer-readable storage medium for dynamically updating terminal connection status based on an FC switching network. Background Art
[0002] Fiber Channel (FC) is a high-speed network technology protocol that uses synchronous serial transmission to transmit data with a very high transmission bandwidth. In order to expand the application scope of Fiber Channel, a FC protocol cluster suitable for various usage environments has been developed.
[0003] Currently, the update of network connection information is mainly achieved through dynamic network information maintenance solutions. The dynamic network information maintenance solutions mainly use the DHCP protocol and WINS service to complete the generation and maintenance of terminal information, and then achieve the update of network connection information. However, the dynamic network information maintenance solution is not universal for different FC protocols and cannot achieve the update of network connection information for networks with multiple FC upper layer protocols. Summary of the invention
[0004] The present invention provides a dynamic update method, device and computer-readable storage medium based on the connection status of FC switching network terminals, the main purpose of which is to solve the problem that the dynamic network information maintenance solution is not universal for different FC protocols and cannot realize the update of network connection information of networks with multiple FC upper layer protocols.
[0005] To achieve the above object, the present invention provides a method for dynamically updating the connection status of a FC switching network terminal, comprising:
[0006] receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;
[0007] Acquire the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch;
[0008] The terminal information is stored in the terminal login information table of the switch to obtain a local login update terminal information table;
[0009] Determining whether the switch is a preset master switch;
[0010] If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;
[0011] If the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table;
[0012] receiving a logout request from the terminal, sending the logout request to the switch, deleting the terminal information in a local logout update terminal information table of the switch, and obtaining a local logout update terminal information table;
[0013] If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;
[0014] If the switch is not the main switch, the terminal information deleted from the local logout update terminal information table is deleted from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
[0015] Optionally, sending the login request to a pre-built switch, and using the switch to allocate a terminal address to the terminal, includes:
[0016] According to the login request, obtaining a login protocol of the terminal;
[0017] generating a terminal address of the terminal in the switch according to a login protocol of the terminal;
[0018] Filling the terminal address into a pre-constructed initial login response frame to obtain a target login response frame;
[0019] The target login response frame is transmitted back to the terminal to complete the allocation of the terminal address.
[0020] Optionally, the determining whether the switch is a preset master switch includes:
[0021] Classify the switches according to the preset switch identification set to obtain a switch identification-category correspondence table;
[0022] Using the identifier of the switch, querying the switch category corresponding to the switch in the switch identifier-category correspondence table;
[0023] According to the switch category, it is determined whether the switch is the master switch.
[0024] Optionally, the sending of the terminal information in the local login update terminal information table to the terminal login information table of the main switch to obtain the whole network login update terminal information table includes:
[0025] Construct an initial universal frame according to the pre-constructed FC universal frame structure and FC network standards;
[0026] Changing the frame type of the initial universal frame to obtain an initial login synchronization frame;
[0027] Fill the terminal information into the initial login synchronization frame to obtain a target login synchronization frame;
[0028] The target login synchronization frame is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table.
[0029] Optionally, the sending of the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table includes:
[0030] Sending the target login synchronization frame to the cascade port of the main switch through the cascade port of the switch;
[0031] Determining whether the cascade port of the main switch receives the target login synchronization frame for the first time;
[0032] If the cascade port of the main switch does not receive the target login synchronization frame for the first time, the target synchronization frame is discarded;
[0033] If the cascade port of the main switch receives the target login synchronization frame for the first time, the terminal login information table of the main switch is updated using the target login synchronization frame to obtain the whole network login updated terminal information table.
[0034] Optionally, after sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table, the method further includes:
[0035] Changing the frame type of the initial general frame to obtain an initial link state response frame;
[0036] Filling the terminal information into the initial link state response frame to obtain a target link state response frame;
[0037] Sending the target link state response frame to the cascade port of the switch through the cascade port of the main switch;
[0038] Determining whether the cascade port of the switch receives the target link status response frame for the first time;
[0039] If the cascade port of the switch does not receive the target link state response frame for the first time, the target link state response frame is discarded;
[0040] If the cascade port of the switch receives the target link status response frame for the first time, the sending of the target login synchronization frame is completed.
[0041] Optionally, after receiving the logout request from the terminal and sending the logout request to the switch, the method further includes:
[0042] Changing the frame type of the initial general frame to obtain an initial logout response frame;
[0043] Filling the terminal information into the initial logout response frame to obtain a target logout response frame;
[0044] The target logout response frame is sent to the terminal.
[0045] In order to solve the above problem, the present invention further provides a dynamic update device based on the connection status of the FC switching network terminal, the device comprising:
[0046] A terminal address allocation module, used for receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to allocate a terminal address to the terminal;
[0047] The terminal information storage module is used to obtain the name of the terminal and the identifier of the switch, and construct the terminal information according to the terminal address, the name of the terminal and the identifier of the switch; store the terminal information in the terminal login information table of the switch to obtain a local login update terminal information table;
[0048] The terminal login information synchronization module is used to determine whether the switch is a preset main switch; if the switch is the main switch, the terminal information in the local login update terminal information table is not forwarded; if the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table;
[0049] A terminal information deletion module, configured to receive a logout request from the terminal, send the logout request to the switch, delete the terminal information in the local logout update terminal information table of the switch, and obtain a local logout update terminal information table;
[0050] The terminal logout information synchronization module is used for not forwarding the terminal information deleted in the local logout update terminal information table if the switch is the main switch; if the switch is not the main switch, deleting the terminal information deleted in the local logout update terminal information table from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
[0051] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0052] a memory storing at least one instruction; and
[0053] The processor executes the instructions stored in the memory to implement the above-mentioned dynamic update method based on the connection status of the FC switching network terminal.
[0054] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned dynamic update method based on the connection status of the FC switching network terminal.
[0055] Compared with the background technology, the dynamic network information maintenance solution is not universal for different FC protocols and cannot realize the phenomenon of updating the network connection information of networks with multiple FC upper layer protocols. When receiving the login request of the terminal, the embodiment of the present invention uses the switch connected to the terminal to allocate a terminal address to the terminal, and then constructs the terminal information according to the terminal address, the terminal name and the switch identifier. After obtaining the terminal information, it is necessary to store it in the terminal login information table in the switch, so as to obtain a real-time local login update terminal information table. At this time, it is necessary to determine whether the switch is the main switch, and adopt different terminal information update methods according to the different authority positioning of the switch. When the When the switch is the main switch, no adjustment is required to the terminal information. If the switch is not the main switch, the terminal information needs to be synchronized to the terminal login information table in the main switch to obtain the whole network login update terminal information table. When the logout request of the terminal is received, the first step is to delete the terminal information of the terminal in the switch, and then adopt different measures according to the specific authority location of the switch. If the switch is the main switch, no other operations are required. If the switch is not the main switch, the deleted terminal information needs to be synchronized to the whole network login update terminal information table of the main switch for deletion to obtain the whole network logout update terminal information table. Therefore, the dynamic update method, device, electronic device and computer-readable storage medium based on the terminal connection status of the FC switching network proposed in the present invention can solve the problem that the dynamic network information maintenance solution is not universal for different FC protocols and cannot realize the update of network connection information of networks with multiple FC upper layer protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 An interaction diagram between a switch and a terminal based on an FC switching network provided by an embodiment of the present invention;
[0057] Figure 2 A general frame structure diagram of a method for dynamically updating a terminal connection state based on an FC switching network provided by an embodiment of the present invention;
[0058] Figure 3 A schematic flow chart of a method for dynamically updating a connection status of a terminal in an FC switching network provided by an embodiment of the present invention;
[0059] Figure 4 for Figure 3 A detailed implementation flow chart of one of the steps in the process;
[0060] Figure 5 A functional module diagram of a dynamic updating device based on FC switching network terminal connection status provided by an embodiment of the present invention;
[0061] Figure 6 A schematic diagram of the structure of an electronic device for implementing the method for dynamically updating the connection status of a terminal based on an FC switching network provided by an embodiment of the present invention.
[0062] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0063] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0064] The embodiment of the present application provides a dynamic update method based on the connection status of the FC switching network terminal. The execution subject of the dynamic update method based on the connection status of the FC switching network terminal includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the dynamic update method based on the connection status of the FC switching network terminal can be executed by software or hardware installed on the terminal device or the server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0065] Reference Figure 1 FIG. 1 is a flow chart of a method for dynamically updating a terminal connection state of an FC switching network provided by an embodiment of the present invention. In this embodiment, the method for dynamically updating a terminal connection state of an FC switching network includes:
[0066] S1. Receive a login request from a terminal, send the login request to a pre-built switch, and use the switch to allocate a terminal address to the terminal.
[0067] It can be explained that the login request (Login, abbreviated as LOGI) refers to the communication protocol used when the terminal accesses the FC (Fiber Channel) switching network. The FC switching network is constructed using the FC protocol. The FC protocol is a high-speed serial communication protocol with the characteristics of high bandwidth, high reliability, low latency, flexible topology and openness, and is mainly used in avionics communication systems. In different FC protocols, the interaction mode between terminals is also different. For example: in FC-AE-1553, the terminals are divided into network controllers (NC) and network terminals (NT), and the interaction mode between the two is command response; in FC-AE-ASM, each terminal is an equal relationship.
[0068] It should be explained that since different FC protocols differ only in the FC-4 layer (upper layer protocol mapping layer, referred to as ULP mapping layer), a FC switching network fault monitoring and terminal connection information dynamic maintenance and update method independent of FC-4 can be proposed, which is applicable to all FC protocols.
[0069] Furthermore, the FC switching network has a variety of topological structures, among which the most common is a switching network, such as Figure 1 As shown, there are several switches interconnected in the FC switching network, each switch can be connected to several terminals, and the communication data between the terminals is forwarded through the switch.
[0070] In the embodiment of the present invention, sending the login request to a pre-built switch and using the switch to allocate a terminal address to the terminal includes:
[0071] According to the login request, obtaining a login protocol of the terminal;
[0072] generating a terminal address of the terminal in the switch according to a login protocol of the terminal;
[0073] Filling the terminal address into a pre-constructed initial login response frame to obtain a target login response frame;
[0074] The target login response frame is transmitted back to the terminal to complete the allocation of the terminal address.
[0075] It can be understood that the login protocol (Fabric Login, referred to as FLOGI) refers to a login protocol for establishing a connection between a terminal and a switch.
[0076] It should be understood that after receiving the login protocol, the switch will allocate an address to the terminal and fill it in the initial login response frame to obtain the target login response frame. The target login response frame (abbreviated as FLOGI LS_ACC) refers to the LS_ACC frame that the switch replies when receiving the login protocol sent by the terminal. The initial login response frame refers to the response frame to be filled in which the terminal address is not filled.
[0077] It can be explained that the terminal logging into the FC switching network is an explicit login, and the frames involved in login and logout are all ELS type frames. The definition of each field can be found in 4.2.7Login (FLOGI / PLOGI) and 4.2.8Logout (LOGO) in FC-LS-2.
[0078] S2. Obtain the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch.
[0079] It can be explained that the terminal information includes the name of the terminal, the terminal address and the identifier of the switch connected to the terminal, and other information can be added according to actual needs.
[0080] S3. Store the terminal information in the terminal login information table of the switch to obtain a local login update terminal information table.
[0081] It should be explained that the terminal login information table refers to a collection of terminal information that is connected to the FC switching network and can communicate normally. The local login update terminal information table refers to storing the terminal information in the terminal login information table of the switch to update the original terminal login information table in the switch, thereby obtaining an information table.
[0082] Furthermore, the switch can be used to monitor the connection status of the physical link between the terminal and the switch. This process can be achieved through the FC-2 layer link fault monitoring function. If the physical layer completes word synchronization and the link layer completes primitive synchronization, it means that the physical link connection is normal, otherwise it means that the physical link is disconnected. When the physical link is disconnected, the corresponding terminal information in the terminal login information table needs to be deleted. If the physical link changes from disconnected to connected, no operation is performed, and the terminal waits for re-initiating explicit login.
[0083] S4. Determine whether the switch is a preset master switch.
[0084] It should be understood that the switches can be divided into two types: a main switch and a secondary switch. The main switch is responsible for maintaining the terminal access status of the entire network, and the secondary switch is responsible for maintaining the access status of the terminals connected to itself.
[0085] For details, see Figure 4 As shown, the step of determining whether the switch is a preset master switch includes:
[0086] S41, classifying switches according to a preset switch identification set to obtain a switch identification-category correspondence table;
[0087] S42, using the identifier of the switch, querying the switch category corresponding to the switch in the switch identifier-category correspondence table;
[0088] S43: Determine whether the switch is the master switch according to the switch type.
[0089] It can be explained that there can be one master switch in the FC switching network, and the other switches are all slave switches. Since the identifier of the switch is a unique identifier of the switch, the identifier of the switch can be used to distinguish whether the switch is a master switch or a slave switch.
[0090] If the switch is the main switch, S5 is executed to not forward the terminal information in the local login update terminal information table.
[0091] It can be understood that when the switch is the main switch, it means that the local login updated terminal information table in the switch can record the terminal information of all terminals in the entire network. At this time, the terminal information is stored in the terminal login information table in the main switch, which means that the maintenance of the terminal access status of the entire network has been achieved.
[0092] Furthermore, the main switch needs to maintain terminal information of terminals connected to itself as well as terminal information of terminals in the entire network.
[0093] If the switch is not the main switch, S6 is executed to send the terminal information in the local login update terminal information table to the terminal login information table of the main switch to obtain the whole network login update terminal information table.
[0094] It can be explained that the terminal information table updated by logging into the entire network refers to an information table that records the terminal information of all terminals in the FC switching network in real time.
[0095] In the embodiment of the present invention, the sending of the terminal information in the local login update terminal information table to the terminal login information table of the main switch to obtain the whole network login update terminal information table includes:
[0096] Construct an initial universal frame according to the pre-constructed FC universal frame structure and FC network standards;
[0097] Changing the frame type of the initial universal frame to obtain an initial login synchronization frame;
[0098] Fill the terminal information into the initial login synchronization frame to obtain a target login synchronization frame;
[0099] The target login synchronization frame is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table.
[0100] In detail, the FC general frame structure can be found in Figure 2 As shown. The initial universal frame refers to a universal frame that can be generated to achieve different functions by setting the frame type. For example: when the byte of the frame type (LS_Command Code) is 0xA7, it indicates the network node link state request protocol (Link State Request, referred to as LS_REQ); when the byte of the frame type (LS_Command Code) is 0xA8, it indicates the network node link state response protocol (Link State Acknowledge, referred to as LS_ACK).
[0101] Furthermore, the initial login synchronization frame refers to a frame to be completed that has a set frame type but has not yet filled with the terminal information. The target login synchronization frame (Link State Update, LSU for short) refers to a data frame used for link state synchronization between switches.
[0102] In the embodiment of the present invention, the step of sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table includes:
[0103] Sending the target login synchronization frame to the cascade port of the main switch through the cascade port of the switch;
[0104] Determining whether the cascade port of the main switch receives the target login synchronization frame for the first time;
[0105] If the cascade port of the main switch does not receive the target login synchronization frame for the first time, the target synchronization frame is discarded;
[0106] If the cascade port of the main switch receives the target login synchronization frame for the first time, the terminal login information table of the main switch is updated using the target login synchronization frame to obtain the whole network login updated terminal information table.
[0107] It can be explained that the terminal information is encapsulated through the target login synchronization frame, and then the target login synchronization frame is sent to the cascade port of the main switch through the interactive machine and the cascade ports of other sub-switches in the FC switching network, so that the main switch obtains the terminal information of the switch and the corresponding terminal. The cascade ports of other sub-switches in the FC switching network may receive the target login synchronization frame repeatedly, so it is necessary to discard the repeated target login synchronization frame until the main switch receives the target login synchronization frame. The main switch also needs to discard the repeated target login synchronization frame.
[0108] In the embodiment of the present invention, after sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table, the method further includes:
[0109] Changing the frame type of the initial general frame to obtain an initial link state response frame;
[0110] Filling the terminal information into the initial link state response frame to obtain a target link state response frame;
[0111] Sending the target link state response frame to the cascade port of the switch through the cascade port of the main switch;
[0112] Determining whether the cascade port of the switch receives the target link status response frame for the first time;
[0113] If the cascade port of the switch does not receive the target link state response frame for the first time, the target link state response frame is discarded;
[0114] If the cascade port of the switch receives the target link status response frame for the first time, the sending of the target login synchronization frame is completed.
[0115] It is understandable that the initial link state response frame refers to a frame to be completed that has a set frame type but has not yet encapsulated terminal information. The target link state response frame (Link State Update, LSA for short) is used for link state response. When the main switch receives the target login synchronization frame, it starts to parse the target login synchronization frame and updates the original terminal login information table. Then, through the cascade port that receives the target login synchronization frame, the target link state response frame is sent to the switch using the cascade ports of other sub-switches in the FC switching network. Similarly, the sub-switch needs to discard the repeatedly received target link state response frame until the target link state response frame is sent to the switch.
[0116] Furthermore, when the switch detects that the connection status of the physical link between the terminal and the switch is abnormal, it is not only necessary to record it in the terminal login information table of the switch, but also to synchronize it to the main switch.
[0117] S7. Receive a logout request from the terminal, send the logout request to the switch, delete the terminal information in the local login update terminal information table of the switch, and obtain a local logout update terminal information table.
[0118] It can be explained that the logout request (Logout, LOGO for short) refers to the communication protocol used when the terminal exits the switch. The local logout update terminal information table refers to the update information table obtained by updating the local login update terminal information table according to the logout operation of the terminal.
[0119] In detail, after receiving the logout request from the terminal and sending the logout request to the switch, the method further includes:
[0120] Changing the frame type of the initial general frame to obtain an initial logout response frame;
[0121] Filling the terminal information into the initial logout response frame to obtain a target logout response frame;
[0122] The target logout response frame is sent to the terminal.
[0123] It should be understood that the target logout response frame (LOGO LS_ACC) refers to the LS_ACC frame that the switch replies to when accepting the terminal logout.
[0124] S8. If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded.
[0125] It can be explained that when the switch to which the terminal is connected is the main switch, it is not necessary to synchronize the logout information of the terminal, and the purpose of the main switch maintaining the terminal information of the terminal can be achieved.
[0126] S9. If the switch is not the master switch, the terminal information deleted from the local logout update terminal information table is deleted from the whole network login update terminal information table of the master switch to obtain the whole network logout update terminal information table.
[0127] It should be understood that when the switch is not the main switch, the terminal information deleted from the local logout update terminal information table needs to be deleted synchronously in the whole network login update terminal information table of the main switch. At this time, a synchronization process similar to the target login synchronization frame (Link State Update, referred to as LSU) is required, and the deleted terminal information is encapsulated by constructing a target logout synchronization frame, and then the target logout synchronization frame is sent to the main switch in the same transmission mode as the target login synchronization frame, and then the corresponding terminal information is deleted in the main switch, and then a link state response frame is constructed and sent to the switch to achieve synchronization of terminal logout information.
[0128] Compared with the background technology, the dynamic network information maintenance solution is not universal for different FC protocols and cannot realize the phenomenon of updating the network connection information of networks with multiple FC upper layer protocols. When receiving the login request of the terminal, the embodiment of the present invention uses the switch connected to the terminal to allocate a terminal address to the terminal, and then constructs the terminal information according to the terminal address, the terminal name and the switch identifier. After obtaining the terminal information, it is necessary to store it in the terminal login information table in the switch, so as to obtain a real-time local login update terminal information table. At this time, it is necessary to determine whether the switch is the main switch, and adopt different terminal information update methods according to the different authority positioning of the switch. When the When the switch is the main switch, there is no need to make any adjustments to the terminal information. If the switch is not the main switch, the terminal information needs to be synchronized to the terminal login information table in the main switch to obtain the whole network login update terminal information table. When the logout request of the terminal is received, the first step is to delete the terminal information of the terminal in the switch, and then adopt different measures according to the specific authority location of the switch. If the switch is the main switch, no other operations are required. If the switch is not the main switch, the deleted terminal information needs to be synchronized to the whole network login update terminal information table of the main switch for deletion to obtain the whole network logout update terminal information table. Therefore, the dynamic update method, device, electronic device and computer-readable storage medium based on the terminal connection status of the FC switching network proposed in the present invention can solve the problem that the dynamic network information maintenance solution is not universal for different FC protocols and cannot realize the update of network connection information of networks with multiple FC upper layer protocols.
[0129] like Figure 5 FIG. 1 is a functional module diagram of a dynamic updating device based on FC switching network terminal connection status provided by an embodiment of the present invention.
[0130] The dynamic update device 100 based on the connection status of the FC switching network terminal of the present invention can be installed in an electronic device. According to the functions to be implemented, the dynamic update device 100 based on the connection status of the FC switching network terminal can include a terminal address allocation module 101, a terminal information storage module 102, a terminal login information synchronization module 103, a terminal information deletion module 104 and a terminal logout information synchronization module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.
[0131] The terminal address allocation module 101 is used to receive a login request from a terminal, send the login request to a pre-built switch, and use the switch to allocate a terminal address to the terminal;
[0132] The terminal information storage module 102 is used to obtain the name of the terminal and the identifier of the switch, and construct the terminal information according to the terminal address, the name of the terminal and the identifier of the switch; store the terminal information in the terminal login information table of the switch to obtain a local login update terminal information table;
[0133] The terminal login information synchronization module 103 is used to determine whether the switch is a preset master switch; if the switch is the master switch, the terminal information in the local login update terminal information table is not forwarded; if the switch is not the master switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the master switch to obtain the whole network login update terminal information table;
[0134] The terminal information deletion module 104 is used to receive a logout request from the terminal, send the logout request to the switch, delete the terminal information in the local logout update terminal information table of the switch, and obtain a local logout update terminal information table;
[0135] The terminal logout information synchronization module 105 is used for not forwarding the terminal information deleted in the local logout update terminal information table if the switch is the main switch; if the switch is not the main switch, deleting the terminal information deleted in the local logout update terminal information table from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
[0136] In detail, each module in the dynamic update device 100 based on the FC switching network terminal connection status in the embodiment of the present invention is used in the same manner as described above. Figure 3The same technical means as the dynamic update method based on the FC switching network terminal connection status described in the above can produce the same technical effect, which will not be repeated here.
[0137] like Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for dynamically updating a terminal connection state based on an FC switching network provided by an embodiment of the present invention.
[0138] The electronic device 1 may include a processor 10, a memory 11, a communication interface 13 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a dynamic update program based on the connection status of the FC switching network terminal.
[0139] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the dynamic update program based on the connection status of the FC switching network terminal, but also be used to temporarily store data that has been output or is to be output.
[0140] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, a dynamic update program based on the connection status of the FC switching network terminal, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0141] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0142] Figure 6 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0143] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0144] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0145] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0146] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0147] The dynamic update program based on the connection status of the FC switching network terminal stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0148] receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;
[0149] Acquire the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch;
[0150] The terminal information is stored in the terminal login information table of the switch to obtain a local login update terminal information table;
[0151] Determining whether the switch is a preset master switch;
[0152] If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;
[0153] If the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table;
[0154] receiving a logout request from the terminal, sending the logout request to the switch, deleting the terminal information in a local logout update terminal information table of the switch, and obtaining a local logout update terminal information table;
[0155] If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;
[0156] If the switch is not the main switch, the terminal information deleted from the local logout update terminal information table is deleted from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
[0157] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 3 to 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0158] Furthermore, if the module / unit integrated in the electronic device 1 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. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0159] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0160] receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;
[0161] Acquire the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch;
[0162] The terminal information is stored in the terminal login information table of the switch to obtain a local login update terminal information table;
[0163] Determining whether the switch is a preset master switch;
[0164] If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;
[0165] If the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table;
[0166] receiving a logout request from the terminal, sending the logout request to the switch, deleting the terminal information in a local logout update terminal information table of the switch, and obtaining a local logout update terminal information table;
[0167] If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;
[0168] If the switch is not the main switch, the terminal information deleted from the local logout update terminal information table is deleted from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
[0169] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0170] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0171] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0172] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0173] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0174] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0175] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for dynamically updating the connection status of a terminal based on an FC switching network, characterized in that: The method comprises: receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal; Acquire the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch; The terminal information is stored in the terminal login information table of the switch to obtain a local login update terminal information table; Determining whether the switch is a preset master switch; If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded; If the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table, including: Construct an initial universal frame according to the pre-constructed FC universal frame structure and FC network standards; Changing the frame type of the initial universal frame to obtain an initial login synchronization frame; Fill the terminal information into the initial login synchronization frame to obtain a target login synchronization frame; Send the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table; After sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table, the method further includes: Changing the frame type of the initial general frame to obtain an initial link state response frame; Filling the terminal information into the initial link state response frame to obtain a target link state response frame; Sending the target link state response frame to the cascade port of the switch through the cascade port of the main switch; Determining whether the cascade port of the switch receives the target link status response frame for the first time; If the cascade port of the switch does not receive the target link state response frame for the first time, the target link state response frame is discarded; If the cascade port of the switch receives the target link status response frame for the first time, the sending of the target login synchronization frame is completed; receiving a logout request from the terminal, sending the logout request to the switch, deleting the terminal information in a local logout update terminal information table of the switch, and obtaining a local logout update terminal information table; If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded; If the switch is not the main switch, the terminal information deleted from the local logout update terminal information table is deleted from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
2. The method for dynamically updating the connection status of a FC switching network terminal according to claim 1, characterized in that: The step of sending the login request to a pre-built switch and using the switch to allocate a terminal address to the terminal includes: According to the login request, obtaining a login protocol of the terminal; generating a terminal address of the terminal in the switch according to a login protocol of the terminal; Filling the terminal address into a pre-constructed initial login response frame to obtain a target login response frame; The target login response frame is transmitted back to the terminal to complete the allocation of the terminal address.
3. The method for dynamically updating the connection status of a FC switching network terminal according to claim 2, wherein: The determining whether the switch is a preset master switch includes: Classify the switches according to the preset switch identification set to obtain a switch identification-category correspondence table; Using the identifier of the switch, querying the switch category corresponding to the switch in the switch identifier-category correspondence table; According to the switch category, it is determined whether the switch is the master switch.
4. The method for dynamically updating the connection status of a FC switching network terminal according to claim 3, characterized in that: The step of sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table includes: Sending the target login synchronization frame to the cascade port of the main switch through the cascade port of the switch; Determining whether the cascade port of the main switch receives the target login synchronization frame for the first time; If the cascade port of the main switch does not receive the target login synchronization frame for the first time, the target login synchronization frame is discarded; If the cascade port of the main switch receives the target login synchronization frame for the first time, the terminal login information table of the main switch is updated using the target login synchronization frame to obtain the whole network login updated terminal information table.
5. The method for dynamically updating the connection status of a FC switching network terminal according to claim 1, characterized in that: After receiving the logout request from the terminal and sending the logout request to the switch, the method further includes: Changing the frame type of the initial general frame to obtain an initial logout response frame; Filling the terminal information into the initial logout response frame to obtain a target logout response frame; The target logout response frame is sent to the terminal.
6. A dynamic update device based on FC switching network terminal connection status, characterized in that: The device comprises: A terminal address allocation module, used for receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to allocate a terminal address to the terminal; The terminal information storage module is used to obtain the name of the terminal and the identifier of the switch, and construct the terminal information according to the terminal address, the name of the terminal and the identifier of the switch; store the terminal information in the terminal login information table of the switch to obtain a local login update terminal information table; The terminal login information synchronization module is used to determine whether the switch is a preset main switch; if the switch is the main switch, the terminal information in the local login update terminal information table is not forwarded; if the switch is not the main switch, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the whole network login update terminal information table, including: constructing an initial general frame according to the pre-constructed FC general frame structure and FC network standard; changing the frame type of the initial general frame to obtain an initial login synchronization frame; filling the terminal information into the initial login synchronization frame to obtain a target login synchronization frame; sending the target login synchronization frame to the terminal login information table of the main switch to obtain the whole network login update terminal information table; The login synchronization frame is sent to the terminal login information table of the main switch, and after obtaining the whole network login update terminal information table, it also includes: changing the frame type of the initial general frame to obtain an initial link state response frame; filling the terminal information into the initial link state response frame to obtain a target link state response frame; sending the target link state response frame to the cascade port of the switch through the cascade port of the main switch; judging whether the cascade port of the switch receives the target link state response frame for the first time; if the cascade port of the switch does not receive the target link state response frame for the first time, discarding the target link state response frame; if the cascade port of the switch receives the target link state response frame for the first time, completing the sending of the target login synchronization frame; A terminal information deletion module, configured to receive a logout request from the terminal, send the logout request to the switch, delete the terminal information in the local logout update terminal information table of the switch, and obtain a local logout update terminal information table; The terminal logout information synchronization module is used for not forwarding the terminal information deleted in the local logout update terminal information table if the switch is the main switch; if the switch is not the main switch, deleting the terminal information deleted in the local logout update terminal information table from the whole network login update terminal information table of the main switch to obtain the whole network logout update terminal information table.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the dynamic update method based on the connection status of the FC switching network terminal as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for dynamically updating the connection status of a terminal based on an FC switching network as claimed in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Media access control MAC address table updating method, switch and system
CN105338127A
Network topology construction method and computing device
CN114465904A