A communication state detection method and apparatus, an electronic device, and a storage medium
By establishing multi-NIC communication and dual-stack communication modes in the distributed database and detecting the communication status of network nodes, the problem of frequent network node switching is solved, thereby improving high availability and stability.
Patent Information
- Application Number
- CN202511332526.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-09-18
AI Technical Summary
In existing distributed database high availability solutions, network nodes are prone to frequent switching when the network is congested or fluctuates, which affects the consistency of database services.
By establishing multiple network connection channels between network nodes, utilizing multi-NIC communication mechanisms and dual-stack communication modes, communication status detection is performed, and communication status detection messages are converted between network nodes and transmitted using at least two Internet protocol types to determine whether the communication status of the network nodes is normal.
It reduces frequent database switching caused by network fluctuations, improves high availability, ensures continuous business services even when network nodes are not completely faulty, and enhances the stability and consistency of the database.
Smart Images

Figure CN120825424B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a communication status detection method, apparatus, electronic device, and storage medium. Background Technology
[0002] High-availability solutions for distributed databases ensure continuous service delivery even in the event of network node failures or network anomalies, guaranteeing data consistency and integrity. In high-availability solutions, monitoring the communication status of network nodes and automatic failover in case of failure are key to ensuring continuous database service.
[0003] However, in existing distributed database high availability solutions, network nodes are usually configured with only one IP (Internet Protocol) address. When network congestion occurs, database services will be interrupted. During network fluctuations, frequent switching of network nodes will occur, affecting the consistency of database services. Summary of the Invention
[0004] This invention provides a communication status detection method, device, electronic device, and storage medium to improve the high availability of distributed databases, realize high availability communication status fault detection, and reduce frequent automatic switching of network nodes caused by network fluctuations and other reasons.
[0005] In a first aspect, embodiments of the present invention provide a communication status detection method, the method comprising:
[0006] By using the mapping relationship between at least two Internet Protocol addresses and network interface cards (NICs) of each network node, at least two network connection channels between network nodes are determined.
[0007] The communication status between network nodes is detected through at least two network connection channels between network nodes;
[0008] Specifically, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types.
[0009] Based on the communication status detection results of each network connection channel between network nodes, determine whether the communication status of the network nodes is normal.
[0010] Secondly, embodiments of the present invention also provide a communication status detection device, the device comprising:
[0011] The network connection channel determination module is used to determine at least two network connection channels between network nodes by using the mapping relationship between at least two Internet Protocol addresses and network interface cards of each network node;
[0012] The communication status detection module is used to detect the communication status between network nodes through at least two network connection channels between network nodes;
[0013] Specifically, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types.
[0014] The network node communication status judgment module is used to determine whether the communication status of the network nodes is normal based on the communication status detection results of each network connection channel between network nodes.
[0015] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the communication status detection method as described in any of the embodiments of the present invention.
[0016] Fourthly, embodiments of the present invention also provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the communication status detection method as described in any of the embodiments of the present invention.
[0017] The technical solution of this invention determines at least two network connection channels between each pair of network nodes by mapping at least two Internet Protocol (IP) addresses to network interface cards (NICs) of each network node. Communication status detection is performed on each of these channels, with the detection messages transmitted in at least two different IIP types. Finally, based on the communication status detection results of each network connection channel, the communication status of the network nodes is determined to be normal. This technical solution reduces frequent database switching caused by network fluctuations, enabling continuous service provision without database switching even when the NICs of each network node are not completely faulty. It fully utilizes the network resources of the distributed database for high-availability communication status detection, enhancing high-availability communication capabilities.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a communication status detection method provided in Embodiment 1 of the present invention;
[0021] Figure 2 This is a flowchart of a communication status detection method provided in Embodiment 2 of the present invention;
[0022] Figure 3 This is a schematic diagram of a multi-NIC mesh communication structure provided in Embodiment 2 of the present invention;
[0023] Figure 4 This is a schematic diagram of the structure of a communication status detection device provided in Embodiment 3 of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. In the embodiments of this application, certain software, components, models, and other existing industry solutions may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0027] The acquisition, transmission, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0028] Example 1
[0029] Figure 1 The flowchart of a communication status detection method provided in Embodiment 1 of the present invention is applicable to the situation of communication status detection of network nodes in a distributed database. The method can be executed by a communication status detection device, which can be implemented in hardware and / or software and can be configured in the distributed database.
[0030] like Figure 1 As shown, the method includes:
[0031] S110. Determine at least two network connection channels between network nodes by using the mapping relationship between at least two Internet Protocol addresses and network interface cards (NICs) of each network node.
[0032] In this context, a network node refers to a node in the distributed database, and an Internet Protocol address refers to an IP (Internet Protocol) address. In this embodiment, each network node is assigned at least two IP addresses, but there is no limit to the number of IP addresses assigned to each network node. A network interface card (NIC), also known as a network adapter, is a hardware device that connects a network node to the network, used for data encapsulation and decapsulation, link management, etc. A NIC can be bound to multiple IP addresses, but an IP address can only be bound to one NIC. Furthermore, for multiple IP addresses of a network node, the NICs bound to them can be the same or different.
[0033] In this embodiment, a mapping relationship between at least two Internet Protocol (IP) addresses and network interface cards (NICs) of each network node is pre-configured. Specifically, the mapping relationship can be represented in the form of key-value pairs. For example, the mapping relationship between the IP address and NIC of network node 1 can be configured as: {node1_ip1:eth1, node1_ip2:eth2}, and the mapping relationship between the IP address and NIC of network node 2 can be configured as: {node2_ip3:eth1, node2_ip4:eth2}.
[0034] Furthermore, the sources of the mapping relationship between Internet Protocol addresses and network interface cards (NICs) include: pre-storing the mapping relationship between at least two Internet Protocol addresses of a network node and a NIC; and / or, determining the NIC that matches the Internet Protocol address based on the Internet Protocol address of the network node through operating system network commands, and storing the mapping relationship between the Internet Protocol address and the NIC.
[0035] Specifically, when deploying a distributed database, the mapping relationship between network node IP addresses and network interface cards (NICs) is pre-stored. This mapping relationship can be represented as key-value pairs of IP addresses and NIC names.
[0036] If, during the deployment of a distributed database, only at least two IP addresses of the network nodes are determined, the network interface card information corresponding to each IP address can be obtained through operating system network commands such as ipconfig or ifconfig, and the mapping relationship between IP addresses and network interfaces can be stored in the form of key-value pairs.
[0037] Furthermore, S110 may include: establishing a network connection channel between the Internet Protocol address of the first network node and the Internet Protocol address of the second network node corresponding to the same Internet Protocol address, based on the mapping relationship between at least two Internet Protocol addresses of the first network node and the second network node and the network interface card.
[0038] At least two network connection channels between network nodes are established based on the same network interface card (NIC) between each pair of network nodes. By resolving the mapping relationship between the Internet Protocol (IP) address of each network node and the NIC, a network connection channel with the same NIC is established between each pair of network nodes.
[0039] Taking network node 1 and network node 2 as examples, the network connection channels between network node 1 and network node 2 are node1_ip1—node2_ip3 corresponding to network card eth1, and node1_ip2—node2_ip4 corresponding to network card eth2.
[0040] In this embodiment, by setting multiple mapping relationships between IP addresses and network cards for each network node, multi-NIC communication can be achieved between the network nodes. The advantage of multi-NIC communication is that after the communication of the network connection channel corresponding to one NIC fails, the communication connection can be switched to the network connection channel corresponding to another NIC, thereby improving the high availability function of the distributed database.
[0041] S120. Detect the communication status between network nodes through at least two network connection channels between network nodes.
[0042] The communication status detection is used to check whether network nodes can communicate normally. For example, this can be achieved through network packet sending tests, ping tests, etc. Specifically, communication status detection can be performed after the distributed database is deployed, establishing communication connections between network nodes, such as TCP (Transmission Control Protocol) connections; alternatively, it can be performed during the operation of the distributed database according to communication status detection instructions, or periodically according to a pre-set time period. This embodiment does not impose any limitations on this. Furthermore, communication status detection between network nodes can be performed through network interface cards pre-configured in the distributed database.
[0043] Furthermore, S120 may include:
[0044] Perform communication status detection on the network connection channel corresponding to the current network card between the first network node and the second network node;
[0045] If the communication status detection result of the network connection channel corresponding to the current network card is determined to be communication failure, then the communication status detection is performed on the network connection channel corresponding to the next network card until the communication status detection result is determined to be communication success, or the communication status detection of the network connection channels corresponding to all network cards is completed.
[0046] The first network node and the second network node refer to the two network nodes currently conducting the communication status test. The terms "first" and "second" are only used to distinguish different network nodes and are not used to indicate order, etc.
[0047] In this embodiment, communication status tests are performed on each pair of network nodes that have established communication connections in the distributed database. For the first and second network nodes currently undergoing communication status testing, since each network card has multiple network connection channels, the communication status of each network connection channel can be checked sequentially. If at least one network connection channel is found to be successfully communicating, then communication between the first and second network nodes is considered normal. If communication status checks are performed on all network connection channels corresponding to all network cards and all communication fails, then communication between the first and second network nodes is considered to have failed.
[0048] In this embodiment, a multi-NIC communication mechanism is set up, allowing network nodes to communicate through multiple network connection channels. If communication fails in one NIC's network connection channel, communication can be directly switched to another NIC's network connection channel. Communication failure between network nodes is only confirmed when all NICs' corresponding network connection channels have failed. This multi-NIC communication mechanism improves the availability of network nodes and the fault tolerance of inter-node communication, reducing frequent switching of network nodes due to network failures or other reasons.
[0049] Furthermore, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types.
[0050] The Internet protocol type refers to the IP type, which can include IPv4 or IPv6, etc. A message forwarder can be set up locally in the distributed database. Network nodes send communication status detection messages or messages during normal communication to the message forwarder, which then performs the Internet protocol type conversion. For example, using IPv4 or IPv6 as the IP type, the message forwarder converts IPv4 communication status detection messages to IPv6, or vice versa. In other words, regardless of whether it's a communication status detection message or a message during normal communication, after passing through the message forwarder, it becomes a communication status detection message of various Internet protocol types, but the message content is the same regardless of the Internet protocol type.
[0051] In this embodiment, to further improve the high availability of the distributed database, a dual-stack communication mode can be constructed by converting communication status detection messages into at least two different Internet protocol types. The advantage of this setup is that regardless of the Internet protocol type supported by the message receiver, message parsing of the communication status detection messages can be achieved. Therefore, by combining multi-NIC communication with the dual-stack communication mode, the high availability of the database is further improved.
[0052] S130. Based on the communication status detection results of each network connection channel between network nodes, determine whether the communication status of the network nodes is normal.
[0053] In this embodiment, based on the detection results of the communication status of each pair of network nodes, it is determined whether the communication status of the network node is normal, that is, whether the network node is a faulty node.
[0054] Understandably, in the multi-NIC communication mechanism of this embodiment, as long as at least one network connection channel is functioning normally, the communication status between any two network nodes is considered normal. Communication between network nodes is only considered to have failed when all network connection channels fail. However, when communication between network nodes fails, the cause may be a failure of one or both network nodes. Therefore, it is necessary to screen for faulty network nodes based on the communication status detection results between network nodes.
[0055] Furthermore, S130 may include: if it is determined that the communication status detection results of each network connection channel between the target network node and at least two other network nodes are all communication failures, then the communication status of the target network node is determined to be abnormal, and the target network node is a faulty node.
[0056] For example, if all network connection channels between network node 1 and network node 2 fail to communicate, and if all network connection channels between network node 1 and network node 3 fail to communicate, then network node 1 is identified as a faulty node.
[0057] In this embodiment, the higher the probability that all network connection channels with other network nodes fail to communicate, the higher the frequency of the network node being a faulty node. Therefore, a network node that fails to communicate with multiple other network nodes can be identified as a faulty node.
[0058] Furthermore, this embodiment can also flexibly set the number threshold of other network nodes according to the actual application of the distributed database. When the number of other network nodes whose communication status detection results of each network connection channel with the target network node are all communication failures is greater than or equal to the preset number threshold, the target network node is identified as a faulty node.
[0059] In this embodiment, a multi-NIC communication mechanism is combined with a dual-stack communication mode. As long as the network connection channels corresponding to all NICs of the network nodes in the database are not completely faulty, service can be continuously provided without network node switching. Network node switching only occurs when all network connection channels corresponding to all NICs fail. This fully utilizes server network resources, achieving highly available communication and fault detection capabilities. Furthermore, it avoids frequent network node switching caused by network fluctuations and failures, ensuring the consistency and stability of the database's data processing services.
[0060] The technical solution of this invention determines at least two network connection channels between each pair of network nodes by mapping at least two Internet Protocol (IP) addresses to network interface cards (NICs) of each network node. Communication status detection is performed on each of these channels, with the detection messages transmitted in at least two different IIP types. Finally, based on the communication status detection results of each network connection channel, the communication status of the network nodes is determined to be normal. This technical solution reduces frequent database switching caused by network fluctuations, enabling continuous service provision without database switching even when the NICs of each network node are not completely faulty. It fully utilizes the network resources of the distributed database for high-availability communication status detection, enhancing high-availability communication capabilities.
[0061] Example 2
[0062] Figure 2 This is a flowchart of a communication status detection method provided in Embodiment 2 of the present invention. Based on the above embodiments, the present invention further specifies the communication status detection process, the process of dual-stack communication based on at least two Internet protocol types, and the process of judging the communication status of network nodes.
[0063] like Figure 2 As shown, the method includes:
[0064] S210. Based on the mapping relationship between at least two Internet Protocol addresses of the first network node and the second network node and the network interface card, establish a network connection channel between the Internet Protocol address of the first network node and the Internet Protocol address of the second network node corresponding to the same network interface card.
[0065] The process of establishing network connection channels between network nodes and their corresponding network cards based on the mapping relationship between network node IP addresses and network cards, thereby enabling multi-NIC communication, has been described in the above embodiments, and this embodiment does not impose any limitations on this.
[0066] Furthermore, Internet Protocol addresses include Internet Protocol addresses of at least two Internet Protocol types.
[0067] This embodiment, based on the above embodiments, allows the same network interface card (NIC) to be configured with both IPv4 and IPv6 addresses simultaneously. This further constructs a mesh communication structure on top of multi-NIC communication. Figure 3 This is a schematic diagram of a multi-NIC mesh communication structure provided in this embodiment, as shown below. Figure 3 As shown, in the above embodiment, the mapping relationship between the IP address and network card of network node 1 is {node1_ip1: eth1, node1_ip2: eth2}, and the mapping relationship between the IP address and network card of network node 2 is {node2_ip3: eth1, node2_ip4: eth2}. Furthermore, eth1 and eth2 of network node 1 correspond to IPv4 and IPv6 addresses respectively, and similarly, eth1 and eth2 of network node 2 also correspond to IPv4 and IPv6 addresses respectively. This configuration expands the network connection channels between network node 1 and network node 2 from the original node1_ip1—node2_ip3 and node1_ip2—node2_ip4 to four network connection channels: node1_ipv4 1—node2_ipv4 3, node1_ipv6 1—node2_ipv6 3, node1_ipv4 2—node2_ipv4 4, and node1_ipv6 2—node2_ipv6 4.
[0068] In this embodiment, by configuring Internet Protocol addresses of different Internet Protocol types on the same network card, the number of network connection channels between network nodes is further expanded, and the high availability of the distributed database is further improved.
[0069] S220. Detect the communication status of the network connection channel corresponding to the current network card between the first network node and the second network node.
[0070] S230. If the communication status detection result of the network connection channel corresponding to the current network card is determined to be communication failure, then the communication status detection is performed on the network connection channel corresponding to the next network card until the communication status detection result is determined to be communication success, or the communication status detection of the network connection channels corresponding to all network cards is completed.
[0071] If the communication status detection result of the network connection channel corresponding to the current network card is successful, it indicates that the communication status between the first network node and the second network node is normal. If the communication status detection result of the network connection channel corresponding to the current network card is unsuccessful, the communication status detection continues for the next network connection channel corresponding to the next network card. As long as the communication status detection result of at least one network connection channel corresponding to the network card is successful, the communication status between the first network node and the second network node can be considered normal. If the communication status detection result of all network connection channels is unsuccessful, then the communication between the first network node and the second network node has failed, and the first network node and / or the second network node is a faulty node.
[0072] Furthermore, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet Protocol types, including: converting a communication status detection message of a first Internet Protocol type sent by a network node into a communication status detection message of a second Internet Protocol type through a message forwarder.
[0073] In this embodiment, a dual-stack communication mode is implemented based on a message forwarder. The specific details of the dual-stack communication mode have been described in the above embodiments, and this embodiment does not impose any limitations on it.
[0074] Furthermore, a network node that receives communication status detection messages of at least two Internet Protocol types sent by a message forwarder processes the communication status detection message of the Internet Protocol type that matches it.
[0075] In dual-stack communication mode, regardless of the Internet protocol type, communication status detection messages are forwarded to the message receiver's network node in at least two Internet protocol types after being sent to the message forwarder by the sending network node. Upon receiving at least two different types of communication status detection messages, the receiving network node can parse and process only those messages corresponding to its supported Internet protocol types. If the receiving network node supports multiple Internet protocol types, it can choose to process only one type of communication status detection message, avoiding redundant processing of other messages to prevent resource waste and maintain communication status detection efficiency.
[0076] Similarly, under normal communication conditions, network nodes can also communicate based on a dual-stack communication mode. The network node sending the message sends the communication message to the message forwarder, which performs format conversion and forwards the communication messages of various Internet protocol types to the network node receiving the message. The network node receiving the message then selects the communication message of the Internet protocol type it supports for processing from the communication messages of various Internet protocol types.
[0077] S240. If it is determined that the communication status detection results of each network connection channel between the target network node and at least two other network nodes are all communication failures, then the communication status of the target network node is determined to be abnormal, and the target network node is a faulty node.
[0078] In this embodiment, a network node that fails to communicate with multiple other network nodes through the network connection channels corresponding to each network card is identified as a faulty node.
[0079] After identifying the target network node as a faulty node, a network node switch can be performed, selecting another network node with normal communication status in the distributed database system to continue providing data services.
[0080] The technical solution of this embodiment, based on the mapping relationship between IP addresses and network interface cards (NICs) in network nodes, constructs NIC-based network connection channels between network nodes. Simultaneously, different Internet Protocol (IP) types of IP addresses can be configured for the same NIC, forming a mesh structure of network connection channels. When communicating based on the same network connection channel, a message forwarder is configured to convert Internet Protocol types and forward messages of multiple Internet Protocol types, realizing a multi-NIC mesh communication mechanism and dual-stack communication mode between network nodes, improving the fault tolerance and availability of communication between network nodes. For each pair of network nodes, the communication status of each network connection channel is detected. If at least one network connection channel is communicating normally, the communication between network nodes is considered normal. If all network connection channels fail to communicate, the communication between network nodes is considered to have failed, and the node that has failed to communicate with multiple other network nodes is identified as a faulty node, and network node switching is performed. While ensuring the continuity of distributed database data service provision, it reduces network node switching caused by network fluctuations and network failures, improving the high availability and system stability of the distributed database.
[0081] Example 3
[0082] Figure 4 This is a schematic diagram of a communication status detection device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes:
[0083] The network connection channel determination module 310 is used to determine at least two network connection channels between network nodes by means of the mapping relationship between at least two Internet Protocol addresses and network interface cards of each network node.
[0084] The communication status detection module 320 is used to detect the communication status between network nodes through at least two network connection channels between network nodes;
[0085] Specifically, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types.
[0086] The network node communication status judgment module 330 is used to determine whether the communication status of the network node is normal based on the communication status detection results of each network connection channel between network nodes.
[0087] The technical solution of this invention determines at least two network connection channels between each pair of network nodes by mapping at least two Internet Protocol (IP) addresses to network interface cards (NICs) of each network node. Communication status detection is performed on each of these channels, with the detection messages transmitted in at least two different IIP types. Finally, based on the communication status detection results of each network connection channel, the communication status of the network nodes is determined to be normal. This technical solution reduces frequent database switching caused by network fluctuations, enabling continuous service provision without database switching even when the NICs of each network node are not completely faulty. It fully utilizes the network resources of the distributed database for high-availability communication status detection, enhancing high-availability communication capabilities.
[0088] Optionally, based on the above embodiments, the apparatus further includes:
[0089] The mapping relationship pre-storage module is used to pre-store the mapping relationship between at least two Internet Protocol addresses of a network node and the network interface card;
[0090] The network interface card (NIC) determination module is used to determine the NIC that matches the Internet Protocol (IP) address of the network node by means of network commands from the operating system, and to store the mapping relationship between the IP address and the NIC.
[0091] Based on the above embodiments, optionally, the network connection channel determination module 310 includes:
[0092] The network connection channel establishment unit is used to establish a network connection channel between the Internet Protocol address of the first network node and the Internet Protocol address of the second network node corresponding to the same network card, based on the mapping relationship between at least two Internet Protocol addresses of the first network node and the second network node and the network card.
[0093] Based on the above embodiments, optionally, the communication status detection module 320 includes:
[0094] The current network interface card (NIC) communication status detection unit is used to detect the communication status of the network connection channel corresponding to the current NIC between the first network node and the second network node.
[0095] The communication status detection unit is used to perform communication status detection on the network connection channel corresponding to the next network card if the communication status detection result of the current network card is determined to be communication failure, until the communication status detection result is determined to be communication success, or to complete the communication status detection of the network connection channels corresponding to all network cards.
[0096] Optionally, based on the above embodiments, the apparatus further includes:
[0097] The message conversion module is used to convert communication status detection messages of the first Internet Protocol type sent by network nodes into communication status detection messages of the second Internet Protocol type through a message forwarder.
[0098] The communication status detection message processing module is used by network nodes that receive communication status detection messages of at least two Internet protocol types sent by the message forwarder, and to process the communication status detection messages of the Internet protocol type that match them.
[0099] Based on the above embodiments, optionally, the Internet Protocol address includes Internet Protocol addresses of at least two Internet Protocol types.
[0100] Based on the above embodiments, optionally, the network node communication status determination module 330 includes:
[0101] The target network node fault determination unit is used to determine that the communication status of the target network node is abnormal and the target network node is a faulty node if the communication status detection results of each network connection channel between the target network node and at least two other network nodes are all communication failures.
[0102] The communication status detection device provided in this embodiment of the invention can execute the communication status detection method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0103] Example 4
[0104] Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0105] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0106] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0107] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as communication status detection methods.
[0108] In some embodiments, the communication status detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the communication status detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the communication status detection method by any other suitable means (e.g., by means of firmware).
[0109] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable communication status detection device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0111] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0113] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0114] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0115] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0116] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A communication status detection method, characterized in that, include: By using the mapping relationship between at least two Internet Protocol addresses and network interface cards (NICs) of each network node, at least two network connection channels between network nodes are determined. The communication status between network nodes is detected through at least two network connection channels between network nodes; Specifically, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types. Based on the communication status detection results of each network connection channel between network nodes, determine whether the communication status of the network nodes is normal.
2. The method according to claim 1, characterized in that, The method further includes: The mapping relationship between at least two Internet Protocol addresses of network nodes and network interface cards is pre-stored; And / or, through operating system network commands, determine the network interface card (NIC) that matches the Internet Protocol (IP) address of the network node, and store the mapping relationship between the IP address and the NIC.
3. The method according to claim 1, characterized in that, By establishing a mapping relationship between at least two Internet Protocol addresses and network interface cards (NICs) for each network node, at least two network connection channels between network nodes are determined, including: Based on the mapping relationship between at least two Internet Protocol addresses of the first network node and the second network node and the network interface card (NIC), a network connection channel is established between the Internet Protocol addresses of the first network node and the second network node corresponding to the same NIC.
4. The method according to claim 3, characterized in that, Communication status detection between network nodes is performed through at least two network connection channels, including: Perform communication status detection on the network connection channel corresponding to the current network card between the first network node and the second network node; If the communication status detection result of the network connection channel corresponding to the current network card is determined to be communication failure, then the communication status detection is performed on the network connection channel corresponding to the next network card until the communication status detection result is determined to be communication success, or the communication status detection of the network connection channels corresponding to all network cards is completed.
5. The method according to claim 1, characterized in that, Convert communication state detection messages into communication state detection messages of at least two Internet Protocol (IP) types, including: The message forwarder converts the first Internet Protocol (IP) type communication status detection message sent by the network node into a second Internet Protocol (IP) type communication status detection message. The method further includes: A network node that receives communication status detection messages of at least two Internet Protocol types sent by a message forwarder processes the communication status detection message of the Internet Protocol type that matches it.
6. The method according to claim 1, characterized in that, The Internet Protocol address includes Internet Protocol addresses of at least two Internet Protocol types.
7. The method according to claim 1 or 6, characterized in that, Based on the communication status detection results of each network connection channel between network nodes, determine whether the communication status of the network nodes is normal, including: If the communication status detection results of each network connection channel between the target network node and at least two other network nodes are all communication failures, then the communication status of the target network node is determined to be abnormal, and the target network node is a faulty node.
8. A communication status detection device, characterized in that, include: The network connection channel determination module is used to determine at least two network connection channels between network nodes by using the mapping relationship between at least two Internet Protocol addresses and network interface cards of each network node; The communication status detection module is used to detect the communication status between network nodes through at least two network connection channels between network nodes; Specifically, when performing communication status detection between network nodes, the communication status detection message is converted into a communication status detection message of at least two Internet protocol types. The network node communication status judgment module is used to determine whether the communication status of the network nodes is normal based on the communication status detection results of each network connection channel between network nodes.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the communication status detection method as described in any one of claims 1-7.
10. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the communication status detection method as described in any one of claims 1-7.
Citation Information
Patent Citations
System, method and equipment for monitoring state of network channel and storage medium
CN114760224A
Video stream monitoring method and device, computer equipment and storage medium
CN116232728A