CN116781670A - Cloud service access method, virtual service device, system, electronic equipment and medium - Google Patents
Cloud service access method, virtual service device, system, electronic equipment and medium Download PDFInfo
- Publication number
- CN116781670A CN116781670A CN202310703619.8A CN202310703619A CN116781670A CN 116781670 A CN116781670 A CN 116781670A CN 202310703619 A CN202310703619 A CN 202310703619A CN 116781670 A CN116781670 A CN 116781670A
- Authority
- CN
- China
- Prior art keywords
- local area
- area network
- address
- network
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000004891 communication Methods 0.000 claims abstract description 100
- 238000006243 chemical reaction Methods 0.000 claims description 115
- 230000004044 response Effects 0.000 claims description 55
- 230000002452 interceptive effect Effects 0.000 claims description 32
- 230000003993 interaction Effects 0.000 claims description 31
- 238000013519 translation Methods 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 13
- 230000002457 bidirectional effect Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 235000008694 Humulus lupulus Nutrition 0.000 description 3
- 241001362551 Samba Species 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a cloud service access method, a virtual service device, a system, electronic equipment and a medium, which relate to the field of cloud service, wherein the virtual service device can be arranged in a user local area network, the device and a cloud server are in communication connection, a local area network communication protocol corresponding to the cloud service is arranged, the device is configured as network equipment in the user local area network based on a local area network IP address distributed from the user local area network, and the user equipment can quickly and conveniently discover and use the cloud service only by communicating with the virtual service device through the existing local area network communication protocol, so that the threshold of user contact and cloud service use can be remarkably reduced.
Description
Technical Field
The present invention relates to the field of cloud services, and in particular, to a cloud service access method, a virtual service device, a virtual service system, an electronic device, and a computer readable storage medium.
Background
In the related art, cloud services are typically deployed on an external network, which allows a user to access the cloud services only by installing additional applications and accessing the external network using the applications, which significantly increases the threshold for the user to use the cloud services.
Disclosure of Invention
The invention aims to provide a cloud service access method, a virtual service device, a system, electronic equipment and a computer readable storage medium, wherein the virtual service device which is in communication connection with cloud service can be arranged in a user local area network, and the user equipment can conveniently and rapidly contact the cloud service through the virtual service device only by communicating with the virtual service device through the existing local area network communication protocol, so that the threshold of using the cloud service by a user can be reduced.
In order to solve the technical problem, the present invention provides a cloud service access method, which is applied to a virtual service device, wherein the virtual service device is in communication connection with a cloud server, and is configured with a local area network communication protocol corresponding to a cloud service, and the method comprises:
configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network, and creating a network address conversion rule between the user local area network and the cloud server;
when receiving a device discovery request sent by user equipment in the user local area network based on the local area network communication protocol, returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol, so that the user equipment discovers the cloud service according to the cloud service name, and mapping the cloud service name with the virtual service device;
When receiving the interactive data sent by the user equipment based on the local area network communication protocol, carrying out network address conversion on the interactive data according to the network address conversion rule, and sending the converted interactive data to the cloud server for service processing;
when receiving response data corresponding to the user equipment sent by the cloud server, performing network address conversion on the response data according to the network address conversion rule, and sending the converted response data to the user equipment based on the local area network communication protocol.
Optionally, before configuring itself as a network device in the user lan by using the lan IP address allocated from the user lan, the method further includes:
receiving the local area network IP address distributed to the virtual service device by CPE equipment corresponding to the user local area network through a tunnel;
correspondingly, receiving the device discovery request sent by the user equipment in the user local area network based on the local area network communication protocol, including:
receiving a device discovery request sent by the user equipment based on the local area network communication protocol through the tunnel;
Correspondingly, receiving the interaction data sent by the user equipment based on the local area network communication protocol comprises the following steps:
receiving interactive data sent by the user equipment based on the local area network communication protocol through the tunnel;
correspondingly, the sending the converted response data to the user equipment based on the local area network communication protocol includes:
and transmitting the converted response data to the user equipment through the tunnel based on the local area network communication protocol.
Optionally, before configuring itself as a network device in the user lan by using the lan IP address allocated from the user lan, the method further includes:
and receiving the local area network IP address distributed to the virtual service device by the vCPE equipment corresponding to the user local area network.
Optionally, the creating a network address translation rule between the user lan and the cloud server includes:
creating a source address conversion rule between a network segment of the user local area network and an external network IP address corresponding to the user local area network;
creating a destination address conversion rule between the local area network IP address and an external network IP address corresponding to the cloud server;
And setting the source address conversion rule and the destination address conversion rule as network address conversion rules between the user local area network and the cloud server.
Optionally, the performing network address conversion on the interaction data according to the network address conversion rule includes:
according to the source address conversion rule, modifying the source address in the interaction data from the local area network IP address of the user equipment to an external network IP address corresponding to the user equipment;
and according to the destination address conversion rule, modifying 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 server.
Optionally, the performing network address conversion on the response data according to the network address conversion rule includes:
according to the source address conversion rule, modifying the destination address in the response data from the external network IP address corresponding to the user equipment to the local area network IP address of the user equipment;
and according to the destination address conversion rule, modifying the source address in the response data from the external network IP address corresponding to the cloud server to the local area network IP address of the virtual service device.
Optionally, after creating the network address translation rule between the user lan and the cloud server, the method further includes:
detecting whether the external network IP address corresponding to the cloud server is changed, and adjusting the network address conversion rule associated with the cloud server based on the external network IP address after the cloud server is changed when the external network IP address is determined to be changed.
Optionally, the detecting whether the external network IP address corresponding to the cloud server is changed includes:
detecting whether an external network IP address corresponding to the cloud server is changed or not based on an SLA protocol;
or detecting whether the cloud server sends the changed external network IP address, and determining that the external network IP address corresponding to the cloud server is changed when the cloud server determines to send the external network IP address.
The invention also provides a virtual service device, which is in communication connection with the cloud server and is configured with a local area network communication protocol corresponding to the cloud service, and the device comprises:
the initialization module is used for configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network by utilizing the local area network IP address allocated from the user local area network, and creating a network address conversion rule between the user local area network and the cloud server;
The service discovery module is used for returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol when receiving a device discovery request sent by the user equipment in the user local area network based on the local area network communication protocol, so that the user equipment discovers the cloud service according to the cloud service name and maps the cloud service name with the virtual service device;
the first network address conversion module is used for carrying out network address conversion on the interactive data according to the network address conversion rule when the interactive data sent by the user equipment based on the local area network communication protocol is received, and sending the converted interactive data to the cloud server for service processing;
and the second network address conversion module is used for carrying out network address conversion on the response data according to the network address conversion rule when receiving the response data which is sent by the cloud server and corresponds to the user equipment, and sending the converted response data to the user equipment based on the local area network communication protocol.
The invention also provides a cloud service access system, which comprises: user equipment, a virtual service device, a cloud server, wherein,
The user equipment is used for discovering and accessing cloud services through the virtual service device;
the virtual service device is used for executing the cloud service access method;
the cloud server is used for providing the cloud service.
The present invention also provides an electronic device including:
a memory for storing a computer program;
and the processor is used for realizing the cloud service access method when executing the computer program.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by a processor, the cloud service access method is realized.
The invention provides a cloud service access method, which is applied to a virtual service device, wherein the virtual service device is in communication connection with a cloud server and is configured with a local area network communication protocol corresponding to cloud service, and the method comprises the following steps: configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network, and creating a network address conversion rule between the user local area network and the cloud service; when receiving a device discovery request sent by user equipment in the user local area network based on the local area network communication protocol, returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol, so that the user equipment discovers the cloud service according to the cloud service name, and mapping the cloud service name with the virtual service device; when receiving the interactive data sent by the user equipment based on the local area network communication protocol, carrying out network address conversion on the interactive data according to the network address conversion rule, and sending the converted interactive data to the cloud server for service processing; when receiving response data corresponding to the user equipment sent by the cloud server, performing network address conversion on the response data according to the network address conversion rule, and sending the converted response data to the user equipment based on the local area network communication protocol.
Therefore, the invention can set a virtual service device, which is in 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 configure itself as network equipment in the user local area network by using the local area network IP address distributed from the user local area network, and simultaneously creates a network address conversion rule between the user local area network and the cloud service; furthermore, the user equipment 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 a cloud service name to the user equipment when receiving the request, so that the user equipment maps the cloud service with the virtual service device according to the cloud service name and the local area network IP address of the virtual service device; meanwhile, the virtual service device can also perform network address conversion on the interactive data based on the network address conversion rule when receiving the interactive data sent by the user equipment based on the local area network communication protocol, send the converted interactive data to the cloud server for service processing, perform network address conversion on the response data based on the network address conversion rule when receiving the response data corresponding to the user equipment returned by the cloud server, and return the converted response data to the user equipment based on the local area network communication protocol. In short, the invention can set a virtual service device in the user local area network to directly access the cloud service into the user local area network through the device, so that the user equipment can conveniently and rapidly contact the cloud service only through the existing local area network communication protocol, and further the threshold of user contact and cloud service use can be obviously reduced. The invention also provides a virtual service device, a system, electronic equipment and a computer readable storage medium, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a block diagram of a first cloud service access system according to an embodiment of the present invention;
fig. 2 is a block diagram of a second cloud service access system according to an embodiment of the present invention;
fig. 3 is a flowchart of a cloud service access method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another cloud service access method according to an embodiment of the present invention;
fig. 5 is a block diagram of a third cloud service access system according to an embodiment of the present invention;
fig. 6 is a block diagram of a fourth cloud service access system according to an embodiment of the present invention;
fig. 7 is a block diagram of a virtual service device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, cloud services are typically deployed on an external network, which allows a user to access the cloud services only by installing additional applications in a local device and accessing the external network using the applications, and this significantly increases the threshold for the user to use the cloud services. In view of this, the present invention can provide a cloud service access method, in which a virtual service device having a communication connection with a cloud server can be set in a user lan, and a user device can conveniently and quickly contact a cloud service through the virtual service device only by communicating with the virtual service device through an existing lan communication protocol, so as to reduce a threshold of a user for using the cloud service.
For ease of understanding, the system architecture of the present invention will be described below. Referring to fig. 1, fig. 1 is a block diagram of a first cloud service access system according to an embodiment of the present invention. The system comprises at least three parts, namely a user equipment 101, a virtual service device 102 and a cloud server 201. The user equipment 101 may be a personal computer, a mobile phone, a tablet, a smart tv, etc., and is disposed in the same user lan with the virtual service device 102, and establishes lan communication connection with the virtual service device 102. The types and the number of the user equipments 101 in the same user lan can be arbitrarily set, and all the user equipments 101 in the lan can share all the virtual service devices 102 in the lan. The cloud server 201 is configured to provide a cloud service, and is disposed on an external network, and establishes an external network communication connection with the virtual service apparatus 102. The cloud service may be a cloud NAS (Network Attached Storage: network attached storage), cloud conference, cloud application, etc. In order to facilitate the user to touch and use each cloud service, the embodiment of the invention sets a virtual service device 102 in the user lan, which is used to directly extend the cloud service into the user lan and provide the query and access service of the cloud service for the user device. Since one virtual service device 102 is responsible for only one cloud service, when there are a plurality of cloud services, the virtual service device 102 corresponding to each cloud server 201 may be set in the user lan, so that the user equipment 101 discovers and accesses each cloud service through each virtual service device 102. In addition, the embodiment of the present invention sets a corresponding lan communication protocol for the cloud service, and may deploy the lan communication protocol to the virtual service device 102. Further, the user equipment 101 may discover the virtual service device 102 directly based on the lan communication protocol, thereby discovering the cloud service; meanwhile, the user equipment 101 may also interact with the virtual service device 102 directly based on the lan communication protocol, and the virtual service device 102 forwards the interaction data to the cloud server 201, so as to interact with the cloud server 201. Considering that the lan communication protocol (e.g. NetBIOS, samba, NFS, FTP, FTPS, airplay, etc.) is a common communication protocol in general user equipment, a user can directly use the native function in the user equipment to conveniently and quickly contact and use the cloud service, so as to significantly reduce the threshold for the user to contact and use the cloud service.
It should be noted that, the embodiment of the present invention is not limited to the correspondence between the cloud service 201 and the lan communication protocol, and relates to the cloud service type in the cloud server 201. For example, when the cloud service type is cloud NAS, the corresponding local area network communication protocol may be NetBIOS, samba, FTP or the like. The local area network communication protocol corresponding to other cloud services can also be set according to the actual application requirements.
It should be noted that the relationship between the virtual service device 102 and the cloud server 201 may be many-to-one, that is, one virtual service device 102 can only correspond to one cloud server 201, and one cloud server 201 can correspond to a plurality of virtual service devices 102, and different user local area networks can be accessed through the plurality of virtual service devices 102. The correspondence between the user lan and the virtual service device 102 may be one-to-one, or may be many-to-one, that is, the user lan may share the virtual service device 102 alone, or may share the virtual service device 102 with other user lans. It can be understood that, when the virtual service device 102 is shared by a plurality of user lans, relevant parameters corresponding to each user lan need to be configured on the virtual service device 102.
Further, the embodiment of the present invention is not limited to the deployment location of the virtual service device 102, and may be deployed on the user side or on the cloud side. It can be understood that when the virtual service apparatus 102 is deployed on the cloud side, the user equipment 101 is far away from the virtual service apparatus 102, and in this case, in order to deploy both on the same user lan, a virtual lan technology (VLAN, virtual Local Area Network) may be used to construct the user lan. In other words, the user equipment 101 may communicate with the virtual service device 102 based on virtual local area network technology and local area network communication protocols. It should be noted that, the embodiment of the present invention is not limited to how to perform communication based on the virtual lan technology, for example, other network devices (such as routers and switches) may be disposed between the ue 101 and the virtual service device 102, so that the ue 101 and the virtual service device 102 may perform lan communication based on the virtual lan technology and reference may be made to the related technology of the virtual lan.
Further, in order to automatically access the virtual service device 102 to the user lan, the embodiment of the present invention may further introduce a device supporting DHCP protocol (Dynamic Host Configuration Protocol ) into the system, so as to automatically allocate lan IP addresses in the user 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, customer premises equipment). For convenience of setup, the present invention will use CPE equipment as equipment for accessing the virtual service device 102 to the user lan based on the DHCP protocol. Referring to fig. 2, fig. 2 is a block diagram of a second cloud service access system according to an embodiment of the present invention, in which CPE device 103 is disposed in a user lan and between user device 101 and virtual service device 102. After accessing the user equipment 101, the CPE device 103 may automatically connect to the virtual service apparatus 102 and assign a local area network IP address in the user local area network to the virtual service apparatus 102 to access the virtual service apparatus 102 to the user local area network. In addition, CPE device 103 may communicate lan messages between user device 101 and virtual service device 102 to enable lan communication between user device 101 and virtual service device 102. It should be noted that, in the embodiment of the present invention, the CPE device 103 may be a physical CPE device or a Virtual CPE device (vCPE); in addition, the CPE device 103 may be deployed on the user side or on the cloud side, and may be set according to the actual application requirements.
Based on the system architecture description, the cloud service access method provided by the embodiment of the invention is described in detail below. Referring to fig. 3, fig. 3 is a flowchart of a cloud service access method according to an embodiment of the present invention. The method is applied to the virtual service device, the virtual service device is in communication connection with the cloud server, and a local area network communication protocol corresponding to the cloud service is configured. The embodiment of the present invention is not limited to the electronic device in which the virtual service device is disposed, and may be disposed in a personal computer, a server, a dedicated device, or the like. The method can comprise the following steps:
s301, configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network, and creating a network address conversion rule between the user local area network and the cloud server.
As described above, in order to access the virtual service device to the user lan, the embodiment of the present invention first needs to issue, for the virtual service device, the lan IP address allocated from the user lan, so that the virtual service device configures itself as a network device in the user lan. Further, the user equipment may discover the virtual service devices via a lan communication protocol and interact with the virtual service devices using the protocol. In addition, after the network device configuration is completed, in order to forward the interaction data sent by the user device to the cloud service and ensure that the cloud service can correctly return the response data to the user device, the virtual service device also needs to create a network address translation rule (NAT, network Address Translation) between the user local area network and the cloud service, so as to translate the network address in the interaction data sent by the user device into an external network address by using the rule, send the external network address to the cloud service, and translate the network address in the response data returned by the cloud service into a local area network address by using the rule, and return the local area network address to the user device. In short, the virtual service device in the embodiment of the present invention is mainly responsible for responding to the device discovery request of the user device and exchanging data between the user device and the cloud service.
It should be noted that, the embodiment of the present invention is not limited to how to allocate the lan IP address to the virtual service device, for example, the allocation may be static, or may be based on the DHCP protocol. For easy access, the embodiment of the invention can introduce a device (such as gateway device or CPE device) supporting DHCP protocol in the user local area network, which can automatically connect with the virtual service device and allocate local area network IP address to the virtual service device.
Further, the embodiment of the present invention is not limited to the type of the network address translation rule, and may be, for example, a unidirectional network address translation rule or a bidirectional network address translation rule. In consideration of that the virtual service device and the cloud service are not usually in the same network segment, the network address translation rule may be set to a bidirectional network address translation rule, so as to improve deployment convenience. Specifically, a source address translation rule (SNAT) between a network segment of the user local area network and an external network IP address corresponding to the user local area network may be created, and a destination address translation rule (DNAT) between the local area network IP address and the external network IP address corresponding to the cloud service may be created, so as to obtain a bidirectional network address translation rule.
Based on this, creating a network address translation rule between the user local area network and the cloud server may include:
Step 11: creating a source address conversion rule between a network segment of the user local area network and an external network IP address corresponding to the user local area network;
step 12: creating a destination address conversion rule between a local area network IP address and an external network IP address corresponding to the cloud server;
step 13: and setting the source address conversion rule and the destination address conversion rule as network address conversion rules between the user local area network and the cloud server.
It should be noted that, the embodiment of the present invention does not limit the number of external network IP addresses corresponding to the user lan, and may be selected according to the actual application requirements. Of course, the above network address translation rule may further include port mapping (PAT, port Address Translation, port address translation) in addition to IP mapping, and may be selected according to practical application requirements.
And S302, when receiving a device discovery request sent by user equipment in a user local area network based on a local area network communication protocol, returning a cloud service name of cloud service to the user equipment based on the local area network communication protocol so that the user equipment discovers the cloud service according to the cloud service name and maps the cloud service name with a virtual service device.
Specifically, the ue may initiate the device discovery request by broadcasting or multicasting. And when the virtual service device responds to the device discovery request, the cloud service name of the cloud service can be returned 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 the cloud service name and the virtual service device are mapped. In short, the embodiment of the invention can convert the cloud service from the original three-layer service to the two-layer service, so that the user equipment can directly find the cloud service through broadcasting or multicasting, thereby improving the convenience of the user in contacting and using the cloud service.
It should be noted that, the embodiment of the present invention is not limited to a specific lan communication protocol, for example, netBIOS protocol, samba protocol, etc., and may be set according to practical application requirements.
And S303, when the interactive data sent by the user equipment based on the local area network communication protocol is received, carrying out network address conversion on the interactive data according to the network address conversion rule, and sending the converted interactive data to the cloud server for service processing.
As described above, because the network address conversion rule created in the embodiment of the present invention may be a bidirectional network address conversion rule, when the virtual service device receives the interaction data sent by the user equipment, the virtual service device may modify, according to the source address conversion rule, the source address in the interaction data from the local area network IP address of the user equipment to the external network IP address corresponding to the user equipment, and modify, according to the source address conversion rule, 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 conversion on the interaction data, thereby sending the converted interaction data to the cloud service for service to perform service processing.
Based on this, performing network address translation on the interaction data according to the network address translation rule may include:
Step 21: modifying a source address in the interaction data from a local area network IP address of the user equipment to an external network IP address corresponding to the user equipment according to a source address conversion rule;
step 22: and according to the destination address conversion rule, modifying 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 server.
And S304, when response data corresponding to the user equipment sent by the cloud server is received, carrying out network address conversion on the response data according to a network address conversion rule, and sending the converted response data to the user equipment based on a local area network communication protocol.
Also, as described above, since the network address conversion rule created in the embodiment of the present invention may be a bidirectional network address conversion rule, when the virtual service device receives the response data returned by the cloud service, according to the source address conversion rule, the virtual service device modifies the external network IP address corresponding to the destination address in the response data from the user device to the local area network IP address of the user device, and modifies the external network IP address corresponding to the cloud service from the source address in the response data to the local area network IP address of the virtual service device, thereby sending the converted response data to the user device, and assisting the user device to complete one interaction with the cloud service.
Based on this, performing network address translation on the response data according to the network address translation rule may include:
step 31: modifying an external network IP address corresponding to the destination address in the response data from the user equipment into a local area network IP address of the user equipment according to the source address conversion rule;
step 32: and modifying the external network IP address corresponding to the source address in the response data by the cloud server into the local area network IP address of the virtual service device according to the destination address conversion rule.
The above-described interaction procedure of the virtual service apparatus will be described below based on another flowchart. Referring to fig. 4, fig. 4 is a flowchart of another cloud service access method provided by an embodiment of the present invention, where vHost represents a virtual service device, its external network IP address is 12.10.55.X, and the local area network IP address allocated to the vcpe/CPE device is 192.168.1.102; the local area network IP address allocated by the vCPE/CPE equipment to the user equipment is 192.168.1.2; the cloud NAS represents a cloud service, and the external network IP address is 10.1.0.8; SMB and NetBIOS are local area network communication protocols. The interaction process between the user equipment and the virtual service device may be: after the user equipment is started to network, a device discovery request is sent to the virtual service device through NBNS/BROWSER broadcasting. After receiving the request, the virtual service device may return to the user equipment according to the requirements of the SMB protocol, and add a service Name (Server Name) of the cloud NAS therein. Upon receiving the hostAnnoncement, the user device may establish a mapping relationship between the service name and the local area network IP address of the virtual service device based on the NetBIOS protocol, and may expose the virtual service device, for example, in an "Internet neighbor" or the like. Furthermore, the user can access the cloud service by accessing other network devices in the local area network, and the user device can send interaction data based on the SMB protocol and the local area network IP address of the virtual service device; the virtual service device may perform address conversion on the interaction data sent by the user equipment according to a preset bidirectional NAT rule (the source address is changed from 192.168.1.2 to 12.10.55.2, the destination address is changed from 192.168.1.102 to 10.1.0.8), and send the interaction data to the cloud service for service processing, or may perform address conversion on the response data returned by the cloud service (the source address is changed from 10.1.0.8 to 192.168.1.102, and the destination address is changed from 12.10.55.2 to 192.168.1.2), and return the response data to the user equipment.
Based on the above embodiment, the present invention may provide a virtual service device, where the device is in 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 configure itself as network equipment in the user local area network by using the local area network IP address distributed from the user local area network, and simultaneously creates a network address conversion rule between the user local area network and the cloud service; furthermore, the user equipment 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 a cloud service name to the user equipment when receiving the request, so that the user equipment maps the cloud service with the virtual service device according to the cloud service name and the local area network IP address of the virtual service device; meanwhile, the virtual service device can also perform network address conversion on the interactive data based on the network address conversion rule when receiving the interactive data sent by the user equipment based on the local area network communication protocol, send the converted interactive data to the cloud service for business processing, perform network address conversion on the response data based on the network address conversion rule when receiving the response data corresponding to the user equipment returned by the cloud service, and return the converted response data to the user equipment based on the local area network communication protocol. In short, the invention can set a virtual service device in the user local area network to directly access the cloud service into the user local area network through the device, so that the user equipment can conveniently and rapidly contact the cloud service only through the existing local area network communication protocol, and further the threshold of user contact and cloud service use can be obviously reduced.
Based on the above embodiment, in order to facilitate the automatic access of the virtual service device located at the cloud side to the user lan, the embodiment of the present invention may modify CPE equipment at the user side, so that the CPE equipment may communicate with the virtual service device through a two-layer tunnel, and allocate an IP address of the lan to the virtual service device through the tunnel. On the basis, the user equipment can also communicate with the virtual service device through the tunnel, such as sending equipment discovery requests, interaction information and the like, so that the cloud-side-based virtual service device can realize the effect of further two-layer service discovery. Based on this, the method may further include:
s401, receiving the local area network IP address distributed for the virtual service device by the CPE equipment corresponding to the user local area network through the tunnel.
It should be noted that, the embodiment of the present invention is not limited to the type and the architecture of the tunnel, and reference may be made to the related art of the tunnel.
S402, the local area network IP address distributed from the user local area network is utilized to configure the local area network IP address as network equipment in the user local area network, and a network address conversion rule between the user local area network and the cloud service is created.
S403, receiving a device discovery request sent by the user equipment based on a local area network communication protocol through a tunnel, and returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol when the device discovery request is received, so that the user equipment discovers the cloud service according to the cloud service name, and mapping the cloud service name with the virtual service device.
S404, receiving the interactive data sent by the user equipment based on the local area network communication protocol through the tunnel, when the interactive data is received, performing network address conversion on the interactive data according to the network address conversion rule, and sending the converted interactive data to the cloud server for service processing.
And S405, when response data corresponding to the user equipment sent by the cloud server is received, performing network address conversion on the response data according to a network address conversion rule, and sending the converted response data to the user equipment through a tunnel based on a local area network communication protocol.
For easy understanding, please refer to fig. 5 for a system frame diagram in this scenario, and fig. 5 is a block diagram of a third cloud service access system according to an embodiment of the present invention. The UE represents user equipment, the Home CPE represents physical CPE equipment deployed on the user side, and the virtual host represents a virtual service device. Therefore, the embodiment of the invention can set a two-layer tunnel between the CPE equipment and the virtual service device, so that the virtual service device can access the user local area network and provide two-layer business service for the user equipment.
Based on the above embodiment, in order to facilitate the virtual service device located at the cloud side to automatically access to the user lan, the embodiment of the present invention may further allocate an IP address of the lan to the virtual service device by using vCPE equipment located at the cloud side and corresponding to the user lan. Based on this, before configuring itself as a network device in the user lan using the lan IP address allocated from the user lan, it may further include:
S501, receiving a local area network IP address distributed for a virtual service device by vCPE equipment corresponding to a user local area network.
For easy understanding, please refer to fig. 6 for a system structure diagram in the present scenario, and fig. 6 is a structural block diagram of a fourth cloud service access system according to an embodiment of the present invention. Wherein the UE represents a user equipment and the virtual host represents a virtual service device. It can be seen that the vCPE or GW device may automatically allocate a local area network IP address in the user local area network to the user device and the virtual service device based on the DHCP protocol, and may transfer a local area network packet between the user device and the virtual service device, so that local area network communication may be performed between the user device and the virtual service device.
Based on the above embodiment, in consideration of possible hops of the external network IP address of the cloud server, in order to ensure that the network address conversion rule is reliable and effective, the virtual service device may further monitor the hops of the external network IP address of the cloud server, so as to modify the relevant network address conversion rule in time when discovering that the external network IP address of the cloud server hops.
Based on this, after creating the network address translation rule between the user lan and the cloud server, it may further include:
and S601, detecting whether the external network IP address corresponding to the cloud server is changed, and adjusting the network address conversion rule associated with the cloud server based on the external network IP address after the cloud server is changed when the external network IP address is determined to be changed.
It should be noted that, the embodiment of the present invention is not limited to a specific manner in which the virtual service device monitors the change of the external network IP address corresponding to the cloud service, for example, whether the external network IP address corresponding to the cloud service is changed may be detected based on the SLA protocol (Service Level Agreements, service level protocol); for example, it may be determined whether the cloud service has transmitted the changed external network IP address, and if it is determined that the cloud service has transmitted the changed external network IP address, it is determined that the cloud service has changed the external network IP address. In other words, the virtual service device can determine the change condition of the cloud service external network IP address through an active detection mode, or determine the change condition of the cloud service external network IP address through a passive detection mode.
Based on this, detecting whether the external network IP address corresponding to the cloud server is changed may include:
step 51: detecting whether an external network IP address corresponding to a cloud server is changed or not based on an SLA protocol; or detecting whether the cloud server sends the changed external network IP address, and determining that the external network IP address corresponding to the cloud service is changed when the cloud server determines to send the external network IP address.
The virtual service device, the system and the computer readable storage medium provided by the embodiments of the present invention are described below, and the virtual service device, the system and the computer readable storage medium described below and the cloud service access method described above may be referred to correspondingly.
Referring to fig. 7, fig. 7 is a block diagram of a virtual service device according to an embodiment of the present invention, where the virtual service device is connected to a cloud server in a communication manner, and is configured with a lan communication protocol corresponding to a cloud service, and may include:
an initialization module 701, configured to configure itself as a network device in the user lan by using the lan IP address allocated from the user lan, and create a network address conversion rule between the user lan and the cloud server;
the service discovery module 702 is configured to, when receiving a device discovery request sent by a user device in a user local area network based on a local area network communication protocol, return a cloud service name of a 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 map the cloud service name with a virtual service device;
the first network address conversion module 703 is configured to, when receiving interaction data sent by the user equipment based on the lan communication protocol, perform network address conversion on the interaction data according to a network address conversion rule, and send the converted interaction data to the cloud server for service processing;
And the second network address conversion module 704 is configured to, when receiving the response data corresponding to the user equipment sent by the cloud server, perform network address conversion on the response data according to a network address conversion rule, and send the converted response data to the user equipment based on a lan communication protocol.
Optionally, the apparatus may further include:
the first address receiving module is used for receiving the local area network IP address distributed to the virtual service device by the CPE equipment corresponding to the user local area network through the tunnel;
accordingly, the service discovery module 702 may include:
a request receiving sub-module, configured to receive, through a tunnel, a device discovery request sent by a user device based on a local area network communication protocol;
accordingly, the first network address translation module 703 may include:
the interactive data receiving sub-module is used for receiving interactive data sent by the user equipment based on the local area network communication protocol through the tunnel;
accordingly, the second network address translation module 704 includes:
and the response data transmitting sub-module is used for transmitting the converted response data to the user equipment through the tunnel based on the local area network communication protocol.
Optionally, the apparatus may further include:
And the second address receiving module is used for receiving the local area network IP address distributed to the virtual service device by the vCPE equipment corresponding to the user local area network.
Optionally, the initializing module 701 may include:
the source address conversion rule creation sub-module is used for creating a source address conversion rule between a network segment of the user local area network and an external network IP address corresponding to the user local area network;
the target address conversion rule creation sub-module is used for creating a target address conversion rule between the local area network IP address and the external network IP address corresponding to the cloud server;
and the network address conversion rule integration sub-module is used for setting the source address conversion rule and the destination address conversion rule as the network address conversion rule between the user local area network and the cloud server.
Optionally, the first network address translation module 703 is specifically configured to:
modifying a source address in the interaction data from a local area network IP address of the user equipment to an external network IP address corresponding to the user equipment according to a source address conversion rule;
and according to the destination address conversion rule, modifying 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 server.
Optionally, the second network address translation module 704 is specifically configured to:
Modifying an external network IP address corresponding to the destination address in the response data from the user equipment into a local area network IP address of the user equipment according to the source address conversion rule;
and modifying the external network IP address corresponding to the source address in the response data by the cloud server into the local area network IP address of the virtual service device according to the destination address conversion rule.
Optionally, the apparatus may further include:
and the rule updating module is used for detecting whether the external network IP address corresponding to the cloud server is changed or not, and adjusting the network address conversion rule associated with the cloud server based on the external network IP address after the change of the cloud server when the change is determined.
Optionally, the rule updating module may include:
the change detection sub-module is used for detecting whether the external network IP address corresponding to the cloud server is changed or not based on the SLA protocol;
or detecting whether the cloud server sends the changed external network IP address, and determining that the external network IP address corresponding to the cloud server is changed when the cloud server determines to send the external network IP address.
Referring to fig. 1, fig. 1 is a block diagram of a cloud service access system according to an embodiment of the present invention, where the system may include: user equipment 101, virtual service device 102, and cloud server 201, wherein:
A user device 101, configured to discover and access a cloud service through a virtual service device;
the virtual service device 102 is configured to perform the cloud service access method as described above.
The cloud server 201 is configured to provide cloud services.
Since the embodiments of the cloud service access system portion and the embodiments of the cloud service access method portion correspond to each other, the embodiments of the cloud service access system portion refer to the description of the embodiments of the cloud service access method portion, and are not repeated herein. Of course, the cloud service access system may also have the form shown in fig. 2, 5 and 6, and may further include CPE devices, vCPE devices, GW devices or two-layer tunnels, which may be selected according to practical application requirements.
The embodiment of the invention also provides electronic equipment, which can comprise:
a memory for storing a computer program;
and the processor is used for realizing the cloud service access method when executing the computer program.
Since the embodiments of the electronic device portion correspond to the embodiments of the cloud service access method portion, the embodiments of the electronic device portion refer to the description of the embodiments of the cloud service access method portion, which is not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the cloud service access method is realized when the computer program is executed by a processor.
Since the embodiments of the computer readable storage medium portion and the embodiments of the cloud service access method portion correspond to each other, the embodiments of the storage medium portion refer to the description of the embodiments of the cloud service access method portion, and are not repeated herein.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The cloud service access method, the virtual service device, the system, the electronic equipment and the medium provided by the invention are described in detail above. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
Claims (12)
1. The cloud service access method is characterized by being applied to a virtual service device, wherein the virtual service device is in communication connection with a cloud server and is configured with a local area network communication protocol corresponding to cloud service, and the method comprises the following steps:
Configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network, and creating a network address conversion rule between the user local area network and the cloud server;
when receiving a device discovery request sent by user equipment in the user local area network based on the local area network communication protocol, returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol, so that the user equipment discovers the cloud service according to the cloud service name, and mapping the cloud service name with the virtual service device;
when receiving the interactive data sent by the user equipment based on the local area network communication protocol, carrying out network address conversion on the interactive data according to the network address conversion rule, and sending the converted interactive data to the cloud server for service processing;
when receiving response data corresponding to the user equipment sent by the cloud server, performing network address conversion on the response data according to the network address conversion rule, and sending the converted response data to the user equipment based on the local area network communication protocol.
2. The cloud service access method according to claim 1, further comprising, before configuring itself as a network device in a user lan using a lan IP address allocated from the user lan:
receiving the local area network IP address distributed to the virtual service device by CPE equipment corresponding to the user local area network through a tunnel;
correspondingly, receiving the device discovery request sent by the user equipment in the user local area network based on the local area network communication protocol, including:
receiving a device discovery request sent by the user equipment based on the local area network communication protocol through the tunnel;
correspondingly, receiving the interaction data sent by the user equipment based on the local area network communication protocol comprises the following steps:
receiving interactive data sent by the user equipment based on the local area network communication protocol through the tunnel;
correspondingly, the sending the converted response data to the user equipment based on the local area network communication protocol includes:
and transmitting the converted response data to the user equipment through the tunnel based on the local area network communication protocol.
3. The cloud service access method according to claim 1, further comprising, before configuring itself as a network device in a user lan using a lan IP address allocated from the user lan:
And receiving the local area network IP address distributed to the virtual service device by the vCPE equipment corresponding to the user local area network.
4. A cloud service access method according to any of claims 1 to 3, wherein said creating a network address translation rule between said user local area network and said cloud server comprises:
creating a source address conversion rule between a network segment of the user local area network and an external network IP address corresponding to the user local area network;
creating a destination address conversion rule between the local area network IP address and an external network IP address corresponding to the cloud server;
and setting the source address conversion rule and the destination address conversion rule as network address conversion rules between the user local area network and the cloud server.
5. The cloud service access method of claim 4, wherein said performing network address translation on said interaction data according to said network address translation rule comprises:
according to the source address conversion rule, modifying the source address in the interaction data from the local area network IP address of the user equipment to an external network IP address corresponding to the user equipment;
and according to the destination address conversion rule, modifying 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 server.
6. The cloud service access method of claim 4, wherein said performing network address translation on said response data according to said network address translation rule comprises:
according to the source address conversion rule, modifying the destination address in the response data from the external network IP address corresponding to the user equipment to the local area network IP address of the user equipment;
and according to the destination address conversion rule, modifying the source address in the response data 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 of claim 4, further comprising, after creating a network address translation rule between said user local area network and said cloud server:
detecting whether the external network IP address corresponding to the cloud server is changed, and adjusting the network address conversion rule associated with the cloud server based on the external network IP address after the cloud server is changed when the external network IP address is determined to be changed.
8. The cloud service access method according to claim 7, wherein the detecting whether the external network IP address corresponding to the cloud server is changed includes:
Detecting whether an external network IP address corresponding to the cloud server is changed or not based on an SLA protocol;
or detecting whether the cloud server sends the changed external network IP address, and determining that the external network IP address corresponding to the cloud server is changed when the cloud server determines to send the external network IP address.
9. A virtual service device, wherein the virtual service device and a cloud server have a communication connection, and are configured with a local area network communication protocol corresponding to a cloud service, the device comprising:
the initialization module is used for configuring the local area network IP address allocated from the user local area network into network equipment in the user local area network by utilizing the local area network IP address allocated from the user local area network, and creating a network address conversion rule between the user local area network and the cloud server;
the service discovery module is used for returning a cloud service name of the cloud service to the user equipment based on the local area network communication protocol when receiving a device discovery request sent by the user equipment in the user local area network based on the local area network communication protocol, so that the user equipment discovers the cloud service according to the cloud service name and maps the cloud service name with the virtual service device;
The first network address conversion module is used for carrying out network address conversion on the interactive data according to the network address conversion rule when the interactive data sent by the user equipment based on the local area network communication protocol is received, and sending the converted interactive data to the cloud server for service processing;
and the second network address conversion module is used for carrying out network address conversion on the response data according to the network address conversion rule when receiving the response data which is sent by the cloud server and corresponds to the user equipment, and sending the converted response data to the user equipment based on the local area network communication protocol.
10. A cloud service access system, comprising: user equipment, a virtual service device, a cloud server, wherein,
the user equipment is used for discovering and accessing cloud services through the virtual service device;
the virtual service apparatus for performing the cloud service access method according to any one of claims 1 to 8;
the cloud server is used for providing the cloud service.
11. An electronic device, comprising:
a memory for storing a computer program;
A processor for implementing the cloud service access method according to any of claims 1 to 8 when executing the computer program.
12. A computer readable storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the cloud service access method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310703619.8A CN116781670A (en) | 2023-06-14 | 2023-06-14 | Cloud service access method, virtual service device, system, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310703619.8A CN116781670A (en) | 2023-06-14 | 2023-06-14 | Cloud service access method, virtual service device, system, electronic equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116781670A true CN116781670A (en) | 2023-09-19 |
Family
ID=88012703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310703619.8A Pending CN116781670A (en) | 2023-06-14 | 2023-06-14 | Cloud service access method, virtual service device, system, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116781670A (en) |
-
2023
- 2023-06-14 CN CN202310703619.8A patent/CN116781670A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20130058256A1 (en) | Port mapping method and apparatus, and communication system | |
JP3574372B2 (en) | DNS server, terminal and communication system | |
US9712383B2 (en) | Device abstraction in autonomous wireless local area networks | |
WO2020248963A1 (en) | Method and apparatus for establishing end-to-end network connection, and network system | |
CN105376299B (en) | Network communication method, equipment and network attached storage equipment | |
US8458303B2 (en) | Utilizing a gateway for the assignment of internet protocol addresses to client devices in a shared subset | |
EP3223498A1 (en) | Method and apparatus for interconnection between networks | |
CN107809386B (en) | IP address translation method, routing device and communication system | |
KR20110060895A (en) | A method and a gateway for providing multiple internet access | |
KR20130052240A (en) | Method and apparatus for provisioning network address translator traversal methods | |
CN111800341B (en) | Cross-router terminal communication method and device | |
CN111711705B (en) | Method and device for realizing network connection based on bidirectional NAT (network Address translation) by proxy node | |
KR20150125379A (en) | A method, a terminal and a server for providing communication service | |
CN115174310B (en) | PDN dialing and configuration method, system, device, equipment and storage medium | |
CN113014680A (en) | Broadband access method, device, equipment and storage medium | |
CN103516820A (en) | Port forwarding method and apparatus based on MAC address | |
CN116781670A (en) | Cloud service access method, virtual service device, system, electronic equipment and medium | |
CN112714202B (en) | Equipment configuration method and device | |
CN111315037B (en) | Communication link establishing method and device, computer equipment and storage medium | |
CN101572729B (en) | Processing method of node information of virtual private network, interrelated equipment and system | |
JP2007329791A (en) | Gateway device | |
US10693673B2 (en) | Method and apparatus for routing data to cellular network | |
CN112261165B (en) | Communication method, system, device, computer equipment and storage medium | |
CN114710465B (en) | Network address translation method, device, equipment and storage medium | |
CN115567529A (en) | Heterogeneous edge network communication method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |