CN113746821A - 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
CN113746821A
CN113746821A CN202110975534.6A CN202110975534A CN113746821A CN 113746821 A CN113746821 A CN 113746821A CN 202110975534 A CN202110975534 A CN 202110975534A CN 113746821 A CN113746821 A CN 113746821A
Authority
CN
China
Prior art keywords
socket
connection
network
communication parameters
intelligent
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.)
Granted
Application number
CN202110975534.6A
Other languages
Chinese (zh)
Other versions
CN113746821B (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]

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 method comprises the following steps: sending the local communication parameters to the intelligent equipment 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, establishing socket connection with the client socket; and performing network-free local area interconnection control on the intelligent equipment through the socket connection. This application effectively promotes smart machine's control performance.

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 and device, a storage medium and electronic equipment.
Background
At present, intelligent devices such as smart home devices are widely popularized in various industries, and the interconnection and mutual control of the intelligent devices are conventional requirements, for example, the devices such as a smart air conditioner and the like are generally required to be controlled through a mobile phone. The conventional control mode needs to be performed by depending on external network connection, but the network connection usually has a risk of disconnection, and the intelligent device cannot realize interconnection and mutual control after the external network connection is disconnected, so that the control performance of the intelligent device is poor.
Disclosure of Invention
The embodiment of the application provides a scheme, and the control performance of the intelligent device can be effectively improved.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
according to an embodiment of the present application, a smart device control method includes: sending the local communication parameters to the intelligent equipment 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, establishing socket connection with the client socket; and performing network-free local area 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 network-free local area interconnection control 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 device communication parameters of the smart device through the network connection includes: and acquiring the equipment port number and the equipment address of the intelligent equipment through the network connection to form the equipment communication parameters of the intelligent equipment.
In some embodiments of the present application, the sending the local communication parameters to the smart device via the network connection includes: monitoring a connection status of the network connection; and when the connection state meets a specific abnormal condition, sending the local communication parameters 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, network outage control indication information is locally sent to the smart device via the network connection; when the server socket receives a connection request sent by the client socket according to the local communication parameters, establishing a 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; and if the network breaking 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 running state information of the intelligent equipment; generating establishment indication information according to the equipment running 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 an embodiment of the present application, an intelligent device control apparatus includes: the sending module is used for sending the local communication parameters to the intelligent equipment through network connection; the establishing module is used for establishing a server socket locally and the intelligent equipment establishes a client socket when the network connection disconnection is monitored; the connection module is used for establishing 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; and the control module is used for carrying out network-free local area 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 of an embodiment 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 in the embodiment of the application.
In the embodiment of the application, the local communication parameters are sent to the intelligent equipment through network connection; when the disconnection of the network connection is monitored, 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, the server socket establishes socket connection with the client socket; and performing network-free local area interconnection control on the intelligent equipment through socket connection.
In this way, local communication parameters are sent to the intelligent equipment when the network connection is dropped, when the network connection is disconnected, a server socket is locally established, a client socket is established by the intelligent equipment, then socket connection can be established, so that the local and intelligent equipment are also connected to the same local area network under the condition of network disconnection, network-free local area interconnection control can be performed on the intelligent equipment based on the socket connection, and the control performance of the intelligent equipment is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
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 an embodiment of the present application.
FIG. 4 shows a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular 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, as those of ordinary skill in the art will appreciate that various steps and operations described below may 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 intelligent device, such as a smart home device like a smart home appliance. 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 as to establish a network connection between the first terminal 102 and the second terminal 103.
In one implementation of this example, the first device 102 may: sending 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, establishing socket connection with the client socket; and performing network-free local area 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 execution subject of the intelligent 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 disconnection of the network connection is monitored, a server socket is established locally, and the intelligent equipment establishes a client socket;
step S230, when the server socket receives the connection request sent by the client socket according to the local communication parameters, the server socket establishes a socket connection with the client socket;
and step S240, performing network-free local area interconnection control on the intelligent equipment through socket connection.
The local communication parameters can be locally transmitted to the intelligent device through network connection, for example, the local communication parameters are transmitted to the intelligent device through a point-to-point network connection mode of the local and intelligent devices in a WIFI AP mode (hotspot 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 between the local and the intelligent device is disconnected, the local can establish a server socket (socket server) through a local application (for example, an intelligent device control app), wait for the connection of the intelligent device, and simultaneously establish a client socket (socket client) on the intelligent device side.
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, that is, the local and 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 the socket connection between the local and the intelligent device is established, the network-less local area interconnection control can be performed on the intelligent device through the socket connection, 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 that the running state of the intelligent device is controlled.
Further, based on steps S210 to S240, by sending the local communication parameter to the smart device when the network connection is dropped, when the network connection is disconnected, a server socket is locally established, the smart device establishes a client socket, and then a socket connection can be established, so that the local and smart devices are also connected to the same local area network when the network is disconnected, and the network-less local area interconnection control can be performed on the smart device based on the socket connection, thereby effectively improving the control performance of the smart device.
The following describes a specific process of each step performed when the smart device control is performed.
In step S210, the local communication parameters are sent to the smart device via the network connection.
In the embodiment of the present example, a network connection may be established between the local device and the smart device through the network device, and the local device may send local communication parameters of the local device to the smart device through the network connection, for example, the local device transmits the local communication parameters of the local device to the smart device through a peer-to-peer network connection between the local device and the smart device in the WIFI AP 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.
In one embodiment, step S210, sending the local communication parameters to the smart device through a network connection, includes: monitoring a connection state of a network connection; and when the connection state meets a specific abnormal condition, sending the local communication parameters to the intelligent equipment through network connection.
The method comprises the steps that state information sent by network equipment (such as a router) in real time or at regular time can be received locally, the connection state of network connection is judged based on the state information, then, local communication parameters are sent to intelligent equipment through network connection when the connection state is judged to meet specific abnormal conditions based on a locally preset state judgment table (specific abnormal conditions can be stored, namely judgment conditions of network abnormality), and when the local communication parameters are possibly sent to the intelligent equipment in advance when the local communication parameters and the intelligent equipment have network abnormality, the intelligent equipment can be controlled in time after the network is disconnected.
In one embodiment, sending the local communication parameters to the smart device over a network connection includes: acquiring a local device port number and a local device address to form local communication parameters; the local communication parameters are sent to the smart device over the network connection.
The intelligent device can accurately seek communication connection with the local by acquiring the device port number and the device address of the local device (such as a mobile phone) to form local communication parameters.
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 the embodiment of this example, when the network connection with the smart device is disconnected locally, the local may establish a socket server (socket server) through the local application (e.g. the smart device control app), wait for the connection of the smart device, and simultaneously establish a socket client (socket client) on the smart device side
In an embodiment, when monitoring that the network connection is disconnected, the smart device may automatically switch from the WIFI AP mode (hotspot mode) to the 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, the device running state information of the intelligent device can 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 indicate 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 operates or at what specific stage of what function or operation parameters, may be locally obtained in real time or at regular time before the network connection is disconnected. Then, according to the device operation state information, the matched establishment indication information (for example, information indicating when the intelligent device establishes the client socket and seeks connection with the server socket through the client socket) is inquired in the local indication information table, and finally, the indication information is sent to the intelligent device, the intelligent device is instructed to establish the client socket according to the establishment indication information, seek connection with the local, and the like, so that the control performance of the intelligent device can be further improved.
In step S230, when the server socket receives the connection request sent by the client socket according to the local communication parameters, the server socket establishes a socket connection with the client socket.
In the embodiment of the present example, 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 smart devices are also connected to the same local area network when the network is disconnected, that is, the local and network devices 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, locally sending network disconnection control instruction information to the intelligent device through network connection; when a server socket receives a connection request sent by a client socket according to local communication parameters, the server socket establishes a socket connection with the client socket, and the method comprises the following steps: when a server socket receives a connection request sent by a client socket according to local communication parameters, determining whether the connection request carries network disconnection control indication information; if the network breaking control indication information is confirmed to be carried, the socket connection is established with the client socket.
The intelligent device is informed of information about continuing to control the intelligent device after the network is disconnected by the network disconnection control indication information, the intelligent device sends the network disconnection control indication information to the intelligent device before the network connection is disconnected, and when the intelligent device seeks to connect after the network is disconnected and carries the network disconnection control indication information, the intelligent device locally agrees to establish socket connection, thereby avoiding the disordered connection when a large amount of intelligent devices are provided, and further improving the control reliability of the intelligent device.
In step S240, the network-less local area interconnection control is performed on the smart device through the socket connection.
In the embodiment of this example, after the socket connection between the local and the intelligent device is established, the network-less local area interconnect control may be performed on the intelligent device through the socket connection, that is, the network device is used as a data transmission medium, and a local area network communication instruction for controlling the operation state of the device is sent to the intelligent device in the local area network under the network-less condition, so as to control the operation 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-less 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 for socket communication with the intelligent device, the device communication parameters can be acquired from the intelligent device in a network connection state, then after socket connection is established, local accurate communication can be carried out with the intelligent device based on the device communication parameters, local area network communication instructions are sent to the intelligent device according to the device communication parameters, and the intelligent device is controlled.
In one embodiment, acquiring device communication parameters of a smart device via a network connection includes: and acquiring the equipment port number and the equipment address of the intelligent equipment through network connection to form equipment communication parameters of the intelligent equipment. The device communication parameters are formed by acquiring the device port number and the device address of the intelligent device, so that the intelligent device can be accurately communicated.
In order to better implement the intelligent device control method provided by the embodiment of the present application, an embodiment of the present application further provides an intelligent device control apparatus based on the intelligent device control method. The meaning of the noun is the same as that in the above-mentioned intelligent device control method, and specific implementation details can refer to the description in the method embodiment. Fig. 3 shows a block diagram of a smart device control apparatus according to an 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 via a network connection; the establishing module 320 may be configured to establish a server socket locally and a client socket locally when the network connection disconnection is monitored; 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 parameter; the control module 340 may be configured to perform network-less lan 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 the 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 equipment port number and the equipment address of the intelligent equipment through the network connection to form the equipment communication parameters of the intelligent equipment.
In some embodiments of the present application, the sending module 310 includes: a state monitoring unit 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 meets 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, network outage control indication information is locally sent to the smart device via 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 network disconnection control indication information is confirmed to be carried.
In some embodiments of the present application, the apparatus further comprises: the running state monitoring unit is used for acquiring equipment running state information of the intelligent equipment; the indication information generating unit is used for generating establishment indication information according to the equipment running 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, local communication parameters are sent to the intelligent device when the network connection is dropped, when the network connection is disconnected, a server socket is locally established, the intelligent device establishes a client socket, and then the socket connection can be established, so that the local and intelligent devices are also connected to the same local area network under the condition of network disconnection, and network-less local area interconnection control can be performed on the intelligent device 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 the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, an embodiment of the present application further provides an electronic device, where the electronic device 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 present application, and specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of 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 operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring 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 handles operating systems, user pages, application programs, and the like, and the modem processor mainly handles wireless communications. 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 operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the 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 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, for example, the processor 401 may execute the following steps:
sending the local communication parameters to the intelligent equipment 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, establishing socket connection with the client socket; and performing network-free local area 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; when the network-less local area network interconnection control is performed on the smart device through the socket connection, the processor 401 may perform: 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, when obtaining the device communication parameters of the smart device through the network connection, the processor 401 may perform: and acquiring the equipment port number and the equipment address of the intelligent equipment through the network connection to form the equipment communication parameters of the intelligent equipment.
In some embodiments of the present application, when the local communication parameter is sent to the smart device through the network connection, the processor 401 may perform: monitoring a connection status of the network connection; and when the connection state meets a specific abnormal condition, sending the local communication parameters to the intelligent equipment through network connection.
In some embodiments of the present application, when the local communication parameter is sent to the smart device through the network connection, the processor 401 may perform: 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, network outage control indication information is locally sent to the smart device via the network connection; when the server socket establishes a socket connection with the client socket when receiving a connection request sent by the client socket according to the local communication parameter, the processor 401 may execute: 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; and if the network breaking 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 running state information of the intelligent equipment; generating establishment indication information according to the equipment running 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 understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, the present application further provides a storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the methods provided in the present application.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the methods provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
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 invention 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 invention 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 (10)

1. An intelligent device control method, comprising:
sending the local communication parameters to the intelligent equipment 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, establishing socket connection with the client socket;
and performing network-free local area interconnection control on the intelligent equipment through the socket connection.
2. The method of claim 1, further comprising:
acquiring device communication parameters of the intelligent device through the network connection;
the network-free local area interconnection control 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 via the network connection comprises:
and acquiring the equipment port number and the equipment address of the intelligent equipment through the network connection to form the equipment communication parameters of the intelligent equipment.
4. The method of claim 1, wherein sending the local communication parameters to the smart device over the network connection comprises:
monitoring a connection status of the network connection;
and when the connection state meets a specific abnormal condition, sending the local communication parameters to the intelligent equipment through network connection.
5. The method of claim 1 or 4, wherein sending the local communication parameters to the smart device via 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 of claim 1, wherein the network outage control indication information is sent locally to the smart device over the network connection;
when the server socket receives a connection request sent by the client socket according to the local communication parameters, establishing a 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;
and if the network breaking control indication information is confirmed to be carried, establishing socket connection with the client socket.
7. The method of claim 4, further comprising:
acquiring equipment running state information of the intelligent equipment;
generating establishment indication information according to the equipment running 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.
8. An intelligent device control apparatus, comprising:
the sending module is used for sending the local communication parameters to the intelligent equipment through network connection;
the establishing module is used for establishing a server socket locally and the intelligent equipment establishes a client socket when the network connection disconnection is monitored;
the connection module is used for establishing 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;
and the control module is used for carrying out network-free local area interconnection control on the intelligent equipment through the socket connection.
9. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to carry out the method of any one of claims 1 to 7.
10. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in the memory to perform the method of any of claims 1 to 7.
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 true CN113746821A (en) 2021-12-03
CN113746821B 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)

Cited By (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
CN115396824A (en) * 2022-07-13 2022-11-25 深圳市酷开网络科技股份有限公司 Network configuration method and device based on Bluetooth, computer equipment and medium
CN116055581A (en) * 2022-11-23 2023-05-02 广东博力威科技股份有限公司 Data transmission control method, device, equipment and storage medium

Citations (6)

* 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
US20200287781A1 (en) * 2018-09-27 2020-09-10 Amazon Technologies, Inc. Network connection and termination system
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200287781A1 (en) * 2018-09-27 2020-09-10 Amazon Technologies, Inc. Network connection and termination system
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
雷思敏等: "智能家居的远程通信关键技术研究", 《科技与创新》 *

Cited By (4)

* 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
CN115396824A (en) * 2022-07-13 2022-11-25 深圳市酷开网络科技股份有限公司 Network configuration method and device based on Bluetooth, computer equipment and medium
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

Also Published As

Publication number Publication date
CN113746821B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN113746821A (en) Intelligent device control method and device, storage medium and electronic device
CN101510167B (en) A kind of method of plug-in component operation, Apparatus and system
CN113765714B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN111625419B (en) Log acquisition method, system, equipment and computer readable storage medium
EP3537246A1 (en) Energy control method and control apparatus for power consumption system
CN108469959B (en) Firmware upgrading method and device of monitoring equipment
CN111130962A (en) Automatic configuration method, equipment, system and storage medium for switch
CN104539493B (en) Based on the intelligent terminal that USB interface is realized to the managing and control system and its implementation of intelligent appliance
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system
CN113285825A (en) Equipment access system and access method
CN105357078A (en) Detection method and system of network state of intelligent equipment
CN115052312A (en) Wireless communication method, device, equipment and storage medium of heat pump equipment
CN115509333A (en) Server collaborative power-on and power-off device, method, system and medium
CN111193765B (en) Device connection method, device, computer device and computer-readable storage medium
CN108234215B (en) Gateway creating method and device, computer equipment and storage medium
CN113938332B (en) Control method and communication device
CN114449554B (en) Equipment upgrading method, device, equipment and storage medium
CN113849356B (en) Equipment testing method and device, electronic equipment and storage medium
CN111506441B (en) Method, device, equipment and storage medium for monitoring Raid card information
CN114390436B (en) Equipment control method and device, storage medium and electronic equipment
CN111026048B (en) Data processing method, device and storage medium
CN115934736A (en) Data docking method, device, equipment and storage medium
CN115987748A (en) Smart television control method and device, storage medium and electronic equipment
CN117119134A (en) Video call method, device, storage medium and door lock
CN117130457A (en) Terminal control method and device, storage medium and electronic equipment

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