[go: up one dir, main page]

CN113992578B - Method, device, equipment and storage medium for switching servers of cloud desktop terminal - Google Patents

Method, device, equipment and storage medium for switching servers of cloud desktop terminal Download PDF

Info

Publication number
CN113992578B
CN113992578B CN202111054529.8A CN202111054529A CN113992578B CN 113992578 B CN113992578 B CN 113992578B CN 202111054529 A CN202111054529 A CN 202111054529A CN 113992578 B CN113992578 B CN 113992578B
Authority
CN
China
Prior art keywords
network
server
address
interface
reachable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111054529.8A
Other languages
Chinese (zh)
Other versions
CN113992578A (en
Inventor
黄明敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202111054529.8A priority Critical patent/CN113992578B/en
Publication of CN113992578A publication Critical patent/CN113992578A/en
Application granted granted Critical
Publication of CN113992578B publication Critical patent/CN113992578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for switching servers of cloud desktop terminals, which are used for solving the technical problem of low detection efficiency of the cloud desktop terminal equipment when multi-network switching is performed. In the invention, after network switching, the upper layer application acquires the network interface address according to the network interface address change event reported by the network card, and matches the interface network segment address in the switching information table, the corresponding relation among the server, the interface network segment address and the DNS address is recorded in the switching information table, if the matching is successful, a network connectivity detection tool is used for detecting whether the server corresponding to the interface network segment address can be connected, and if the server corresponding to the interface network segment address can be connected, the corresponding server is connected. The network detection method and the network detection device effectively shorten the network detection time when the cloud desktop terminal performs network switching, improve the network identification efficiency and further improve the network switching efficiency.

Description

Method, device, equipment and storage medium for switching servers of cloud desktop terminal
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching servers of a cloud desktop terminal.
Background
When a user has two networks and requires complete isolation between the networks, the cloud desktop dual-network function can be used. The cloud desktop dual-network function is based on a virtual desktop infrastructure (VDI, virtual Desktop Infrastructure, virtual desktop infrastructure) mainstream in the industry, integrates functions and advantages of a carrier-level virtualization platform CAS product, can host a user desktop environment to a high-performance server in a data center in a virtual machine mode, and is isolated on a back-end server. An administrator can realize visual convenient management of all cloud desktop resources, and can rapidly deploy cloud desktops in batches to meet the requirements of a large number of users. The user can conveniently finish tasks such as daily office work and management by using the cloud desktop of the user through various terminals such as a PC, a thin terminal and the like.
The dual-network function supports the user to connect two management platforms in different networks, only one of the networks is allowed to be started at the same time, and the cloud desktop authorized by the corresponding management platform is connected. The dual-network isolation function is that the single-network card thin terminal equipment switches networks by means of a network switcher, and the management platform switching function in different networks is completed.
Through the network switcher, the terminal equipment can flexibly and conveniently switch between the network A and the network B, and the cloud desktop function is automatically connected by utilizing the terminal program, so that a user can flexibly and conveniently switch the cloud desktop.
In the above-mentioned dual-network isolated use scenario, the network switcher may switch continuously a plurality of times, and after stopping the switching, the terminal device cannot or is not easy to determine the current network and the corresponding server to be connected. Network identification efficiency becomes a key point of cloud desktop switching performance.
Assuming that both network a and network B use DHCP dynamic networks, both switches connected directly to the terminal configure edge ports to speed up terminal dynamic address allocation. When the physical network switch is switched, the state of the physical network card of the terminal is switched, and the address is reassigned. The terminal system informs the upper layer application network address to switch, the application program detects the network and selects the server, connects the server where the current network is located and resumes the service.
Based on the scheme, the high efficiency of the network method is detected by the application program, and the network switching efficiency is directly affected.
Assuming that the application program configures two management platform addresses, a management platform address and a management platform address, the existing network detection method comprises the following steps:
(1) And the network Ping server A address, if the A server can be Ping-enabled, the switching to the network where the server A is located, and triggering the client to log in the server address A. If the A server cannot conduct Ping communication within a certain number of times and time range, executing the step (2).
(2) And the address of the network Ping server B, if the B server can be turned on, switching to the network where the server B is located, and triggering the client to log in the server address B. If the B server cannot be turned on by Ping within a certain number of times and time range, executing the step (1).
Repeating (1) and (2) for a plurality of times, wherein the server of Ping is not available for A or B, and the correct server cannot be selected.
According to the method, in the case that the Dynamic Host Configuration Protocol (DHCP) address is used by both networks, except that the network link does have a problem, the correct server A or B can be selected.
In the detection scheme, the network where the detection A, B server is located has blindness, the Ping operation is used for detection, the asynchronous message interaction time is long, and the detection efficiency is low.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, device and storage medium for switching servers of a cloud desktop terminal, which are used for solving the technical problem of low detection efficiency when the cloud desktop terminal device performs multi-network switching.
Based on one aspect of the embodiment of the invention, the invention provides a method for switching servers of a cloud desktop terminal, which is applied to cloud desktop terminal equipment, wherein the terminal equipment externally presents two network ports, a physical network card, namely a local network card, is configured in the terminal equipment, and a network switcher is used for switching networks, and the method comprises the following steps:
after receiving a network interface address change event notification reported by a local network card, acquiring a network interface address of the local network card; the network interface address change event is reported to an upper layer application program by the local network card when the network switcher is switched;
matching the interface network segment address in the switching information table by using the acquired network interface address; the switching information table is used for storing the corresponding relation among the server address, the interface network segment address of the network where the server is located and the DNS address of the domain name server;
when the interface network segment address is matched, detecting whether a first server in a network to which the matched interface network segment address belongs is reachable or not by using a network connectivity detection tool;
in case the first server is reachable, connecting to the first server.
Further, the method further comprises:
detecting whether the first server is reachable using a network connectivity detection tool when the interface segment address is not matched;
under the condition that a first server is reachable, writing an interface network segment address and a DNS address of a network where a current network card is located into a record corresponding to the first server in the switching information table;
detecting, using a network connectivity detection tool, if the second server is reachable, if the first server is not reachable;
and under the condition that the second server is reachable, writing the interface network segment address and the DNS address of the network where the current network card is positioned into the record corresponding to the second server in the switching information table.
Further, the method further comprises: and recording the switching information table into a database or a local configuration file, and loading the switching information table into a memory during initialization.
Further, the method further comprises:
acquiring a server connected before network switching under the condition that the acquired network interface address is not matched with an interface network segment address in a switching information table;
in the case where the server connected before the handover is the first server, detecting whether the second server is reachable using a connectivity detection tool;
and when the second server is reachable, acquiring an interface network segment address and a DNS address of the network interface address of the current network card, and recording the interface network segment address and the DNS address into the switching information table.
Based on another aspect of the embodiment of the invention, the invention also provides a device for switching servers of cloud desktop terminals, which is applied to cloud desktop terminal equipment, wherein the terminal equipment externally presents two network ports, a physical network card, namely a local network card, is configured in the terminal equipment, and network switching is performed by using a network switcher; the device comprises:
the switching response module is used for acquiring the network interface address of the local network card after receiving the network interface address change event notification reported by the local network card; the network interface address change event is reported to an upper layer application program by the local network card when the network switcher is switched;
the switching information table is used for storing the corresponding relation among the server address, the interface network segment address of the network where the server is located and the DNS address of the domain name server;
the network matching module is used for matching the interface network segment address in the switching information table by using the acquired network interface address;
the server detection module is used for detecting whether a first server in a network to which the matched interface network segment address belongs is reachable or not by using the network connectivity detection tool when the interface network segment address is matched;
and the connection module is used for connecting to the first server in the condition that the first server is reachable.
Further, the server detection module is further configured to detect, when the interface network segment address is not matched, whether the first server is reachable by using a network connectivity detection tool;
under the condition that a first server is reachable, writing an interface network segment address and a DNS address of a network where a current network card is located into a record corresponding to the first server in the switching information table;
detecting, using a network connectivity detection tool, if the second server is reachable, if the first server is not reachable;
and under the condition that the second server is reachable, writing the interface network segment address and the DNS address of the network where the current network card is positioned into the record corresponding to the second server in the switching information table.
Further, the server detection module is further configured to record the switching information table into a database or a local configuration file, and load the switching information table into a memory during initialization.
Further, the server detection module is further configured to obtain a server connected before network switching, where the obtained network interface address is not matched with the interface network segment address in the switching information table;
in the case where the server connected before the handover is the first server, detecting whether the second server is reachable using a connectivity detection tool;
and when the second server is reachable, acquiring an interface network segment address and a DNS address of the network interface address of the current network card, and recording the interface network segment address and the DNS address into the switching information table.
In the technical scheme of the invention, after network switching, the upper layer application acquires a network interface address according to a network interface address change event reported by a network card, matches an interface network segment address in a switching information table, records the corresponding relation among a server, the interface network segment address and a DNS address in the switching information table, and uses a network connectivity detection tool to detect whether the server corresponding to the interface network segment address can be connected or not if the matching is successful, and connects the corresponding server if the server corresponding to the interface network segment address can be connected. The network detection method and the network detection device effectively shorten the network detection time when the cloud desktop terminal performs network switching, improve the network identification efficiency and further improve the network switching efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will briefly describe the drawings required to be used in the embodiments of the present invention or the description in the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to these drawings of the embodiments of the present invention for a person having ordinary skill in the art.
Fig. 1 is a schematic link structure diagram of a connection between a cloud desktop terminal device with a multi-network isolation function and a server according to an embodiment of the present invention;
fig. 2 is a schematic device structure diagram of a cloud desktop terminal switching server according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing a method for switching servers of a cloud desktop terminal according to an embodiment of the present invention.
Detailed Description
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of embodiments of the invention. As used in this embodiment of the invention, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used in this disclosure refers to any or all possible combinations comprising one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of embodiments of the present invention. Depending on the context, furthermore, the word "if" used may be interpreted as "at … …" or "at … …" or "in response to a determination".
The invention provides a method for switching servers by cloud desktop terminals, which aims to solve the technical problem that network switching detection speed of terminal equipment in a virtual desktop infrastructure VDI is low in a multi-network isolation scene.
Taking the case that the cloud desktop terminal is connected with two physical network isolated servers as an example, fig. 1 illustrates a link structure diagram of connection between the cloud desktop terminal device with a multi-network isolation function and the servers, a gigabit media access controller GMAC is integrated in a main board or a CPU of the cloud desktop terminal device (abbreviated as terminal device), the gigabit media access controller GMAC is connected with a physical network card (abbreviated as network card or PHY) through a reduced gigabit media independent interface RGMII, the PHY is connected with a physical network switcher (abbreviated as switcher) through a media related interface MDI, the network switcher is respectively connected with two physical interfaces rq45_1 and rq45_2 through MDI, and the network switcher can realize switching between two mutually isolated networks a and B under program or switch control. The invention does not limit the number of networks connected with the cloud desktop terminal, and can be more than 2, and correspondingly, the network switcher can also switch among more than 2 isolated networks.
In this embodiment, the terminal device presents two network ports to the outside, but only has one physical network card in the device, and uses the network switcher to switch the network. Only one logic network card exists in the operating system of the terminal equipment.
It is assumed that two virtual machines to be connected by the terminal device are a virtual machine a located on a server a (address 1.1.1.1) in a network a and a virtual machine B located on a server B (2.2.2.2) in a network B, respectively, and both networks adopt a dynamic host configuration protocol.
Before executing the method for switching servers of the cloud desktop terminal provided in this embodiment, a switching information table needs to be initialized and established, and the switching information table in the initial state is shown in table 1:
TABLE 1
Wherein the interface network segment address and the domain name server (Domain Name Server, DNS) address are obtained during execution of the method.
The following steps are step flows of the method for switching servers by using the cloud desktop terminal provided in this embodiment, where the step flows of the method are applied to an application program on a terminal device, and the application program may be a cloud desktop client, and the method includes:
step 201, the network switch switches, the network card on the terminal device generates a down/up event, the network interface address of the network card changes, and the network card reports the network interface address change event to the upper layer application program.
Step 202, after receiving the reported network interface address change event, the application program obtains the network interface address, matches the obtained network interface address with the interface network segment address recorded in table 1, in the initial state, the interface network segment address in table 1 is empty, and in the case of failure of matching, step 203 is executed.
Step 203, the application program obtains a DNS address, matches the DNS address of the record, and in the same way, in the initial state, the DNS address in table 1 is also empty, and if the matching fails, step 204 is executed.
Step 204, the application program uses a network connectivity detection tool (e.g. Ping program) to detect whether the server a is reachable, if the server a is reachable, it indicates that the current network has been switched to the network a where the server a is located, at this time, the interface network segment address of the interface network address of the current network card and the DNS address of the network a are obtained and recorded in the above table 1, and then the application program can connect to the server a.
Step 204, if the application program uses the connectivity detection tool to detect that the server A is not reachable, continuing to detect whether the server B is reachable, if so, indicating that the current network is switched to the network B where the server B is located, then acquiring the interface network segment address of the interface network address of the current network card and the DNS address of the network B, recording the interface network segment address and the DNS address of the network B in the table 1, and then connecting the application program to the server B.
After the network switching is successfully connected to the server A and the server B, the corresponding relation among the server address, the interface network segment address of the network where the local network card is currently located and the DNS address can be established through the switching information table, and the established corresponding relation can be used for fast switching when the network switching is performed next time. For example, table 2 illustrates an example of a handover information table after successfully acquiring information of network a and network B.
TABLE 2
Server address Network type Static address Interface network segment address DNS address acquisition mode DNS address
Server A (1.1.1.1) DHCP Without any means for 1.1.2.0/24 Automatic acquisition of 5.5.5.5
Server B (2.2.2.2) DHCP Without any means for 2.2.3.0/24 Automatic acquisition of 4.4.4.4
Based on the complete switching information table, when network switching is performed again, the method for switching servers by the cloud desktop terminal in the embodiment comprises the following steps:
step 211, after the network switch performs network switching, the network card of the terminal device generates a down/up event, the network interface address of the network card changes, and the network card notifies the upper layer application program of the network interface address change event.
Step 212, after receiving the notification of the network interface address change event, the application program obtains the network interface address of the network card (supposing 1.1.2.3/24), matches the network interface address recorded in the switching information table (1.1.2.0/24), if the matching is successful, it can further use a network connectivity detection tool (e.g. Ping program) to detect whether the link of the server a is reachable, if so, it is determined that the current switching to the network a where the server a is located, the application program can connect to the server a, and the dual-network switching is ended.
In an embodiment of the present invention, after each successful connection to the server, the information such as the interface network segment address, DNS address, etc. corresponding to the network interface address of the current network card is updated to the switching information table, so as to implement dynamic update of the switching information table.
In an embodiment of the present invention, the application program records the switching information table into a database or a local configuration file, loads the table into the memory from the database or the local configuration file when the application program is initialized when running, and keeps the memory consistent with the content in the database or the local configuration file when the switching information table is updated each time. Therefore, after the server is started each time, when the network is switched, the server where the switching network is located can be quickly selected through matching based on the loaded switching information table, and the purpose of quick switching is achieved.
In an embodiment of the present invention, in order to increase the network switching speed of the application program, the success rate of the first switching may be increased by the following manner:
after the application program obtains the current network interface address of the network card, the application program obtains the server connected before network switching under the condition that the network interface address of the network card is not matched with the interface network segment address in the switching information table, if the server A is connected before, the application program uses a connectivity detection tool to detect whether the server B is reachable, if the server B is reachable, the current network is switched to the network B where the server B is located, the interface network segment address and the DNS address of the network interface address of the current network card are obtained, and the interface network segment address and the DNS address of the network interface address of the current network card are recorded in the table 1.
In the initial case, assuming that the application program is connected to the server a in the network a before switching, the application program may record the address of the currently connected server a in a history table, when the user switches using the switch button, according to the normal usage habit of the user, if the user is in the network a before, and when switching occurs, the user switches to the network B with a larger probability, because the interface network segment address and DNS address of the network B are not initialized, if the application program fails to match when obtaining the network interface address of the current network card according to a fixed matching sequence, if the application program still detects according to the sequence of detecting the server a before detecting the server B at this time, the process of detecting the server a is obviously useless, and the detection time is prolonged, so that the server B is directly detected, and if the server B is connected, the interface network segment address and DNS address corresponding to the server B in table 1 are updated. In this embodiment, by recording the address of the server connected the previous time, after the network is switched, another address of the server different from the address of the server connected the previous time is directly detected, so that the success rate of the first detection is improved, and the switching efficiency is improved.
The invention can learn the network environment (interface network segment address, DNS address) in the program operation process, and uses the configuration file to solidify the operation process data, guide the network switching, improve the switching efficiency and success rate, and achieve the purpose of rapidly identifying the network and switching the server.
Fig. 2 is a schematic diagram of an apparatus structure of a cloud desktop terminal switching server according to an embodiment of the present invention, where each functional module in the apparatus 20 may be implemented by software, hardware, or a combination of software and hardware.
The device 20 is applied to cloud desktop terminal equipment, and the device 20 comprises:
the switching response module 21 is configured to obtain a network interface address of the local network card after receiving a notification of a network interface address change event reported by the local network card;
a network matching module 22, configured to match the interface network segment address in the handover information table using the acquired network interface address;
a server detecting module 23, configured to detect, when the interface network segment address is matched, whether a first server in a network to which the matched interface network segment address belongs is reachable using a network connectivity detecting tool;
a connection module 24 for connecting to the first server if the first server is reachable;
and the switching information table 25 is used for storing the corresponding relation among the server, the interface network segment address of the network where the server is located and the DNS address of the domain name server.
In an embodiment of the present invention, the server detection module 23 is further configured to detect, when the interface network segment address is not matched, whether the first server is reachable using the network connectivity detection tool;
under the condition that a first server is reachable, writing an interface network segment address and a DNS address of a network where a current network card is located into a record corresponding to the first server in the switching information table;
detecting, using a network connectivity detection tool, if the second server is reachable, if the first server is not reachable;
and under the condition that the second server is reachable, writing the interface network segment address and the DNS address of the network where the current network card is positioned into the record corresponding to the second server in the switching information table.
In an embodiment of the present invention, the server detection module 23 is further configured to record the switching information table into a database or a local configuration file, and load the switching information table into the memory during initialization.
In an embodiment of the present invention, the server detecting module 23 is further configured to obtain a server connected prior to network handover in a case where the obtained network interface address is not matched to the interface network segment address in the handover information table;
in the case where the server connected before the handover is the first server, detecting whether the second server is reachable using a connectivity detection tool;
and when the second server is reachable, acquiring an interface network segment address and a DNS address of the network interface address of the current network card, and recording the interface network segment address and the DNS address into the switching information table.
Fig. 3 is a schematic structural diagram of an electronic device for implementing a method for switching servers of a cloud desktop terminal according to an embodiment of the present invention, where the device 300 includes: a processor 310 such as a Central Processing Unit (CPU), a communication bus 320, a communication interface 340 (e.g., a physical network card), and a storage medium 330. Wherein the processor 310 and the storage medium 330 may communicate with each other via a communication bus 320. The storage medium 330 stores a computer program, which when executed by the processor 310, can implement the functions of each step of the method for switching servers of the cloud desktop terminal provided by the present invention. The storage medium 330 may include the apparatus 200 for switching servers of a cloud desktop terminal composed of software modules.
The storage medium may include a random access Memory (Random Access Memory, RAM) or a Non-Volatile Memory (NVM), such as at least one magnetic disk Memory. In addition, the storage medium may be at least one storage device located remotely from the processor. The processor may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
It should be appreciated that embodiments of the invention may be implemented or realized in computer hardware, a combination of hardware and software, or by computer instructions stored in non-transitory memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory storage medium configured with a computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose. Furthermore, the operations of the processes described in the present invention may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes (or variations and/or combinations thereof) described herein may be performed under control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications), by hardware, or combinations thereof, collectively executing on one or more processors. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable computing platform, including, but not limited to, a personal computer, mini-computer, mainframe, workstation, network or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and so forth. Aspects of the invention may be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and/or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, which when read by a computer, is operable to configure and operate the computer to perform the processes described herein. Further, the machine readable code, or portions thereof, may be transmitted over a wired or wireless network. When such media includes instructions or programs that, in conjunction with a microprocessor or other data processor, implement the steps described above, the invention described herein includes these and other different types of non-transitory computer-readable storage media. The invention also includes the computer itself when programmed according to the methods and techniques of the present invention.
The foregoing is merely exemplary of the present invention and is not intended to limit the present invention. Various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The method is characterized in that the method is applied to cloud desktop terminal equipment, the terminal equipment externally presents two network ports, one physical network card, namely a local network card, is configured in the terminal equipment, and network switching is performed by using a network switcher; the method comprises the following steps:
after receiving a network interface address change event notification reported by a local network card, acquiring a network interface address of the local network card; the network interface address change event is reported to an upper layer application program by the local network card when the network switcher is switched;
matching the interface network segment address in the switching information table by using the acquired network interface address; the switching information table is used for storing the corresponding relation among the server address, the interface network segment address of the network where the server is located and the DNS address of the domain name server;
when the interface network segment address is matched, detecting whether a first server in a network to which the matched interface network segment address belongs is reachable or not by using a network connectivity detection tool;
in case the first server is reachable, connecting to the first server.
2. The method according to claim 1, wherein the method further comprises:
detecting whether the first server is reachable using a network connectivity detection tool when the interface segment address is not matched;
under the condition that a first server is reachable, writing an interface network segment address and a DNS address of a network where a current network card is located into a record corresponding to the first server in the switching information table;
detecting, using a network connectivity detection tool, if the second server is reachable, if the first server is not reachable;
and under the condition that the second server is reachable, writing the interface network segment address and the DNS address of the network where the current network card is positioned into the record corresponding to the second server in the switching information table.
3. The method according to claim 1, wherein the method further comprises:
and recording the switching information table into a database or a local configuration file, and loading the switching information table into a memory during initialization.
4. The method according to claim 2, wherein the method further comprises:
acquiring a server connected before network switching under the condition that the acquired network interface address is not matched with an interface network segment address in a switching information table;
in the case where the server connected before the handover is the first server, detecting whether the second server is reachable using a connectivity detection tool;
and when the second server is reachable, acquiring an interface network segment address and a DNS address of the network interface address of the current network card, and recording the interface network segment address and the DNS address into the switching information table.
5. The device is applied to cloud desktop terminal equipment, the terminal equipment externally presents two network ports, one physical network card, namely a local network card is configured in the terminal equipment, and network switching is performed by using a network switcher, and the device comprises:
the switching response module is used for acquiring the network interface address of the local network card after receiving the network interface address change event notification reported by the local network card; the network interface address change event is reported to an upper layer application program by the local network card when the network switcher is switched;
the switching information table is used for storing the corresponding relation among the server address, the interface network segment address of the network where the server is located and the DNS address of the domain name server;
the network matching module is used for matching the interface network segment address in the switching information table by using the acquired network interface address;
the server detection module is used for detecting whether a first server in a network to which the matched interface network segment address belongs is reachable or not by using the network connectivity detection tool when the interface network segment address is matched;
and the connection module is used for connecting to the first server in the condition that the first server is reachable.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the server detection module is further used for detecting whether the first server is reachable or not by using a network connectivity detection tool when the interface network segment address is not matched;
under the condition that a first server is reachable, writing an interface network segment address and a DNS address of a network where a current network card is located into a record corresponding to the first server in the switching information table;
detecting, using a network connectivity detection tool, if the second server is reachable, if the first server is not reachable;
and under the condition that the second server is reachable, writing the interface network segment address and the DNS address of the network where the current network card is positioned into the record corresponding to the second server in the switching information table.
7. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the server detection module is also used for recording the switching information table into a database or a local configuration file, and loading the switching information table into a memory during initialization.
8. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the server detection module is further used for acquiring a server connected before network switching under the condition that the acquired network interface address is not matched with an interface network segment address in the switching information table;
in the case where the server connected before the handover is the first server, detecting whether the second server is reachable using a connectivity detection tool;
and when the second server is reachable, acquiring an interface network segment address and a DNS address of the network interface address of the current network card, and recording the interface network segment address and the DNS address into the switching information table.
9. An electronic device is characterized by comprising a processor, a communication interface, a storage medium and a communication bus, wherein the processor, the communication interface and the storage medium are communicated with each other through the communication bus;
a storage medium storing a computer program;
a processor for performing the method steps of any of claims 1-4 when executing a computer program stored on a storage medium.
10. A storage medium having stored thereon a computer program, which when executed by a processor performs the method steps of any of claims 1 to 4.
CN202111054529.8A 2021-09-09 2021-09-09 Method, device, equipment and storage medium for switching servers of cloud desktop terminal Active CN113992578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111054529.8A CN113992578B (en) 2021-09-09 2021-09-09 Method, device, equipment and storage medium for switching servers of cloud desktop terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111054529.8A CN113992578B (en) 2021-09-09 2021-09-09 Method, device, equipment and storage medium for switching servers of cloud desktop terminal

Publications (2)

Publication Number Publication Date
CN113992578A CN113992578A (en) 2022-01-28
CN113992578B true CN113992578B (en) 2023-11-03

Family

ID=79735514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111054529.8A Active CN113992578B (en) 2021-09-09 2021-09-09 Method, device, equipment and storage medium for switching servers of cloud desktop terminal

Country Status (1)

Country Link
CN (1) CN113992578B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584608B (en) * 2022-02-09 2024-05-24 北信源系统集成有限公司 Network switching method, device, equipment and storage medium
CN114826969B (en) * 2022-03-17 2024-02-06 阿里巴巴(中国)有限公司 Network connectivity checking method, device, equipment and storage medium
CN115378672B (en) * 2022-08-09 2024-11-12 德邦证券股份有限公司 Method, device and storage medium for determining cross-network device
CN118138499B (en) * 2024-04-29 2024-08-23 苏州元脑智能科技有限公司 Method, device, system and server for determining connectivity of connecting wires

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026263A (en) * 2010-12-09 2011-04-20 苏州捷泰科信息技术有限公司 Wireless communication network connection method
CN102917426A (en) * 2012-11-15 2013-02-06 中国联合网络通信集团有限公司 Operator network switching method and device for IOT (Internal of Things) terminal
CN103997422A (en) * 2014-05-05 2014-08-20 大唐移动通信设备有限公司 Fault processing method and device for IP interface board
CN104066129A (en) * 2014-06-30 2014-09-24 深圳市中兴移动通信有限公司 Network switching method and system
CN104967538A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Network failover method, device and system
CN106851758A (en) * 2017-03-17 2017-06-13 广东欧珀移动通信有限公司 Communication network changing method and terminal device
CN108696395A (en) * 2018-05-23 2018-10-23 湖南麒麟信安科技有限公司 Network switching device and its application process under a kind of Multi net voting isolation environment
CN108737188A (en) * 2018-05-24 2018-11-02 郑州云海信息技术有限公司 A kind of net card failure switching system
CN110519401A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Improve method, apparatus, equipment and the storage medium of network Access Success Rate
CN110856225A (en) * 2018-08-20 2020-02-28 中兴通讯股份有限公司 Network switching method, device, terminal and storage medium
CN113366815A (en) * 2019-04-11 2021-09-07 深圳市欢太科技有限公司 Network resource request method, device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101563949A (en) * 2006-10-31 2009-10-21 意大利电信股份公司 Management of seamless handover between different communication systems in an IP dual-mode terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026263A (en) * 2010-12-09 2011-04-20 苏州捷泰科信息技术有限公司 Wireless communication network connection method
CN102917426A (en) * 2012-11-15 2013-02-06 中国联合网络通信集团有限公司 Operator network switching method and device for IOT (Internal of Things) terminal
CN103997422A (en) * 2014-05-05 2014-08-20 大唐移动通信设备有限公司 Fault processing method and device for IP interface board
CN104066129A (en) * 2014-06-30 2014-09-24 深圳市中兴移动通信有限公司 Network switching method and system
CN104967538A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Network failover method, device and system
CN106851758A (en) * 2017-03-17 2017-06-13 广东欧珀移动通信有限公司 Communication network changing method and terminal device
CN108696395A (en) * 2018-05-23 2018-10-23 湖南麒麟信安科技有限公司 Network switching device and its application process under a kind of Multi net voting isolation environment
CN108737188A (en) * 2018-05-24 2018-11-02 郑州云海信息技术有限公司 A kind of net card failure switching system
CN110856225A (en) * 2018-08-20 2020-02-28 中兴通讯股份有限公司 Network switching method, device, terminal and storage medium
CN113366815A (en) * 2019-04-11 2021-09-07 深圳市欢太科技有限公司 Network resource request method, device, electronic equipment and storage medium
CN110519401A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Improve method, apparatus, equipment and the storage medium of network Access Success Rate

Also Published As

Publication number Publication date
CN113992578A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN113992578B (en) Method, device, equipment and storage medium for switching servers of cloud desktop terminal
US10606496B1 (en) Host device with multi-path layer implementing automatic standby setting for active-active configuration
CN110572275B (en) Network card switching method and device, server and computer readable storage medium
US10999139B2 (en) Online upgrade method, apparatus, and system
CN112596960B (en) Distributed storage service switching method and device
US10541862B2 (en) VNF processing policy determining method, apparatus, and system
CN111258851A (en) Cluster alarm method, device, setting and storage medium
CN107666493B (en) Database configuration method and equipment thereof
CN106873970B (en) Installation method and device of operating system
US20180188990A1 (en) Method, apparatus and system for inserting disk
CN112804330A (en) Application communication method and device
CN102983989B (en) Removing method, device and equipment of server virtual address
CN110740155A (en) Request processing method and device in distributed system
CN111666184A (en) Solid state drive SSD hard disk test method and device and electronic equipment
US20200342109A1 (en) Baseboard management controller to convey data
CN111835559A (en) Automatic configuration method, device, equipment and machine readable storage medium
CN107145304A (en) Server, storage system and correlation technique
CN113055252A (en) Method, device, equipment and storage medium for detecting newly added service host
CN107453888B (en) High-availability virtual machine cluster management method and device
CN106878052B (en) User migration method and device
US9417942B1 (en) Event-based in-band host registration
CN103810038A (en) Method and device for transferring virtual machine storage files in HA cluster
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN114363334A (en) Network configuration method, device and equipment for cloud system and cloud desktop virtual machine
CN106911508B (en) DNS configuration recovery method and device

Legal Events

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