Communication equipment and communication detection method of communication equipment
By designing reception, connection and control modules in communication equipment, determining the disconnection category and generating alarm signals, the problem that existing equipment cannot determine the disconnection situation is solved, and troubleshooting and maintenance efficiency is improved.
Patent Information
- Application Number
- CN202411196145.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-17
AI Technical Summary
The existing communication equipment cannot determine the disconnection situation under the framework of the HSR/PRP protocol implementation, resulting in difficulties in troubleshooting and maintenance.
A communication device is designed, including a receiving module, a connecting module and a control module. It determines the connection status of the interface through the receiving link signal, and determines the disconnection category based on the status, generates an alarm prompt behavior, and controls the connection module to generate an alarm signal and transmits it to External electronic equipment.
It realizes accurate detection and alarm of communication equipment disconnection, improves the efficiency of troubleshooting and maintenance, and reduces the risk of accidents.
Smart Images

Figure CN119155570A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication device and a communication detection method for the communication device. Background Art
[0002] In recent years, the demand for reliable network transmission in industries such as trains, industrial control and even the Internet has continued to increase. In addition, today's network topology is becoming more and more complex, and there is an urgent need for a redundant communication device with good compatibility and ease of use.
[0003] At present, in order to improve the reliability of network transmission and the compatibility of different devices, communication equipment with HSR / PRP protocol is widely accepted by the market. However, under the current HSR / PRP protocol implementation framework, communication equipment cannot determine the disconnection situation, which makes troubleshooting and maintenance difficult. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a communication device and a communication detection method for the communication device.
[0005] In a first aspect, an embodiment of the present application provides a communication device, including a first interface and a chip, wherein a receiving module, a connecting module and a control module are provided on the chip;
[0006] The receiving module is respectively connected to the first interface and the connecting module for receiving a link signal of the first interface, and the link signal is transmitted to the control module through the connecting module, wherein the first interface is a network interface for data exchange between the communication device and an external network, and the first interface can support network redundancy;
[0007] The control module is data-connected with the connection module, determines the connection state of the first interface according to the received link signal, determines the disconnection category based on the connection state, and transmits the alarm prompt behavior control information corresponding to the disconnection category to the connection module;
[0008] The connection module is data-connected with the receiving module and the control module respectively, and controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information.
[0009] In a possible implementation manner, the first interface includes a first sub-interface and a second sub-interface, and the receiving module is data-connected to the first sub-interface and the second sub-interface respectively;
[0010] The receiving module receives a first sub-link signal of the first sub-interface, and receives a second sub-link signal of the second sub-interface, and supports network redundancy capability based on the first sub-interface and the second sub-interface;
[0011] The first sub-link signal and the second sub-link signal are high-level signals / low-level signals.
[0012] In one possible implementation,
[0013] The control module determines a first sub-connection state of the first sub-interface according to the received first sub-link signal, and determines a second sub-connection state of the second sub-interface according to the received second sub-link signal;
[0014] Performing a logic operation on the first sub-connection state and the second sub-connection state to determine the disconnection category;
[0015] The logical operation is an AND operation, and the disconnection type can indicate that the first sub-interface and / or the second sub-interface cannot implement data interaction between the communication device and the external network.
[0016] In a possible implementation, different disconnection categories correspond to different alarm prompt behavior control information;
[0017] If the disconnection category indicates that the first sub-interface or the second sub-interface cannot realize data interaction between the communication device and the external network, the connection module controls the generation of a first alarm signal according to the alarm prompt behavior control information, and the first alarm signal indicates that the communication device can interact with the external network and that there is a communication abnormality in the first sub-interface or the second sub-interface;
[0018] If the disconnection category indicates that the first sub-interface and the second sub-interface cannot enable the communication device to interact with the external network for data, the connection module controls the generation of a second alarm signal according to the alarm prompt behavior control information, and the second alarm signal indicates that the communication device cannot interact with the external network for data.
[0019] In a possible implementation manner, the communication device further includes a second interface, where the second interface is an interface for data exchange between the communication device and the electronic device;
[0020] The connection module is data-connected to the second interface to control the first alarm signal or the second alarm signal to be transmitted to the electronic device through the second interface. The electronic device generates different display identifiers and messages in response to different prompt signals.
[0021] In a possible implementation manner, the second interface includes a network switch, and the connection module is connected to the network switch;
[0022] If the connection module controls to generate the second alarm signal, the connection module controls the network switch to be disconnected.
[0023] In one possible implementation,
[0024] The connection module receives the physical address of the first interface written externally, and transmits the physical address to the control module;
[0025] The control module generates a first sub-address of the first sub-interface and a second sub-address of the second sub-interface according to the physical address.
[0026] In one possible implementation,
[0027] If the disconnection type indicates that the first sub-interface or the second sub-interface cannot enable data exchange between the communication device and the external network, the first alarm signal is generated according to the first sub-address or the second sub-address.
[0028] In a possible implementation manner, a test module is further provided on the chip;
[0029] The test module can be connected to an external test device to test the communication device.
[0030] In a second aspect, an embodiment of the present application further provides a communication detection method for a communication device, which is applied to a communication device as described in any one of the above, and the communication detection method includes:
[0031] Obtaining a link signal of the first interface, wherein the first interface is a network interface for the communication device to exchange data with an external network, and the first interface can support network redundancy;
[0032] determining a connection state of the first interface according to the link signal;
[0033] Determine a disconnection category according to the connection status;
[0034] According to the alarm prompt behavior control information corresponding to the disconnection category, control is performed to generate an alarm prompt behavior.
[0035] The communication device provided in the embodiment of the present application receives the link signal of the first interface through the receiving module, and transmits it to the control module through the connecting module. The control module determines the connection status of the first interface according to the link signal, and determines the disconnection category based on the connection status, that is, the communication device can clearly detect the disconnection category of the first interface; and the control module transmits the alarm prompt behavior control information corresponding to the disconnection category to the connecting module, so that the connecting module controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information, that is, it can remind the user that the first interface is disconnected, which greatly improves the efficiency of troubleshooting and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0037] Figure 1 A basic schematic diagram of a communication device provided by the present application is shown;
[0038] Figure 2 A schematic diagram based on QSYS and NIOS provided by the present application is shown;
[0039] Figure 3 A block diagram of FES system components with current configuration provided by the present application is shown;
[0040] Figure 4 A schematic diagram showing the structure of a communication device provided by the present application is shown;
[0041] Figure 5 A schematic diagram showing a display mark provided by the present application is shown;
[0042] Figure 6 A schematic diagram showing another display mark provided by the present application is shown;
[0043] Figure 7 A flow chart of a communication detection method provided by the present application is shown.
[0044] Reference numerals
[0045] first interface-1; first sub-interface-11; second sub-interface-12; chip-2; receiving module-21; connecting module-22; control module-23; testing module-24; second interface-3; network switch-31; DETAILED DESCRIPTION
[0046] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0047] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0048] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0049] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0050] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0051] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0052] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0053] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0054] Figure 1A basic framework schematic diagram of a communication device provided in an embodiment of the present application is shown. Specifically, the communication device uses a field programmable gate array (FPGA) as the main control core, exchanges data with a host computer through a network and a high-speed serial computer expansion bus standard (Peripheral Component Interconnect express, PCIe) interface, and is networked through two small form-factor pluggable optical modules (SFP) interfaces. In addition, the high-availability seamless redundancy (HSR) protocol or the parallel redundancy protocol (PRP) protocol is followed to exchange data within the network. Optionally, the HSR adopts a ring network topology, and the PRP adopts a dual-network network architecture to achieve dual-network seamless redundancy.
[0055] Furthermore, the communication card reduces the dependence on the central processing unit (CPU) by coordinating the QSYS in the FPGA with the NIOS bottom-level driver. As an example, Figure 2 The schematic diagram based on QSYS and NIOS is shown. Specifically, the data communication interface is built through QSYS, and the Ethernet switch IP is configured through VHDL or Verilog in the front end system (FES), and the network protocol interface is opened. The FES system QSYS component is actually a subsystem, that is, it includes other QSYS components, which are generated according to the configuration using tcl scripts. The block diagram of the FES system components with the current configuration is shown in Figure 3 As shown. Figure 2 and Figure 3 The principle setting of the embodiments of the present application will not be described in detail. Those skilled in the art should know that adaptive modifications can be made on this basis to meet different functional requirements.
[0056] Through the protocol interface opened by the FES system, the HSR protocol or PRP protocol is implemented in NIOS through C language, which reduces the difficulty of development compared with VHDL and Verilog languages. At the same time, PRP and HSR are transparent to the upper-layer protocol and decoupled from it, and can be applied to smart substation communication networks with different network topologies.
[0057] Combined with the above basic framework, Figure 4 The structure diagram of the communication device provided in the embodiment of the present application is shown. Figure 4It can be seen that the communication device includes a first interface 1 and a chip 2. The first interface 1 is a network interface for the communication device to exchange data with an external network, and the first interface 1 can support network redundancy. In combination with the above, the first interface 1 is an SFP interface and the chip 2 is an FPGA.
[0058] Continue to refer to Figure 4 , a receiving module 21, a connecting module 22 and a controlling module 23 are arranged on the chip 2. As one example, the receiving module 21 includes a physical interface transceiver such as a physical layer (PHY) chip, and may also include other chips capable of receiving external signals; the connecting module 22 includes an interface capable of implementing VHDL and Verilog languages, which is used to realize data connection between the receiving module 21 and the controlling module 23; the controlling module 23 includes a NIOS processor capable of implementing the HSR protocol and the PRP protocol through the C language.
[0059] Furthermore, the receiving module 21 is data-connected to the first interface 1 and the connecting module 22 , respectively, and is used to receive the link signal of the first interface 1 , and transmit the link signal to the control module 23 through the connecting module 22 .
[0060] Continue to refer to Figure 4 , the first interface 1 includes a first sub-interface 11 and a second sub-interface 12, the receiving module 21 is respectively connected to the first sub-interface 11 and the second sub-interface 12 for data, and optionally, the receiving module 21 is respectively connected to the first sub-interface 11 and the second sub-interface 12 for data through an I2C (Inter-Integrated Circuit) bus, and then receives the first sub-link signal of the first sub-interface 11 and the second sub-link signal of the second sub-interface 12 through the I2C bus, and supports the network redundancy capability through the first sub-interface 11 and the second sub-interface 12. In other words, the communication device in the embodiment of the present application can prevent network interruption to a certain extent and ensure normal network communication through the first sub-interface 11 and the second sub-interface 12.
[0061] Among them, the first sub-link signal and the second sub-link signal are high-level signals / low-level signals. Optionally, the first sub-interface 11 and the second sub-interface 12 of the embodiment of the present application are set as SFP interfaces. The SFP interface can detect whether there is an inserted device such as an optical fiber, etc., to generate a corresponding signal according to whether there is a device inserted. For example, when a device is inserted, a high-level signal is generated, and when no device is inserted, a low-level signal is generated.
[0062] As an example, the control module 23 is data-connected with the connection module 22, and the control module 23 determines the connection state of the first interface 1 according to the received link signal. Specifically, the control module 23 receives the first sub-link signal and the second sub-link signal at the same time, based on which, it determines the first sub-connection state of the first sub-interface 11 according to the received first sub-link signal, and determines the second sub-connection state of the second sub-interface 12 according to the received second sub-link signal; the first sub-connection state and the second sub-connection state are connected / unconnected. Of course, when the connection state is connected, it indicates that a device is plugged into the corresponding sub-interface; when the connection state is unconnected, it indicates that no device is plugged into the corresponding sub-interface.
[0063] Further, the control module 23 determines the disconnection category based on the connection state. Specifically, the control module 23 performs a logical operation on the first sub-connection state and the second sub-connection state to determine the disconnection category of the first interface. Among them, the logical operation is an AND operation, and the disconnection category can characterize that the first sub-interface 11 and / or the second sub-interface 12 cannot realize data interaction between the communication device and the external network. Specifically, if one of the first sub-connection state and the second sub-connection state is connected and the other is not connected, then the disconnection category of the first interface 1 characterizes that the first sub-interface 11 or the second sub-interface 12 cannot realize data interaction between the communication device and the external network; if the first sub-connection state and the second sub-connection state are both not connected, then the disconnection category of the first interface 1 characterizes that the first sub-interface 11 and the second sub-interface 12 cannot realize data interaction between the communication device and the external network.
[0064] After the disconnection category of the first interface 1 is determined, the alarm prompt behavior control information corresponding to the disconnection category is transmitted to the connection module 22 .
[0065] Depend on Figure 4 It can be seen that the connection module 22 is data-connected with the receiving module 21 and the control module 23 respectively. After receiving the alarm prompt behavior control information, the connection module 22 controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information.
[0066] In a specific implementation, different disconnection categories correspond to different alarm prompt behavior control information, so as to prompt the user of the connection status of the first interface 1 through different alarm prompt behavior control information. Optionally, if the disconnection category indicates that the first sub-interface 11 or the second sub-interface 12 cannot realize data interaction between the communication device and the external network, the connection module 22 controls the generation of a first alarm signal according to the alarm prompt behavior control information, and the first alarm signal indicates that the communication device can interact with the external network and that there is a communication anomaly in the first sub-interface 11 or the second sub-interface 12; if the disconnection category indicates that the first sub-interface 11 and the second sub-interface 12 cannot realize data interaction between the communication device and the external network, the connection module 22 controls the generation of a second alarm signal according to the alarm prompt behavior control information, and the second alarm signal indicates that the communication device cannot interact with the external network.
[0067] Continue to refer to Figure 4 The communication device of the embodiment of the present application also includes a second interface 3, which is an interface for data exchange between the communication device and the electronic device. That is, the communication device can transmit data to the electronic device through the second interface 3, or receive data transmitted by the electronic device.
[0068] As an example, the connection module 22 is data-connected with the second interface 3 to control the transmission of the first alarm signal or the second alarm signal to the electronic device through the second interface 3. In the embodiment of the present application, the second interface 3 includes a network switch 31, and the connection module 22 is connected to the network switch 31. If the connection module 22 controls the generation of the first alarm signal, the connection module 22 controls the network switch 31 to connect, and transmits the first alarm signal to the electronic device at the same time; if the connection module 22 controls the generation of the second alarm signal, the connection module 22 controls the network switch 31 to disconnect, and then transmits the second alarm signal to the electronic device. Among them, the first alarm signal and the second alarm signal can be generated by the connection module 22, and can also be generated according to the closing or disconnection of the network switch 31. For example, the first alarm signal is generated when the network switch 31 is connected, and the second alarm signal is generated when the network switch 31 is disconnected.
[0069] Accordingly, the electronic device generates different display identifiers and messages in response to different prompt signals. For example, when the electronic device responds to the first alarm signal, it may generate Figure 5 The display logo shown, and generates a first message, the first message can indicate that no device is inserted into the first sub-interface 11 or the second sub-interface 12, that is, there is a communication abnormality in the first sub-interface 11 or the second sub-interface 12; when the electronic device responds to the second alarm signal, it can generate Figure 6 The display mark shown is displayed, and a second message is generated. The second message can indicate that no device is inserted into the first sub-interface 11 and the second sub-interface 12, that is, there is a communication abnormality in the first sub-interface 11 or the second sub-interface 12.
[0070] It is worth noting that when the electronic device does not receive the first alarm signal and the second alarm signal, that is, the first sub-interface 11 and the second sub-interface 12 communicate normally, at this time, a corresponding display mark and message can also be generated.
[0071] In another example, the connection module 22 of the embodiment of the present application receives the physical address of the first interface 1 written externally, and transmits the physical address to the control module 23. The control module 23 generates the first sub-address of the first sub-interface 11 and the second sub-address of the second sub-interface 12 according to the physical address, thereby being able to distinguish the first sub-interface 11 from the second sub-interface 12, and distinguishing the first sub-link signal from the second sub-link signal. Based on this, if the disconnection category indicates that the first sub-interface 11 or the second sub-interface 12 cannot realize data interaction between the communication device and the external network, a first alarm signal is generated according to the first sub-address or the second sub-address, and then the electronic device can generate a corresponding message according to the first alarm signal carrying the first sub-address or the second sub-address. Of course, the message includes the first sub-address or the second sub-address, that is, the user can refer to the message to find out whether the device is inserted into the first sub-interface 11 or the second sub-interface 12, thereby achieving the purpose of accurately locating the disconnected interface, greatly improving the efficiency of troubleshooting and maintenance, and thus reducing the risk of accidents to a certain extent.
[0072] At the same time, by receiving the externally written physical address of the first interface 1 through the connection module 22, the problem of randomly generating addresses for special interfaces in the current technology resulting in the inability to use the interface can be avoided, effectively improving the versatility of the communication device.
[0073] Depend on Figure 4 It can be seen that the chip 2 of the embodiment of the present application is also provided with a test module 24, and the test module 24 can be connected to an external test device to test the communication device to ensure the factory qualification rate of the communication device.
[0074] The communication device provided in the embodiment of the present application receives the link signal of the first interface through the receiving module, and transmits it to the control module through the connecting module. The control module determines the connection status of the first interface according to the link signal, and determines the disconnection category based on the connection status, that is, the communication device can clearly detect the disconnection category of the first interface; and the control module transmits the alarm prompt behavior control information corresponding to the disconnection category to the connecting module, so that the connecting module controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information, that is, it can remind the user that the first interface is disconnected, which greatly improves the efficiency of troubleshooting and maintenance.
[0075] Based on the same inventive concept, the second aspect of the present application further provides a communication detection method, which is aimed at detecting the above-mentioned communication device. Specifically, Figure 7 A flow chart of a communication detection method provided in an embodiment of the present application is shown, wherein specific steps include S701-S704.
[0076] S701, obtaining a link signal of a first interface, wherein the first interface is a network interface for data exchange between a communication device and an external network, and the first interface can support network redundancy.
[0077] S702: Determine a connection state of the first interface according to the link signal.
[0078] S703: Determine a disconnection category according to the connection status.
[0079] S704: Control generation of an alarm prompt behavior according to the alarm prompt behavior control information corresponding to the disconnection category.
[0080] In a specific implementation, the communication detection method is applied to communication equipment.
[0081] Optionally, after the communication device is connected to the electronic device, it obtains in real time the link signal of the first interface included therein, wherein the first interface is a network interface for the communication device to exchange data with an external network, and the first interface can support the realization of network redundancy. As one example, a receiving module provided on a chip included in the communication device is data-connected to the first interface, based on which the link signal of the first interface is obtained through the receiving module.
[0082] Preferably, the first interface is configured to include a first sub-interface and a second sub-interface, and the first sub-interface and the second sub-interface can be configured to be an SFP interface, and the first sub-interface and the second sub-interface implement support for network redundancy capability. Specifically, when the link signal of the first interface is obtained by the receiving module, the first sub-link signal of the first sub-interface is received, and the second sub-link signal of the second sub-interface is received. Wherein, the first sub-link signal and the second sub-link signal are high-level signals / low-level signals. Optionally, the first sub-interface and the second sub-interface of the embodiment of the present application are configured to be an SFP interface, and the SFP interface can detect whether there is an inserted device such as an optical fiber, etc., to generate a corresponding signal according to whether there is a device inserted, for example, when a device is inserted, a high-level signal is generated, and when no device is inserted, a low-level signal is generated.
[0083] After obtaining the link signal of the first interface, that is, the first sub-link signal and the second sub-link signal, the connection state of the first interface is determined according to the link signal. Optionally, the connection state of the first interface is determined according to the link signal by a control module provided on a chip included in the communication device. Specifically, the control module is data-connected with the receiving module through a connection module provided on the chip. After obtaining the first sub-link signal and the second sub-link signal, the receiving module transmits the first sub-link signal and the second sub-link signal to the control module through the connection module.
[0084] Further, the control module determines the first sub-connection state of the first sub-interface according to the first sub-link signal, and determines the second sub-connection state of the second sub-interface according to the second sub-link signal, wherein the first sub-connection state and the second sub-connection state are connected / unconnected. As an example, when the connection state is connected, it indicates that a device is inserted into the corresponding sub-interface; when the connection state is unconnected, it indicates that no device is inserted into the corresponding sub-interface.
[0085] After determining the connection state of the first interface, the control module also determines the disconnection category according to the connection state. Specifically, the control module performs a logical operation on the first sub-connection state and the second sub-connection state to determine the disconnection category of the first interface. The logical operation is an AND operation, and the disconnection category can indicate that the first sub-interface and / or the second sub-interface cannot realize data interaction between the communication device and the external network.
[0086] As one example, if one of the first sub-connection state and the second sub-connection state is connected and the other is disconnected, the disconnection category of the first interface indicates that the first sub-interface or the second sub-interface cannot realize data interaction between the communication device and the external network; if the first sub-connection state and the second sub-connection state are both disconnected, the disconnection category of the first interface indicates that the first sub-interface and the second sub-interface cannot realize data interaction between the communication device and the external network.
[0087] After determining the disconnection category of the first interface, the control module transmits the alarm prompt behavior control information corresponding to the disconnection category to the connection module, so that the connection module controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information corresponding to the disconnection category.
[0088] As an example, if the disconnection category indicates that the first sub-interface or the second sub-interface cannot realize data interaction between the communication device and the external network, the connection module controls the generation of a first alarm signal according to the alarm prompt behavior control information, and the first alarm signal indicates that the communication device and the external network can interact with data, and that there is a communication abnormality in the first sub-interface or the second sub-interface; if the disconnection category indicates that the first sub-interface and the second sub-interface cannot realize data interaction between the communication device and the external network, the connection module controls the generation of a second alarm signal according to the alarm prompt behavior control information, and the second alarm signal indicates that the communication device and the external network cannot interact with data.
[0089] In a specific implementation, the communication device exchanges data with the electronic device through the second interface. After the connection module controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information, the connection module transmits the first alarm signal or the second alarm signal to the electronic device through the second interface.
[0090] In another example, the second interface includes a network switch, and the connection module is connected to the network switch. If a first alarm signal is generated, the network switch is controlled to close by the connection module, and the first alarm signal is transmitted to the electronic device at the same time; if a second alarm signal is generated, the network switch is controlled to disconnect by the connection module, and the second alarm signal is transmitted to the electronic device. The first alarm signal and the second alarm signal can be generated by the connection module, or can be generated according to the closing or disconnection of the network switch. For example, the first alarm signal is generated when the network switch is closed, and the second alarm signal is generated when the network switch is disconnected.
[0091] Accordingly, the electronic device can generate different display identifiers and messages for different prompt signals. For example, the electronic device generates a first display identifier and a first message for a first alarm signal, and the first message can indicate that no device is inserted into the first sub-interface or the second sub-interface, that is, there is a communication anomaly in the first sub-interface or the second sub-interface; the electronic device generates a second display identifier and a second message for a second alarm signal, and the second message can indicate that no device is inserted into both the first sub-interface and the second sub-interface, that is, there is a communication anomaly in both the first sub-interface or the second sub-interface.
[0092] It is worth noting that when the electronic device does not receive the first alarm signal and the second alarm signal, that is, the first sub-interface and the second sub-interface communicate normally, at this time, a corresponding display mark and message can also be generated.
[0093] As another example, the communication device of the embodiment of the present application can receive the physical address of the first interface written externally through the connection module, and transmit the physical address to the control module. Furthermore, the control module can generate a first sub-address of the first sub-interface and a second sub-address of the second sub-interface according to the physical address, thereby being able to distinguish between the first sub-interface and the second sub-interface, and distinguish between the first sub-link signal and the second sub-link signal.
[0094] Based on this, if the disconnection category indicates that the first sub-interface or the second sub-interface cannot realize data interaction between the communication device and the external network, a first alarm signal is generated according to the first sub-address or the second sub-address, and then the electronic device can generate a corresponding message according to the first alarm signal carrying the first sub-address or the second sub-address. Of course, the message includes the first sub-address or the second sub-address, that is, the user can determine whether the first sub-interface or the second sub-interface is not plugged in by checking the message, thereby achieving the purpose of accurately locating the disconnected interface, greatly improving the efficiency of troubleshooting and maintenance, and thus reducing the risk of accidents to a certain extent.
[0095] At the same time, by receiving the physical address of the first interface written externally through the connection module, the problem of randomly generating addresses for special interfaces in the current technology resulting in the inability to use the interface can be avoided, effectively improving the versatility of the communication device.
[0096] In a specific implementation, the communication detection method of the embodiment of the present application also includes connecting an external test device through a test module provided on the chip to test the communication device to ensure the factory qualification rate of the communication device.
[0097] The embodiment of the present application receives the link signal of the first interface through the receiving module, and transmits it to the control module through the connecting module. Thereafter, the control module determines the connection status of the first interface according to the link signal, and determines the disconnection category based on the connection status, that is, the communication device can clearly detect the disconnection category of the first interface; and, the control module transmits the alarm prompt behavior control information corresponding to the disconnection category to the connecting module, so that the connection module controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information, that is, it can remind the user that the first interface is disconnected, which greatly improves the efficiency of troubleshooting and maintenance.
[0098] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0099] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
[0100] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.
Claims
1. A communication device, comprising a first interface and a chip, wherein the chip is provided with a receiving module, a connecting module and a control module; The receiving module is respectively connected to the first interface and the connecting module for receiving a link signal from the first interface, and the link signal is transmitted to the control module through the connecting module, wherein: The first interface is a network interface for the communication device to exchange data with an external network, and the first interface can support network redundancy; The control module is data-connected with the connection module, determines the connection state of the first interface according to the received link signal, determines the disconnection category based on the connection state, and transmits the alarm prompt behavior control information corresponding to the disconnection category to the connection module; The connection module is data-connected with the receiving module and the control module respectively, and controls the generation of the alarm prompt behavior according to the alarm prompt behavior control information.
2. The communication device according to claim 1, wherein the first interface comprises a first sub-interface and a second sub-interface, and the receiving module is respectively connected to the first sub-interface and the second sub-interface for data transmission; The receiving module receives a first sub-link signal of the first sub-interface, and receives a second sub-link signal of the second sub-interface, and supports network redundancy capability based on the first sub-interface and the second sub-interface; in, The first sub-link signal and the second sub-link signal are high level signals / low level signals.
3. The communication device according to claim 2, The control module determines a first sub-connection state of the first sub-interface according to the received first sub-link signal, and determines a second sub-connection state of the second sub-interface according to the received second sub-link signal; Performing a logic operation on the first sub-connection state and the second sub-connection state to determine the disconnection category; The logical operation is an AND operation, and the disconnection type can indicate that the first sub-interface and / or the second sub-interface cannot implement data interaction between the communication device and the external network.
4. The communication device according to claim 2, wherein different disconnection categories correspond to different alarm prompt behavior control information; If the disconnection category indicates that the first sub-interface or the second sub-interface cannot realize data interaction between the communication device and the external network, the connection module controls the generation of a first alarm signal according to the alarm prompt behavior control information, and the first alarm signal indicates that the communication device can interact with the external network and that there is a communication abnormality in the first sub-interface or the second sub-interface; If the disconnection category indicates that the first sub-interface and the second sub-interface cannot enable the communication device to interact with the external network for data, the connection module controls the generation of a second alarm signal according to the alarm prompt behavior control information, and the second alarm signal indicates that the communication device cannot interact with the external network for data.
5. The communication device according to claim 4, further comprising a second interface, wherein the second interface is an interface for data exchange between the communication device and the electronic device; The connection module is data-connected to the second interface to control the first alarm signal or the second alarm signal to be transmitted to the electronic device through the second interface. The electronic device generates different display identifiers and messages in response to different prompt signals.
6. The communication device according to claim 5, wherein the second interface comprises a network switch, and the connection module is connected to the network switch; If the connection module controls to generate the second alarm signal, the connection module controls the network switch to be disconnected.
7. The communication device according to claim 4, The connection module receives the physical address of the first interface written externally, and transmits the physical address to the control module; The control module generates a first sub-address of the first sub-interface and a second sub-address of the second sub-interface according to the physical address.
8. The communication device according to claim 7, If the disconnection type indicates that the first sub-interface or the second sub-interface cannot enable data exchange between the communication device and the external network, the first alarm signal is generated according to the first sub-address or the second sub-address.
9. The communication device according to claim 1, wherein a test module is also provided on the chip; The test module can be connected to an external test device to test the communication device.
10. A communication detection method for a communication device, applied to the communication device according to any one of claims 1 to 9, the communication detection method comprising: Obtaining a link signal of the first interface, wherein the first interface is a network interface for the communication device to exchange data with an external network, and the first interface can support network redundancy; determining a connection state of the first interface according to the link signal; Determine a disconnection category according to the connection status; According to the alarm prompt behavior control information corresponding to the disconnection category, control is performed to generate an alarm prompt behavior.
