CN113746821B - Intelligent device control method and device, storage medium and electronic device - Google Patents

Intelligent device control method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113746821B
CN113746821B CN202110975534.6A CN202110975534A CN113746821B CN 113746821 B CN113746821 B CN 113746821B CN 202110975534 A CN202110975534 A CN 202110975534A CN 113746821 B CN113746821 B CN 113746821B
Authority
CN
China
Prior art keywords
connection
socket
network
intelligent
communication parameters
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
Application number
CN202110975534.6A
Other languages
Chinese (zh)
Other versions
CN113746821A (en
Inventor
黄海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202110975534.6A priority Critical patent/CN113746821B/en
Publication of CN113746821A publication Critical patent/CN113746821A/en
Application granted granted Critical
Publication of CN113746821B publication Critical patent/CN113746821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total 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)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses an intelligent device control method, an intelligent device control device, a storage medium and electronic equipment, and relates to the technical field of Internet of things, wherein the intelligent device control method comprises the following steps: transmitting the local communication parameters to the intelligent device through network connection; when the network connection is monitored to be disconnected, a server socket is established locally, and the intelligent equipment establishes a client socket; when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket; and carrying out network-free local interconnection control on the intelligent equipment through the socket connection. The control performance of intelligent device is effectively promoted to this application.

Description

Intelligent device control method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of internet of things, in particular to an intelligent device control method, an intelligent device control device, a storage medium and electronic equipment.
Background
At present, intelligent devices, such as intelligent home devices, are widely popularized in various industries, and conventional requirements are met for interconnection and mutual control of the intelligent devices, for example, intelligent air conditioning and other devices are generally required to be controlled through mobile phones. The conventional control method needs to rely on external network connection, but the network connection usually has the risk of disconnection, and the intelligent devices cannot realize interconnection and mutual control after the external network connection is disconnected, so that the control performance of the intelligent devices is poor.
Disclosure of Invention
The embodiment of the application provides a scheme, which can effectively improve the control performance of intelligent equipment.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
according to one embodiment of the application, a smart device control method includes: transmitting the local communication parameters to the intelligent device through network connection; when the network connection is monitored to be disconnected, a server socket is established locally, and the intelligent equipment establishes a client socket; when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket; and carrying out network-free local interconnection control on the intelligent equipment through the socket connection.
In some embodiments of the present application, the method further comprises: acquiring device communication parameters of the intelligent device through the network connection; the controlling the network-free local interconnection of the intelligent device through the socket connection comprises the following steps: and sending a local area network communication instruction to the intelligent equipment according to the equipment communication parameters through the socket connection so as to control the intelligent equipment.
In some embodiments of the present application, the obtaining, through the network connection, a device communication parameter of the smart device includes: and acquiring the device port number and the device address of the intelligent device through the network connection to form the device communication parameters of the intelligent device.
In some embodiments of the present application, the sending the local communication parameters to the smart device via the network connection includes: monitoring the connection state of the network connection; and when the connection state accords with a specific abnormal condition, the local communication parameters are sent to the intelligent equipment through network connection.
In some embodiments of the present application, the sending the local communication parameters to the smart device via the network connection includes: acquiring a local device port number and a local device address to form the local communication parameters; and sending the local communication parameters to the intelligent equipment through network connection.
In some embodiments of the present application, sending, locally, network disconnection control indication information to the intelligent device through the network connection; when the server socket receives a connection request sent by the client socket according to the local communication parameters, establishing socket connection with the client socket, including: when the server socket receives a connection request sent by the client socket according to the local communication parameters, determining whether the connection request carries the network disconnection control indication information or not; and if the network disconnection control indication information is confirmed to be carried, establishing socket connection with the client socket.
In some embodiments of the present application, the method further comprises: acquiring equipment operation state information of the intelligent equipment; generating establishment indication information according to the equipment operation state information; and sending the establishment indication information to the intelligent equipment through the network connection so as to indicate the intelligent equipment to establish the client socket according to the establishment indication information.
According to one embodiment of the present application, a smart device control apparatus includes: the sending module is used for sending the local communication parameters to the intelligent equipment through network connection; the intelligent device comprises an establishing module, a control module and a control module, wherein the establishing module is used for locally establishing a server socket when the network connection is monitored to be disconnected, and the intelligent device establishes a client socket; the connection module is used for establishing socket connection with the client socket when the connection request sent by the client socket according to the local communication parameters is received by the server socket; and the control module is used for carrying out network-free local interconnection control on the intelligent equipment through the socket connection.
According to another embodiment of the present application, a storage medium has stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method described in the embodiments of the present application.
According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and the processor reads the computer program stored in the memory to execute the method according to the embodiment of the application.
In the embodiment of the application, local communication parameters are sent to the intelligent equipment through network connection; when the network connection disconnection is monitored, a server socket is built locally, and the intelligent equipment builds a client socket; when a server socket receives a connection request sent by a client socket according to local communication parameters, establishing socket connection with the client socket; and carrying out network-free local interconnection control on the intelligent equipment through socket connection.
In this way, the local communication parameters are sent to the intelligent device by descending the network connection, when the network connection is disconnected, the server socket is locally established, the intelligent device establishes the client socket, and then the socket connection can be established, so that the local and the intelligent device are also connected to the same local area network under the condition that the network is disconnected, the intelligent device can be subjected to network-free local area interconnection control based on the socket connection, and the control performance of the intelligent device is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a schematic diagram of a system to which embodiments of the present application may be applied.
Fig. 2 shows a flow chart of a smart device control method according to an embodiment of the present application.
Fig. 3 shows a block diagram of a smart device control apparatus according to one embodiment of the present application.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise indicated. Thus, these steps and operations will be referred to in several instances as being performed by a computer, which as referred to herein performs operations that include processing units by the computer that represent electronic signals that represent data in a structured form. This operation transforms the data or maintains it in place in the memory system of the computer, which may be reconfigured or otherwise altered in ways well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the foregoing text and are not meant to be limiting, and one skilled in the art will recognize that various steps and operations described below may also be implemented in hardware.
Fig. 1 shows a schematic diagram of a system 100 to which embodiments of the present application may be applied. As shown in fig. 1, the system 100 may include a network device 101, a first device 102, and a second device 103. The first device 102 may be any device, such as a computer, a cell phone, a smart watch, etc. The second device 103 may be any smart device, such as a smart home device, e.g. a smart home appliance. The network device 101 may be a network device such as a router. In one example, the first device 102 is a mobile phone and the second device 103 is a smart home device. The first terminal 102 and the second terminal 103 may be directly or indirectly connected to the network device 101, so that a network connection is established between the first terminal 102 and the second terminal 103.
In one implementation of the present example, the first device 102 may: transmitting the local communication parameters to the smart device (e.g., the second device 103) over the network connection; when the network connection is monitored to be disconnected, a server socket is established locally, and the intelligent equipment establishes a client socket; when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket; and carrying out network-free local interconnection control on the intelligent equipment through the socket connection.
Fig. 2 schematically shows a flow chart of a smart device control method according to an embodiment of the present application. The main body of execution of the smart device control method may be any device, such as the first device 102 shown in fig. 1.
As shown in fig. 2, the smart device control method may include steps S210 to S240.
Step S210, local communication parameters are sent to the intelligent equipment through network connection;
step S220, when the network connection disconnection is monitored, a server socket is built locally, and the intelligent equipment builds a client socket;
step S230, when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket;
and step S240, carrying out network-free local interconnection control on the intelligent equipment through socket connection.
The local can establish network connection with the intelligent device through the network device, and the local can send local communication parameters of the local to the intelligent device through the network connection, for example, the local communication parameters of the local can be transmitted to the intelligent device through a point-to-point network connection mode of the local and the intelligent device in a WIFI AP mode (hot spot mode). The local communication parameters are parameters required for socket communication with the local, and the local communication parameters may include a device port number and a device IP.
When the network connection of the local connection with the intelligent device is disconnected, the local connection with the intelligent device is waited for by establishing a server socket (socket server) through a local application (for example, an intelligent device control app), and meanwhile, the intelligent device also establishes a client socket (socket client).
Then, the intelligent device can send a connection request to the server socket according to the local communication parameters through the client socket, and the server socket can establish socket connection with the client socket in response to the connection request, so that the local and intelligent devices are also connected to the same local area network under the condition that the network is disconnected, namely, the local and the network devices are connected to the network device under the condition that the network is disconnected, and the network device is used as a data transmission medium to establish communication connection.
After socket connection between the local and intelligent devices is established, the intelligent devices can be subjected to network-free local interconnection control through socket connection, namely, network devices are used as data transmission media, local area network communication instructions for controlling the running state of the devices are sent to the intelligent devices in a local area network under the condition of no network, and the running state of the intelligent devices is controlled.
And based on the steps S210 to S240, the local communication parameters are sent to the intelligent equipment through the decline of the network connection, when the network connection is disconnected, the server socket is locally established, the intelligent equipment establishes the client socket, and then the socket connection can be established, so that the local and the intelligent equipment are also connected to the same local area network under the condition of the disconnection of the network, the intelligent equipment can be subjected to network-free local interconnection control based on the socket connection, and the control performance of the intelligent equipment is effectively improved.
The specific procedures of each step performed when the intelligent device control is performed are described below.
In step S210, the local communication parameters are sent to the smart device via the network connection.
In this example embodiment, a network connection may be established between the local device and the intelligent device through a network device, and local communication parameters of the local device may be sent to the intelligent device through the network connection, for example, in a peer-to-peer network connection manner between the local device and the intelligent device in a WIFI AP mode, and the local communication parameters of the local device are transmitted to the intelligent device. The local communication parameters are parameters required for socket communication with the local, and the local communication parameters may include a device port number and a device IP.
In one embodiment, step S210, sending the local communication parameters to the smart device through the network connection, includes: monitoring the connection state of network connection; and when the connection state meets a specific abnormal condition, the local communication parameters are sent to the intelligent equipment through the network connection.
The local may receive state information sent by the network device (e.g., router) in real time or at regular time, determine a connection state of the network connection based on the state information, and then, based on a locally preset state determination table (in which a specific abnormal condition may be stored, that is, a determination condition of network abnormality), when the connection state is determined to be in accordance with the specific abnormal condition, send the local communication parameter to the intelligent device through the network connection, so that when the local and the intelligent device have a possibility of network abnormality, the local communication parameter may be sent to the intelligent device in advance, and further, the intelligent device may be controlled in time after the network disconnection.
In one embodiment, sending local communication parameters to a smart device over a network connection includes: acquiring a local device port number and a device address to form local communication parameters; and sending the local communication parameters to the intelligent device through a network connection.
By obtaining the device port number and the device address of the local device (such as a mobile phone) to form local communication parameters, the intelligent device can accurately search for communication connection with the local device.
In step S220, when it is monitored that the network connection is disconnected, a server socket is established locally, and the smart device establishes a client socket.
In this example embodiment, when the network connection between the local and the smart device is disconnected, the local application (for example, the smart device control app) may establish a service socket (socket server) to wait for the connection of the smart device, and at the same time, the smart device side also establishes a client socket (socket client)
In one embodiment, when the intelligent device monitors that the network connection is disconnected, the intelligent device can automatically switch from a WIFI AP mode (hotspot mode) to a WIFI STA mode (site mode), then establish a client socket, and seek to connect with a server socket as a site in the site mode.
In one embodiment, device operation state information of the intelligent device may be obtained locally; generating establishment indication information according to the equipment running state information; and sending the establishment indication information to the intelligent equipment through network connection so as to instruct the intelligent equipment to establish the client socket according to the establishment indication information.
The device operation state information, such as what function the device is operating or at what specific stage or operation parameter of what function, may be acquired locally in real time or at a fixed time before the network connection is disconnected. And then, inquiring matched establishment indication information (such as information indicating when the intelligent device establishes a client socket, seeks connection with a server socket through the client socket and the like) in a local indication information table according to the equipment operation state information, and finally, sending the indication information to the intelligent device to indicate the intelligent device to establish the client socket according to the establishment indication information, and seek connection with the local connection and the like, so that the control performance of the intelligent device can be further improved.
In step S230, when the server socket receives a connection request sent by the client socket according to the local communication parameters, a socket connection is established with the client socket.
In this exemplary embodiment, the smart device may send a connection request to the server socket according to the local communication parameter through the client socket, and the server socket may establish a socket connection with the client socket in response to the connection request, so that the local and the smart device are also connected to the same local area network when the network is disconnected, that is, the local and the network device are connected to the network device when the network is disconnected, and the network device is used as a data transmission medium to establish a communication connection.
In one embodiment, step S230, local sending a disconnection control indication message to the intelligent device through a network connection; when a server socket receives a connection request sent by a client socket according to local communication parameters, establishing socket connection with the client socket, including: when a connection request sent by a client socket according to local communication parameters is received, determining whether the connection request carries network disconnection control indication information or not; if the network disconnection control indication information is confirmed to be carried, socket connection is established with the client socket.
The off-network control indication information informs the intelligent device of the information that the intelligent device needs to continue to control the intelligent device after the off-network, the intelligent device sends the off-network control indication information to the intelligent device before the network connection is disconnected, and the intelligent device agrees to establish socket connection only locally when carrying the off-network control indication information after the off-network connection is sought for connection, so that the connection confusion when a large number of intelligent devices are provided is avoided, and the control reliability of the intelligent device is further improved.
In step S240, the intelligent device is controlled by the socket connection without network local interconnection.
In the embodiment of the present example, after the socket connection between the local and the intelligent device is established, the intelligent device may be controlled by the socket connection without network local interconnection, that is, the network device is used as a data transmission medium, and a local area network communication instruction for controlling the running state of the device is sent to the intelligent device in the local area network under the condition of no network, so as to control the running state of the intelligent device.
In one embodiment, the method further comprises: acquiring equipment communication parameters of intelligent equipment through network connection; step S240, performing network-free local area interconnection control on the intelligent device through socket connection, including: and sending a local area network communication instruction to the intelligent equipment according to the equipment communication parameters through socket connection so as to control the intelligent equipment.
The device communication parameters are parameters required by socket communication with the intelligent device, the device communication parameters can be obtained from the intelligent device in a network connection state, further, after socket connection is established, the device communication parameters can be accurately communicated with the intelligent device locally, and local area network communication instructions are sent to the intelligent device according to the device communication parameters to control the intelligent device.
In one embodiment, obtaining device communication parameters of a smart device through a network connection includes: and obtaining the device port number and the device address of the intelligent device through network connection to form the device communication parameters of the intelligent device. By acquiring the device port number and the device address of the intelligent device to form the device communication parameters, the intelligent device can be accurately communicated with.
In order to facilitate better implementation of the intelligent device control method provided by the embodiment of the application, the embodiment of the application also provides an intelligent device control device based on the intelligent device control method. The meaning of the nouns is the same as that in the intelligent device control method, and specific implementation details can be referred to the description in the method embodiment. Fig. 3 shows a block diagram of a smart device control apparatus according to one embodiment of the present application.
As shown in fig. 3, the smart device control apparatus 300 may include a sending module 310, an establishing module 320, a connecting module 330, and a control module 340.
The sending module 310 may be configured to send the local communication parameters to the smart device through a network connection; the establishing module 320 may be configured to, when it is detected that the network connection is disconnected, locally establish a server socket, and the smart device establishes a client socket; the connection module 330 may be configured to establish a socket connection with the client socket when the server socket receives a connection request sent by the client socket according to the local communication parameters; the control module 340 may be configured to perform a network-free local interconnect control on the smart device through the socket connection.
In some embodiments of the present application, the apparatus further comprises: the device parameter acquisition unit is used for acquiring device communication parameters of the intelligent device through the network connection; the control module 340 includes: and the control unit is used for sending a local area network communication instruction to the intelligent equipment according to the equipment communication parameters through the socket connection so as to control the intelligent equipment.
In some embodiments of the present application, the device parameter obtaining unit is configured to: and acquiring the device port number and the device address of the intelligent device through the network connection to form the device communication parameters of the intelligent device.
In some embodiments of the present application, the sending module 310 includes: the state monitoring unit is used for monitoring the connection state of the network connection; and the sending unit is used for sending the local communication parameters to the intelligent equipment through network connection when the connection state accords with a specific abnormal condition.
In some embodiments of the present application, the sending unit is configured to: acquiring a local device port number and a local device address to form the local communication parameters; and sending the local communication parameters to the intelligent equipment through network connection.
In some embodiments of the present application, sending, locally, network disconnection control indication information to the intelligent device through the network connection; the connection module 330 includes: a request receiving unit, configured to determine, when the server socket receives a connection request sent by the client socket according to the local communication parameter, whether the connection request carries the network disconnection control indication information; and the request response unit is used for establishing socket connection with the client socket if the request response unit confirms that the network disconnection control instruction information is carried.
In some embodiments of the present application, the apparatus further comprises: the running state monitoring unit is used for acquiring the equipment running state information of the intelligent equipment; an indication information generating unit, configured to generate establishment indication information according to the equipment operation state information; and the indication information sending unit is used for sending the establishment indication information to the intelligent equipment through the network connection so as to indicate the intelligent equipment to establish the client socket according to the establishment indication information.
In this way, based on the intelligent device control apparatus 300, the local communication parameters are sent to the intelligent device by descending the network connection, when the network connection is disconnected, the server socket is locally established, the intelligent device establishes the client socket, and then the socket connection can be established, so that the local and the intelligent device are also connected in the same local area network under the condition of network disconnection, and the intelligent device can be subjected to network-free local area interconnection control based on the socket connection, thereby effectively improving the control performance of the intelligent device.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, the embodiment of the application further provides an electronic device, which may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user page, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 executes the computer programs stored in the memory 402, so as to implement various functions, for example, the processor 401 may perform the following steps:
transmitting the local communication parameters to the intelligent device through network connection; when the network connection is monitored to be disconnected, a server socket is established locally, and the intelligent equipment establishes a client socket; when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket; and carrying out network-free local interconnection control on the intelligent equipment through the socket connection.
In some embodiments of the present application, the processor 401 may perform steps including: acquiring device communication parameters of the intelligent device through the network connection; the processor 401 may execute, when the network-free local interconnection control is performed on the intelligent device through the socket connection: and sending a local area network communication instruction to the intelligent equipment according to the equipment communication parameters through the socket connection so as to control the intelligent equipment.
In some embodiments of the present application, the processor 401 may execute, when acquiring the device communication parameter of the smart device through the network connection: and acquiring the device port number and the device address of the intelligent device through the network connection to form the device communication parameters of the intelligent device.
In some embodiments of the present application, the processor 401 may execute, when the local communication parameter is sent to the smart device through the network connection: monitoring the connection state of the network connection; and when the connection state accords with a specific abnormal condition, the local communication parameters are sent to the intelligent equipment through network connection.
In some embodiments of the present application, the processor 401 may execute, when the local communication parameter is sent to the smart device through the network connection: acquiring a local device port number and a local device address to form the local communication parameters; and sending the local communication parameters to the intelligent equipment through network connection.
In some embodiments of the present application, sending, locally, network disconnection control indication information to the intelligent device through the network connection; the processor 401 may execute, when the server socket, when receiving a connection request sent by the client socket according to the local communication parameter, establishing a socket connection with the client socket: when the server socket receives a connection request sent by the client socket according to the local communication parameters, determining whether the connection request carries the network disconnection control indication information or not; and if the network disconnection control indication information is confirmed to be carried, establishing socket connection with the client socket.
In some embodiments of the present application, the processor 401 may: acquiring equipment operation state information of the intelligent equipment; generating establishment indication information according to the equipment operation state information; and sending the establishment indication information to the intelligent equipment through the network connection so as to indicate the intelligent equipment to establish the client socket according to the establishment indication information.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present embodiments also provide a storage medium having stored therein a computer program that can be loaded by a processor to perform the steps of any of the methods provided by the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the storage medium may perform any of the steps in the method provided in the embodiment of the present application, the beneficial effects that can be achieved by the method provided in the embodiment of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It will be understood that the present application is not limited to the embodiments that have been described above and shown in the drawings, but that various modifications and changes can be made without departing from the scope thereof.

Claims (9)

1. The intelligent equipment control method is characterized by comprising the following steps of:
the method comprises the steps of sending local communication parameters to intelligent equipment through network connection, and sending off-network control indication information to the intelligent equipment through the network connection, wherein the off-network control indication information is information for informing the intelligent equipment that the intelligent equipment is to be continuously controlled after the intelligent equipment is off-network;
when the network connection is monitored to be disconnected, a server socket is established locally, and the intelligent equipment also establishes a client socket when the network connection is disconnected;
when the server socket receives a connection request sent by the client socket according to the local communication parameters, socket connection is established with the client socket;
the intelligent equipment is subjected to network-free local interconnection control through the socket connection;
when the server socket receives a connection request sent by the client socket according to the local communication parameters, establishing socket connection with the client socket, including:
when the server socket receives a connection request sent by the client socket according to the local communication parameters, determining whether the connection request carries the network disconnection control indication information or not;
and if the network disconnection control indication information is confirmed to be carried, establishing socket connection with the client socket.
2. The method according to claim 1, wherein the method further comprises:
acquiring device communication parameters of the intelligent device through the network connection;
the controlling the network-free local interconnection of the intelligent device through the socket connection comprises the following steps:
and sending a local area network communication instruction to the intelligent equipment according to the equipment communication parameters through the socket connection so as to control the intelligent equipment.
3. The method of claim 2, wherein the obtaining device communication parameters of the smart device over the network connection comprises:
and acquiring the device port number and the device address of the intelligent device through the network connection to form the device communication parameters of the intelligent device.
4. The method of claim 1, wherein the sending the local communication parameters to the smart device over the network connection comprises:
monitoring the connection state of the network connection;
and when the connection state accords with a specific abnormal condition, the local communication parameters are sent to the intelligent equipment through network connection.
5. The method according to claim 1 or 4, wherein said sending local communication parameters to the smart device over the network connection comprises:
acquiring a local device port number and a local device address to form the local communication parameters;
and sending the local communication parameters to the intelligent equipment through network connection.
6. The method according to claim 4, wherein the method further comprises:
acquiring equipment operation state information of the intelligent equipment;
generating establishment indication information according to the equipment operation state information;
and sending the establishment indication information to the intelligent equipment through the network connection so as to indicate the intelligent equipment to establish the client socket according to the establishment indication information.
7. An intelligent device control apparatus, characterized by comprising:
the system comprises a sending module, a network connection module and a network connection module, wherein the sending module is used for sending local communication parameters to intelligent equipment through network connection, and sending off-network control indication information to the intelligent equipment through the network connection, wherein the off-network control indication information is information for informing the intelligent equipment that the intelligent equipment is to be continuously controlled after the intelligent equipment is off-network;
the intelligent device comprises an establishing module, a receiving module and a processing module, wherein the establishing module is used for locally establishing a server socket when the network connection is monitored to be disconnected, and the intelligent device also establishes a client socket when the network connection is monitored to be disconnected;
the connection module is used for establishing socket connection with the client socket when the connection request sent by the client socket according to the local communication parameters is received by the server socket;
the control module is used for carrying out network-free local interconnection control on the intelligent equipment through the socket connection;
wherein, the connection module includes: a request receiving unit, configured to determine, when the server socket receives a connection request sent by the client socket according to the local communication parameter, whether the connection request carries the network disconnection control indication information; and the request response unit is used for establishing socket connection with the client socket if the request response unit confirms that the network disconnection control instruction information is carried.
8. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of any of claims 1 to 6.
9. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in a memory to perform the method of any one of claims 1 to 6.
CN202110975534.6A 2021-08-24 2021-08-24 Intelligent device control method and device, storage medium and electronic device Active CN113746821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975534.6A CN113746821B (en) 2021-08-24 2021-08-24 Intelligent device control method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975534.6A CN113746821B (en) 2021-08-24 2021-08-24 Intelligent device control method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113746821A CN113746821A (en) 2021-12-03
CN113746821B true CN113746821B (en) 2023-06-27

Family

ID=78732530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975534.6A Active CN113746821B (en) 2021-08-24 2021-08-24 Intelligent device control method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113746821B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338461A (en) * 2021-12-30 2022-04-12 武汉斗鱼鱼乐网络科技有限公司 Network connection monitoring method and related equipment
CN115396824B (en) * 2022-07-13 2023-11-21 深圳市酷开网络科技股份有限公司 Bluetooth-based network configuration method, device, computer equipment and medium
CN116055581A (en) * 2022-11-23 2023-05-02 广东博力威科技股份有限公司 Data transmission control method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN111465015A (en) * 2020-03-06 2020-07-28 珠海格力电器股份有限公司 Method, system, device, equipment and storage medium for intelligent household equipment network distribution
CN112130461A (en) * 2020-09-24 2020-12-25 珠海格力电器股份有限公司 Smart home control method and device, storage medium and electronic device
CN112764351A (en) * 2020-12-18 2021-05-07 深圳市欧瑞博科技股份有限公司 Control method and device of intelligent device, electronic device and storage medium
CN112929225A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Session exception handling method and device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10666503B1 (en) * 2018-09-27 2020-05-26 Amazon Technologies, Inc. Network connection and termination system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN111465015A (en) * 2020-03-06 2020-07-28 珠海格力电器股份有限公司 Method, system, device, equipment and storage medium for intelligent household equipment network distribution
CN112130461A (en) * 2020-09-24 2020-12-25 珠海格力电器股份有限公司 Smart home control method and device, storage medium and electronic device
CN112764351A (en) * 2020-12-18 2021-05-07 深圳市欧瑞博科技股份有限公司 Control method and device of intelligent device, electronic device and storage medium
CN112929225A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Session exception handling method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智能家居的远程通信关键技术研究;雷思敏等;《科技与创新》;20200731(第14期);51-52 *

Also Published As

Publication number Publication date
CN113746821A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
CN113746821B (en) Intelligent device control method and device, storage medium and electronic device
CN113765714B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN113038440B (en) Communication channel switching method and device, computer equipment and readable storage medium
CN112333727A (en) Method and device for controlling equipment, storage medium, processor and terminal
CN111147567A (en) Service calling method, device, equipment and medium
EP3537246A1 (en) Energy control method and control apparatus for power consumption system
CN114338464B (en) Fault diagnosis method, device, equipment and computer readable storage medium
CN108965019B (en) Dynamic configuration method of communication protocol, wireless communication device and related equipment
CN104539493A (en) Intelligent terminal system and method of management and control over intelligent household electric appliances based on USB interface
EP3680783B1 (en) Electronic apparatus and method and device for reducing power consumption
EP3694151A1 (en) Terminal network sharing method, apparatus, air conditioning adjustment device, and storage medium
CN113660149B (en) Equipment control method and device, storage medium and electronic equipment
CN110119111B (en) Communication method and device, storage medium, and electronic device
CN111193765B (en) Device connection method, device, computer device and computer-readable storage medium
JP2001145168A (en) Communication system, communications equipment, and communication method
CN114245370B (en) Communication management method, device, server and computer storage medium
CN116743551B (en) Main-standby switching method and device of equipment gateway and computer readable storage medium
CN117412282A (en) Wireless connection method, device, storage medium and electronic equipment
CN114071628B (en) Terminal communication method and device based on android system and storage medium
CN113132960B (en) Bluetooth communication method, system and Bluetooth device
CN117676645A (en) Communication control method, device, computer equipment and storage medium
CN118301710A (en) Distribution network method and device, storage medium and electronic equipment
CN117255332A (en) Bluetooth connection control method and device, storage medium and electronic equipment
CN117135765A (en) Audio transmission method and device, storage medium and electronic equipment
CN117412405A (en) Data transmission method, device, electronic equipment and computer readable storage medium

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