CN111741538B - Communication link establishing method based on gateway, equipment control method and device - Google Patents
Communication link establishing method based on gateway, equipment control method and device Download PDFInfo
- Publication number
- CN111741538B CN111741538B CN202010712135.6A CN202010712135A CN111741538B CN 111741538 B CN111741538 B CN 111741538B CN 202010712135 A CN202010712135 A CN 202010712135A CN 111741538 B CN111741538 B CN 111741538B
- Authority
- CN
- China
- Prior art keywords
- communication link
- gateway
- control instruction
- local
- mobile terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- 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/2803—Home automation networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a communication link establishing method based on a gateway, a device control method and a device, wherein the gateway is connected with a local server, and the communication link method based on the gateway comprises the following steps: acquiring a communication link establishment request sent by mobile terminals in the same local area network; analyzing a local domain name in the communication link establishment request, and generating an IP address of a local server according to the local domain name; a first communication link is established with the mobile terminal based on the IP address of the local server. By implementing the method and the system, the problems that in the prior art, when a home area of a user is disconnected, the user cannot issue a control instruction through the mobile terminal to control the intelligent household equipment, so that control is invalid and user experience is influenced are solved, local control of the intelligent household equipment is realized, and the intelligent household equipment can be controlled under the condition that a gateway is not connected with the Internet; and the local communication link is short, and the control instruction can be transmitted to the controlled equipment more quickly and efficiently.
Description
Technical Field
The invention relates to the field of wireless communication, in particular to a communication link establishing method based on a gateway, a device control method and a device.
Background
In the practical application scenario of the smart home, controlling the smart home devices is generally indirect control performed by connecting software on the mobile terminal with a cloud. The specific process is that a user inputs a control instruction on the mobile terminal, the control instruction is forwarded to the background server, and the background server issues the instruction to each intelligent household device through the internet, so that the intelligent household devices are controlled.
However, when a broadband installed in a home area of a user fails, at this time, the mobile terminal cannot access the external internet, and the user cannot issue a control instruction through the mobile terminal to control the smart home device, so that control is disabled, and user experience is affected.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that when a home area of a user is disconnected, the user cannot issue a control instruction through a mobile terminal to control an intelligent home device, which results in control failure and affects user experience, so as to provide a communication link establishment method based on a gateway, a device control method and an apparatus.
According to a first aspect, an embodiment of the present invention provides a method for establishing a communication link based on a gateway, where the gateway is connected to a local server, and the method includes: acquiring a communication link establishment request sent by mobile terminals in the same local area network; analyzing a local domain name in the communication link establishment request, and generating an IP address of the local server according to the local domain name; and establishing a first communication link with the mobile terminal according to the IP address of the local server.
With reference to the first aspect, in a first embodiment of the first aspect, the method further includes: and establishing a second communication link according to the preset IP address information of the cloud server.
According to a second aspect, an embodiment of the present invention provides a gateway-based device control method, including: acquiring a device control instruction issued by a mobile terminal; transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect; and controlling corresponding equipment according to the equipment control instruction.
With reference to the second aspect, in a first embodiment of the second aspect, the method further comprises: transmitting the equipment control instruction according to a second communication link established by the mobile terminal and the cloud server; and controlling the corresponding equipment according to the equipment control instruction.
With reference to the second aspect, in a second implementation manner of the second aspect, before the step of transmitting the device control instruction according to the first communication link established between the mobile terminal and the local server, the method further includes: extracting user characteristic information in the equipment control instruction; and when the user is judged to have the control right according to the user characteristic information, transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server.
With reference to the second aspect, in a third implementation manner of the second aspect, the controlling a corresponding device according to the device control instruction specifically includes: and extracting the equipment characteristic information in the equipment control instruction, and controlling corresponding equipment according to the equipment characteristic information.
According to a third aspect, an embodiment of the present invention provides an apparatus for establishing a communication link based on a gateway, where the gateway is connected to a local server, the apparatus including: a communication link establishment request acquisition module, configured to acquire a communication link establishment request sent by a mobile terminal in the same local area network; the IP address generating module is used for analyzing the local domain name in the communication link establishing request and generating the IP address of the local server according to the local domain name; and the first communication link establishing module is used for establishing a first communication link with the mobile terminal according to the IP address of the local server.
According to a fourth aspect, an embodiment of the present invention provides an apparatus for controlling a gateway-based device, including: the device control instruction acquisition module is used for acquiring a device control instruction issued by the mobile terminal; the device control instruction transmission module is used for transmitting the device control instruction according to a first communication link established between the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect; and the equipment control module is used for controlling corresponding equipment according to the equipment control instruction.
According to a fifth aspect, an embodiment of the present invention provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect or the gateway-based device control method according to any one of the second aspect or the second embodiment of the second aspect.
According to a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the gateway-based communication link establishment method according to the first aspect or the first implementation manner of the first aspect or the gateway-based device control method according to the second aspect or any implementation manner of the second aspect.
The technical scheme of the invention has the following advantages:
1. the invention provides a method and a device for establishing a communication link based on a gateway, wherein the gateway is connected with a local server, and the method for establishing the communication link based on the gateway comprises the following steps: acquiring a communication link establishment request sent by mobile terminals in the same local area network; analyzing a local domain name in the communication link establishment request, and generating an IP address of a local server according to the local domain name; a first communication link is established with the mobile terminal based on the IP address of the local server. By implementing the method and the system, the problems that in the prior art, when a home area of a user is disconnected, the user cannot issue a control instruction through the mobile terminal to control the intelligent household equipment, control is invalid, and user experience is influenced are solved, local control of the intelligent household equipment is realized, and the intelligent household equipment can be controlled under the condition that a gateway is not connected with the internet; and the local communication link is short, and the control instruction can be transmitted to the controlled equipment more quickly and efficiently.
2. The invention provides a gateway-based equipment control method and a gateway-based equipment control device, wherein the equipment control method comprises the steps of obtaining an equipment control instruction issued by a mobile terminal; transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect; and controlling corresponding equipment according to the equipment control instruction, transmitting the equipment control instruction through a local control link, and ensuring short delay and no failure of the control instruction.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of a gateway-based communication link establishment method according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific example of a gateway-based device control method according to an embodiment of the present invention;
fig. 3 is a specific schematic diagram of a gateway-based communication link establishment method or a gateway-based device control method according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a specific example of a gateway-based communication link establishment apparatus according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a specific example of a gateway-based device control apparatus according to an embodiment of the present invention;
FIG. 6 is a diagram showing a specific example of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In the field of intelligent device control (for example, in the intelligent home industry), in order to solve the problem that a user cannot directly control an intelligent device through a mobile terminal when the intelligent device cannot be connected with an external internet, embodiments of the present invention provide a method and an apparatus for establishing a communication link based on a gateway, and a method and an apparatus for controlling an apparatus based on a gateway.
As shown in fig. 1, a method for establishing a communication link based on a gateway provided in an embodiment of the present invention, where the gateway is connected to a local server, includes:
step S11: acquiring a communication link establishment request sent by mobile terminals in the same local area network; in this embodiment, the local area network may be a network set in a preset area, so that a plurality of intelligent terminals in the preset area are connected to each other to transmit data. The mobile terminal may be a mobile phone, a tablet, an electronic watch, etc. The communication link establishment request may be a communication link establishment request automatically generated when the user opens the smart home device control software on the mobile terminal.
Specifically, when a user starts the smart home control software on the mobile terminal, if the mobile terminal and the local gateway are in the same local area network, a communication link establishment request sent by the mobile terminal is acquired, and the request is used for establishing a communication link between the mobile terminal and a local server in the local gateway.
Step S12: analyzing a local domain name in the communication link establishment request, and generating an IP address of a local server according to the local domain name; in this embodiment, the local domain name may be a name of a certain device in the internet, which is preset in the local gateway and is composed of a string of separation characters, and is used for positioning and identifying the corresponding device during data transmission, and is in a mapping relationship with the IP address of the device. Specifically, when the mobile terminal and the local gateway belong to the same local area network, and the local domain name information is preset in the local gateway, at this time, the local gateway can perform mutual conversion between the local domain name and the IP address of the local mqts server according to the domain name system protocol, and since the domain name and the IP address are mapped to each other, one domain name has only one corresponding IP address.
Illustratively, when the local domain name of the local MQTTS server is preset in the local gateway, that is, the local MQTTS server is preset in the local gateway. At this time, if the mobile terminal and the local gateway are in the same local area network, the IP address of the mqts server corresponding to the local domain name can be determined directly according to the domain name system protocol.
Step S13: a first communication link is established with the mobile terminal based on the IP address of the local server. In this embodiment, a communication link between the mobile terminal and a local server in the local gateway is established based on the destination address obtained by the parsing. Specifically, the local server may be disposed outside the local gateway as long as a condition that the local server and the local gateway maintain connection is satisfied. At this time, the mobile terminal can directly access the local MQTTS server through the local area network.
The embodiment of the invention provides a communication link establishing method based on a gateway, wherein the gateway is connected with a local server, and the method comprises the following steps: acquiring a communication link establishment request sent by mobile terminals in the same local area network; analyzing a local domain name in the communication link establishment request, and generating an IP address of a local server according to the local domain name; a first communication link is established with the mobile terminal based on the IP address of the local server. By implementing the method and the system, the problems that in the prior art, when a home area of a user is disconnected, the user cannot issue a control instruction through the mobile terminal to control the intelligent household equipment, control is invalid, and user experience is influenced are solved, local control of the intelligent household equipment is realized, and the intelligent household equipment can be controlled under the condition that a gateway is not connected with the internet; and the local communication link is short, and the control instruction can be transmitted to the controlled equipment more quickly and efficiently.
As an optional implementation manner of the present invention, the method for establishing a communication link based on a gateway further includes: and establishing a second communication link according to the preset IP address information of the cloud server. In this embodiment, when a local domain name is not preset in the local gateway, or the mobile terminal and the local gateway are not in the same local area network at the moment, or a local mqts server connected to the local gateway does not exist, the cloud server may be used to transmit the smart home control instruction of the user. Specifically, when the user opens the intelligent home control software on the mobile terminal, a second communication link establishment request is sent to the cloud server through the data network, and a second communication link is established between the mobile terminal and the cloud server according to the analyzed IP address of the cloud server.
An embodiment of the present invention further provides a gateway-based device control method, as shown in fig. 2, including:
step S21: acquiring a device control instruction issued by a mobile terminal; in this embodiment, the mobile terminal may be various smart terminals that the user can carry around, for example, a mobile phone, a tablet, an electronic watch, and the like. The device control command may be control information issued by the user through the mobile terminal, for example, "air conditioner in living room is on" or "air conditioner in living room is adjusted to 27 degrees in temperature". Specifically, when the user issues the control command through the mobile terminal, various control options in software on the mobile terminal (e.g., a mobile phone) may be clicked.
Step S22: transmitting a device control instruction according to a first communication link established by the mobile terminal and the local server; the first communication link is established by the gateway-based communication link establishment method described in the above embodiment; in this embodiment, the local server is an MQTTS server provided in the local gateway, or may be an MQTTS server provided outside the local gateway and connected to the local gateway. By the method in any of the above embodiments, a first communication link may be established between the mobile terminal and the local server, and the received device control instruction may be transmitted. That is, the device control command of the user can be directly transmitted to the local gateway through the local control path, and then transmitted to the corresponding device.
Step S23: and controlling the corresponding equipment according to the equipment control instruction. In this embodiment, according to an obtained device control instruction, device feature information in the device control instruction is extracted, and a control requirement of a user is determined according to the device feature information, that is, to which type of device the device control instruction is applied, so that the device executes a corresponding instruction.
The invention provides a gateway-based equipment control method, which comprises the steps of obtaining an equipment control instruction issued by a mobile terminal; transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect; and controlling corresponding equipment according to the equipment control instruction, transmitting the equipment control instruction through a local control link, and having short delay and no failure of the control instruction.
As an optional implementation manner of the present invention, the gateway-based device control method further includes: transmitting a device control instruction according to a second communication link established by the mobile terminal and the cloud server; and controlling the corresponding equipment according to the equipment control instruction. In this embodiment, when the local domain name is not pre-stored in the local gateway, or the mobile terminal and the local gateway are not in the same local area network at this time, or a local mqts server connected to the local gateway does not exist, the mobile terminal automatically switches to establish a communication link with the cloud server, and at this time, the device control instruction of the user may be transmitted through the second communication link.
As an optional embodiment of the present invention, before the step of transmitting the device control instruction according to the first communication link established between the mobile terminal and the local server, the gateway-based device control method further includes:
extracting user characteristic information in the equipment control instruction; and when the user is judged to have the right to use the gateway according to the user characteristic information, transmitting a device control instruction according to a first communication link established by the mobile terminal and the local server. In this embodiment, after the mobile terminal establishes the first communication link with the local server in the local gateway, or after the mobile terminal establishes the second communication link with the cloud server, the device control instruction of the user may be transmitted through the communication link. Specifically, when the device control instruction of the user is obtained, the identity feature information of the user in the device control instruction is extracted, and whether the current user has the right to use the gateway is judged according to the identity feature information (for example, identity ID). When the user has the right to use the gateway, the first communication link or the second communication link can be selected to transmit the device control instruction according to the condition of the mobile terminal. In the process, the user does not sense the process of switching the link transmission equipment control instruction.
As an optional implementation manner of the present invention, step S23, according to the device control instruction, controls the corresponding device, specifically including: and extracting the equipment characteristic information in the equipment control instruction, and controlling the corresponding equipment according to the equipment characteristic information.
As shown in fig. 3, the following detailed description is made with reference to a specific embodiment of a method for establishing a communication link based on a gateway and a method for controlling a device based on a gateway according to the foregoing embodiments: when a user starts the intelligent home control software on the mobile terminal, whether a local domain name is stored in the local gateway in advance or not, whether the mobile terminal and the local gateway belong to the same local area network or not and whether a local MQTTS server is arranged in the local gateway in advance or not are automatically detected.
When a local domain name is prestored in the local gateway, the mobile terminal and the local gateway both belong to a local area network, and a local MQTTS server is preset in the local gateway, the device control instruction of the user can be transmitted through a local control path, that is, the device control instruction of the user can be transmitted through a first communication link, so as to control the corresponding intelligent home equipment.
When a local domain name is not stored in the local gateway in advance, or the mobile terminal and the local gateway do not belong to a local area network, or a local MQTTS server is not set in the local gateway in advance, at this moment, a device control instruction of a user is transmitted through a remote control path, namely the device control instruction is transmitted through a second communication link, specifically, the mobile terminal is connected with a cloud server, or can be connected with a background server, and the device control instruction is transmitted through a remote control port and an interface of an MQTTS client, so that corresponding intelligent home equipment is controlled.
An embodiment of the present invention provides a communication link establishing apparatus based on a gateway, where the gateway is connected to a local server, as shown in fig. 4, and the communication link establishing apparatus includes:
a communication link establishment request acquisition module 31, configured to acquire a communication link establishment request sent by a mobile terminal in the same local area network; the detailed implementation can be referred to the related description of step S11 in the above method embodiment.
An IP address generating module 32, configured to resolve a local domain name in the communication link establishment request, and generate an IP address of the local server according to the local domain name; the detailed implementation can be referred to the related description of step S12 in the above method embodiment.
A first communication link establishing module 33, configured to establish a first communication link with the mobile terminal according to the IP address of the local server. The detailed implementation can be referred to the related description of step S13 in the above method embodiment.
The invention provides a communication link establishing device based on a gateway, wherein the gateway is connected with a local server, and the device comprises: a communication link establishment request acquisition module 31 is used for acquiring communication link establishment requests sent by mobile terminals in the same local area network; the local domain name in the communication link establishing request is analyzed through the IP address generating module 32, and the IP address of the local server is generated according to the local domain name; in the first communication link establishing module 33, a first communication link with the mobile terminal is established based on the IP address of the local server. By implementing the method and the system, the problems that in the prior art, when a home area of a user is disconnected, the user cannot issue a control instruction through the mobile terminal to control the intelligent household equipment, control is invalid, and user experience is influenced are solved, local control of the intelligent household equipment is realized, and the intelligent household equipment can be controlled under the condition that a gateway is not connected with the internet; and the local communication link is short, and the control instruction can be transmitted to the controlled equipment more quickly and efficiently.
An embodiment of the present invention provides an apparatus control device based on a gateway, as shown in fig. 5, including:
a device control instruction obtaining module 41, configured to obtain a device control instruction issued by the mobile terminal; the detailed implementation can be referred to the related description of step S21 in the above method embodiment.
A device control instruction transmission module 42, configured to transmit a device control instruction according to a first communication link established between the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to claim 1 or claim 2; the detailed implementation can be referred to the related description of step S22 in the above method embodiment.
And the device control module 43 is configured to control the corresponding device according to the device control instruction. The detailed implementation can be referred to the related description of step S23 in the above method embodiment.
The invention provides a gateway-based equipment control device, which comprises an equipment control instruction acquisition module 41, an equipment control instruction acquisition module and a gateway control module, wherein the equipment control instruction acquisition module is used for acquiring an equipment control instruction issued by a mobile terminal; in the device control instruction transmission module 42, transmitting the device control instruction according to a first communication link established between the mobile terminal and the local server; the first communication link is established by a gateway-based communication link establishment method according to the first aspect or the first embodiment of the first aspect; in the device control module 43, the corresponding device is controlled according to the device control command, the device control command can be transmitted through the local control link, the communication link is short, so the delay is short, and the control command transmitted by the user through the local control path does not fail.
An embodiment of the present invention further provides a computer device, as shown in fig. 6, the computer device may include a processor 61 and a memory 62, where the processor 61 and the memory 62 may be connected by a bus or in another manner, and fig. 6 illustrates an example of a connection by a bus.
The processor 61 may be a Central Processing Unit (CPU). The Processor 61 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 62 is a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the gateway-based device control method in the embodiment of the present invention (for example, the communication link establishment request acquisition module 31, the IP address generation module 32, the first communication link establishment module 33 shown in fig. 4, or the device control instruction acquisition module 41, the device control instruction transmission module 42, and the device control module 43 shown in fig. 5). The processor 61 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 62, that is, implements the gateway-based device control method in the above-described method embodiment.
The memory 62 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 61, and the like. Further, the memory 62 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 62 may optionally include memory located remotely from the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 62 and, when executed by the processor 61, perform a gateway-based device control method as in the embodiment shown in fig. 1.
The details of the computer device can be understood by referring to the corresponding related descriptions and effects in the embodiments shown in fig. 1 and fig. 2, and are not described herein again.
Optionally, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are configured to enable a computer to execute the method for establishing a communication link based on a gateway or the method for controlling a device based on a gateway described in any of the foregoing embodiments, where the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.
Claims (8)
1. A method for establishing a communication link based on a gateway, wherein the gateway is connected to a local server, the method comprising:
acquiring a communication link establishment request sent by mobile terminals in the same local area network;
analyzing a local domain name in the communication link establishment request, and generating an IP address of the local server according to the local domain name; the local domain name is a name of a certain device in the Internet, which is preset in the gateway and consists of a string of separation characters, and is used for positioning and identifying the corresponding device during data transmission and is in a mapping relation with an IP address of the device;
establishing a first communication link with the mobile terminal according to the IP address of the local server;
wherein, still include:
and establishing a second communication link according to the preset IP address information of the cloud server.
2. A device control method based on a gateway is characterized by comprising the following steps:
acquiring a device control instruction issued by a mobile terminal;
transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server; the first communication link is established by the gateway-based communication link establishment method of claim 1;
controlling corresponding equipment according to the equipment control instruction;
wherein, still include:
transmitting the equipment control instruction according to a second communication link established by the mobile terminal and the cloud server;
and controlling the corresponding equipment according to the equipment control instruction.
3. The method of claim 2, further comprising, prior to transmitting the device control instruction based on the first communication link established between the mobile terminal and the local server:
extracting user characteristic information in the equipment control instruction;
and when the user is judged to have the control right according to the user characteristic information, transmitting the equipment control instruction according to a first communication link established by the mobile terminal and the local server.
4. The method according to claim 2, wherein the controlling the corresponding device according to the device control instruction specifically includes: and extracting the equipment characteristic information in the equipment control instruction, and controlling corresponding equipment according to the equipment characteristic information.
5. An apparatus for establishing a communication link based on a gateway, wherein the gateway is connected to a local server, the apparatus comprising:
a communication link establishment request acquisition module, configured to acquire a communication link establishment request sent by a mobile terminal in the same local area network;
the IP address generating module is used for analyzing the local domain name in the communication link establishing request and generating the IP address of the local server according to the local domain name; the local domain name is a name of a certain device in the Internet, which is preset in the gateway and consists of a string of separation characters, and is used for positioning and identifying the corresponding device during data transmission and is in a mapping relation with an IP address of the device;
a first communication link establishing module, configured to establish a first communication link with the mobile terminal according to the IP address of the local server;
wherein the apparatus further comprises:
and the second communication link establishing module is used for establishing a second communication link according to the preset IP address information of the cloud server.
6. An apparatus for controlling a device based on a gateway, comprising:
the device control instruction acquisition module is used for acquiring a device control instruction issued by the mobile terminal;
the device control instruction transmission module is used for transmitting the device control instruction according to a first communication link established between the mobile terminal and the local server; the first communication link is established by the gateway-based communication link establishment method of claim 1;
the equipment control module is used for controlling corresponding equipment according to the equipment control instruction;
wherein the device control instruction transmission module is further configured to:
transmitting the equipment control instruction according to a second communication link established by the mobile terminal and the cloud server;
and controlling corresponding equipment according to the equipment control instruction.
7. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the one processor to cause the at least one processor to perform the steps of the gateway-based communication link establishment method of claim 1 or the gateway-based device control method of claim 2 or 3.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the gateway-based communication link establishment method according to claim 1 or the gateway-based device control method according to claim 2 or 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010712135.6A CN111741538B (en) | 2020-07-22 | 2020-07-22 | Communication link establishing method based on gateway, equipment control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010712135.6A CN111741538B (en) | 2020-07-22 | 2020-07-22 | Communication link establishing method based on gateway, equipment control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111741538A CN111741538A (en) | 2020-10-02 |
CN111741538B true CN111741538B (en) | 2022-06-07 |
Family
ID=72657329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010712135.6A Active CN111741538B (en) | 2020-07-22 | 2020-07-22 | Communication link establishing method based on gateway, equipment control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111741538B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112787997A (en) * | 2020-12-26 | 2021-05-11 | 广州保仕盾智能科技有限公司 | Method for realizing intranet IP communication based on gateway serving as server side |
CN113014426B (en) * | 2021-02-10 | 2023-04-07 | 优刻得科技股份有限公司 | Method and device for establishing communication between cloud server and client server |
CN114200848A (en) * | 2021-12-02 | 2022-03-18 | 北京小米移动软件有限公司 | Remote control method, system and device of household equipment and storage medium |
CN114745445B (en) * | 2022-04-27 | 2024-05-28 | 深圳绿米联创科技有限公司 | Control method, control device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103941651A (en) * | 2013-01-19 | 2014-07-23 | 珠海格力电器股份有限公司 | Intelligent household system based on Internet and control method |
CN106533863A (en) * | 2016-11-22 | 2017-03-22 | 深圳Tcl新技术有限公司 | Mobile terminal, local server, intelligent home equipment control method and system |
CN107277025A (en) * | 2017-06-28 | 2017-10-20 | 维沃移动通信有限公司 | A kind of Secure Network Assecc method, mobile terminal and computer-readable recording medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1166124C (en) * | 2002-09-16 | 2004-09-08 | 联想(北京)有限公司 | Equipment peer-to-peer connection method in realizing dynamic network connection in home network |
CN106292560B (en) * | 2015-05-26 | 2018-07-13 | 美的集团股份有限公司 | The communication means and appliance system of appliance system |
-
2020
- 2020-07-22 CN CN202010712135.6A patent/CN111741538B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103941651A (en) * | 2013-01-19 | 2014-07-23 | 珠海格力电器股份有限公司 | Intelligent household system based on Internet and control method |
CN106533863A (en) * | 2016-11-22 | 2017-03-22 | 深圳Tcl新技术有限公司 | Mobile terminal, local server, intelligent home equipment control method and system |
CN107277025A (en) * | 2017-06-28 | 2017-10-20 | 维沃移动通信有限公司 | A kind of Secure Network Assecc method, mobile terminal and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
CN111741538A (en) | 2020-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111741538B (en) | Communication link establishing method based on gateway, equipment control method and device | |
CN108667638B (en) | Network service configuration method and network management equipment | |
US10630551B2 (en) | Method and apparatus for automatic networking of gateway device | |
KR20220005647A (en) | Method for setting pdu type, method for setting ue policy, and related entities | |
US10148764B2 (en) | Backup wide area network connection for access points and routers | |
CN108111999A (en) | Short-distance communication equipment shares request and control method and electronic equipment | |
EP2693691B1 (en) | Method and apparatus for initializing gateway in device management system | |
CN111405059B (en) | Cloud device data transmission method, electronic device and Internet of things system | |
CN106507414B (en) | Message forwarding method and device | |
US20080025331A1 (en) | Communication System, Connection Adapter For Communication Device and Network Router | |
EP3651040A1 (en) | Apparatus and method for remotely managing devices, and program therefor | |
CN104424036A (en) | Synchronous operation method and device of smart terminal | |
US11658871B2 (en) | Transmission of data from a management entity to a smart electricity meter | |
US20170289318A1 (en) | Implementing logical endpoints in internet-enabled devices | |
CN108810180B (en) | Scheduling method, device and terminal for domain name resolution redirection | |
CN113472763A (en) | Control instruction sending method and device, storage medium and electronic device | |
KR101341470B1 (en) | Method, remote access server and system for configuring a quality of service parameter | |
CN115918035A (en) | Method and device for realizing home computing cloud | |
CN111781848A (en) | Server connection method, device and system based on intelligent household equipment | |
EP3451717A1 (en) | Message pushing system, client equipment and message pushing method thereof | |
US10980078B2 (en) | Method and device for controlling network connection of application terminal | |
CN113691591A (en) | Data transmission method, device and computer readable storage medium | |
CN112953794A (en) | Network detection method, device, equipment and storage medium of router | |
JP2021150682A (en) | Control device, filtering control method, and filtering control program | |
US20190312929A1 (en) | Information synchronization method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |