A communication connection method, apparatus, communication system, device, medium and product

By obtaining the target network address, determining the network segment, and filtering virtual network cards, a target virtual network card is created to solve the problem of low network communication connection efficiency between the network video recorder and the network camera, thus achieving automated and efficient connection.

CN116846952BActive Publication Date: 2026-07-07TOPSEE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TOPSEE TECH CO LTD
Filing Date
2023-07-28
Publication Date
2026-07-07

Smart Images

  • Figure CN116846952B_ABST
    Figure CN116846952B_ABST
Patent Text Reader

Abstract

The application discloses a communication connection method and device, a communication system, equipment, a medium and a product, and relates to the technical field of network communication. The communication connection method comprises the following steps: determining whether a preset communication device can directly perform network communication connection with a target communication device by a preset network address and a target network address; if the preset communication device cannot directly perform the network communication connection, screening a preset virtual network card according to the target network address; if the screening result is that there is no matched preset virtual network card, performing connection test on the target communication device by a preset connection test module; if it is determined that the connection is successful, creating a first target virtual network card according to the target network address, and establishing the communication connection between the preset communication device and the target communication device by the first target virtual network card. The communication connection method can improve the efficiency of establishing the network communication connection between the network video recorder and the network camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, and in particular to a communication connection method, apparatus, communication system, equipment, medium and product. Background Technology

[0002] In related technologies, network video recorders (VVRs) can establish network communication connections with multiple network cameras. Different network cameras have different network addresses, so after replacing a network camera, the network address configuration of the VVR needs to be manually modified accordingly. However, when many network cameras are replaced, manually modifying the network address configuration becomes overly cumbersome, thus affecting the efficiency of establishing network communication connections between the VVR and the network cameras. Therefore, how to provide a communication connection method to improve the efficiency of establishing network communication connections between VVRs and network cameras has become an urgent technical problem to be solved. Summary of the Invention

[0003] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a communication connection method that can improve the efficiency of establishing a network communication connection between a network video recorder and a network camera.

[0004] The present invention also proposes a communication system, a communication connection device, an electronic device applying the above-described communication connection method, a computer-readable storage medium applying the above-described communication connection method, and a computer program product.

[0005] A communication connection method according to a first aspect of the present invention is applied to a preset communication device, the preset communication device being used to establish a communication connection with a target communication device, the method comprising:

[0006] Obtain the target network address of the target communication device;

[0007] A network segment determination operation is performed based on a preset network address and the target network address to obtain a network segment determination result; wherein, the preset network address is the network address of the preset communication device;

[0008] If the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, the preset virtual network card is filtered according to the target network address to obtain the network card filtering result;

[0009] If the network card filtering result indicates that the network address of the preset virtual network card is different from the target network address, a connection test operation is performed on the target communication device according to the preset connection test module to obtain the first connection test result;

[0010] If the first connection test result indicates that the connection test module has failed to connect to the target communication device, a first target virtual network card is created based on the target network address; wherein, the network address of the first target virtual network card is the target network address;

[0011] A communication connection is established between the first target virtual network card and the target communication device.

[0012] The communication connection method according to embodiments of the present invention has at least the following beneficial effects: By obtaining a preset network address and a target network address, it is determined whether a preset communication device can directly establish a network communication connection with a target communication device. If a direct connection is not possible, a preset virtual network interface card (NIC) is filtered based on the target network address to search for a NIC that matches the target network address. If no matching NIC exists, a connection test is performed on the target communication device using a preset connection test module to determine whether the target communication device is in the upstream network of the local area network of the preset communication device. If the target communication device is not in the aforementioned upstream network, a first target virtual NIC is created based on the target network address, and a communication connection is established between the preset communication device and the target communication device using the first target virtual NIC. This communication connection method enables the preset communication device and the target communication device to quickly establish a network communication connection, thereby improving the efficiency of establishing a network communication connection between a network video recorder and a network camera.

[0013] According to some embodiments of the present invention, a target communication device that needs to be disconnected from communication is designated as a device to be uninstalled, a target communication device that does not need to be disconnected from communication is designated as a standby device, the target network address of the device to be uninstalled is designated as the network address to be uninstalled, the target network address of the standby device is designated as the standby network address, and a preset virtual network card with the same network address as the device to be uninstalled is designated as the network card to be uninstalled; the method further includes: disconnecting the communication connection between the device to be uninstalled and the preset communication device according to an uninstallation device instruction, specifically including:

[0014] The connection status between the device to be uninstalled and the preset virtual network card is detected according to the uninstallation device instruction;

[0015] If the connection status indicates that the device to be uninstalled is in communication connection with the preset virtual network card, obtain the network address to be uninstalled;

[0016] The standby devices are filtered based on the network addresses to be uninstalled, and the device filtering results are obtained.

[0017] If the device screening result indicates that the standby network address is different from the network address to be uninstalled, the network card to be uninstalled is uninstalled to disconnect the communication connection between the device to be uninstalled and the preset communication device.

[0018] According to some embodiments of the present invention, establishing a communication connection between the first target virtual network interface card and the target communication device specifically includes:

[0019] The connection test module performs a connection test operation between the first target virtual network card and the target communication device to obtain a second connection test result.

[0020] A communication connection is established with the target communication device based on the results of the second connection test.

[0021] According to some embodiments of the present invention, establishing a communication connection between the preset communication device and the target communication device based on the second connection test result includes:

[0022] If the second connection test result indicates that the first target virtual network card is successfully connected to the target communication device, a communication connection is established between the first target virtual network card and the target communication device.

[0023] If the second connection test result indicates that the first target virtual network card failed to connect with the target communication device, the first target virtual network card is uninstalled and a connection failure message is generated.

[0024] According to some embodiments of the present invention, the communication connection method further includes:

[0025] If the network card filtering result indicates that the network address of the preset virtual network card is the same as the target network address, the preset virtual network card with the same network address as the target network address is used as the second target virtual network card;

[0026] The preset communication device establishes a communication connection with the target communication device based on the second target virtual network card.

[0027] A communication system according to a second aspect of the present invention includes:

[0028] switch;

[0029] A target communication device, wherein the target communication device is used to communicate with the switch;

[0030] A preset communication device is provided, which is used to communicate with a switch. The preset communication device is used to obtain a target network address through the switch, so as to execute the communication connection method of the first aspect embodiment above based on the target network address.

[0031] The communication system according to the embodiments of the present invention has at least the following beneficial effects: by adopting the above-described communication connection method, the communication system enables a preset communication device and a target communication device to quickly establish a network communication connection, thereby improving the efficiency of establishing a network communication connection between a network video recorder and a network camera.

[0032] A communication connection device according to a third aspect embodiment of the present invention includes:

[0033] A network address acquisition module, wherein the network address acquisition module is used to acquire the target network address of the target communication device;

[0034] A network segment determination module is used to perform a network segment determination operation based on a preset network address and the target network address to obtain a network segment determination result; wherein, the preset network address is the network address of the preset communication device;

[0035] A network card filtering module is used to filter the preset virtual network card according to the target network address if the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, thereby obtaining the network card filtering result;

[0036] A connection test module is used to perform a connection test operation on the target communication device according to the preset connection test module if the network card filtering result indicates that the network address of the preset virtual network card is different from the target network address, and to obtain a first connection test result.

[0037] A virtual network interface card (NIC) creation module is configured to create a first target virtual NIC based on the target network address if the first connection test result indicates that the connection test module has failed to connect with the target communication device; wherein the network address of the first target virtual NIC is the target network address.

[0038] A communication establishment module is used to establish a communication connection with the target communication device based on the first target virtual network card.

[0039] An electronic device according to a fourth aspect embodiment of the present invention includes:

[0040] At least one memory;

[0041] At least one processor;

[0042] At least one calculation program;

[0043] The calculation program is stored in the memory, and the processor executes the at least one calculation program to implement the communication connection method of the first aspect embodiment described above.

[0044] A computer-readable storage medium according to a fifth aspect embodiment of the present invention includes:

[0045] The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the communication connection method of the first aspect embodiment described above.

[0046] According to a sixth aspect of the present invention, the computer program product includes a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the communication connection method described in the first aspect of the present invention.

[0047] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0048] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:

[0049] Figure 1 This is a flowchart of a first specific embodiment of the communication connection method of the present invention;

[0050] Figure 2 This is a flowchart of a second specific embodiment of the communication connection method of the present invention;

[0051] Figure 3 for Figure 1 A flowchart illustrating the specific method of step S160;

[0052] Figure 4 This is a flowchart of a third specific embodiment of the communication connection method of the present invention;

[0053] Figure 5 This is a flowchart illustrating the specific method for disconnecting the device to be unloaded in the communication connection method of the present invention.

[0054] Figure 6 This is a flowchart illustrating the communication connection method according to an embodiment of the present invention.

[0055] Figure 7 A module block diagram of a communication connection device provided in an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention.

[0057] Figure label:

[0058] The network address acquisition module 110, network segment judgment module 120, network card filtering module 130, connection test module 140, virtual network card creation module 150, communication establishment module 160, processor 210, memory 220, input / output interface 230, communication interface 240, and bus 250 are included. Detailed Implementation

[0059] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0060] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0061] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0062] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0063] In related technologies, network video recorders (VVRs) can establish network communication connections with multiple network cameras. Different network cameras have different network addresses, so after replacing a network camera, the network address configuration of the VVR needs to be manually modified accordingly. However, when many network cameras are replaced, manually modifying the network address configuration becomes overly cumbersome, thus affecting the efficiency of establishing network communication connections between the VVR and the network cameras. Therefore, how to provide a communication connection method to improve the efficiency of establishing network communication connections between VVRs and network cameras has become an urgent technical problem to be solved.

[0064] Based on this, embodiments of the present invention provide a communication connection method, apparatus, communication system, device, medium, and product, which can improve the efficiency of establishing a network communication connection between a network video recorder and a network camera.

[0065] It should be noted that in the following embodiments, a network video recorder is used as the preset communication device, and a network camera is used as the target communication device for illustrative purposes. However, it should be understood that other types of network communication devices should also fall within the protection scope of the embodiments of this invention.

[0066] like Figure 1 As shown, this embodiment of the invention provides a communication connection method, which is applied to a preset communication device, and the preset communication device establishes a communication connection with a target communication device. This communication connection method includes, but is not limited to, steps S110 to S160, which will be described in detail below.

[0067] Step S110: Obtain the target network address of the target communication device;

[0068] Step S120: Perform a network segment determination operation based on the preset network address and the target network address to obtain the network segment determination result; wherein, the preset network address is the network address of the preset communication device;

[0069] Step S130: If the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, filter the preset virtual network card according to the target network address to obtain the network card filtering result;

[0070] Step S140: If the network card filtering result indicates that the network address of the preset virtual network card is different from the target network address, perform a connection test operation on the target communication device according to the preset connection test module to obtain the first connection test result;

[0071] Step S150: If the first connection test result indicates that the connection test module fails to connect with the target communication device, create a first target virtual network card based on the target network address; wherein, the network address of the first target virtual network card is the target network address;

[0072] Step S160: Establish a communication connection between the first target virtual network card and the target communication device.

[0073] According to the communication connection method of this embodiment, by acquiring a preset network address and a target network address, it is determined whether a preset communication device can directly establish a network communication connection with a target communication device. If a direct connection is not possible, a preset virtual network interface card (NIC) is filtered based on the target network address to search for a NIC that matches the target network address. If no matching NIC exists, a connection test is performed on the target communication device using a preset connection test module to determine whether the target communication device is in the upstream network of the local area network of the preset communication device. If the target communication device is not in the upstream network, a first target virtual NIC is created based on the target network address, and a communication connection is established between the preset communication device and the target communication device using the first target virtual NIC. This communication connection method enables the preset communication device and the target communication device to quickly establish a network communication connection, thereby improving the efficiency of establishing a network communication connection between a network video recorder and a network camera.

[0074] In step S110 of some embodiments, the preset communication device and the target communication device can establish a physical connection in advance via a connection method such as a network cable connection. The target network address includes the IP address and subnet mask of the target communication device. For example, the obtained target network address may have an IP address of 192.168.1.20 and a subnet mask of 255.255.255.0.

[0075] In step S120 of some embodiments, the preset network address includes the IP address and subnet mask of the preset communication device. For example, the IP address of the obtained preset network address can be 192.168.1.10 and the subnet mask can be 255.255.255.0.

[0076] After obtaining the preset network address and the target network address, it is determined whether the network segment of the preset network address and the network segment of the target network address are the same, thus obtaining the network segment determination result. This can be achieved by performing a bitwise AND operation on the IP address and subnet mask of the network address to obtain the network segment addresses of the preset network address and the target network address, respectively, for network segment determination. For example, if the IP address of the preset network address is 192.168.1.10 and the subnet mask is 255.255.255.0, performing a bitwise AND operation on the IP address and subnet mask yields the network segment address 192.168.1.0. Similarly, if the IP address of the target network address is 192.168.2.30 and the subnet mask is 255.255.255.0, performing a bitwise AND operation on the IP address and subnet mask yields the network segment address 192.168.2.0. As can be seen, the network segment address 192.168.1.0 of the preset network address is different from the network segment address 192.168.2.0 of the target network address. The network segment determination result at this point indicates that the network segments of the preset and target networks are not the same. When the network segments of the preset and target networks are the same, it means that the network address of the physical network card of the preset communication device matches the network address of the target communication device. In this case, the preset communication device can directly establish a network communication connection with the target communication device using its physical network card.

[0077] In step S130 of some embodiments, when the network segment of the preset network address is different from the network segment of the target network address, it indicates that the network address of the physical network card of the preset communication device does not match the network address of the target communication device, and the preset communication device cannot establish a network communication connection with the target communication device using the physical network card. At this time, the preset virtual network cards pre-configured in the preset communication device are filtered using the target network address to determine whether the network address of the preset virtual network card is the same as the target network address, thereby obtaining the network card filtering result.

[0078] The preset communication device can be pre-configured with multiple preset virtual network cards. When the network address of any preset virtual network card is the same as the target network address, the network card filtering result is obtained, indicating that the network address of the preset virtual network card is the same as the target network address. When the network addresses of all preset virtual network cards are different from the target network address, the network card filtering result is obtained, indicating that the network address of the preset virtual network card is different from the target network address.

[0079] like Figure 4 As shown, in some embodiments of the present invention, the communication connection method further includes, but is not limited to, steps S210 and S220, which will be described in detail below.

[0080] Step S210: If the network card filtering result indicates that the network address of the preset virtual network card is the same as the target network address, the preset virtual network card with the same network address as the target network address is used as the second target virtual network card;

[0081] Step S220: Establish a communication connection between the preset communication device and the target communication device based on the second target virtual network card.

[0082] In step S210 of some embodiments, when the network card filtering result indicates that the network address of the preset virtual network card is the same as the target network address, it indicates that the network address of the preset virtual network card matches the network address of the target communication device. At this time, the preset virtual network card is used as the second target virtual network card.

[0083] In step S220 of some embodiments, after determining the second target virtual network card, since the network address of the second target virtual network card is in the same network segment as the target network address of the target communication device, the preset communication device can establish a communication connection with the target communication device based on the second target virtual network card.

[0084] In step S140 of some embodiments, when the network card screening result indicates that the network address of the preset virtual network card is different from the target network address, it means that the network address of the preset virtual network card does not match the network address of the target communication device, and the preset communication device cannot establish a communication connection with the target communication device using the preset virtual network card. At this time, the connection test module of the preset communication device is used to perform a connection test on the target communication device to determine whether the target communication device is in the same local area network as the preset communication device and its parent network, thereby obtaining the first connection test result.

[0085] The connection test module can create a socket based on the target network address and port number of the target communication device, and then use this socket to attempt a network connection with the target communication device. When the first connection test result shows that the connection test module has successfully connected with the target communication device, it indicates that the target communication device's network address is in the same upstream network as the preset communication device on the same local area network. At this point, it is not necessary to create a new virtual network card. Instead, the preset communication device sends a connection request to the gateway, and the gateway establishes a communication connection between the preset communication device and the target communication device based on the connection request.

[0086] In step S150 of some embodiments, when the first connection test result indicates that the connection test module fails to connect with the target communication device, it indicates that the target communication device is not in the upstream network of the preset communication device and cannot be connected via the gateway. At this time, a first target virtual network interface card (NIC) is created in the same network segment as the target network address. This first target virtual NIC can be created using system control commands of the preset communication device. For example, the system command "ifconfig eth0:2192.168.2.10" can be used to create the first target virtual NIC, where "eth0" is the name of the physical NIC on which the first target virtual NIC resides, "eth0:2" is the name of the first target virtual NIC, and "192.168.2.10" is the network address of the first target virtual NIC.

[0087] In step S160 of some embodiments, after the first target virtual network card is created, since the network address of the first target virtual network card is in the same network segment as the target network address of the target communication device, the preset communication device can establish a communication connection with the target communication device based on the first target virtual network card.

[0088] like Figure 3 As shown, in some embodiments of the present invention, step S160 includes, but is not limited to, steps S310 and S320, which will be described in detail below.

[0089] Step S310: Perform a connection test operation between the first target virtual network card and the target communication device according to the connection test module, and obtain the second connection test result;

[0090] Step S320: Establish a communication connection with the target communication device based on the results of the second connection test.

[0091] In step S310 of some embodiments, after creating the first target virtual network interface card (NIC), a connection test module is used to test whether the first target virtual NIC can connect to the target communication device, thereby obtaining a second connection test result. The connection test module creates a socket based on the target network address and port number of the target communication device, and uses the socket to attempt to establish a network connection between the first target virtual NIC and the target communication device.

[0092] In step S320 of some embodiments, after obtaining the second connection test result, a communication connection between the preset communication device and the target communication device can be established using the first target virtual network card based on the second connection test result.

[0093] The following is a detailed description of step S320. For example... Figure 4 As shown, in some embodiments of the present invention, step S320 includes, but is not limited to, steps S410 and S420, which will be described in detail below.

[0094] Step S410: If the second connection test result indicates that the first target virtual network card and the target communication device are successfully connected, establish a communication connection between the first target virtual network card and the target communication device;

[0095] Step S420: If the second connection test result indicates that the first target virtual network card failed to connect with the target communication device, uninstall the first target virtual network card and generate a connection failure message.

[0096] In step S410 of some embodiments, when the second connection test result indicates that the first target virtual network card and the target communication device are successfully connected, it means that the network address of the first target virtual network card and the target network address of the target communication device are matched in terms of network segment. The preset communication device establishes a communication connection with the target communication device based on the first target virtual network card. For example, if the network address of the first target virtual network card is 192.168.2.10 and the IP address of the target network address is 192.168.2.30, it can be seen that the network segment of both the first target virtual network card and the target communication device is "192.168.2.0". At this time, the preset communication device can establish a communication connection with the target communication device based on the first target virtual network card.

[0097] In step S420 of some embodiments, when the second connection test result indicates that the connection between the first target virtual network card and the target communication device has failed, since factors such as network segment mismatch and the target communication device's network address possibly being in the upstream network of the preset communication device have been ruled out, this indicates that the target communication device required by the preset communication device does not exist, and therefore a network connection cannot be established. At this time, a connection failure message is generated to indicate that the target communication device does not exist.

[0098] like Figure 5 As shown, in some embodiments of the present invention, the target communication device that needs to be disconnected is designated as the device to be uninstalled, the target communication device that does not need to be disconnected is designated as the standby device, the target network address of the device to be uninstalled is designated as the network address to be uninstalled, the target network address of the standby device is designated as the standby network address, and a preset virtual network card with the same network address as the device to be uninstalled is designated as the network card to be uninstalled. The communication connection method further includes disconnecting the communication connection between the device to be uninstalled and the preset communication device according to the uninstallation device instruction, specifically including but not limited to steps S510 to S540, which are described in detail below.

[0099] Step S510: Detect the connection status between the device to be uninstalled and the preset virtual network card according to the uninstallation device command;

[0100] Step S520: If the connection status indicates that the device to be uninstalled is connected to the preset virtual network card, obtain the network address to be uninstalled;

[0101] Step S530: Perform a filtering operation on the devices to be uninstalled based on the network address to obtain the device filtering results;

[0102] Step S540: If the device screening result indicates that the standby network address is different from the network address to be uninstalled, uninstall the network card to be uninstalled to disconnect the communication connection between the device to be uninstalled and the preset communication device.

[0103] In step S510 of some embodiments, the uninstallation device command can be obtained manually via a touch device such as a keyboard and mouse. After obtaining the uninstallation device command, it is detected whether there is a communication connection between the device to be uninstalled and the preset virtual network card, thereby determining whether the device to be uninstalled is already in the uninstallation state. When it is detected that there is no communication connection between the device to be uninstalled and the preset virtual network card, the physical connection between the device to be uninstalled and the preset communication device can be directly disconnected.

[0104] In step S520 of some embodiments, when it is detected that the device to be uninstalled is still in a communication connection with the preset virtual network card, the network address of the device to be uninstalled is obtained.

[0105] In step S530 of some embodiments, after obtaining the network address to be uninstalled, the network address to be uninstalled is compared with the target network address of the standby device to determine whether there is a standby device with the same target network address as the network address to be uninstalled, thereby obtaining a device filtering result. If the obtained device filtering result indicates that the standby network address is the same as the network address to be uninstalled, that is, there is a standby device with the same target network address as the network address to be uninstalled, it indicates that the preset virtual network card is still being used to communicate with the standby device, and it is not necessary to uninstall the preset virtual network card.

[0106] In step S540 of some embodiments, if the obtained device filtering result indicates that the standby network address and the network address to be uninstalled are different, that is, there is no standby device with the same target network address as the network address to be uninstalled, it indicates that the preset virtual network card is already in an idle state. At this time, the preset virtual network card with the same network address as the device to be uninstalled is designated as the network card to be uninstalled, and the network card to be uninstalled is uninstalled, thereby disconnecting the communication connection between the device to be uninstalled and the preset communication device.

[0107] In one specific embodiment of the present invention, Figure 6 This is a flowchart of the communication connection method. Each step in the flowchart has been described in detail in the above embodiments. For details, please refer to the description of each step in the above embodiments.

[0108] This invention also provides a communication system comprising: a switch, a target communication device, and a preset communication device. The target communication device is used to communicate with the switch, and the preset communication device is used to communicate with the switch. The preset communication device is used to obtain a target network address through the switch, and to execute the communication connection method as described in any of the above embodiments based on the target network address.

[0109] Specifically, the switch can establish electrical connections between the pre-set communication devices and the target communication devices through connection methods such as network cable connections, and the switch can assist in data transmission between the pre-set communication devices and the target communication devices.

[0110] It is evident that the content of the above communication connection method embodiments is applicable to this communication system embodiment. The specific functions implemented in this communication system embodiment are the same as those in the above communication connection method embodiments, and the beneficial effects achieved are also the same as those achieved in the above communication connection method embodiments.

[0111] like Figure 7 As shown, embodiments of the present invention also provide a communication connection device, including:

[0112] The network address acquisition module 110 is used to acquire the target network address of the target communication device.

[0113] The network segment determination module 120 is used to perform a network segment determination operation based on a preset network address and the target network address to obtain a network segment determination result; wherein, the preset network address is the network address of the preset communication device;

[0114] The network card filtering module 130 is used to filter the preset virtual network card according to the target network address if the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, and obtain the network card filtering result.

[0115] The connection test module 140 is used to perform a connection test operation on the target communication device according to the preset connection test module if the network card screening result indicates that the network address of the preset virtual network card is different from the target network address, and to obtain the first connection test result.

[0116] The virtual network interface card (NIC) creation module 150 is used to create a first target virtual NIC based on the target network address if the first connection test result indicates that the connection test module and the target communication device have failed to connect; wherein, the network address of the first target virtual NIC is the target network address;

[0117] The communication establishment module 160 is used to establish a communication connection with the target communication device based on the first target virtual network card.

[0118] It is evident that the content of the above communication connection method embodiments is applicable to this communication connection device embodiment. The specific functions implemented by this communication connection device embodiment are the same as those of the above communication connection method embodiments, and the beneficial effects achieved are also the same as those achieved by the above communication connection method embodiments.

[0119] The following is combined Figure 8 The electronic device according to embodiments of the present invention will be described in detail.

[0120] like Figure 8 , Figure 8 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0121] The processor 210 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.

[0122] The memory 220 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 220 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220 and is called and executed by the processor 210 to execute the communication connection method of the embodiments of this disclosure.

[0123] Input / output interface 230 is used to implement information input and output;

[0124] The communication interface 240 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0125] Bus 250 transmits information between various components of the device (e.g., processor 210, memory 220, input / output interface 230, and communication interface 240);

[0126] The processor 210, memory 220, input / output interface 230 and communication interface 240 are connected to each other within the device via bus 250.

[0127] This invention also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the communication connection method as described in any of the above embodiments.

[0128] It is evident that the content of the above communication connection method embodiments is applicable to the present computer-readable storage medium embodiments. The specific functions implemented by the present computer-readable storage medium embodiments are the same as those of the above communication connection method embodiments, and the beneficial effects achieved are also the same as those achieved by the above communication connection method embodiments.

[0129] This invention also provides a computer program product, which includes a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the communication connection method as described in any of the above embodiments.

[0130] It is evident that the content of the above communication connection method embodiments is applicable to the present computer program product embodiments. The specific functions implemented by the present computer program product embodiments are the same as those of the above communication connection method embodiments, and the beneficial effects achieved are also the same as those achieved by the above communication connection method embodiments.

[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0133] The terms "first," "second," "third," "fourth," etc. (if present) in the specification 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 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 a non-exclusive inclusion; for example, a process, method, system, product, or apparatus 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 apparatus.

[0134] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0135] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present disclosure. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present disclosure shall be within the scope of the claims of the present disclosure.

[0140] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.

Claims

1. A communication connection method, characterized in that, The method is applied to a preset communication device, which is used to communicate with a target communication device, and includes: Obtain the target network address of the target communication device; A network segment determination operation is performed based on a preset network address and the target network address to obtain a network segment determination result; wherein, the preset network address is the network address of the preset communication device; If the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, the preset virtual network card is filtered according to the target network address to obtain the network card filtering result; If the network card filtering result indicates that the network address of the preset virtual network card is different from the target network address, a connection test operation is performed on the target communication device according to the preset connection test module to obtain the first connection test result; If the first connection test result indicates that the connection test module has failed to connect to the target communication device, a first target virtual network card is created based on the target network address; wherein, the network address of the first target virtual network card is the target network address; A communication connection is established between the first target virtual network card and the target communication device.

2. The communication connection method according to claim 1, characterized in that, The target communication device that needs to be disconnected is designated as the device to be uninstalled, the target communication device that does not need to be disconnected is designated as the standby device, the target network address of the device to be uninstalled is designated as the network address to be uninstalled, the target network address of the standby device is designated as the standby network address, and the preset virtual network card with the same network address as the device to be uninstalled is designated as the network card to be uninstalled. The method further includes: disconnecting the communication connection between the device to be uninstalled and the preset communication device according to the uninstallation device instruction, specifically including: The connection status between the device to be uninstalled and the preset virtual network card is detected according to the uninstallation device instruction; If the connection status indicates that the device to be uninstalled is in communication connection with the preset virtual network card, obtain the network address to be uninstalled; The standby devices are filtered based on the network addresses to be uninstalled, and the device filtering results are obtained. If the device screening result indicates that the standby network address is different from the network address to be uninstalled, the network card to be uninstalled is uninstalled to disconnect the communication connection between the device to be uninstalled and the preset communication device.

3. The communication connection method according to claim 1, characterized in that, The step of establishing a communication connection between the first target virtual network card and the target communication device specifically includes: The connection test module performs a connection test operation between the first target virtual network card and the target communication device to obtain a second connection test result. Based on the second connection test result, a communication connection is established between the preset communication device and the target communication device.

4. The communication connection method according to claim 3, characterized in that, The step of establishing a communication connection between the preset communication device and the target communication device based on the second connection test result includes: If the second connection test result indicates that the first target virtual network card is successfully connected to the target communication device, a communication connection is established between the first target virtual network card and the target communication device. If the second connection test result indicates that the first target virtual network card failed to connect with the target communication device, the first target virtual network card is uninstalled and a connection failure message is generated.

5. The communication connection method according to any one of claims 1 to 4, characterized in that, Also includes: If the network card filtering result indicates that the network address of the preset virtual network card is the same as the target network address, the preset virtual network card with the same network address as the target network address is used as the second target virtual network card; The preset communication device establishes a communication connection with the target communication device based on the second target virtual network card.

6. A communication system, characterized in that, include: switch; A target communication device, wherein the target communication device is used to communicate with the switch; A preset communication device is used to communicate with a switch, and the preset communication device is used to obtain a target network address through the switch, so as to execute the communication connection method as described in any one of claims 1 to 5 according to the target network address.

7. A communication connection device, characterized in that, Configured in a preset communication device, including: A network address acquisition module, wherein the network address acquisition module is used to acquire the target network address of the target communication device; A network segment determination module is used to perform a network segment determination operation based on a preset network address and the target network address to obtain a network segment determination result; wherein, the preset network address is the network address of the preset communication device; A network card filtering module is used to filter the preset virtual network card according to the target network address if the network segment judgment result indicates that the network segments between the preset network address and the target network address are different, thereby obtaining the network card filtering result; A connection test module is used to perform a connection test operation on the target communication device according to the preset connection test module if the network card filtering result indicates that the network address of the preset virtual network card is different from the target network address, and to obtain a first connection test result. A virtual network interface card (NIC) creation module is configured to create a first target virtual NIC based on the target network address if the first connection test result indicates that the connection test module has failed to connect with the target communication device; wherein the network address of the first target virtual NIC is the target network address. A communication establishment module is used to establish a communication connection with the target communication device based on the first target virtual network card.

8. An electronic device, characterized in that, include: At least one memory; At least one processor; At least one computer program; The computer program is stored in the memory, and the processor executes the at least one computer program to implement the communication connection method as described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the communication connection method as described in any one of claims 1 to 5.

10. A computer program product comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the communication connection method as described in any one of claims 1 to 5.