CN115604206A - Universal terminal connection state acquisition method and device, electronic equipment and storage medium - Google Patents

Universal terminal connection state acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115604206A
CN115604206A CN202211235549.XA CN202211235549A CN115604206A CN 115604206 A CN115604206 A CN 115604206A CN 202211235549 A CN202211235549 A CN 202211235549A CN 115604206 A CN115604206 A CN 115604206A
Authority
CN
China
Prior art keywords
frame
terminal
request
connection
main switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211235549.XA
Other languages
Chinese (zh)
Inventor
霍利超
曹素芝
畅响
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Technology and Engineering Center for Space Utilization of CAS
Original Assignee
Technology and Engineering Center for Space Utilization of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Technology and Engineering Center for Space Utilization of CAS filed Critical Technology and Engineering Center for Space Utilization of CAS
Priority to CN202211235549.XA priority Critical patent/CN115604206A/en
Publication of CN115604206A publication Critical patent/CN115604206A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction

Abstract

The invention relates to the technical field of protocol communication, and discloses a terminal connection state universal acquisition method based on an FC (fiber channel) switching network, which comprises the following steps: receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch; judging whether the connection request frame is sent to the main switch for the first time or not; if the request connection frame is sent to the main switch for the first time, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame; if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded; and transmitting the request response frame back to the terminal to obtain terminal connection state information. The invention also provides a terminal connection state general acquisition device based on the FC switching network, electronic equipment and a storage medium. The invention can solve the problem that the terminal can not be universally accessed into the switching network due to the diversity of the FC protocol cluster.

Description

Universal acquisition method and device for terminal connection state, electronic equipment and storage medium
Technical Field
The present invention relates to the field of protocol communication technologies, and in particular, to a method and an apparatus for universally obtaining a connection state of a terminal based on an FC switching network, an electronic device, and a computer-readable storage medium.
Background
The Fiber Channel (FC) protocol is a high-speed serial communication protocol, and has the characteristics of high bandwidth, high reliability, low delay, flexible topology structure and openness. In order to meet the application requirements of the FC protocol in avionics communication systems, a plurality of FC protocol clusters suitable for avionics environments have been established.
However, at present, switches accessed to an FC switching network by terminals in the aerospace field all use static configuration, that is, network operation parameters are manually specified before initialization, and equipment information is identified according to the initial operation parameters after a system is started, so that network communication is performed. There is also an access mode based on dynamic configuration, which is mainly completed through DHCP protocol and WINS service. The DHCP protocol is used for the server to dynamically distribute the IP address for the terminal, and the WINS service is used for centrally managing the access information of the terminal in the network so as to inquire the information of a target computer during communication.
The static configuration and the dynamic configuration can effectively complete the access of the terminal to the FC switching network, but are limited by the diversity of the FC protocol cluster, and at present, there is no general method for the terminal meeting the requirement of multiple FC protocol clusters to access to the FC switching network.
Disclosure of Invention
The invention provides a universal acquisition method and device for a terminal connection state based on an FC (fiber channel) switched network and a computer readable storage medium, and mainly aims to solve the problem that the terminal can not be universally accessed to the FC switched network due to the diversity of FC protocol clusters.
In order to achieve the above object, the present invention provides a general method for acquiring a connection state of a terminal based on an FC switching network, including:
receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch;
judging whether the request connection frame is sent to the main switch for the first time or not;
if the request connection frame is sent to the main switch for the first time, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame;
if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and transmitting the request response frame back to the terminal to obtain terminal connection state information.
Optionally, the method for generating a connection request frame of the receiving terminal includes:
generating a universal frame according to the structural information of the pre-constructed universal frame and the FC network standard;
changing the frame type of the general frame to obtain a request connection frame with information to be perfected;
acquiring the ID of the main switch and the ID of the terminal;
and combining the ID of the main switch and the ID of the terminal to the request connection frame with information to be completed to obtain the request connection frame.
Optionally, the changing the frame type of the general frame to obtain a connection request frame whose information is to be perfected includes:
acquiring a frame type value taking table, and searching a frame type value corresponding to the connection request frame in the frame type value taking table;
and extracting the frame number of the connection request frame sent by the terminal, and filling the frame number and the frame type value into the universal frame to obtain the connection request frame with information to be perfected.
Optionally, the determining whether the connection request frame is sent to the master switch for the first time includes:
extracting the frame serial number and the ID of the terminal from the connection request frame;
and judging whether the connection request frame is sent to the master switch for the first time or not according to whether the master switch has a history frame serial number and an ID which are the same as the frame serial number and the ID of the terminal.
Optionally, the method for generating the terminal information includes:
transmitting a login protocol of a terminal to a switch connected with the terminal;
and generating an allocation address of the terminal in the switch, filling the allocation address into a pre-constructed login response frame, returning the login response frame to the terminal, simultaneously acquiring terminal information comprising a terminal name, a terminal address and a connected switch identifier of the terminal, and storing the terminal information into a whole network terminal access information table of the main switch to obtain the terminal information.
Optionally, the obtaining of the request response frame according to the terminal information package includes:
generating an original response frame according to the structure information of the general frame and the FC network standard;
changing the frame type of the original response frame to obtain a request response frame with information to be perfected;
and packaging the terminal information to the request response frame with information to be completed to obtain the request response frame.
Optionally, the sending the request connection frame to a pre-constructed master switch includes:
judging whether the terminal is directly connected with the main switch or not;
if the terminal is directly connected with the main switch, the request connection frame is sent to the main switch;
and if the terminal is not directly connected with the main switch, forwarding the request connection frame to the main switch for a plurality of times through a pre-constructed auxiliary switch.
In order to solve the above problem, the present invention further provides a device for obtaining a connection state of a terminal based on an FC switching network, the device including:
the system comprises a request connection frame sending module, a pre-constructed main switch and a request connection frame receiving module, wherein the request connection frame sending module is used for receiving a request connection frame of a terminal and sending the request connection frame to the pre-constructed main switch;
a connection request frame judging module, configured to judge whether the connection request frame is sent to the master switch for the first time;
a request response frame generation module, configured to extract terminal information in the master switch if the request connection frame is sent to the master switch for the first time, and obtain a request response frame by encapsulation according to the terminal information; if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and the request response frame returning module is used for returning the request response frame to the terminal to obtain the terminal connection state information.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the FC switching network-based terminal connection state general acquisition method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, where at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the FC switched network-based terminal connection state general acquisition method described above.
Based on the background technology, the method comprises the following steps: static configuration and dynamic configuration can effectively complete the access of the terminal to the FC switching network, but are limited by the diversity of FC protocol clusters, and at present, a universal method for meeting the requirement of accessing the terminal to the FC switching network by a plurality of groups of FC protocol clusters does not exist. In order to solve the problem, in the embodiment of the present invention, switches in an FC switching network are divided into a main switch and a sub switch, where the main switch is responsible for maintaining a terminal connection state of a whole network, the sub switch is only responsible for maintaining a terminal connection of itself, and a connection of any terminal ultimately depends on a control of the main switch over the terminal connection state of an entire interactive network, when a terminal requests a network connection state, a different response policy is performed on the request connection frame by determining whether the request connection frame is sent to the main switch for the first time, if the request connection frame sent by the terminal is sent to the main switch for the first time, terminal information corresponding to the terminal is obtained, and the request response frame is obtained by encapsulating according to the terminal information, and if the request connection frame is not sent to the main switch for the first time, the request response frame is not sent to the main switch, so as to avoid a possibility of repeatedly receiving the request response frame. Therefore, the invention makes the two access strategies into an organic interface, and can maximally realize the phenomenon that the access of the terminal fails due to different protocols. Therefore, the method, the device, the electronic device and the computer readable storage medium for universally acquiring the connection state of the terminal based on the FC switching network, provided by the invention, can solve the problem that the terminal cannot be universally accessed into the FC switching network due to the diversity of FC protocol clusters.
Drawings
Fig. 1 is an interaction diagram of a switch and a terminal based on an FC switched network according to an embodiment of the present invention;
fig. 2 is a data interaction diagram of a terminal accessing to a switch based on an FC switched network according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for universally obtaining a connection status of a terminal based on an FC switched network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a detailed implementation of one of the steps in FIG. 3;
fig. 5 is a general frame structure diagram of a general method for acquiring a connection status of a terminal based on an FC switching network according to an embodiment of the present invention;
fig. 6 is a frame header structure diagram of a generic frame of a terminal connection status generic acquisition method based on an FC switched network according to an embodiment of the present invention;
fig. 7 is a payload format diagram of a request connection frame of a terminal connection state general acquisition method based on an FC switched network according to an embodiment of the present invention;
fig. 8 is a payload format diagram of a request response frame of a terminal connection state general acquisition method based on an FC switching network according to an embodiment of the present invention;
fig. 9 is a functional block diagram of a general terminal connection state acquiring apparatus based on an FC switching network according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device for implementing the FC switched network-based general terminal connection state acquisition method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a terminal connection state general acquisition method based on an FC switching network. The execution main body of the FC switching network-based terminal connection state general acquisition method includes, but is not limited to, at least one of a server, a terminal, and other electronic devices that can be configured to execute the method provided by the embodiment of the present application. In other words, the FC switching network-based terminal connection state general acquisition method may be executed by software or hardware installed in a terminal device or a server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Before describing one embodiment of the present invention in detail, for the sake of convenience and simplicity of the term writing, the following definitions are defined:
FC: fiber Channel (fibre Channel)
LOGI: login (communication protocol used when logging in and terminal accesses to exchange network, short for logging in exchange network communication protocol)
LOGO: logout (communication protocol used when logging out and equipment quits switching network, short for quitting switching network communication protocol)
LS _ ACC: link Service Accept (reply frame when responder receives Service request)
FC-LS: firber Channel-Link Services (fibre Channel. Link service)
NC: network Controller (Network Controller)
NT: network Terminal
ID: identifier (unique address Identifier of FC network equipment, length 3 bytes)
SW: switch (exchanger)
FLOGI: fabric Login (Login protocol when establishing connection between terminal and switch, abbreviated as Login protocol)
LS _ REQ: link State Request (network node connection State Request protocol, connection State Request protocol for short)
LS _ ACK: link State Acknowledge protocol (network node connection State Acknowledge protocol for short)
FLOGI LS _ ACC: frame replied when switch receives terminal FLOGI, short for login response frame
LOGO LS _ ACC: frame replied when switch receives LOGO of terminal, called exit response frame for short
ELS: extended Link services (Extended Link service)
PLOGI: port Login (Login protocol when establishing connection between two node devices)
S _ ID: source ID (Source ID, ID of device sending FC frame)
D _ ID: destination ID (Destination ID, device ID for receiving FC frame)
Cascading ports: port for interconnection between switches
Payload: the load refers to the contents of the FC frame except the locator of the frame header and the frame tail, the CRC check, and the frame header.
In addition, the main application scenario of the embodiment of the invention is FC, and the FC is mainly applied to an avionic communication system and is suitable for an avionic environment. The protocol supporting the FC operation of the avionics communication system is called FC protocol, in which there are different terminals and switches at the same time to serve the normal operation of the avionics communication system.
It should be explained that, in different FC protocols, the types of terminals are different, and the interaction mode between the terminals is also different. For example, in the FC-AE-1553 protocol, terminals are divided into a Network Controller (NC) and a Network Terminal (NT), and the interaction mode between the two is command-response type; in the FC-AE-ASM protocol, the terminals are again peers, but different FC protocols generally rely on the switching network of fig. 1.
Fig. 1 is a conventional FC switching network, in which a switching network is required to be relied upon when there is a communication demand between terminals and between a terminal and a switch in the switching network.
It should be explained that, the embodiment of the present invention completes the automatic maintenance of the connection state of each terminal in the FC switching network link, depending on the primary switch and the secondary switch. Only one main exchanger is arranged in the exchange network, and the other main exchangers are auxiliary exchangers; the main switch is responsible for maintaining the terminal connection state of the whole network and providing a uniform interface for other terminals to inquire the terminal connection state in the switching network, and the auxiliary switch is only responsible for maintaining the terminal connection state of the auxiliary switch; when there is a change in the terminal connection information of the subordinate switch, it is necessary to synchronize the change information with the principal switch.
In the embodiment of the present invention, a first terminal and a second terminal are taken as an example, and for convenience of description, terminal access information request terminals of the first terminal and the second terminal are respectively split to describe a process of accessing the first terminal and the second terminal to a switch, in addition, the first terminal is connected with a main switch, the second terminal is connected with a sub-switch, and fig. 2 is shown in a detailed example.
It should be sequentially explained that the terminal access information table refers in particular to a set of terminal information that is accessed to the FC switching network and can communicate normally, each terminal information includes a terminal name, a terminal address, a connected switch identifier, and the like, and other information can be added according to actual needs. In the embodiment of the invention, the terminal access information table comprises a whole network and a local branch, wherein the whole network terminal access information table is maintained by the main switch, and the local terminal access information table is maintained by the auxiliary switch.
Further, when the terminal accesses the switching network again after being started and connected for the first time or after being disconnected, an address needs to be allocated to the terminal, and taking the first terminal as an example, the detailed execution process includes:
transmitting a login protocol of the first terminal to the master switch;
and generating an allocation address of the first terminal in the main switch, filling the allocation address into the login response frame, transmitting the login response frame back to the first terminal, simultaneously acquiring terminal information comprising a terminal name, a terminal address and a connected switch identifier of the first terminal, and storing the terminal information into a whole network terminal access information table of the main switch.
In addition, in another embodiment of the present invention, when the first terminal actively exits the switching network, data interaction with the master switch is also required, and the detailed execution process includes:
generating a network switching quitting communication request at the first terminal based on the network switching quitting communication protocol, and sending the network switching quitting communication request to the main switch;
when the main switch receives the switching network quitting communication request, deleting the terminal information of the first terminal in a whole network terminal access information table of the main switch;
and when the terminal information of the first terminal is deleted successfully, generating the quit response frame and feeding the quit response frame back to the first terminal to finish the process that the first terminal quits the exchange network actively.
Similarly, referring to fig. 2, the second terminal corresponds to the sub-switch, and when the second terminal logs in or logs out of the switching network, the second terminal is similar to the first terminal, and the main difference is that the second terminal information can be directly written in the local terminal access information table of the sub-switch or deleted. And the second terminal information needs to utilize the auxiliary switch to connect the main switch, and then the second terminal information is inserted or deleted in the whole network terminal access information table of the main switch.
Fig. 3 is a schematic flow chart of a method for obtaining a connection state of a terminal based on an FC switched network according to an embodiment of the present invention. In this embodiment, taking the first terminal as an example, the method for obtaining a connection state of a terminal based on an FC switched network in a general manner includes:
s1, receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch;
it should be explained that there is only one main switch in the switching network, and the other switches are auxiliary switches, the main switch is responsible for maintaining the terminal connection state of the whole network, and providing a uniform interface for other terminals to inquire the internal terminal connection state of the switching network, the auxiliary switches are only responsible for maintaining the terminal connection state of the auxiliary switches, and when the terminal connection information of the auxiliary switches changes, the change information needs to be synchronized to the main switch.
In the embodiment of the invention, when the terminal prepares to enter the switching network, the terminal needs to directly execute the communication protocol conversion with the switch, and the terminal is not permitted to enter the switching network until the requirement of the communication protocol conversion is met.
It should be explained that the terminal and the master switch or the slave switch each include an LS _ REQ: link State Request (network node connection State Request protocol, connection State Request protocol for short) and LS _ ACK: link State Acknowledge protocol (network node connection State Acknowledge protocol for short).
Specifically, referring to fig. 4, the generating a connection request frame according to the connection status request protocol includes:
s11, generating a universal frame according to the structural information of the pre-constructed universal frame and an FC network standard;
s12, changing the frame type of the general frame to obtain a request connection frame with information to be perfected;
s13, acquiring the ID of the main switch and the ID of the terminal;
and S14, combining the ID of the main switch and the ID of the terminal to the request connection frame with information to be completed to obtain the request connection frame.
It should be explained that the universal frame of the present invention is a protocol supporting the FC operation avionics communication system, i.e., a universal frame format of the FC protocol, and one of the universal frame formats is shown in fig. 5 and mainly includes SOF, CRC, EOF, a universal frame header, and Data _ Field. The SOF, CRC, EOF, and Data _ Field are common technical identifiers in the communication Field, and are not described herein again.
With reference to fig. 5, we continue to refine the structure of the generic frame header, as shown in fig. 6. As shown in fig. 6, the generic frame header includes R _ CTL, D _ ID, S _ ID, payload, and the like, where D _ ID is an ID of a device that receives an FC frame, S _ ID is an ID of a device that transmits the FC frame, R _ CTL is set to 0x22, and Payload is referred to as Payload.
In the embodiment of the present invention, the changing the frame type of the general frame to obtain the connection request frame whose information is to be perfected includes:
acquiring a frame type value taking table, and searching a frame type value corresponding to the connection request frame in the frame type value taking table;
and extracting the frame serial number of the connection request frame sent by the terminal, and filling the frame serial number and the frame type value into the universal frame to obtain the connection request frame with information to be completed.
In the embodiment of the present invention, the frame type value of the request connection frame is 0xA7.
It should be explained that the frame number of the connection request frame refers to a REQ _ Num field in the payload format of the LS _ REQ frame, and is gradually incremented by times, where if the terminal sends the connection request for the first time, the corresponding frame number is 0, and if the terminal sends the connection request for the second time, the corresponding frame number is 1.
In detail, the payload format of the request connect frame is shown in fig. 7. A total of 8 bytes in payload format of the LS _ REQ frame. Req _ Num is the sequence number of the LS _ Req frame sent by the terminal, and is used to identify each LS _ Req frame.
In this embodiment of the present invention, the sending the request connection frame to a pre-constructed master switch includes:
judging whether the terminal is directly connected with the main switch or not;
if the terminal is directly connected with the main switch, the request connection frame is sent to the main switch;
and if the terminal is not directly connected with the main switch, forwarding the request connection frame to the main switch for a plurality of times through a pre-constructed auxiliary switch.
In detail, when the connection request frame needs to be forwarded through the secondary switch, the secondary switch identifies whether the frame is received for the first time according to the S _ ID and the Req _ Num, if so, the frame is forwarded from the cascade port, otherwise, the frame is directly discarded. The request connection frame reaches the primary switch through a plurality of times of forwarding of the secondary switch.
S2, judging whether the connection request frame is sent to the main switch for the first time or not;
in this embodiment of the present invention, the determining whether the connection request frame is sent to the master switch for the first time includes:
extracting the frame serial number and the ID of the terminal from the connection request frame;
and judging whether the connection request frame is sent to the main switch for the first time or not according to whether the main switch has a historical frame serial number and an ID which are the same as the frame serial number and the ID of the terminal or not.
Further, the generation process of the request response frame is similar to that of the request connection frame, and the main difference lies in a frame type value corresponding to the request response frame in the frame type value taking table, for example, the frame type value of the request connection frame is 0xA7, and the frame type value of the request response frame is 0xA8.
In detail, the payload format of the request response frame is shown in fig. 8. The length of the request response frame depends on the number of pieces containing the terminal information. Each piece of terminal connection information in the request response frame includes: SW _ Num (identification of terminal connection switch), node _ ID (address of terminal), and Node _ Name (Name of terminal).
In the embodiment of the present invention, the method for determining whether the connection request frame is sent to the secondary switch for the first time is the same as the method for determining whether the connection request frame is sent to the primary switch for the first time, and mainly checks whether the historical frame number and the ID that are the same as the frame number and the ID of the terminal can be found in the secondary switch, which is not described herein again.
If the request connection frame is sent to the main switch for the first time, executing S3, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame;
in the embodiment of the invention, the terminal information can be acquired from the whole network terminal access information table of the host switch, the terminal information comprises a terminal name, a terminal address, a connected switch identifier and the like, and other information can be added according to actual requirements.
In the embodiment of the present invention, the method for generating the terminal information includes:
transmitting a login protocol of a terminal to a switch connected with the terminal;
and generating an allocation address of the terminal in the switch, filling the allocation address into a pre-constructed login response frame, returning the login response frame to the terminal, simultaneously acquiring terminal information comprising a terminal name, a terminal address and a connected switch identifier of the terminal, and storing the terminal information into a whole network terminal access information table of the main switch to obtain the terminal information.
Since the specific implementation process of writing the terminal information into the local terminal access information table is similar to that described above, it is not described herein again.
In the embodiment of the present invention, the obtaining of the request response frame according to the encapsulation of the terminal information includes:
generating an original response frame according to the structure information of the general frame and the FC network standard;
changing the frame type of the original response frame to obtain a request response frame with information to be perfected;
and packaging the terminal information to the request response frame with information to be perfected to obtain the request response frame.
It should be explained that, in the embodiment of the present invention, the terminal information is encapsulated into Payload in the request response frame.
If the request connection frame is not sent to the master switch for the first time, executing S4 and not responding to the request response frame;
it will be appreciated that since there may be multiple routes between two switches, the same request connection frame may be forwarded to the master switch via different routes, resulting in the master switch repeatedly receiving the request connection frame, and therefore, when the request connection frame is not first sent to the master switch, there is no need to respond to the request reply frame.
And S5, transmitting the request response frame back to the terminal to obtain terminal connection state information.
In detail, when the request response frame needs to be forwarded through the secondary switch, the secondary switch identifies whether the frame is received for the first time according to the D _ ID and the Ack _ Num, if so, the frame is forwarded from the cascade port, otherwise, the frame is discarded. The request response frame is forwarded to the request end through the secondary switch for a plurality of times. The terminal connection state information includes a set of terminal information that accesses the FC switching network and can normally communicate.
Based on the background technology: static configuration and dynamic configuration can effectively complete the access of the terminal to the FC switching network, but are limited by the diversity of the FC protocol cluster, and a general method for the access of the terminal meeting multiple groups of FC protocol clusters to the FC switching network does not exist at present. In order to solve the problem, in the embodiment of the present invention, switches in an FC switching network are divided into a main switch and a sub switch, where the main switch is responsible for maintaining a terminal connection state of a whole network, the sub switch is only responsible for maintaining a terminal connection of itself, and a connection of any terminal ultimately depends on a control of the main switch over the terminal connection state of an entire interactive network, when a terminal requests a network connection state, a different response policy is performed on the request connection frame by determining whether the request connection frame is sent to the main switch for the first time, if the request connection frame sent by the terminal is sent to the main switch for the first time, terminal information corresponding to the terminal is obtained, and the request response frame is obtained by encapsulating according to the terminal information, and if the request connection frame is not sent to the main switch for the first time, the request response frame is not sent to the main switch, so as to avoid a possibility of repeatedly receiving the request response frame. Therefore, the invention makes the two access strategies into an organic interface, and can maximally realize the phenomenon of terminal access failure caused by different protocols. Therefore, the method, the device, the electronic device and the computer readable storage medium for universally acquiring the connection state of the terminal based on the FC switching network, provided by the invention, can solve the problem that the terminal can not be universally accessed to the FC switching network due to the diversity of the FC protocol cluster.
Fig. 9 is a functional block diagram of a general terminal connection state acquiring device based on an FC switching network according to an embodiment of the present invention.
The FC switched network-based terminal connection state general acquisition apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the FC switching network-based terminal connection state general acquisition apparatus 100 may include a connection request frame sending module 101, a connection request frame determining module 102, a request response frame generating module 103, and a request response frame returning module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
The request connection frame sending module 101 is configured to receive a request connection frame of a terminal, and send the request connection frame to a pre-constructed master switch;
the connection request frame determining module 102 is configured to determine whether the connection request frame is sent to the master switch for the first time;
the request response frame generating module 103 is configured to, if the request connection frame is sent to the master switch for the first time, extract terminal information in the master switch, and package the terminal information to obtain a request response frame; if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
the request response frame returning module 104 is configured to return the request response frame to the terminal, so as to obtain terminal connection state information.
In detail, in the embodiment of the present invention, when the modules in the FC switched network-based terminal connection state general acquisition apparatus 100 are used, the same technical means as that of the FC switched network-based terminal connection state general acquisition method described in fig. 1 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 10 is a schematic structural diagram of an electronic device for implementing a general method for acquiring a connection state of a terminal based on an FC switching network according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11 and a bus, and may further include a computer program stored in the memory 11 and operable on the processor 10, such as a terminal connection state general-purpose acquisition program 12 based on an FC switching network.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used to temporarily store data that has been output or will be output, as well as application software installed in the electronic device 1 and various types of data, such as codes of the FC switching network-based terminal connection state general acquisition program 12.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged 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. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing a program or a module (for example, a terminal connection state general acquisition program based on an FC switching network, or the like) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 10 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 10 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and 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 are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The FC switched network based terminal connection state general purpose acquiring program 12 stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, can realize:
receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch;
judging whether the connection request frame is sent to the main switch for the first time or not;
if the request connection frame is sent to the main switch for the first time, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame;
if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and transmitting the request response frame back to the terminal to obtain terminal connection state information.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 to fig. 8, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch;
judging whether the request connection frame is sent to the main switch for the first time or not;
if the request connection frame is sent to the main switch for the first time, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame;
if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and transmitting the request response frame back to the terminal to obtain terminal connection state information.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not to denote any particular order.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the same, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A terminal connection state general acquisition method based on an FC switching network is characterized by comprising the following steps:
receiving a request connection frame of a terminal, and sending the request connection frame to a pre-constructed main switch;
judging whether the connection request frame is sent to the main switch for the first time or not;
if the request connection frame is sent to the main switch for the first time, extracting terminal information in the main switch, and packaging according to the terminal information to obtain a request response frame;
if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and transmitting the request response frame back to the terminal to obtain terminal connection state information.
2. The method for universally acquiring connection states of terminals based on an FC switched network according to claim 1, wherein the method for generating the connection request frame of the receiving terminal comprises:
generating a universal frame according to the structural information of the pre-constructed universal frame and the FC network standard;
changing the frame type of the general frame to obtain a request connection frame with information to be completed;
acquiring the ID of the main switch and the ID of the terminal;
and combining the ID of the main switch and the ID of the terminal to the request connection frame with information to be completed to obtain the request connection frame.
3. The method according to claim 2, wherein the changing the frame type of the generic frame to obtain the connection request frame with information to be perfected comprises:
acquiring a frame type value taking table, and searching a frame type value corresponding to the connection request frame in the frame type value taking table;
and extracting the frame number of the connection request frame sent by the terminal, and filling the frame number and the frame type value into the universal frame to obtain the connection request frame with information to be perfected.
4. The method for universally acquiring connection states of FC switched networks based on terminals as claimed in claim 3, wherein the determining whether the connection request frame is sent to the master switch for the first time comprises:
extracting the frame sequence number and the ID of the terminal from the connection request frame;
and judging whether the connection request frame is sent to the main switch for the first time or not according to whether the main switch has a historical frame serial number and an ID which are the same as the frame serial number and the ID of the terminal or not.
5. The method for universally acquiring the connection status of the terminals based on the FC switched network according to claim 1, wherein the method for generating the terminal information comprises:
transmitting a login protocol of a terminal to a switch connected with the terminal;
and generating an allocation address of the terminal in the switch, filling the allocation address into a pre-constructed login response frame, returning the login response frame to the terminal, simultaneously acquiring terminal information comprising a terminal name, a terminal address and a connected switch identifier of the terminal, and storing the terminal information into a whole network terminal access information table of the main switch to obtain the terminal information.
6. The method for universally acquiring the connection status of the FC-based switching network according to claim 5, wherein the encapsulating the request response frame according to the terminal information comprises:
generating an original response frame according to the structure information of the general frame and the FC network standard;
changing the frame type of the original response frame to obtain a request response frame with information to be perfected;
and packaging the terminal information to the request response frame with information to be completed to obtain the request response frame.
7. The FC switched network-based terminal connection state generic acquisition method according to claim 4, wherein the sending the request connection frame to a pre-constructed master switch includes:
judging whether the terminal is directly connected with the main switch or not;
if the terminal is directly connected with the main switch, the request connection frame is sent to the main switch;
and if the terminal is not directly connected with the main switch, forwarding the request connection frame to the main switch for a plurality of times through a pre-constructed auxiliary switch.
8. A device for universally acquiring a connection status of a terminal based on an FC switching network, the device comprising:
the system comprises a request connection frame sending module, a pre-constructed main switch and a request connection frame receiving module, wherein the request connection frame sending module is used for receiving a request connection frame of a terminal and sending the request connection frame to the pre-constructed main switch;
a connection request frame judging module, configured to judge whether the connection request frame is sent to the master switch for the first time;
a request response frame generation module, configured to extract terminal information in the master switch if the request connection frame is sent to the master switch for the first time, and obtain a request response frame by encapsulation according to the terminal information; if the request connection frame is not sent to the main switch for the first time, the request response frame is not responded;
and the request response frame returning module is used for returning the request response frame to the terminal to obtain the terminal connection state information.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the FC switched network based terminal connection state general acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the FC switched network based terminal connection state general acquisition method according to any one of claims 1 to 7.
CN202211235549.XA 2022-10-10 2022-10-10 Universal terminal connection state acquisition method and device, electronic equipment and storage medium Pending CN115604206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211235549.XA CN115604206A (en) 2022-10-10 2022-10-10 Universal terminal connection state acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211235549.XA CN115604206A (en) 2022-10-10 2022-10-10 Universal terminal connection state acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115604206A true CN115604206A (en) 2023-01-13

Family

ID=84847444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211235549.XA Pending CN115604206A (en) 2022-10-10 2022-10-10 Universal terminal connection state acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115604206A (en)

Similar Documents

Publication Publication Date Title
CN109428922B (en) Subscription and publishing method and server
DE112011102415B4 (en) Register access in a distributed virtual bridge environment
KR100883405B1 (en) Arrangement for creating multiple virtual queue pairs from a compressed queue pair based on shared attributes
US9479461B2 (en) Computer system and method for communicating data between computers
CN104503932B (en) More mainboard server main substrate Management Controller referee methods and system
CN116501681B (en) CXL data transmission board card and method for controlling data transmission
CN101102305A (en) Method and system for managing network information processing
CN110532208B (en) Data processing method, interface conversion structure and data processing equipment
CN111064680B (en) Communication device and data processing method
US20120102149A1 (en) Inter-Board Communication Apparatus, Method for Transmitting and Receiving Message of Inter-Board Communication
CN114050998A (en) Method, device, electronic equipment and medium for realizing remote direct memory access
CN115348126A (en) Network target range entity equipment access method, device and implementation system
CN112583655B (en) Data transmission method and device, electronic equipment and readable storage medium
CN109286564B (en) Message forwarding method and device
CN109582242B (en) Address determination method and device for cascade memory array system and electronic equipment
TWI799179B (en) Computing systems and methods for management of a network device
CN113691466A (en) Data transmission method, intelligent network card, computing device and storage medium
CN109150724B (en) Communication method and network card
CN115604206A (en) Universal terminal connection state acquisition method and device, electronic equipment and storage medium
CN114513792B (en) Remote network control method and device based on eSIM card
CN110891031B (en) Synchronous information parallel writing method and network equipment
US8069273B2 (en) Processing module
CN115550177A (en) Dynamic updating method, device and medium based on FC switching network terminal connection state
CN105874757A (en) Data processing method and multi-core processor system
US9785594B2 (en) Micro server and switch device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination