CN118175193A - Connection switching method, device, server and storage medium - Google Patents

Connection switching method, device, server and storage medium Download PDF

Info

Publication number
CN118175193A
CN118175193A CN202211573746.2A CN202211573746A CN118175193A CN 118175193 A CN118175193 A CN 118175193A CN 202211573746 A CN202211573746 A CN 202211573746A CN 118175193 A CN118175193 A CN 118175193A
Authority
CN
China
Prior art keywords
connection
server
real machine
cloud real
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211573746.2A
Other languages
Chinese (zh)
Inventor
张腾飞
徐康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202211573746.2A priority Critical patent/CN118175193A/en
Publication of CN118175193A publication Critical patent/CN118175193A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a connection switching method, a device, a server and a storage medium. The method is applied to Yu Yunzhen machine proxy service ends, and comprises the following steps: detecting the wired connection state of a first connection server based on the wired connection mode and connected with the cloud real machine server; and under the condition that the abnormal wired connection state of the first connection service end is detected, aiming at a second connection service end which is accessed to the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode. According to the technical scheme, the cloud real machine server is always connected to a certain connection server by automatically switching the connection mode of the cloud real machine server, so that stable service of the cloud real machine deployed with the cloud real machine server is ensured.

Description

Connection switching method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a connection switching method, a device, a server and a storage medium.
Background
The cloud real machine platform is a platform for realizing cloud real machine control based on the Internet, so that related personnel can remotely control the cloud real machine to complete tasks, such as tasks for testing software to be tested, which is installed on the cloud real machine. A cloud camera is understood here as an entity device running at the far end.
In the process of realizing the invention, the inventor finds that the following technical problems exist in the prior art: stable service of the cloud computing machine cannot be guaranteed.
Disclosure of Invention
The embodiment of the invention provides a connection switching method, a device, a server and a storage medium, which solve the problem that stable service of a cloud real machine cannot be ensured.
According to an aspect of the present invention, there is provided a connection switching method, where the method may be applied to Yu Yunzhen machine proxy servers, and the method may include:
detecting the wired connection state of a first connection server based on the wired connection mode and connected with the cloud real machine server;
And under the condition that the abnormal wired connection state of the first connection service end is detected, aiming at a second connection service end which is accessed to the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
According to another aspect of the present invention, there is provided a connection switching apparatus configured at a proxy server of a cloud computing device, the apparatus may include:
The connection state detection module is used for detecting the wired connection state of a first connection server which is connected with the cloud real machine server based on a wired connection mode;
The connection switching module is used for scheduling the second connection service end to be connected with the cloud real machine service end based on the wireless connection mode corresponding to the wireless network aiming at the second connection service end which accesses the same wireless network with the cloud real machine service end under the condition that the wired connection state of the first connection service end is detected to be abnormal, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
According to another aspect of the present invention, there is provided a cloud real machine proxy server, which may include:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to implement the connection switching method provided by any embodiment of the present invention when executed.
According to another aspect of the present invention, there is provided a computer readable storage medium having stored thereon computer instructions for causing a processor to implement the connection switching method provided by any of the embodiments of the present invention when executed.
According to the technical scheme, aiming at the first connection server which is connected to the cloud real machine server based on the wired connection mode, the cloud real machine proxy server determines whether the first connection server is connected with the cloud real machine server currently or not by detecting the wired connection state of the first connection server; under the condition that the wired connection state of the first connection service end is abnormal, the first connection service end is not connected to the cloud real machine service end at present, and the cloud real machine deployed with the cloud real machine service end (the cloud real machine service end which is not connected to any connection service end) cannot provide service at present, so that in order to ensure stable service of the cloud real machine, the second connection service end and the cloud real machine service end are considered to be connected to the same wireless network, and therefore the second connection service end can be scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, and the cloud real machine can continue to provide service. According to the technical scheme, the dependence of the cloud real machine server on a single connection server is reduced, when the cloud real machine server cannot be connected with a certain connection server based on a wired connection mode, the cloud real machine server can be automatically switched to a wireless connection mode to be connected with another connection server, namely, the cloud real machine server is always connected to the certain connection server by automatically switching the connection mode of the cloud real machine server, and therefore stable service of the cloud real machine is guaranteed.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to be used to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a connection switching method according to an embodiment of the present invention;
Fig. 2a is a schematic diagram of a connection mode in a connection switching method according to an embodiment of the present invention;
fig. 2b is a schematic diagram of connection switching in a connection switching method according to an embodiment of the present invention;
fig. 3 is a flowchart of another connection switching method according to an embodiment of the present invention;
fig. 4 is a flowchart of another connection switching method according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of an alternative example of another connection switching method according to an embodiment of the present invention;
Fig. 6 is a schematic diagram of an architecture of a cloud computing platform in another connection switching method according to an embodiment of the present invention;
fig. 7 is a block diagram of a connection switching apparatus according to an embodiment of the present invention;
Fig. 8 is a schematic structural diagram of a cloud real machine proxy server for implementing the connection switching method provided by the embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. The cases of "target", "original", etc. are similar and will not be described in detail herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart of a connection switching method according to an embodiment of the present invention. The embodiment is applicable to the situation of automatically switching the connection mode between the cloud real machine server and the connection server, and is particularly applicable to the situation of automatically switching to the wireless connection mode to be connected with another connection server when the cloud real machine server cannot be connected with the connection server based on the wired connection mode. The method can be executed by the connection switching device provided by the embodiment of the invention, the device can be realized by software and/or hardware, and the device can be integrated on a cloud real machine proxy server.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
S110, detecting the wired connection state of a first connection server based on the wired connection mode and a first connection server connected with the cloud real machine server.
The cloud proxy server (proxy) for executing the method of the embodiment of the invention is configured to be in communication connection with the first connection server, so that the wired connection state of the first connection server can be detected by the cloud proxy server, that is, whether the first connection server is connected with the cloud proxy server in a wired connection manner is detected, thereby determining whether the wired connection state of the first connection server is normal. In practical application, optionally, the wired connection mode may be realized by connecting a physical line with a communication function between a first connection server deployed with a first connection server and a cloud camera deployed with a cloud camera server.
In connection with the application scenario possibly related to the embodiment of the invention, for example, the communication connection between the cloud real machine proxy server and the first connection server can be realized based on WebSocket service; the first connection server may be built based on farmer; the first connection server may include a personal computer (Personal Computer, PC); the physical line may be a universal serial bus (Universal Serial Bus, USB); in general, the first connection server may be connected to at least one cloud computing device based on a wired connection, and the cloud computing device may be connected to one first connection server based on a wired connection.
And S120, under the condition that the abnormal wired connection state of the first connection service end is detected, aiming at a second connection service end which accesses the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
The second connection server may be understood as a connection server different from the first connection server, that is, the first connection server and the second connection server are both connection servers, and they are named differently for distinguishing them, which is not a specific limitation on their essential content.
Under the condition that the wired connection state of the first connection server is detected to be abnormal, the first connection server cannot be connected with the cloud real machine server based on a wired connection mode, namely the cloud real machine server cannot be connected to any connection server at present, and the cloud real machine cannot effectively provide services. On the basis, the cloud real machine server and the second connection server are considered to be connected to the same wireless network, so that the cloud real machine proxy server can schedule the second connection server to enable the second connection server to be connected with the cloud real machine server based on a wireless connection mode (namely, a connection mode realized based on the wireless network), and the cloud real machine can be connected to a certain connection server, and service can be continuously provided.
Compared with the scheme that the cloud real machine server can only be connected to one connection server, i.e. depends on a single connection server (such as a PC), the technical scheme can automatically switch to a wireless connection mode to connect with another connection server when the cloud real machine server cannot be connected with the connection server based on a wired connection mode, i.e. the cloud real machine server can be connected to the connection server under any condition by switching the connection mode of the cloud real machine server, so that stable service of the cloud real machine is ensured.
In order to better understand the above technical solution, an exemplary description thereof is provided below in connection with specific examples. Illustratively, as shown in FIG. 2a, an operating system farmer of the PC is built: the PC deployed with the connection service end creates long connection with the cloud real machine through the USB, so that interaction between the control flow and the video flow is realized, and the USB connection (namely wired connection) is used as a main connection; the cloud real machine is connected with the same wireless network as the PC, and the wireless connection realized based on the wireless network is auxiliary connection; in other words, the USB connection and the wireless connection complement each other and are mutually backed up, so that the online rate of the cloud real machine is improved, and the stable service of the cloud real machine is ensured.
As shown in fig. 2b, a detection center monitor is set up: the detection center bit Yu Yunzhen for detecting the USB connection state of the connection server is used for proxy server, and the detection center for detecting the USB connection state of the cloud real machine server is located in the connection server. Detecting the USB connection state of the first connection server through a detection center in the cloud real machine proxy server, and further maintaining the current situation under the condition that the USB connection state of the first connection server is normal, namely the first connection server is connected with the cloud real machine server through the USB, so that efficient connection is guaranteed; correspondingly, under the condition that the USB connection state of the first connection server is abnormal, namely the first connection server cannot use the USB to connect with the cloud real machine server, the cloud real machine proxy server schedules the second connection server to be connected with the cloud real machine server through wireless, and therefore the effect of automatic tangent (namely switching from USB connection to wireless connection) is achieved.
According to the technical scheme, aiming at the first connection server which is connected to the cloud real machine server based on the wired connection mode, the cloud real machine proxy server determines whether the first connection server is connected with the cloud real machine server currently or not by detecting the wired connection state of the first connection server; under the condition that the wired connection state of the first connection service end is abnormal, the first connection service end is not connected to the cloud real machine service end at present, and the cloud real machine deployed with the cloud real machine service end (the cloud real machine service end which is not connected to any connection service end) cannot provide service at present, so that in order to ensure stable service of the cloud real machine, the second connection service end and the cloud real machine service end are considered to be connected to the same wireless network, and therefore the second connection service end can be scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, and the cloud real machine can continue to provide service. According to the technical scheme, the dependence of the cloud real machine server on a single connection server is reduced, when the cloud real machine server cannot be connected with a certain connection server based on a wired connection mode, the cloud real machine server can be automatically switched to a wireless connection mode to be connected with another connection server, namely, the cloud real machine server is always connected to the certain connection server by automatically switching the connection mode of the cloud real machine server, and therefore stable service of the cloud real machine is guaranteed.
On the basis, an optional technical scheme is that after detecting that the wired connection state of the first connection service end is abnormal, the connection switching method further comprises the following steps: generating a first warning message and sending the first warning message to the client, wherein the first warning message is used for warning that the wired connection state of the first connection server is abnormal; the scheduling of the second connection server to connect with the cloud real machine server based on the wireless connection mode corresponding to the wireless network includes: under the condition that a first wireless connection instruction returned by the client side aiming at the first warning message is received, responding to the first wireless connection instruction, and scheduling the second connection server side to be connected with the cloud real machine server side based on a wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state.
Under the condition that the wired connection state of the first connection service end is abnormal, at least three solutions exist for ensuring stable service of the cloud real machine: the first step is that a physical line is connected between the cloud real machine and a second connection server provided with a second connection server by manpower, so that wired connection between the cloud real machine server and the second connection server is realized; secondly, the second connection server is scheduled to be connected to the cloud real machine server in a wireless mode through the cloud real machine proxy server, and therefore wireless connection between the cloud real machine server and the second connection server is achieved; third, the present situation is maintained, and the cloud computing device is applicable to the situation that the cloud computing device is not required to continuously provide services. Therefore, in the case of detecting the abnormal wired connection state of the first connection server, the cloud real machine proxy server can determine by itself or by related personnel whether to adopt any of the above three solutions to solve the abnormality. For the latter, the cloud real machine proxy server may send a first warning message for warning that the wired connection state of the first connection server is abnormal to the client, so that the relevant person determines according to the first warning message.
Further, the cloud real machine proxy server side receives the first wireless connection instruction returned by the client side for the first warning message, which indicates that the related personnel determine to adopt a second solution to solve the abnormality, and at this time, the effect of scheduling the connection of the second connection server side to the cloud real machine server side based on the wireless connection mode can be achieved by setting the state of the cloud real machine server side relative to the second connection server side to be in an online state, so that the cloud real machine can continue to provide services.
On the basis, optionally, the number of the second connection service ends is at least two, and the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine service end relative to the second connection service end to be an on-line state, which comprises the following steps: determining wireless connection service ends with cloud real machine service ends mounted in at least two second connection service ends; and the state of the cloud real machine server side relative to the wireless connection server side is set to be an on-line state, and the wireless connection server side is scheduled to be connected with the cloud real machine server side based on a wireless connection mode corresponding to the wireless network.
In the case that at least two second connection service ends exist, in order to wirelessly connect the cloud real machine service end to a certain second connection service end, related personnel can mount the cloud real machine service end on a certain second connection service end in the at least two second connection service ends through operation, and specifically can mount the cloud real machine on a certain PC. In this way, the cloud real machine proxy server can determine the wireless connection server on which the cloud real machine server is mounted from at least two second connection servers, and then set the state of the cloud real machine server relative to the wireless connection server to be an on-line state, so that wireless connection between the cloud real machine server and the wireless connection server (namely, a certain second connection server) is realized.
Fig. 3 is a flowchart of another connection switching method according to an embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the connection switching method may further include: under the condition that a second warning message sent by the first connection server is received, the second connection server is scheduled to be connected with the cloud real machine server based on a wireless connection mode; the second warning message is generated by the first connection server under the condition that the wired connection state of the cloud real machine server is detected to be abnormal. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 3, the method of this embodiment may specifically include the following steps:
S210, detecting the wired connection state of a first connection server based on the wired connection mode and a first connection server connected with the cloud real machine server.
S220, when the abnormal wired connection state of the first connection service end is detected, and/or a second warning message sent by the first connection service end is received, aiming at a second connection service end which accesses the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode, wherein the second warning message is generated by the first connection service end when the abnormal wired connection state of the cloud real machine service end is detected.
The cloud real machine server and the first connection server are connected in a wired connection manner, so that the first connection server can detect the wired connection state of the cloud real machine server, for example, the detection center in the first connection server shown in fig. 2b detects the wired connection state of the cloud real machine server. On the basis, under the condition that the first connection server detects that the wired connection state of the cloud real machine server is abnormal, a second warning message for warning the wired connection state of the cloud real machine server can be generated, and the second warning message is sent to the cloud real machine proxy server.
And under the condition that the cloud real machine proxy server receives the second warning message, determining that the wired connection state of the cloud real machine server is abnormal, namely that the wired connection between the first connection server and the cloud real machine server is abnormal, and in order to ensure stable service of the cloud real machine, the second connection server can be scheduled to be connected with the cloud real machine server based on a wireless connection mode, so that the cloud real machine server is connected to a certain connection server again.
According to the technical scheme provided by the embodiment of the invention, the cloud real machine proxy server can determine the connection condition between the first connection server and the cloud real machine server through the related data after the wired connection state of the cloud real machine server is detected by the first connection server, and the connection condition is combined with the connection condition detected by the cloud real machine proxy server, so that the cloud real machine server can be connected to a certain connection server under any condition from different aspects, and stable service of the cloud real machine can be better ensured.
On the basis, an optional technical scheme, after receiving the second warning message sent by the first connection server, the connection switching method may further include: sending a second warning message to the client; the scheduling second connection service end is connected with the cloud real machine service end based on a wireless connection mode, and comprises the following steps: and under the condition that a second wireless connection instruction returned by the client side aiming at the second warning message is received, responding to the second wireless connection instruction, and scheduling the second connection server side to be connected with the cloud real machine server side based on a wireless connection mode by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state. The specific implementation process of the technical scheme is similar to the implementation process of the technical scheme related to the first warning message, and is not repeated here. Therefore, the cloud real machine proxy server plays a role of a bridge, and opens the network where the client is located and the connection server, so that data interaction between the client and the connection server is realized.
Fig. 4 is a flowchart of another connection switching method according to an embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the cloud real machine proxy server belongs to at least two candidate proxy servers, and the connection switching method further includes: receiving a first connection request sent by a client through a load balancing server, wherein the load balancing server is used for determining a candidate proxy server to be connected to the client from at least two candidate proxy servers according to a cloud real machine identifier in the first connection request, forwarding the first connection request to the determined candidate proxy server, and the cloud real machine identifier is used for identifying the cloud real machine server; and responding to the first connection request, and connecting with the client. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 4, the method of this embodiment may specifically include the following steps:
S310, detecting the wired connection state of a first connection server based on the wired connection mode and a first connection server connected with the cloud real machine server.
And S320, under the condition that the abnormal wired connection state of the first connection service end is detected, aiming at a second connection service end which accesses the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
S330, receiving a first connection request sent by the client through the load balancing server, and responding to the first connection request to connect with the client, wherein the load balancing server is used for determining a candidate proxy server to be connected to the client from at least two candidate proxy servers according to a cloud real machine identifier in the first connection request, forwarding the first connection request to the determined candidate proxy server, and the cloud real machine identifier is used for identifying the cloud real machine server.
In the case that at least two candidate proxy service (proxy) ends exist, for a current connection service end currently connected with a cloud service end in the first connection service end and the second connection service end, a cloud service proxy service end to be connected with the current connection service end can be determined from the at least two candidate proxy service ends according to a cloud service identifier for identifying the cloud service end (or a cloud service), and then connection between the current connection service end and the cloud service proxy service end is established, for example, connection between the current connection service end and the cloud service proxy service end is established through WebSocket service. In practical application, optionally, under the condition that the cloud real machine proxy server is interrupted, the current connection server can automatically select other candidate proxy servers from the at least two candidate proxy servers to complete bridging, so that the limitation of point-to-point network docking of WebSocket service is broken, and stable service of the cloud real machine server connected to the current connection server is ensured. Alternatively, the cloud machine identifier may be represented by a serial number, an internet protocol (Internet Protocol, IP), or a port of the cloud machine, which is not specifically limited herein.
On the basis, in order to realize data interaction between the client and the cloud real machine server, the client can be connected to the cloud real machine proxy server, so that the data interaction between the client and the cloud real machine proxy server is realized through the path of the cloud real machine proxy server. Because the cloud real machine proxy server is determined from at least two candidate proxy servers according to the cloud real machine identification, the client can send the first connection request to the load balancing server, and the load balancing server can determine the candidate proxy server to be connected to the client from the at least two candidate proxy servers according to the cloud real machine identification in the first connection request and forward the first connection request to the candidate proxy server. Therefore, under the condition that the cloud real machine proxy server receives the first connection request, the cloud real machine proxy server is the candidate proxy server to be connected to the client side in the at least two candidate proxy server sides, and therefore the cloud real machine proxy server can respond to the first connection request to be connected to the client side, for example, connection between the cloud real machine proxy server and the client side is achieved through WebSocket service, the effect that the client side and the cloud real machine server side are connected to the same candidate proxy server side is achieved, and data interaction between the client side and the cloud real machine server side is achieved.
On the basis, in combination with the application scenario possibly related to the embodiment of the invention, optionally, the data interaction between the client and the cloud real machine server can be realized through the following steps: receiving a video stream sent by a cloud real machine server through a first connection server or a second connection server, and forwarding the video stream to a connected client so that the client displays the received video stream, wherein the video stream can embody content displayed on a display interface of the cloud real machine; and/or receiving a control flow sent by the connected client, and sending the control flow to a current connection server currently connected with the cloud real machine server in the first connection server and the second connection server, so as to control the cloud real machine deployed with the cloud real machine server through the current connection server based on the received control flow, for example, clicking and/or sliding a target object on the cloud real machine.
In order to better understand the above technical solution, an exemplary description thereof is provided below in connection with specific examples. For example, referring to fig. 5, here, an example is a cloud server deployed on a circled cloud server, where the cloud server is connected to a 3 rd connection server, and the 3 rd connection server is connected to a2 nd candidate proxy server. On the basis, a certain client in the 3 clients sends a first connection request corresponding to the cloud real machine to a load balancing server (Nginx) through a firewall, the load balancing server carries out hash calculation on a serial number in the first connection request, and then the first connection request is forwarded to the 2 nd candidate proxy server according to an obtained hash calculation result so that the 2 nd candidate proxy server is connected with the client. The client and the 3 rd connection server (i.e. the connection server connected with the cloud real machine server) are connected to the same candidate proxy server (i.e. the 2 nd candidate proxy server), so that data interaction between the client and the cloud real machine server can be realized.
According to the technical scheme, the client sends a first connection request containing a cloud real machine identifier (used for identifying the cloud real machine server to be connected) to the load balancing server; the load balancing server can determine a candidate proxy server to be connected with the client from at least two candidate proxy servers according to the cloud real machine identification in the first connection request, and forward the first connection request to the candidate proxy server; therefore, under the condition that the cloud real machine proxy server receives the first connection request, the cloud real machine proxy server is connected with the cloud real machine server, and after connection between the cloud real machine proxy server and the client is established, the effect that the client and the cloud real machine server are automatically connected to the same candidate proxy server can be achieved, which is a necessary precondition for data interaction between the client and the cloud real machine server.
An optional technical solution, the above connection switching method further includes: receiving a second connection request sent by the connectable service end through the load balancing service end, and responding to the second connection request to connect with the connectable service end so as to detect the wired connection state of the connected connectable service end or schedule the connected connectable service end; the connectable service end comprises a first connection service end or a second connection service end, and the load balancing service end is used for determining a candidate proxy service end to be connected to the connectable service end from at least two candidate proxy service ends according to the cloud real machine identification in the second connection request and forwarding the second connection request to the determined candidate proxy service end.
The connection between the candidate proxy server and the connectable server can also be completed through the load balancing server, so that the cloud real machine server and the client can be connected to the same candidate proxy server. Specifically, the connectable server may generate and send a second connection request according to a cloud real machine identifier corresponding to the cloud real machine server connected to the connectable server, and then the load balancing server may forward the second connection request to the corresponding candidate proxy server according to the cloud real machine identifier in the received second connection request. On the basis, after the cloud real machine proxy server side in the at least two candidate proxy server sides receives the second connection request, the cloud real machine proxy server side can be connected with the connectable server side, so that the connection process between the connectable server side and a certain candidate proxy server side is realized, and further detection operation or scheduling operation can be executed.
In order to better understand the above-described respective technical solutions as a whole, an exemplary description thereof is given below in conjunction with specific examples. For example, referring to the cloud real machine platform shown in fig. 6, the cloud real machine platform includes at least two cloud real machine proxy servers (herein, referred to as a candidate proxy server in the foregoing, and not specifically referred to as a candidate proxy server), a load balancing server, at least two connection servers, at least two cloud real machines (i.e., at least two cloud real machine servers), and a client (not shown in fig. 6, for displaying UI interfaces).
On the basis, each cloud real machine server is connected with a certain connection server based on a USB connection mode, and is connected with the same wireless network with each connection server, so that when the USB connection is abnormal, the cloud real machine server can be switched to the wireless connection mode to be connected with the certain connection server. A cloud real machine server can be connected to a connection server, and a connection server can be connected with one or more cloud real machine servers. For each connection server, the connection server can send a second connection request to the load balancing server according to the serial number of the cloud real machine mounted on the connection server, so that the load balancing server forwards the second connection request to a certain cloud real machine proxy server according to the serial number, and connection between the cloud real machine proxy server and the connection server is completed.
And under the condition that a related person needs to control a certain cloud real machine through the client, the client can send a first connection request to the load balancing server based on the serial number of the cloud real machine, so that the load balancing server forwards the first connection request to a certain cloud real machine proxy server according to the serial number, and the connection between the cloud real machine proxy server and the client is completed. The cloud real machine and the client are connected to the same cloud real machine proxy server, namely, the internal network where the client is located is communicated with the office network where the client and the client are connected through the bridge of the cloud real machine proxy server, so that data interaction between the cloud real machine and the client is realized.
From the above, the above-mentioned cloud real machine platform belongs to a distributed platform, when there is an expansion demand, the connection server can be directly added, and the newly added connection server is directly connected to a certain cloud real machine proxy server, so that there is no need to redeploy a cloud real machine proxy server, and the expansibility is better.
Fig. 7 is a block diagram of a connection switching apparatus according to an embodiment of the present invention, where the apparatus is configured to perform the connection switching method according to any of the foregoing embodiments. The device and the connection switching method of the above embodiments belong to the same inventive concept, and reference may be made to the above embodiments of the connection switching method for details not described in detail in the embodiments of the connection switching device. As shown in fig. 7, the device is configured at a cloud real machine proxy server, and may specifically include: a connection state detection module 410 and a connection switching module 420.
The connection state detection module 410 is configured to detect, for a first connection server connected to the cloud real machine server based on a wired connection manner, a wired connection state of the first connection server;
The connection switching module 420 is configured to schedule, when detecting that the wired connection state of the first connection server is abnormal, the second connection server to access to a second connection server of the same wireless network with respect to the cloud real machine server, and connect the second connection server with the cloud real machine server based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine server is switched from the wired connection mode to the wireless connection mode.
Optionally, on the basis of the above device, the device may further include:
The first warning message sending module is used for generating a first warning message after detecting that the wired connection state of the first connection server is abnormal, and sending the first warning message to the client, wherein the first warning message is used for warning that the wired connection state of the first connection server is abnormal;
the connection switching module 420 may include:
The first wireless connection unit is used for responding to the first wireless connection instruction under the condition that the first wireless connection instruction returned by the client side aiming at the first warning message is received, and the second connection server side is scheduled to be connected with the cloud real machine server side based on a wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state.
On this basis, optionally, the number of the second connection service terminals is at least two, and the first wireless connection unit may include:
the wireless connection server determining subunit is used for determining wireless connection servers with cloud real machine servers mounted in at least two second connection servers;
And the wireless connection subunit is used for scheduling the wireless connection server to be connected with the cloud real machine server based on a wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine server relative to the wireless connection server to be an on-line state.
Optionally, the connection switching device may further include:
the wireless connection module is used for scheduling the second connection server to connect with the cloud real machine server based on a wireless connection mode under the condition that the second warning message sent by the first connection server is received;
The second warning message is generated by the first connection server under the condition that the wired connection state of the cloud real machine server is detected to be abnormal.
Optionally, on the basis of the above device, the device may further include:
The second warning message sending module is used for sending the second warning message to the client after receiving the second warning message sent by the first connection server;
the wireless connection module may include:
And the second wireless connection unit is used for responding to the second wireless connection instruction under the condition that the second wireless connection instruction returned by the client side aiming at the second warning message is received, and the second connection server side is scheduled to be connected with the cloud real machine server side based on the wireless connection mode by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state.
Optionally, the cloud real machine proxy server belongs to at least two candidate proxy servers, and the connection switching device may further include:
The cloud real machine identification is used for identifying the cloud real machine server side;
And the client connection module is used for responding to the first connection request and connecting with the client.
On this basis, optionally, the connection switching device may further include:
The video stream forwarding module is used for receiving the video stream sent by the cloud real machine server through the first connection server or the second connection server after being connected with the client, and forwarding the video stream to the connected client so that the client displays the received video stream;
And/or the number of the groups of groups,
And the control flow sending module is used for receiving the control flow sent by the connected client after being connected with the client, and sending the control flow to the current connection server currently connected with the cloud real machine server in the first connection server and the second connection server so as to control the cloud real machine deployed with the cloud real machine server based on the received control flow through the current connection server.
Still alternatively, the connection switching apparatus may further include:
the connectable server connection module is used for receiving a second connection request sent by the connectable server through the load balancing server, responding to the second connection request and connecting with the connectable server so as to detect the wired connection state of the connected connectable server or schedule the connected connectable server;
the connectable server comprises a first connection server or a second connection server, and the load balancing server is used for determining a candidate proxy server to be connected to the connectable server from at least two candidate proxy servers according to the cloud real machine identification in the second connection request, and forwarding the second connection request to the determined candidate proxy server.
According to the connection switching device provided by the embodiment of the invention, aiming at the first connection service end connected to the cloud real machine service end based on the wired connection mode, the cloud real machine proxy service end detects the wired connection state of the first connection service end through the connection state detection module, so that whether the first connection service end is connected with the cloud real machine service end at present is determined; under the condition that the wired connection state of the first connection service end is abnormal, the connection switching module indicates that the first connection service end is not connected to the cloud real machine service end at present, and the cloud real machine deployed with the cloud real machine service end (the cloud real machine service end which is not connected to any connection service end) cannot provide service at present, so that in order to ensure stable service of the cloud real machine, the second connection service end and the cloud real machine service end are considered to be connected to the same wireless network, and therefore the second connection service end can be scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, and further the cloud real machine can continue to provide service. According to the device, the dependence of the cloud real machine server on a single connection server is reduced, when the cloud real machine server cannot be connected with a certain connection server based on a wired connection mode, the connection with another connection server can be automatically switched to a wireless connection mode, namely, the cloud real machine server is always connected to the certain connection server by automatically switching the connection mode of the cloud real machine server, and therefore stable service of the cloud real machine is guaranteed.
The connection switching device provided by the embodiment of the invention can execute the connection switching method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the above embodiment of the connection switching apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Fig. 8 shows a schematic diagram of the architecture of a cloud computing proxy server 10 that may be used to implement an embodiment of the present invention. Cloud computing proxy servers are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The cloud camera proxy server may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the cloud computing proxy server 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which a computer program executable by the at least one processor is stored, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the cloud computing proxy server 10 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
The various components in the cloud real machine proxy server 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the cloud computing proxy server 10 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as the connection switching method.
In some embodiments, the connection switching method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the cloud computing proxy server 10 via the ROM 12 and/or the communication unit 19. When a computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the connection switching method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the connection switching method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a cloud-to-real proxy server having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the cloud computing proxy server. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for switching connection, wherein an application Yu Yunzhen is a proxy server, the method comprising:
detecting the wired connection state of a first connection server based on a wired connection mode and connected with a cloud real machine server;
And under the condition that the abnormal wired connection state of the first connection service end is detected, aiming at a second connection service end which accesses the same wireless network with the cloud real machine service end, the second connection service end is scheduled to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
2. The method according to claim 1, wherein after detecting that the wired connection state of the first connection server is abnormal, further comprising:
Generating a first warning message and sending the first warning message to a client, wherein the first warning message is used for warning that the wired connection state of the first connection server is abnormal;
The scheduling the second connection server to connect with the cloud real machine server based on a wireless connection mode corresponding to the wireless network includes:
And under the condition that a first wireless connection instruction returned by the client side aiming at the first warning message is received, responding to the first wireless connection instruction, and scheduling the second connection server side to be connected with the cloud real machine server side based on a wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state.
3. The method according to claim 2, wherein the number of the second connection service terminals is at least two, and the scheduling the second connection service terminal to connect with the cloud real machine service terminal based on the wireless connection mode corresponding to the wireless network by setting the state of the cloud real machine service terminal relative to the second connection service terminal to be an online state includes:
determining wireless connection service ends with the cloud real machine service ends mounted in the at least two second connection service ends;
And setting the state of the cloud real machine server relative to the wireless connection server to be an on-line state, and scheduling the wireless connection server to be connected with the cloud real machine server based on a wireless connection mode corresponding to the wireless network.
4. The method as recited in claim 1, further comprising:
Under the condition that a second warning message sent by the first connection server is received, the second connection server is scheduled to be connected with the cloud real machine server based on the wireless connection mode;
The second warning message is generated by the first connection server under the condition that the wired connection state of the cloud real machine server is detected to be abnormal.
5. The method of claim 4, wherein after receiving the second alert message sent by the first connection server, the method further comprises:
Sending the second warning message to a client;
the scheduling the second connection server to connect with the cloud real machine server based on the wireless connection mode includes:
and under the condition that a second wireless connection instruction returned by the client side aiming at the second warning message is received, responding to the second wireless connection instruction, and scheduling the second connection server side to be connected with the cloud real machine server side based on the wireless connection mode by setting the state of the cloud real machine server side relative to the second connection server side to be an on-line state.
6. The method of claim 1, wherein the cloud real proxy server belongs to at least two candidate proxy servers, the method further comprising:
Receiving a first connection request sent by a client through a load balancing server, wherein the load balancing server is used for determining a candidate proxy server to be connected to the client from the at least two candidate proxy servers according to a cloud real machine identifier in the first connection request, forwarding the first connection request to the determined candidate proxy server, and the Yun Zhen machine identifier is used for identifying the cloud real machine server;
And responding to the first connection request, and connecting with the client.
7. The method of claim 6, further comprising, after said connecting with said client:
Receiving a video stream sent by the cloud real machine server through the first connection server or the second connection server, and forwarding the video stream to the connected client so that the client displays the received video stream;
And/or the number of the groups of groups,
And receiving a control flow sent by the connected client, and sending the control flow to a current connection server currently connected with the cloud real machine server in the first connection server and the second connection server, so as to control the cloud real machine deployed with the cloud real machine server based on the received control flow through the current connection server.
8. The method as recited in claim 6, further comprising:
Receiving a second connection request sent by a connectable service end through the load balancing service end, and responding to the second connection request to connect with the connectable service end so as to detect the wired connection state of the connected connectable service end or schedule the connected connectable service end;
The connectable server comprises the first connection server or the second connection server, and the load balancing server is configured to determine a candidate proxy server to be connected to the connectable server from the at least two candidate proxy servers according to the Yun Zhen machine identifier in the second connection request, and forward the second connection request to the determined candidate proxy server.
9. The utility model provides a connection auto-change over device which characterized in that disposes in cloud true machine proxy service end, said device includes:
The connection state detection module is used for detecting the wired connection state of a first connection server connected with the cloud real machine server based on a wired connection mode;
and the connection switching module is used for scheduling the second connection service end to be connected with the cloud real machine service end based on a wireless connection mode corresponding to the wireless network aiming at the second connection service end which is accessed to the same wireless network when the wired connection state of the first connection service end is detected to be abnormal, so that the connection mode of the cloud real machine service end is switched from the wired connection mode to the wireless connection mode.
10. A cloud computing proxy server, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the connection switching method of any one of claims 1-8.
11. A computer readable storage medium storing computer instructions for causing a processor to perform the connection switching method according to any one of claims 1-8.
CN202211573746.2A 2022-12-08 2022-12-08 Connection switching method, device, server and storage medium Pending CN118175193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211573746.2A CN118175193A (en) 2022-12-08 2022-12-08 Connection switching method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211573746.2A CN118175193A (en) 2022-12-08 2022-12-08 Connection switching method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN118175193A true CN118175193A (en) 2024-06-11

Family

ID=91349197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211573746.2A Pending CN118175193A (en) 2022-12-08 2022-12-08 Connection switching method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN118175193A (en)

Similar Documents

Publication Publication Date Title
CN114025037B (en) Cloud mobile phone overhaul method and device, electronic equipment and storage medium
CN114697391A (en) Data processing method, device, equipment and storage medium
CN113067769A (en) Router restarting method, device, equipment and storage medium
CN118175193A (en) Connection switching method, device, server and storage medium
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN116027226A (en) Component testing method and device, electronic equipment and storage medium
CN113641688B (en) Node updating method, related device and computer program product
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN113420275B (en) Data connection processing method, related device and computer program product
CN113326192B (en) Application testing method, device, equipment and storage medium for mobile terminal
CN112770415B (en) Information processing method and device for wireless hotspots
CN112925623B (en) Task processing method, device, electronic equipment and medium
CN113419880A (en) Cloud mobile phone root authority acquisition method, related device and computer program product
CN113010285A (en) Method, apparatus, device, medium and product for processing data
CN116440504B (en) Game resource processing method, device and storage medium
CN117041325A (en) Website access method, device, equipment and storage medium
CN116781572A (en) Service availability detection method, device, equipment and storage medium
CN117076168A (en) SDK processing method, device, equipment and storage medium
CN117040958A (en) RS 485-based multipurpose multi-standby control method, device, equipment and medium
CN113783769A (en) Method and device for transmitting message in automatic driving and relay equipment
CN118118386A (en) Link delay detection method, device, equipment and storage medium
CN116107878A (en) Remote debugging method, device, equipment and storage medium
CN117370209A (en) Application program performance test method, device, medium and electronic equipment
CN117376399A (en) Data processing method, device, equipment and medium
CN117061412A (en) Transmission path determining method and device in power system and electronic equipment

Legal Events

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