Cloud application network compatibility method, device, electronic device and storage medium
By generating virtual hotspots and virtual sites locally on the client and adapting data packets to protocols, the transmission problem of cloud games in different network environments is solved, and the data transmission success rate and user experience are improved.
Patent Information
- Application Number
- CN202211313761.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-10-25
AI Technical Summary
Cloud games are prone to failure when data transmission is transmitted under different network environments, resulting in failure to download update packages or inability to start cloud games, affecting the user experience.
Virtual hotspots and virtual sites are generated locally on the client side, and the data packets are deencapsulated and re-encapsulated based on the client network protocol and server network protocol through virtual hotspots, adapting to transmission in different network environments.
It improves the success rate and network compatibility of cloud application data transmission, ensuring the normal operation and user experience of cloud application.
Smart Images

Figure CN115695569B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud application technology, and in particular to a cloud application network compatibility method, device, electronic device and storage medium. Background Art
[0002] With the integration of 5G technology and cloud computing technology, cloud gaming, as a vertical field of cloud computing, has also begun to develop in new ways, and the industry is showing a thriving scene. Cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming mode, all games are run on the server. After the game is started and rendered, it is compressed and transmitted to the client through the network. The client does not need to configure a high-performance processor and graphics card for the game, and only needs basic video decompression capabilities to execute the game. However, the data transmission involved in cloud gaming will be affected by the different hardware and network environments of the server and client. For example, in the scenario of downloading an update package to upgrade a cloud game, it is usually necessary to first determine whether the current network environment is connected to WIFI. If so, the update package download is supported. Since this process is executed on the server, and the server is connected to Ethernet, there is no WIFI environment, which will cause the update package download to fail or even fail to start the cloud game. Summary of the invention
[0003] Embodiments of the present application provide a cloud application network compatibility method, device, electronic device, and storage medium to improve the network compatibility of cloud applications.
[0004] In a first aspect, an embodiment of the present application provides a cloud application network compatibility method, including: pre-generating a virtual hotspot and a virtual site locally based on a first network to which a client is connected, and the virtual site accesses a locally connected second network through the virtual hotspot; in the case of cloud application data packet transmission between the virtual site and the second network, the virtual hotspot decapsulates and recapsulates the data packet based on the protocol of the first network and the protocol of the second network before transmitting it.
[0005] In the second aspect, an embodiment of the present application provides a cloud application network compatible device, including: a virtual driver module, used to pre-generate a virtual hotspot and a virtual site locally based on a first network to which a client is connected, and the virtual site accesses a locally connected second network through the virtual hotspot; a control module, used to, when there is data packet transmission of a cloud application between the virtual site and the second network, decapsulate and re-capsulate the data packet based on the protocol of the first network and the protocol of the second network by the virtual hotspot before transmission.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the above methods when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the methods described above is implemented.
[0008] Compared with the prior art, this application has the following advantages:
[0009] A virtual hotspot and a virtual site are generated locally based on the first network to which the client is connected in advance. When data packets of cloud applications are transmitted between the virtual site and the local second network, the virtual hotspot decapsulates and recapsulates the data packets based on the protocol of the first network and the protocol of the second network before transmitting them. This can reduce the impact of different network environments of the local and client on the data transmission of cloud applications, effectively improve the success rate of data transmission, and ensure the normal operation of cloud applications. It also improves the network compatibility of cloud applications, thereby enhancing the user experience.
[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.
[0012] Figure 1 A schematic diagram of an application scenario of the cloud application network compatibility method provided in this application;
[0013] Figure 2 A flowchart of a cloud application network compatibility method according to an embodiment of the present application;
[0014] Figure 3 is a flow chart of a cloud application network compatibility method according to another embodiment of the present application;
[0015] Figure 4 is a schematic diagram of the architecture of a virtual driver according to another embodiment of the present application;
[0016] Figure 5is a schematic diagram of bidirectional transmission between a virtual hotspot and Ethernet in another embodiment of the present application;
[0017] Figure 6 is a structural block diagram of a cloud application network compatible device according to an embodiment of the present application; and
[0018] Figure 7 A block diagram of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION
[0019] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the concept or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature and not restrictive.
[0020] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.
[0021] First, the terms involved in this application are explained.
[0022] Cloud application: A method in which a server provides services to a client based on cloud computing. The client interacts with the server through the cloud application. The client's operations are synchronized to the server, and the data generated by the server is also transmitted to the client in real time. There are many types of cloud applications, including but not limited to: cloud games, cloud music, cloud health, cloud travel or cloud sports.
[0023] Server: A server located in the cloud that provides related services for cloud applications. A server can provide one cloud application, or a server can provide multiple cloud applications.
[0024] Client: A user device that uses cloud applications and can communicate with the cloud server and interact with the user. Clients can be of many types, including but not limited to computers, tablets, laptops, personal digital assistants (PDAs), or mobile phones.
[0025] AP (Access Point), also known as wireless access point or hotspot, is the creator of a wireless network and the central node of the wireless network. The wireless router used in a general home or office is an AP.
[0026] STA (Station) is a user device that can connect to a wireless network. Each user device connected to a wireless network is called a station, including but not limited to computers, tablet computers, laptops, PDAs or mobile phones.
[0027] IEEE 802.3: defines the media access control of the physical layer and data link layer of wired Ethernet. 802.3 also defines the LAN access method using CSMA / CD (Carrier Sense Multiple Access with Collision Detection).
[0028] IEEE 802.11: A universal standard for wireless LANs.
[0029] Service Set IDentifier (SSID): used to identify wireless LANs. SSID can be used to distinguish different wireless LANs. After scanning the SSID broadcast by the hotspot, the client can access the hotspot based on the SSID and then access the wireless LAN.
[0030] Figure 1 The schematic diagram of an exemplary application scenario for implementing the cloud application network compatibility method of the embodiment of the present application. The server in the cloud can provide cloud application related services to multiple clients. Among them, there can be various types of clients, such as computers, mobile phones, tablet computers or laptops, etc. The server in the cloud can be deployed as needed, including centralized deployment or distributed deployment. For example, multiple servers can be deployed in the cloud, each server provides a cloud application, or one server can be deployed to provide multiple cloud applications at the same time. The figure only takes the deployment of one server as an example for illustration.
[0031] The present application embodiment provides a cloud application network compatibility method that can be applied to a server in the cloud. Figure 2 The flowchart of the cloud application network compatibility method according to an embodiment of the present application is shown. The method may include the following steps S201 and S202.
[0032] In step S201, a virtual hotspot and a virtual site are generated locally based on a first network to which the client is connected, and the virtual site is connected to a locally connected second network through the virtual hotspot.
[0033] The first network connected to the client may be a WIFI wireless fidelity network, and the second network connected locally may be Ethernet, Bluetooth or a mobile network, which is determined by the hardware of the server. The mobile network includes but is not limited to: 2G, 3G, 4G or 5G mobile networks, etc.
[0034] Exemplarily, the virtual hotspot and virtual site can be driven by a virtual WiFi built into the server operating system kernel, and can be obtained by creating an AP mode instance and a STA mode instance. After the virtual site accesses the second network through the virtual hotspot, the virtual site can send and receive data of the cloud application through the second network.
[0035] In step S202, when there is data packet transmission of a cloud application between the virtual site and the second network, the virtual hotspot decapsulates and recapsulates the data packet based on the protocol of the first network and the protocol of the second network before transmission.
[0036] Among them, decapsulating the data packet refers to removing the original protocol header in the data packet, and recapsulating refers to adding a new protocol header to the decapsulated data, thereby realizing the message format conversion from the original protocol to the new protocol to adapt to network transmission.
[0037] In this embodiment, the protocol of the first network is a network protocol supported by the client, and the protocol of the second network is a network protocol supported by the server. Decapsulation and recapsulation of data packets based on the protocol of the first network and the protocol of the second network can achieve compatibility between the first network and the second network, thereby improving the success rate and accuracy of data transmission.
[0038] The above method provided in this embodiment can reduce the impact of different local and client network environments on cloud application data transmission, effectively improve the success rate of data transmission, ensure the normal operation of cloud applications, and improve the network compatibility of cloud applications, thereby enhancing user experience.
[0039] Another embodiment of the present application provides a cloud application network compatibility method that can be applied to a server in the cloud. Figure 3 Shown is a flow chart of a cloud application network compatibility method according to another embodiment of the present application. The method may include the following steps S301 to S306.
[0040] In step S301, information about a first network to which a client is connected is obtained in advance.
[0041] In this embodiment, the information of the first network is a service set identifier SSID, which is used to identify the first network connected to the client. The SSID can be obtained in any of the following ways: a method reported by the client or a method randomly generated by the server.
[0042] In the first client reporting method, when the client is connected to the first network, it can report the SSID of the first network to the server, so that the server obtains the SSID reported by the client. In this client reporting method, the SSID obtained by the server is the SSID of the first network that the client is actually connected to, which can reflect the client's real network environment. Based on this, a more realistic virtual driver can be obtained on the server, which improves the accuracy of cloud application services.
[0043] In the second server random generation method, the server does not care whether the client has connected to the first network or has not yet connected to the first network. Usually, when the client has not yet connected to the first network, the server will actively generate a random SSID locally and assign the randomly generated SSID to the client for use to identify the first network to be connected by the client. The SSID obtained by this random generation method has a certain degree of versatility and can be applied to clients of any model and brand. In addition, this method does not require client reporting, eliminating the link between the client and the server for communication due to reporting, saving communication resources, and the SSID is directly generated on the server, greatly improving efficiency.
[0044] In step S302, a virtual hotspot is generated locally in AP wireless access point mode, and a name of the virtual hotspot is set based on information of the first network.
[0045] Among them, the virtual hotspot can be generated in the following manner: a virtual hotspot is generated locally by driving an operation process in AP mode, and the name of the virtual hotspot is set based on the information of the first network. Exemplarily, the driving operation process can be a hostapd process. Hostapd is an encryption authentication tool on the AP side, which implements access management related to IEEE 802.11. The AP mode in this embodiment supports the operation of the hostapd process. The hostapd process can simulate the function of AP, is responsible for controlling the access and authentication of the management site, and can set various parameters of the wireless network by modifying the configuration file. Specifically, when the information of the first network obtained is SSID, the name of the virtual hotspot can be set to the SSID.
[0046] In step S303, a virtual site is generated in STA site mode.
[0047] Exemplarily, the virtual hotspot and virtual site in this embodiment can be obtained by creating an AP mode instance and a STA mode instance by a virtual WiFi driver built into the local operating system kernel. The STA mode in this embodiment supports wpa_supplicant operation based on the nl80211 specification. wpa_supplicant is an encryption authentication tool for WIFI clients, supporting WEP (Wired Equivalent Privacy), WPA (WIFI Protected Access) and WPA2 wireless protocols and encryption authentication.
[0048] Figure 4 FIG. 1 is a schematic diagram of the architecture of a virtual driver according to an embodiment of the present application. Figure 4As shown, the architecture of the operating system in the server includes: application, framework, WIFI service, wificond, HIDL (Hardware abstract layer Interface Definition Language) interface and kernel. Among them, wificond is an independent process that communicates with the WIFI driver through standard nl80211 commands. WIFI services include: basic WIFI service, WIFIP2P (Peer to Peer) service and WIFIRtt (Round Trip Time) service. Among them, P2P refers to peer-to-peer network, also known as peer-to-peer technology, which is an Internet system without a central server and relies on user groups (peers) to exchange information. RTT refers to the time required for data to be transmitted from one end of the network to the other end and then received confirmation from the receiving end. HIDL interface includes: supplicant HAL (client hardware abstraction layer), hostapd HAL and Vendor HAL (vendor hardware abstraction layer). Among them, supplicant HAL is the HAL interface of wpa_supplicant, hostapd HAL is the HAL interface of hostapd, and Vendor HAL is the HAL interface of Android-specific commands. WIFI services communicate with the framework, wificond and HIDL interfaces through binder. Among them, binder is an inter-process communication mechanism. By mapping the memory of the user space of the process to the kernel space, data transmission between processes can be achieved by simply copying from the kernel space. In order to achieve network compatibility of cloud applications, a virtual WIFI driver can be built into the kernel of the server operating system and connected to the Ethernet eth0 of the server to achieve bidirectional data transmission. Specifically, in the virtual WiFi driver, at least one AP mode instance and one STA mode instance can be created to obtain a virtual hotspot (as shown in the figure ap0) and a virtual site (as shown in the figure wlan0). The virtual site wlan0 is connected to the Ethernet eht0 by connecting to the virtual hotspot ap0.
[0049] In step S304, the virtual site connects to the virtual hotspot based on the name.
[0050] In one embodiment, the virtual site can be connected to the virtual hotspot in the following manner: the virtual site is scanned by the daemon process of WIFI access protection, and the virtual hotspot is connected based on the scanned name. Exemplarily, the daemon process of WIFI access protection can be a wpa_supplicant process. The STA mode in this embodiment supports standard wpa_supplicant operations such as scanning, connecting and deleting. In STA mode, the virtual site can scan the SSID provided by the virtual hotspot through the wpa_supplicant process and connect to the virtual hotspot. Specifically, when the information of the first network obtained is the SSID, the virtual site can connect to the corresponding virtual hotspot based on the scanned SSID.
[0051] In step S305, when the virtual site has a first data packet to be sent to the second network based on the cloud application, the virtual hotspot decapsulates the first data packet and recapsulates it into a second data packet and then sends it through the second network.
[0052] The first data packet may be a data packet based on a protocol of the first network, and the second data packet may be a data packet based on a protocol of the second network.
[0053] In step S306, when the third data packet of the cloud application is received through the second network, the virtual hotspot decapsulates the third data packet and recapsulates it into a fourth data packet and then sends it to the virtual site.
[0054] The third data packet is a data packet based on the protocol of the second network, and the fourth data packet is a data packet based on the protocol of the first network.
[0055] In this embodiment, the first network connected to the client may be a WIFI wireless fidelity network, and the second network locally connected may be Ethernet, Bluetooth or a mobile network, which is determined by the hardware of the server. The mobile network includes but is not limited to: 2G, 3G, 4G or 5G mobile networks, etc.
[0056] There may be multiple cloud applications involved in the embodiments of the present application. The following takes cloud gaming as an example to specifically illustrate the process of network compatibility. In the operating mode of cloud gaming, all games are run on the server. After the game is started and rendered, it is compressed and transmitted to the client through the network. The client does not need to configure a high-performance processor and graphics card for the game, only basic video decompression capabilities are required to execute the game. However, the client and server of cloud gaming generally have certain differences in hardware. The following Table 1 shows the difference in hardware configuration between the two.
[0057] Table 1
[0058] Hardware Configuration Client server Bluetooth have none WiFi have none NFC have none GPS have none Audio ADC+DAC have none FaceID have none Camera have none TouchID have none Eth (Ethernet) none have Gyroscope have none Gravity sensor have none Hall sensor (magnetic sensor, used for leather case mode) have none Compass (magnetic field sensor, commonly used for navigation) have none Infrared sensor (for remote control function) have none Proximity Light S Sensor have none Ambient light sensor have none SIM+call function have none
[0059] As can be seen from Table 1, the client is usually equipped with Bluetooth, WIFI, NFC, GPS, gyroscope, compass and ambient light sensor, etc., while the server generally does not have these configurations. The common configuration on the server is Ethernet. For cloud games, the client will first determine whether WIFI is turned on when updating resources. If it is turned on, it supports the download of update packages. Since update packages are usually large in capacity, this method can avoid downloading update packages in non-WIFI environments, which will consume a lot of user traffic charges. However, the server is connected to Ethernet and there is no WIFI network, so the two networks need to be compatible to ensure the normal operation of cloud games.
[0060] Figure 5 FIG. 1 is a schematic diagram of bidirectional transmission between a virtual hotspot and Ethernet in another embodiment of the present application. Figure 5 As shown, in the server, based on the WIFI network connected by the client, a virtual site STA (such as wlan0) and a virtual hotspot AP (such as ap0) are generated. wlan0 is connected to Ethernet eth0 through ap0. When the 802.11 data packet in AP mode needs to be sent, it is first decapsulated by ap0 and recapsulated into an 802.3 data packet, and then sent out through Ethernet eth0. When an 802.3 data packet is received from Ethernet eth0, it is first decapsulated by ap0 and recapsulated into an 802.11 data packet, and then forwarded to wlan0. The above process realizes bidirectional data transmission between the virtual site and Ethernet, and improves network compatibility.
[0061] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a cloud application network compatible device. Figure 6 The structure block diagram of a cloud application network compatible device according to an embodiment of the present application is shown. The device may include a virtual driver module 601 and a control module 602.
[0062] The virtual driver module 601 is used to generate a virtual hotspot and a virtual site locally based on the first network to which the client is connected in advance, and the virtual site is connected to the locally connected second network through the virtual hotspot.
[0063] The control module 602 is used to decapsulate and recapsulate the data packets before transmission based on the protocols of the first network and the second network by the virtual hotspot when data packets of cloud applications are transmitted between the virtual site and the second network.
[0064] In one implementation, the control module 602 may include a first control unit and a second control unit.
[0065] The first control unit is used for decapsulating the first data packet by the virtual hotspot and recapsulating it into a second data packet and then sending it through the second network when the virtual site has a first data packet to be sent to the second network based on a cloud application.
[0066] The second control unit is used for, when a third data packet of the cloud application is received through the second network, decapsulating the third data packet by the virtual hotspot, recapsulating it into a fourth data packet and sending it to the virtual site.
[0067] The first data packet and the fourth data packet are data packets based on the protocol of the first network, and the second data packet and the third data packet are data packets based on the protocol of the second network.
[0068] In one embodiment, the virtual driver module 601 can be used to: pre-acquire information about the first network to which the client is connected, locally generate a virtual hotspot in AP wireless access point mode, set the name of the virtual hotspot based on the information of the first network, generate a virtual site in STA site mode, and the virtual site connects to the virtual hotspot based on the above name.
[0069] In one embodiment, the virtual driver module 601 can be used to: pre-acquire information about the first network to which the client is connected, locally generate a virtual hotspot by driving an operation process in AP mode, set a name for the virtual hotspot based on the information of the first network, generate a virtual site in STA site mode, scan the virtual site through a daemon process protected by WIFI access, and connect to the virtual hotspot based on the scanned name.
[0070] In this embodiment, the information of the first network may be a service set identifier SSID, wherein the SSID is the SSID of the connected first network reported by the client, or is a locally randomly generated SSID used to identify the first network to be connected by the client.
[0071] Exemplarily, the virtual hotspot and the virtual site can be obtained by creating an AP mode instance and a STA mode instance through a virtual WiFi driver built into the local operating system kernel.
[0072] In this embodiment, the first network is a WIFI wireless fidelity network, and the second network is Ethernet, Bluetooth or a mobile network.
[0073] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.
[0074] The above device provided in this embodiment can reduce the impact of different local and client network environments on cloud application data transmission, effectively improve the success rate of data transmission, ensure the normal operation of cloud applications, and improve the network compatibility of cloud applications, thereby enhancing user experience.
[0075] Figure 7 is a block diagram of an electronic device used to implement an embodiment of the present application. Figure 7 As shown, the electronic device includes: a memory 710 and a processor 720. The memory 710 stores a computer program that can be run on the processor 720. When the processor 720 executes the computer program, the method in the above embodiment is implemented. The number of the memory 710 and the processor 720 can be one or more.
[0076] The electronic device also includes:
[0077] The communication interface 730 is used to communicate with external devices and perform data exchange transmission.
[0078] If the memory 710, the processor 720 and the communication interface 730 are implemented independently, the memory 710, the processor 720 and the communication interface 730 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0079] Optionally, in a specific implementation, if the memory 710, the processor 720 and the communication interface 730 are integrated on a chip, the memory 710, the processor 720 and the communication interface 730 can communicate with each other through an internal interface.
[0080] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.
[0081] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.
[0082] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.
[0083] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0084] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of exemplary but not limiting description, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0085] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0086] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0087] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0088] Any process or method described in the flow chart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0089] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or used in combination with these instruction execution systems, devices or apparatuses.
[0090] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0091] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0092] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope recorded in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A cloud application network compatibility method, characterized in that: The method comprises: Pre-generating a virtual hotspot and a virtual site locally on the server based on the first network to which the client is connected, wherein the virtual site accesses the locally connected second network through the virtual hotspot; In the case of data packet transmission of cloud applications between the virtual site and the second network, the virtual hotspot decapsulates and recapsulates the data packet based on the protocol of the first network and the protocol of the second network before transmission; Among them, the pre-generating a virtual hotspot and a virtual site locally on the server based on the first network to which the client is connected includes: pre-acquiring information of the first network to which the client is connected; generating a virtual hotspot locally in AP wireless access point mode, and setting the name of the virtual hotspot based on the information of the first network; generating a virtual site in STA site mode; and the virtual site connects to the virtual hotspot based on the name.
2. The method according to claim 1, characterized in that In the case where there is data packet transmission of the cloud application between the virtual site and the second network, the virtual hotspot decapsulates and recapsulates the data packet based on the protocol of the first network and the protocol of the second network before transmitting, including: In the case where the virtual site has a first data packet to be sent to the second network based on the cloud application, the virtual hotspot decapsulates the first data packet and recapsulates it into a second data packet and then sends it through the second network; When a third data packet of the cloud application is received through the second network, the virtual hotspot decapsulates the third data packet, recapsulates the fourth data packet and sends the fourth data packet to the virtual site; The first data packet and the fourth data packet are data packets based on the protocol of the first network, and the second data packet and the third data packet are data packets based on the protocol of the second network.
3. The method according to claim 1, characterized in that The locally generating a virtual hotspot in AP wireless access point mode, and setting a name of the virtual hotspot based on information of the first network, includes: A virtual hotspot is generated locally by driving an operation process in AP mode, and a name of the virtual hotspot is set based on information of the first network.
4. The method according to claim 1, characterized in that: The virtual site is connected to the virtual hotspot based on the name, including: The virtual site is scanned by a WIFI access protection daemon, and the virtual hotspot is connected based on the scanned name.
5. The method according to claim 1, characterized in that: The information of the first network is a service set identifier SSID, wherein the SSID is the SSID of the connected first network reported by the client, or is a locally randomly generated SSID used to identify the first network to be connected by the client.
6. The method according to any one of claims 1 to 5, characterized in that: The virtual hotspot and virtual site are obtained by creating an AP mode instance and a STA mode instance through a virtual WiFi driver built into the local operating system kernel.
7. The method according to any one of claims 1 to 5, characterized in that: The first network is a WIFI wireless fidelity network, and the second network is Ethernet, Bluetooth or a mobile network.
8. A cloud application network compatible device, characterized in that: The device comprises: A virtual driver module, used to generate a virtual hotspot and a virtual site locally on the server based on the first network to which the client is connected in advance, wherein the virtual site accesses the locally connected second network through the virtual hotspot; A control module, configured to, when there is data packet transmission of a cloud application between the virtual site and the second network, decapsulate and recapsulate the data packet based on the protocol of the first network and the protocol of the second network by the virtual hotspot before transmission; Among them, the virtual driver module is used to: pre-acquire the information of the first network to which the client is connected; locally generate a virtual hotspot in AP wireless access point mode, and set the name of the virtual hotspot based on the information of the first network; generate a virtual site in STA site mode; and the virtual site connects to the virtual hotspot based on the name.
9. The device according to claim 8, characterized in that The control module comprises: A first control unit is configured to, when the virtual site has a first data packet to be sent to the second network based on a cloud application, decapsulate the first data packet by the virtual hotspot, recapsulate the first data packet into a second data packet, and then send the second data packet through the second network; A second control unit is configured to, when a third data packet of the cloud application is received through the second network, decapsulate the third data packet by the virtual hotspot, recapsulate the third data packet into a fourth data packet, and then send the fourth data packet to the virtual site; The first data packet and the fourth data packet are data packets based on the protocol of the first network, and the second data packet and the third data packet are data packets based on the protocol of the second network.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
11. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.