Cloud service access method, virtual service device, system, electronic device and medium
By setting up a communication connection between the virtual service device and the cloud server in the user's LAN, and using the LAN IP address and network address translation rules, the user equipment can directly access the cloud service, solving the problem of users needing to install additional applications, and reducing the threshold for using cloud services.
Patent Information
- Application Number
- CN202310703619.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-06-14
AI Technical Summary
Users need to install additional applications to access cloud services on the external network, which increases the threshold for using cloud services.
Set up a virtual service device in the user's LAN, establish a communication connection with the cloud server, and configure a LAN communication protocol to realize direct communication between user equipment and cloud services through LAN IP address and network address conversion rules.
User equipment can easily and quickly access and use cloud services through the existing LAN communication protocol without additional applications, significantly lowering the threshold for use.
Smart Images

Figure CN116781670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud services, and in particular to a cloud service access method, a virtual service device, a system, an electronic device, and a computer-readable storage medium. Background Art
[0002] In related technologies, cloud services are usually deployed on the external network, which means that users can only access the above cloud services by installing additional applications and using these applications to access the external network, which significantly increases the threshold for users to use cloud services. Summary of the Invention
[0003] The purpose of the present invention is to provide a cloud service access method, virtual service device, system, electronic device and computer-readable storage medium, which can be set up in the user's local area network to establish a communication connection with the cloud service. The user device only needs to communicate with the virtual service device through the existing local area network communication protocol to access the cloud service conveniently and quickly through the virtual service device, thereby reducing the threshold for users to use cloud services.
[0004] To solve the above technical problems, the present invention provides a cloud service access method, which is applied to a virtual service device, wherein the virtual service device has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service. The method includes:
[0005] Using the LAN IP address allocated from the user LAN to configure itself as a network device in the user LAN, and create a network address translation rule between the user LAN and the cloud server;
[0006] When receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, returning the cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device discovers the cloud service according to the cloud service name, and maps the cloud service name with the virtual service device;
[0007] When receiving interaction data sent by the user device based on the local area network communication protocol, performing network address translation on the interaction data according to the network address translation rule, and sending the translated interaction data to the cloud server for service processing;
[0008] When receiving response data corresponding to the user device sent by the cloud server, the response data is subjected to network address translation according to the network address translation rule, and the translated response data is sent to the user device based on the local area network communication protocol.
[0009] Optionally, before configuring itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, the method further includes:
[0010] Receive the LAN IP address assigned to the virtual service device by the CPE device corresponding to the user LAN through the tunnel;
[0011] Correspondingly, receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol includes:
[0012] receiving, through the tunnel, a device discovery request sent by the user equipment based on the local area network communication protocol;
[0013] Correspondingly, receiving the interaction data sent by the user equipment based on the local area network communication protocol includes:
[0014] receiving, through the tunnel, interaction data sent by the user equipment based on the local area network communication protocol;
[0015] Accordingly, the sending of the converted response data to the user equipment based on the local area network communication protocol includes:
[0016] Based on the local area network communication protocol, the converted response data is sent to the user equipment through the tunnel.
[0017] Optionally, before configuring itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, the method further includes:
[0018] Receive the local area network IP address allocated to the virtual service device by the vCPE device corresponding to the user local area network.
[0019] Optionally, the creating a network address translation rule between the user LAN and the cloud server includes:
[0020] Creating a source address translation rule between the network segment of the user LAN and the external IP address corresponding to the user LAN;
[0021] Create a destination address translation rule between the local area network IP address and the external network IP address corresponding to the cloud server;
[0022] The source address translation rule and the destination address translation rule are set as network address translation rules between the user LAN and the cloud server.
[0023] Optionally, performing network address translation on the interaction data according to the network address translation rule includes:
[0024] According to the source address translation rule, the source address in the interactive data is modified from the local area network IP address of the user device to the external network IP address corresponding to the user device;
[0025] According to the destination address conversion rule, the destination address in the interactive data is modified from the local area network IP address of the virtual service device to the external network IP address corresponding to the cloud server.
[0026] Optionally, performing network address translation on the response data according to the network address translation rule includes:
[0027] According to the source address translation rule, the destination address in the response data is modified from the external network IP address corresponding to the user device to the local area network IP address of the user device;
[0028] According to the destination address conversion rule, the source address in the response data is modified from the external network IP address corresponding to the cloud server to the local area network IP address of the virtual service device.
[0029] Optionally, after creating the network address translation rule between the user LAN and the cloud server, the method further includes:
[0030] Detect whether the external network IP address corresponding to the cloud server has changed, and when it is determined that a change has occurred, adjust the network address translation rule associated with the cloud server based on the changed external network IP address of the cloud server.
[0031] Optionally, detecting whether the external network IP address corresponding to the cloud server has changed includes:
[0032] Detect whether the external IP address corresponding to the cloud server has changed based on the SLA agreement;
[0033] Or, it is detected whether the cloud server sends the changed external network IP address, and when it is determined to send it, it is determined that the external network IP address corresponding to the cloud server has changed.
[0034] The present invention also provides a virtual service device, which has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service, and the device includes:
[0035] an initialization module, configured to configure itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, and to create a network address translation rule between the user LAN and the cloud server;
[0036] a service discovery module configured to, upon receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, return a cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device discovers the cloud service based on the cloud service name, and maps the cloud service name with the virtual service device;
[0037] a first network address translation module, configured to, upon receiving interaction data sent by the user equipment based on the local area network communication protocol, perform network address translation on the interaction data according to the network address translation rule, and send the converted interaction data to the cloud server for service processing;
[0038] The second network address translation module is used to, when receiving response data corresponding to the user device sent by the cloud server, perform network address translation on the response data according to the network address translation rule, and send the converted response data to the user device based on the local area network communication protocol.
[0039] The present invention also provides a cloud service access system, comprising: user equipment, a virtual service device, and a cloud server, wherein:
[0040] The user equipment is used to discover and access cloud services through the virtual service device;
[0041] The virtual service device is used to execute the cloud service access method described above;
[0042] The cloud server is used to provide the cloud service.
[0043] The present invention further provides an electronic device, comprising:
[0044] Memory for storing computer programs;
[0045] A processor is configured to implement the cloud service access method described above when executing the computer program.
[0046] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the cloud service access method described above is implemented.
[0047] The present invention provides a cloud service access method, which is applied to a virtual service device, wherein the virtual service device has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service. The method comprises: using a local area network IP address allocated from a user local area network to configure itself as a network device in the user local area network, and creating a network address translation rule between the user local area network and the cloud service; when receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, returning the cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the cloud service The user device discovers the cloud service based on the cloud service name and maps the cloud service name with the virtual service device; when receiving the interaction data sent by the user device based on the local area network communication protocol, the interaction data is network addressed according to the network address translation rule, and the converted interaction data is sent to the cloud server for business processing; when receiving the response data corresponding to the user device sent by the cloud server, the response data is network addressed according to the network address translation rule, and the converted response data is sent to the user device based on the local area network communication protocol.
[0048] It can be seen that the present invention can set up a virtual service device, which has a communication connection with the cloud server and is provided with a local area network communication protocol corresponding to the cloud service; then, the virtual service device can use the local area network IP address allocated from the user local area network to configure itself as a network device in the user local area network, and at the same time create a network address conversion rule between the user local area network and the cloud service; furthermore, the user device in the user local area network can send a device discovery request to the virtual service device based on the local area network communication protocol, and the virtual service device can return the cloud service name to the user device when receiving the request, so that the user device can The cloud service is mapped to the virtual service device based on the cloud service name and the LAN IP address of the virtual service device. At the same time, the virtual service device can also perform network address translation on the interactive data based on the above-mentioned network address translation rules when receiving interactive data sent by the user device based on the LAN communication protocol, and send the converted interactive data to the cloud server for business processing. When receiving response data corresponding to the user device returned by the cloud server, the response data is performed network address translation based on the above-mentioned network address translation rules, and the converted response data is returned to the user device based on the LAN communication protocol. In other words, in simple terms, the present invention can set up a virtual service device in the user's LAN to directly connect the cloud service to the user's LAN through the device. In this way, the user device can easily and quickly access the cloud service only through the existing LAN communication protocol, thereby significantly lowering the threshold for users to access and use cloud services. The present invention also provides a virtual service device, system, electronic device and computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0050] Figure 1 A structural block diagram of the first cloud service access system provided by an embodiment of the present invention;
[0051] Figure 2 A structural block diagram of a second cloud service access system provided by an embodiment of the present invention;
[0052] Figure 3 A flowchart of a cloud service access method provided by an embodiment of the present invention;
[0053] Figure 4 A flowchart of another cloud service access method provided by an embodiment of the present invention;
[0054] Figure 5 This is a structural diagram of the third cloud service access system provided by an embodiment of the present invention;
[0055] Figure 6 This is a structural block diagram of the fourth cloud service access system provided by an embodiment of the present invention;
[0056] Figure 7 This is a structural block diagram of a virtual service device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0058] In related technologies, cloud services are typically deployed on external networks. This means that users can only access these cloud services by installing additional applications on their local devices and using these applications to access the external network, significantly increasing the barrier to entry for users to use cloud services. In light of this, the present invention provides a cloud service access method that can deploy a virtual service device within a user's local area network (LAN) that establishes a communication connection with a cloud server. User devices only need to communicate with the virtual service device via existing LAN communication protocols to quickly and easily access cloud services through the virtual service device, thereby lowering the barrier to entry for users to use cloud services.
[0059] For ease of understanding, the system architecture of the present invention is introduced below. Figure 1 , Figure 1This is a block diagram of the structure of the first cloud service access system provided by an embodiment of the present invention. This system comprises at least three components: a user device 101, a virtual service device 102, and a cloud server 201. User device 101 can be a personal computer, mobile phone, tablet, smart TV, etc. It is located in the same user local area network (LAN) as the virtual service device 102 and establishes a LAN communication connection with the virtual service device 102. The type and number of user devices 101 in the same user LAN can be arbitrarily set, and all user devices 101 in the LAN can share all virtual service devices 102 in the LAN. Cloud server 201, which provides cloud services, is located in an external network and establishes an external network communication connection with the virtual service device 102. Cloud services can include cloud NAS (Network Attached Storage), cloud conferencing, cloud applications, and more. To facilitate user access to and use of various cloud services, embodiments of the present invention specifically include a virtual service device 102 in the user LAN, which extends cloud services directly into the user LAN and provides cloud service query and access services for user devices. Since a virtual server device 102 is responsible for only one cloud service, when multiple cloud services exist, a virtual server device 102 corresponding to each cloud server 201 can be set up in the user's local area network, allowing the user device 101 to discover and access each cloud service through each virtual server device 102. Furthermore, embodiments of the present invention also specifically provide a corresponding local area network communication protocol for cloud services, and this local area network communication protocol can be deployed in the virtual server device 102. Furthermore, the user device 101 can directly discover the virtual server device 102 based on the local area network communication protocol, thereby discovering the cloud service. Furthermore, the user device 101 can also directly interact with the virtual server device 102 based on the local area network communication protocol, and the virtual server device 102 can forward the interaction data to the cloud server 201, thereby interacting with the cloud server 201. Considering that LAN communication protocols (such as NetBIOS, Samba, NFS, FTP, FTPS, Airplay, etc.) are common communication protocols in general user devices, users can directly use the native functions in the user devices to access and use cloud services conveniently and quickly, thereby significantly lowering the threshold for users to access and use cloud services.
[0060] It should be noted that the embodiment of the present invention does not limit the correspondence between cloud service 201 and LAN communication protocols; it is related to the type of cloud service in cloud server 201. For example, when the cloud service type is cloud NAS, its corresponding LAN communication protocol may be NetBIOS, Samba, FTP, etc. The LAN communication protocols corresponding to other cloud services can also be set according to actual application requirements.
[0061] It should be noted that the relationship between virtual server device 102 and cloud server 201 can be many-to-one, meaning that one virtual server device 102 can correspond to only one cloud server 201, while one cloud server 201 can correspond to multiple virtual server devices 102 and access different user LANs through multiple virtual server devices 102. The correspondence between a user LAN and virtual server device 102 can be one-to-one or many-to-one, meaning that a user LAN can have exclusive access to virtual server device 102 or share it with multiple other user LANs. It should be understood that when multiple user LANs share a virtual server device 102, the virtual server device 102 must be configured with the relevant parameters corresponding to each user LAN.
[0062] Furthermore, the embodiments of the present invention do not limit the deployment location of the virtual server device 102; it can be deployed on the user side or on the cloud side. It is understood that when the virtual server device 102 is deployed on the cloud side, the user device 101 and the virtual server device 102 are relatively far apart. In this case, to deploy both in the same user LAN, a virtual local area network (VLAN) technology can be used to construct a user LAN. In other words, the user device 101 can communicate with the virtual server device 102 based on the virtual local area network technology and the LAN communication protocol. It should be noted that the embodiments of the present invention do not limit how communication is based on the virtual local area network technology. For example, other network devices (such as routers, switches, etc.) can be set between the user device 101 and the virtual server device 102 to encapsulate and transmit LAN messages between the user device 101 and the virtual server device 102 based on the virtual local area network technology, so that the user device 101 and the virtual server device 102 can communicate on the LAN. Reference can be made to relevant technologies related to virtual local area networks.
[0063] Furthermore, in order to automatically connect the virtual service device 102 to the user's LAN, the embodiment of the present invention may also introduce a device that supports the DHCP protocol (Dynamic Host Configuration Protocol) in the system to automatically allocate LAN IP addresses in the user's LAN to the user device 101 and the virtual service device 102. The device may be a gateway device (GW) or a CPE device (Customer Premise Equipment). For ease of setup, the present invention will use a CPE device as a device that connects the virtual service device 102 to the user's LAN based on the DHCP protocol. Please refer to Figure 2 , Figure 2This is a block diagram of the structure of the second cloud service access system provided by an embodiment of the present invention, in which a CPE device 103 is provided in a user's local area network (LAN) and is located between a user device 101 and a virtual server 102. After accessing the user device 101, the CPE device 103 automatically connects to the virtual server 102 and assigns a LAN IP address within the user's LAN to the virtual server 102, thereby connecting the virtual server 102 to the user's LAN. Furthermore, the CPE device 103 can transmit LAN messages between the user device 101 and the virtual server 102, enabling LAN communication between the user device 101 and the virtual server 102. It should be noted that the CPE device 103 in this embodiment of the present invention can be either a physical CPE device or a virtual CPE (vCPE). Furthermore, the CPE device 103 can be deployed either on the user side or on the cloud side, and can be configured based on actual application requirements.
[0064] Based on the above system architecture, the cloud service access method provided by the embodiment of the present invention is described in detail below. Figure 3 , Figure 3 This is a flow chart of a cloud service access method provided by an embodiment of the present invention. This method is applied to a virtual service device, which has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service. It should be noted that the embodiment of the present invention does not limit the type of electronic device in which the virtual service device is deployed. For example, it can be deployed on a personal computer, server, or dedicated device. This method may include:
[0065] S301. Use the LAN IP address allocated from the user LAN to configure itself as a network device in the user LAN, and create a network address translation rule between the user LAN and the cloud server.
[0066] As described above, to connect a virtual service device to a user's LAN, embodiments of the present invention first require issuing a LAN IP address allocated from the user's LAN to the virtual service device, enabling the virtual service device to configure itself as a network device within the user's LAN. User devices can then discover the virtual service device via the LAN communication protocol and interact with it using that protocol. Furthermore, after completing the network device configuration, to forward interaction data sent by the user device to the cloud service and ensure that the cloud service can correctly return response data to the user device, the virtual service device also needs to create a Network Address Translation (NAT) rule between the user's LAN and the cloud service. This rule converts the network address in interaction data sent by the user device into an external network address and sends it to the cloud service, and also converts the network address in response data returned by the cloud service into a LAN address and returns it to the user device. In short, the virtual service device in embodiments of the present invention is primarily responsible for responding to device discovery requests from user devices and exchanging data between the user device and the cloud service.
[0067] It should be noted that the embodiments of the present invention do not limit how the LAN IP address is assigned to the virtual server. For example, it can be assigned statically or based on the DHCP protocol. To facilitate access, embodiments of the present invention can introduce a DHCP-supported device (such as a gateway or CPE device) into the user's LAN, which can automatically connect to the virtual server and assign it a LAN IP address.
[0068] Furthermore, the embodiment of the present invention does not limit the type of network address translation rule. For example, it can be a unidirectional network address translation rule or a bidirectional network address translation rule. Considering that the virtual service device and the cloud service are usually not in the same network segment, the above-mentioned network address translation rule can be set as a bidirectional network address translation rule to improve the convenience of deployment. Specifically, a source address translation rule (SNAT) can be created between the network segment of the user LAN and the external network IP address corresponding to the user LAN, and a destination address translation rule (DNAT) can be created between the LAN IP address and the external network IP address corresponding to the cloud service, thereby obtaining a bidirectional network address translation rule.
[0069] Based on this, create network address translation rules between the user's LAN and the cloud server, which may include:
[0070] Step 11: Create a source address translation rule between the user LAN segment and the external IP address corresponding to the user LAN;
[0071] Step 12: Create a destination address translation rule between the LAN IP address and the public IP address corresponding to the cloud server;
[0072] Step 13: Set the source address translation rule and the destination address translation rule as the network address translation rules between the user LAN and the cloud server.
[0073] It should be noted that the embodiment of the present invention does not limit the number of external IP addresses corresponding to the user's local area network, and can be selected according to actual application requirements. Of course, in addition to IP mapping, the above-mentioned network address translation rules can also further include port mapping (PAT, Port Address Translation, port address translation), which can be selected according to actual application requirements.
[0074] S302. When receiving a device discovery request sent by a user device in the user LAN based on the LAN communication protocol, return the cloud service name of the cloud service to the user device based on the LAN communication protocol, so that the user device discovers the cloud service according to the cloud service name and maps the cloud service name with the virtual service device.
[0075] Specifically, the user device can initiate the aforementioned device discovery request via broadcast or multicast. In response to the device discovery request, the virtual server device can return the cloud service name of the cloud service to the user device based on the local area network communication protocol, allowing the user device to discover the cloud service based on the cloud service name and map the cloud service name to the virtual server device. Simply put, this embodiment of the present invention can convert cloud services from existing Layer 3 services to Layer 2 services, allowing user devices to directly discover cloud services via broadcast or multicast, thereby improving the convenience of users accessing and using cloud services.
[0076] It should be noted that the embodiment of the present invention is not limited to a specific LAN communication protocol, such as NetBIOS protocol, Samba protocol, etc., which can be set according to actual application requirements.
[0077] S303: When receiving interaction data sent by the user device based on the local area network communication protocol, perform network address translation on the interaction data according to the network address translation rule, and send the translated interaction data to the cloud server for business processing.
[0078] As described above, since the network address translation rules created by the embodiment of the present invention can be bidirectional network address translation rules, when the virtual service device receives the interaction data sent by the user device, it can modify the source address in the interaction data from the local area network IP address of the user device to the external network IP address corresponding to the user device according to the source address translation rules, and modify the destination address in the interaction data from the local area network IP address of the virtual service device to the external network IP address corresponding to the cloud service, so as to perform bidirectional network address translation on the interaction data, and thus send the converted interaction data to the cloud service for business processing.
[0079] Based on this, network address translation is performed on the interactive data according to network address translation rules, which may include:
[0080] Step 21: According to the source address translation rule, the source address in the interactive data is modified from the local area network IP address of the user device to the external network IP address corresponding to the user device;
[0081] Step 22: According to the destination address conversion rule, the destination address in the interactive data is modified from the LAN IP address of the virtual service device to the external IP address corresponding to the cloud server.
[0082] S304: When receiving response data corresponding to the user device sent by the cloud server, perform network address translation on the response data according to the network address translation rule, and send the translated response data to the user device based on the local area network communication protocol.
[0083] Also as mentioned above, since the network address translation rule created by the embodiment of the present invention can be a bidirectional network address translation rule, when the virtual service device receives the response data returned by the cloud service, it modifies the destination address in the response data from the external network IP address corresponding to the user device to the local area network IP address of the user device according to the source address translation rule, and modifies the source address in the response data from the external network IP address corresponding to the cloud service to the local area network IP address of the virtual service device, thereby sending the converted response data to the user device, thereby assisting the user device to complete an interaction with the cloud service.
[0084] Based on this, performing network address translation on the response data according to network address translation rules may include:
[0085] Step 31: According to the source address translation rule, the destination address in the response data is modified from the external network IP address corresponding to the user device to the local area network IP address of the user device;
[0086] Step 32: According to the destination address translation rule, the source address in the response data is modified from the external network IP address corresponding to the cloud server to the local area network IP address of the virtual service device.
[0087] The following will introduce the above interaction process of the virtual service device based on another flow chart. Figure 4 , Figure 4This is a flowchart of another cloud service access method provided by an embodiment of the present invention, wherein vHost represents a virtual service device, whose external IP address is 12.10.55.X, and the LAN IP address assigned to it by the vCPE / CPE device is 192.168.1.102; the LAN IP address assigned to the user device by the vCPE / CPE device is 192.168.1.2; cloud NAS represents a cloud service, whose external IP address is 10.1.0.8; SMB and NetBIOS are LAN communication protocols. The interaction process between the user device and the virtual service device can be: after the user device is turned on and connected to the network, it sends a device discovery request to the virtual service device via NBNS / BROWSER broadcast. After receiving the request, the virtual service device can return a HostAnnouncement to the user device in accordance with the requirements of the SMB protocol, and add the service name (Server Name) of the cloud NAS therein. Upon receiving the HostAnnouncement, the user device can establish a mapping between the service name and the LAN IP address of the virtual service device based on the NetBIOS protocol, and can display the virtual service device in locations such as "My Network Places." Furthermore, the user can access the cloud service by accessing other network devices in the LAN, and the user device can send interactive data based on the SMB protocol and the LAN IP address of the virtual service device. The virtual service device can then perform address translation on the interactive data sent by the user device according to the preset bidirectional NAT rules (the source address changes from 192.168.1.2 to 12.10.55.2, and the destination address changes from 192.168.1.102 to 10.1.0.8), and send it to the cloud service for business processing. It can also perform address translation on the response data returned by the cloud service (the source address changes from 10.1.0.8 to 192.168.1.102, and the destination address changes from 12.10.55.2 to 192.168.1.2), and return it to the user device.
[0088] Based on the above embodiment, the present invention can set up a virtual service device, which has a communication connection with the cloud service and is provided with a local area network communication protocol corresponding to the cloud service; then, the virtual service device can use the local area network IP address allocated from the user local area network to configure itself as a network device in the user local area network, and at the same time create a network address conversion rule between the user local area network and the cloud service; furthermore, the user device in the user local area network can send a device discovery request to the virtual service device based on the local area network communication protocol, and the virtual service device can return the cloud service name to the user device when receiving the request, so that the user can use the virtual service device to find the cloud service name. The user device maps the cloud service to the virtual service device based on the cloud service name and the LAN IP address of the virtual service device. Furthermore, upon receiving interactive data sent by the user device based on the LAN communication protocol, the virtual service device may perform network address translation on the interactive data based on the aforementioned network address translation rules and send the translated interactive data to the cloud service for business processing. Furthermore, upon receiving response data corresponding to the user device returned by the cloud service, the virtual service device may perform network address translation on the response data based on the aforementioned network address translation rules and return the translated response data to the user device based on the LAN communication protocol. In other words, the present invention may provide a virtual service device in the user LAN to directly connect the cloud service to the user LAN through the device. In this way, the user device may conveniently and quickly access the cloud service simply through the existing LAN communication protocol, thereby significantly lowering the threshold for users to access and use cloud services.
[0089] Based on the above embodiment, to facilitate automatic access of a cloud-side virtual service device to a user's LAN, embodiments of the present invention can modify the user's CPE device to enable it to communicate with the virtual service device via a Layer 2 tunnel, and assign a LAN IP address to the virtual service device via this tunnel. Furthermore, the user device can also communicate with the virtual service device via this tunnel, such as sending device discovery requests and exchanging information, thereby achieving Layer 2 service discovery based on the cloud-side virtual service device. Based on this, the method can also include:
[0090] S401: Receive, through a tunnel, a LAN IP address allocated by a CPE device corresponding to a user LAN to a virtual service device.
[0091] It should be noted that the embodiments of the present invention do not limit the type and structure of the tunnel, and reference may be made to relevant technologies related to tunnels.
[0092] S402: Use the LAN IP address allocated from the user LAN to configure itself as a network device in the user LAN, and create a network address translation rule between the user LAN and the cloud service.
[0093] S403. Receive a device discovery request sent by the user device based on the local area network communication protocol through the tunnel. When the device discovery request is received, return the cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device discovers the cloud service according to the cloud service name and maps the cloud service name with the virtual service device.
[0094] S404. Receive interactive data sent by the user device based on the local area network communication protocol through the tunnel. When the interactive data is received, perform network address translation on the interactive data according to the network address translation rule, and send the translated interactive data to the cloud server for business processing.
[0095] S405. When receiving the response data corresponding to the user device sent by the cloud server, the response data is subjected to network address translation according to the network address translation rule, and the translated response data is sent to the user device through the tunnel based on the local area network communication protocol.
[0096] For ease of understanding, please refer to the system framework diagram in this scenario Figure 5 , Figure 5 This is a block diagram of the third cloud service access system provided by an embodiment of the present invention. UE represents user equipment, Home CPE represents the physical CPE device deployed on the user side, and virtual host represents the virtual service device. This embodiment of the present invention establishes a Layer 2 tunnel between the CPE device and the virtual service device, enabling the virtual service device to access the user's LAN and provide Layer 2 services to the user equipment.
[0097] Based on the above embodiment, to facilitate automatic access of a virtual service device located on the cloud side to a user's LAN, embodiments of the present invention may also utilize a vCPE device located on the cloud side that corresponds to the user's LAN to allocate a LAN IP address to the virtual service device. Based on this, before configuring itself as a network device in the user's LAN using the LAN IP address allocated from the user's LAN, the following steps may also be included:
[0098] S501: Receive a local area network IP address allocated by a vCPE device corresponding to a user local area network to a virtual service device.
[0099] For easier understanding, please refer to the system structure diagram in this scenario. Figure 6 , Figure 6 This is a block diagram of the structure of the fourth cloud service access system provided by an embodiment of the present invention. UE represents user equipment, and virtual host represents a virtual server. As can be seen, the vCPE or GW device can automatically assign LAN IP addresses in the user's LAN to the user equipment and virtual server based on the DHCP protocol, and can also transmit LAN messages between the user equipment and the virtual server, enabling LAN communication between the user equipment and the virtual server.
[0100] Based on the above embodiment, considering that the external IP address of the cloud server may change, in order to ensure that the network address translation rules are reliable and effective, the virtual service device can also monitor the changes in the external IP address of the cloud server, so as to modify the relevant network address translation rules in time when it is found that it has changed.
[0101] Based on this, after creating the network address translation rules between the user LAN and the cloud server, you can also include:
[0102] S601. Detect whether the external network IP address corresponding to the cloud server has changed, and if it is determined that a change has occurred, adjust the network address translation rule associated with the cloud server based on the changed external network IP address of the cloud server.
[0103] It should be noted that the embodiments of the present invention do not limit the specific method by which the virtual service device monitors changes in the external network IP address corresponding to the cloud service. For example, it can detect whether the external network IP address corresponding to the cloud service has changed based on the SLA (Service Level Agreements) agreement; for example, it can also determine whether the cloud service has sent the changed external network IP address, and if it is determined that it has sent the changed external network IP address, it is determined that the external network IP address corresponding to the cloud service has changed. In other words, the virtual service device can determine changes in the external network IP address of the cloud service by active detection or by passive detection.
[0104] Based on this, checking whether the external IP address corresponding to the cloud server has changed can include:
[0105] Step 51: Detect whether the external IP address corresponding to the cloud server has changed based on the SLA protocol; or, detect whether the cloud server has sent the changed external IP address, and when determining to send, determine whether the external IP address corresponding to the cloud service has changed.
[0106] The following introduces the virtual service device, system and computer-readable storage medium provided by the embodiments of the present invention. The virtual service device, system and computer-readable storage medium described below can be referenced to the cloud service access method described above.
[0107] Please refer to Figure 7 , Figure 7 This is a block diagram of a virtual service device provided by an embodiment of the present invention. The virtual service device has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service. The virtual service device may include:
[0108] Initialization module 701, configured to configure itself as a network device in the user's LAN using the LAN IP address allocated from the user's LAN, and to create a network address translation rule between the user's LAN and the cloud server;
[0109] The service discovery module 702 is configured to, upon receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, return a cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device can discover the cloud service based on the cloud service name, and map the cloud service name to the virtual service device;
[0110] The first network address translation module 703 is configured to, upon receiving interaction data sent by a user device based on a local area network communication protocol, perform network address translation on the interaction data according to a network address translation rule, and send the translated interaction data to the cloud server for service processing;
[0111] The second network address translation module 704 is used to perform network address translation on the response data according to the network address translation rules when receiving the response data corresponding to the user device sent by the cloud server, and send the converted response data to the user device based on the local area network communication protocol.
[0112] Optionally, the device may further include:
[0113] A first address receiving module is used to receive, through a tunnel, a local area network IP address allocated by a CPE device corresponding to a user local area network to the virtual service device;
[0114] Accordingly, the service discovery module 702 may include:
[0115] A request receiving submodule, configured to receive, through a tunnel, a device discovery request sent by a user device based on a local area network communication protocol;
[0116] Accordingly, the first network address translation module 703 may include:
[0117] an interactive data receiving submodule, configured to receive, through the tunnel, interactive data sent by the user equipment based on the local area network communication protocol;
[0118] Accordingly, the second network address translation module 704 includes:
[0119] The response data sending submodule is used to send the converted response data to the user equipment through the tunnel based on the local area network communication protocol.
[0120] Optionally, the device may further include:
[0121] The second address receiving module is used to receive the local area network IP address allocated by the vCPE device corresponding to the user local area network to the virtual service device.
[0122] Optionally, the initialization module 701 may include:
[0123] The source address translation rule creation submodule is used to create the source address translation rule between the network segment of the user's LAN and the external network IP address corresponding to the user's LAN;
[0124] The destination address translation rule creation submodule is used to create the destination address translation rule between the LAN IP address and the external IP address corresponding to the cloud server;
[0125] The network address translation rule integration submodule is used to set the source address translation rule and the destination address translation rule as the network address translation rule between the user's local area network and the cloud server.
[0126] Optionally, the first network address translation module 703 is specifically configured to:
[0127] According to the source address translation rule, the source address in the interactive data is modified from the local area network IP address of the user device to the corresponding external network IP address of the user device;
[0128] According to the destination address conversion rule, the destination address in the interactive data is modified from the local area network IP address of the virtual service device to the external network IP address corresponding to the cloud server.
[0129] Optionally, the second network address translation module 704 is specifically configured to:
[0130] According to the source address translation rule, the destination address in the response data is modified from the external network IP address corresponding to the user device to the local area network IP address of the user device;
[0131] According to the destination address translation rule, the source address in the response data is modified from the external network IP address corresponding to the cloud server to the local area network IP address of the virtual service device.
[0132] Optionally, the device may further include:
[0133] The rule update module is used to detect whether the external network IP address corresponding to the cloud server has changed, and when it is determined that a change has occurred, adjust the network address translation rules associated with the cloud server based on the changed external network IP address of the cloud server.
[0134] Optionally, the rule updating module may include:
[0135] The change detection submodule is used to detect whether the external IP address corresponding to the cloud server has changed based on the SLA agreement;
[0136] Alternatively, it is detected whether the cloud server has sent the changed external IP address, and when it is determined to send it, it is determined that the external IP address corresponding to the cloud server has changed.
[0137] Please refer to Figure 1 , Figure 1 This is a structural block diagram of a cloud service access system provided by an embodiment of the present invention. The system may include: a user device 101, a virtual service device 102, and a cloud server 201, wherein:
[0138] User equipment 101, used to discover and access cloud services through a virtual service device;
[0139] The virtual service device 102 is used to execute the above cloud service access method.
[0140] The cloud server 201 is used to provide cloud services.
[0141] Since the embodiments of the cloud service access system part correspond to the embodiments of the cloud service access method part, the embodiments of the cloud service access system part refer to the description of the embodiments of the cloud service access method part, and will not be repeated here. Figure 2 、 5 , and may further include CPE equipment, vCPE equipment, GW equipment or a Layer 2 tunnel, which can be selected according to actual application requirements.
[0142] An embodiment of the present invention further provides an electronic device, which may include:
[0143] Memory for storing computer programs;
[0144] A processor is configured to implement the cloud service access method described above when executing a computer program.
[0145] Since the embodiments of the electronic device part correspond to the embodiments of the cloud service access method part, the embodiments of the electronic device part refer to the description of the embodiments of the cloud service access method part and will not be repeated here.
[0146] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the cloud service access method described above is implemented.
[0147] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the cloud service access method part, the embodiments of the storage medium part refer to the description of the embodiments of the cloud service access method part and will not be repeated here.
[0148] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0149] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0150] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0151] The cloud service access method, virtual service device, system, electronic device and medium provided by the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A cloud service access method, characterized in that: Applied to a virtual service device, the virtual service device has a communication connection with a cloud server and is configured with a local area network communication protocol corresponding to the cloud service, the method includes: Using the LAN IP address allocated from the user LAN to configure itself as a network device in the user LAN, and create a network address translation rule between the user LAN and the cloud server; When receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, returning the cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device discovers the cloud service according to the cloud service name, and maps the cloud service name with the virtual service device; When receiving interaction data sent by the user device based on the local area network communication protocol, performing network address translation on the interaction data according to the network address translation rule, and sending the translated interaction data to the cloud server for service processing; When receiving response data corresponding to the user device sent by the cloud server, the response data is subjected to network address translation according to the network address translation rule, and the translated response data is sent to the user device based on the local area network communication protocol.
2. The cloud service access method according to claim 1, wherein: Before configuring itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, the method further includes: Receive the LAN IP address assigned to the virtual service device by the CPE device corresponding to the user LAN through the tunnel; Correspondingly, receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol includes: receiving, through the tunnel, a device discovery request sent by the user equipment based on the local area network communication protocol; Correspondingly, receiving the interaction data sent by the user equipment based on the local area network communication protocol includes: receiving, through the tunnel, interaction data sent by the user equipment based on the local area network communication protocol; Accordingly, the sending of the converted response data to the user equipment based on the local area network communication protocol includes: Based on the local area network communication protocol, the converted response data is sent to the user equipment through the tunnel.
3. The cloud service access method according to claim 1, wherein: Before configuring itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, the method further includes: Receive the local area network IP address allocated to the virtual service device by the vCPE device corresponding to the user local area network.
4. The cloud service access method according to any one of claims 1 to 3, characterized in that: The creating of a network address translation rule between the user local area network and the cloud server includes: Creating a source address translation rule between the network segment of the user LAN and the external IP address corresponding to the user LAN; Create a destination address translation rule between the local area network IP address and the external network IP address corresponding to the cloud server; The source address translation rule and the destination address translation rule are set as network address translation rules between the user LAN and the cloud server.
5. The cloud service access method according to claim 4, wherein: The performing network address translation on the interactive data according to the network address translation rule includes: According to the source address translation rule, the source address in the interactive data is modified from the local area network IP address of the user device to the external network IP address corresponding to the user device; According to the destination address conversion rule, the destination address in the interactive data is modified from the local area network IP address of the virtual service device to the external network IP address corresponding to the cloud server.
6. The cloud service access method according to claim 4, wherein: The performing network address translation on the response data according to the network address translation rule includes: According to the source address translation rule, the destination address in the response data is modified from the external network IP address corresponding to the user device to the local area network IP address of the user device; According to the destination address conversion rule, the source address in the response data is modified from the external network IP address corresponding to the cloud server to the local area network IP address of the virtual service device.
7. The cloud service access method according to claim 4, wherein: After creating the network address translation rule between the user LAN and the cloud server, the method further includes: Detect whether the external network IP address corresponding to the cloud server has changed, and when it is determined that a change has occurred, adjust the network address translation rule associated with the cloud server based on the changed external network IP address of the cloud server.
8. The cloud service access method according to claim 7, wherein: The detecting whether the external network IP address corresponding to the cloud server has changed includes: Detect whether the external IP address corresponding to the cloud server has changed based on the SLA agreement; Or, it is detected whether the cloud server sends the changed external network IP address, and when it is determined to send it, it is determined that the external network IP address corresponding to the cloud server has changed.
9. A virtual service device, characterized in that: The virtual service device is connected to the cloud server and is configured with a local area network communication protocol corresponding to the cloud service. The device includes: an initialization module, configured to configure itself as a network device in the user LAN using the LAN IP address allocated from the user LAN, and to create a network address translation rule between the user LAN and the cloud server; a service discovery module configured to, upon receiving a device discovery request sent by a user device in the user local area network based on the local area network communication protocol, return a cloud service name of the cloud service to the user device based on the local area network communication protocol, so that the user device discovers the cloud service based on the cloud service name, and maps the cloud service name with the virtual service device; a first network address translation module, configured to, upon receiving interaction data sent by the user equipment based on the local area network communication protocol, perform network address translation on the interaction data according to the network address translation rule, and send the converted interaction data to the cloud server for service processing; The second network address translation module is used to, when receiving response data corresponding to the user device sent by the cloud server, perform network address translation on the response data according to the network address translation rule, and send the converted response data to the user device based on the local area network communication protocol.
10. A cloud service access system, characterized in that: include: User equipment, virtual service device, cloud server, wherein, The user equipment is used to discover and access cloud services through the virtual service device; The virtual service device is used to execute the cloud service access method according to any one of claims 1 to 8; The cloud server is used to provide the cloud service.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the cloud service access method according to any one of claims 1 to 8 when executing the computer program.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the cloud service access method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Cloud service system of local area network and access method thereof
CN101854280A
Method, device and system for virtual machine to access physical server in cloud calculation system
CN112995272A