CN114155636A - Device control method, device, electronic device and storage medium - Google Patents

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

Info

Publication number
CN114155636A
CN114155636A CN202111530205.7A CN202111530205A CN114155636A CN 114155636 A CN114155636 A CN 114155636A CN 202111530205 A CN202111530205 A CN 202111530205A CN 114155636 A CN114155636 A CN 114155636A
Authority
CN
China
Prior art keywords
network
electronic equipment
electronic device
internet
electronic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111530205.7A
Other languages
Chinese (zh)
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 CN202111530205.7A priority Critical patent/CN114155636A/en
Publication of CN114155636A publication Critical patent/CN114155636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys

Abstract

The embodiment of the application discloses a device control method and device, electronic equipment and a storage medium. The method comprises the following steps: the method comprises the steps of detecting the connection condition of first electronic equipment and the Internet; when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted; detecting a second network generated by a second electronic device according to the first network; and awakening the first electronic equipment to enter a working mode according to the second network. When the network is disconnected, the first electronic equipment does not frequently enter the working mode, and only when the network is recovered, the first electronic equipment is controlled to enter the working mode, so that the electric quantity of the first electronic equipment is saved.

Description

Device control method, device, electronic device and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a device control method and apparatus, an electronic device, and a storage medium.
Background
In the prior art, an intelligent door lock usually needs to be connected with the internet to work, for example, a user can control the intelligent door lock to remotely open a door through a network.
However, when a network fails, for example, an operator network failure or a home network device failure, the intelligent door lock cannot be networked, and at this time, the intelligent door lock is waken up to work all the time and tries to be networked, which may cause the intelligent door lock to generate more power consumption.
Disclosure of Invention
The embodiment of the application provides a device control method and device, electronic equipment and a storage medium. The equipment control method can save the electric quantity of the electronic equipment.
In a first aspect, an embodiment of the present application provides an apparatus control method, which is applied to a first electronic apparatus, and the method includes:
detecting the connection condition of the first electronic equipment and the Internet;
when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted;
detecting a second network generated by a second electronic device according to the first network;
and awakening the first electronic equipment to enter a working mode according to the second network.
In a second aspect, an embodiment of the present application provides an apparatus control device, which is applied to a first electronic device, and includes:
the first detection module is used for detecting the connection condition of the first electronic equipment and the Internet;
the first control module is used for controlling the first electronic equipment to enter a sleep mode, generating a first network and broadcasting the first network when the first electronic equipment is disconnected from the Internet;
the second detection module is used for detecting a second network generated by the second electronic equipment according to the first network;
and the second control module is used for awakening the first electronic equipment to enter a working mode according to the second network.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory storing executable program code, and a processor coupled to the memory; the processor calls the executable program codes stored in the memory to execute the steps in the device control method provided by the embodiment of the application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute steps in a device control method provided in an embodiment of the present application.
In the embodiment of the application, the connection condition of the first electronic equipment and the internet is detected; when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted; detecting a second network generated by a second electronic device according to the first network; and awakening the first electronic equipment to enter a working mode according to the second network. When the network is disconnected, the first electronic equipment does not frequently enter the working mode, and only when the network is recovered, the first electronic equipment is controlled to enter the working mode, so that the electric quantity of the first electronic equipment is saved.
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 is a schematic view of a scenario of a network node according to an embodiment of the present application.
Fig. 2 is a first flowchart of an apparatus control method according to an embodiment of the present application.
Fig. 3 is a second flowchart of the apparatus control method according to the embodiment of the present application.
Fig. 4 is a schematic structural diagram of an apparatus control device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present 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 prior art, an intelligent door lock usually needs to be connected with the internet to work, for example, a user can control the intelligent door lock to remotely open a door through a network.
However, when a network fails, for example, an operator network failure or a home network device failure, the intelligent door lock cannot be networked, and at this time, the intelligent door lock is waken up to work all the time and tries to be networked, which may cause the intelligent door lock to generate more power consumption.
In order to solve the above technical problem, embodiments of the present application provide an apparatus control method, an apparatus, an electronic device, and a storage medium. The equipment control method can save the electric quantity of the electronic equipment. The equipment control method can be applied to intelligent household equipment such as an intelligent door lock and can also be applied to equipment such as a computer, a mobile phone and a television.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of device control according to an embodiment of the present disclosure.
In fig. 1, there are a first electronic device a1, a second electronic device a2, and a third electronic device A3, where the first electronic device a1 may be a smart door lock, the second electronic device a2 may be a router, and the third electronic device A3 may be a terminal device such as a smart phone.
In the embodiment of the application, the first electronic device a1 may connect to the internet through a WiFi network generated by the second electronic device a2, the third electronic device A3 may send a corresponding instruction to the first electronic device a1 through the internet, and the first electronic device a1 implements corresponding functions according to the instruction, such as turning on a camera to capture a picture, turning on a microphone to capture sound.
When the first electronic device a1 detects a disconnection from the internet, such as a network failure of an operator, the first electronic device a1 enters a sleep mode to keep the first electronic device a1 operating with low power consumption, the first electronic device a1 generates a first network and broadcasts the first network, and the first electronic device a1 detects a second network generated by the second electronic device a2 according to the first network.
When the first electronic device a1 detects that the second network is satisfactory, it indicates that the internet has been recovered, and thus wakes up the first electronic device a1 to enter the operating mode. When the network is disconnected, the first electronic device a1 does not frequently enter the working mode, and only when the network is recovered, the first electronic device a1 is controlled to enter the working mode, so that the power of the first electronic device a1 is saved.
Referring to fig. 2, fig. 2 is a first flowchart of an apparatus control method according to an embodiment of the present disclosure. The device control method may include the steps of:
110. and detecting the connection condition of the first electronic equipment and the Internet.
In some embodiments, the first electronic device is disconnected from the internet due to network fluctuations, operator cable failures, network device failures, and the like. It is therefore necessary that the first electronic device detects the connection to the internet at intervals.
For example, the first electronic device checks the connection between the first electronic device and the internet every ten minutes.
In some embodiments, the first electronic device may be an intelligent home device, such as an intelligent door lock, and the first electronic device is often connected to the internet by connecting to a router network, so as to be connected to the internet, when the router detects disconnection from the internet, the first electronic device sends a network disconnection signal to the first electronic device through a WiFi network, and the first electronic device only needs to detect the network disconnection signal, and if the network disconnection signal is detected, it is described that the first electronic device is disconnected from the internet at this time. And if the network disconnection signal is not detected, the connection between the first electronic equipment and the Internet is indicated.
120. When the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted.
When the first electronic device is disconnected from the internet, the first electronic device cannot implement some functions through the internet, for example, the first electronic device cannot receive a control instruction transmitted by another terminal through the internet and execute the control instruction.
At this time, the first electronic device may be controlled to enter a sleep mode, in which the first electronic device operates with extremely low power consumption, and at the same time, devices with large power consumption, such as a camera and a microphone, may not be actively operated. While the first electronic device does not actively attempt to connect to the internet.
Taking the first electronic device as an example of an intelligent door lock, when the first electronic device enters the sleep mode, the first electronic device does not call a microphone or a camera any more, and only basic functions such as basic password identification and fingerprint identification are reserved. At this time, the processor of the first electronic device operates in the low power consumption mode, and most programs of the first electronic device are in an inactive state, and only the main process is reserved to maintain the operation of the first electronic device.
In some embodiments, when the first electronic device enters the sleep mode, the first electronic device generates a first network and broadcasts the first network, and the first network may be a wireless network of a WiFi, bluetooth, or other type.
In some embodiments, the first electronic device may generate a first network corresponding to the target name according to the device information of the first electronic device, and then broadcast the first network and the target name of the first network. For example, the first electronic device may obtain a unique identification code of the electronic device, such as a product Serial Number (SN), a network access license Number, an International Mobile Equipment Identity (IMEI), and other device information.
The first electronic device then generates an object name based on the device information, such as "ABC-12345678", i.e. the object name was generated by means of the device manufacturer's name in the front and the product serial code in the back. And then generating a first network of the target name by using a WiFi module or a Bluetooth module of the first electronic device, and broadcasting the first network.
It should be noted that the target name of the first network is a name reflecting the device information of the first electronic device, and in practical applications, the target name may be generated in other manners.
130. And detecting a second network generated by the second electronic equipment according to the first network.
In some embodiments, after the first electronic device broadcasts the first network and the target name corresponding to the first network, some electronic devices scan or connect to the first network within a certain range, and at this time, the first electronic device may determine the second electronic device among the electronic devices and detect the second network generated by the second electronic device according to the first network.
For example, a first electronic device may scan electronic devices within a preset range through a first network, determine the scanned electronic devices as electronic devices to be selected, return a first signal to the first electronic device when the electronic devices to be selected are connected to the first network, and determine a second electronic device in the electronic devices to be selected according to the first signal returned when the electronic devices to be selected are connected to the first network.
The second electronic device generates a second network after detecting or connecting to the first network, and the name of the second network may be the name of the target name, or the name of the second network is changed based on the target name. This is advantageous for the first electronic device to perform a fast detection of the second network.
140. And awakening the first electronic equipment to enter a working mode according to the second network.
In some embodiments, the electronic device may determine whether the name of the second network is consistent with the target name of the first network, and wake up the first electronic device to enter the operating mode if the name of the second network is consistent with the target name of the first network.
For example, when the first electronic device detects the second network, the name of the second network may be obtained, and if the name of the second network is the same as the target name "ABC-12345678", it indicates that the second electronic device is feeding back to the first electronic device that the internet has been repaired, and at this time, the first electronic device may enter an operating mode from the sleep mode, thereby actively connecting to the internet.
After the first electronic device enters the working mode, most main processes of the first electronic device can be started, devices such as a microphone and a camera can also be started, and the first electronic device can also realize corresponding functions such as unlocking, locking, face recognition and the like according to instructions received from the internet.
In the embodiment of the application, when the first electronic device is disconnected from the internet, in order to avoid frequent awakening of the first electronic device and attempt to connect to the internet, the first electronic device may enter a sleep mode at this time, so that power is saved. And awakening the first electronic equipment to enter a working mode until the Internet is recovered.
In the embodiment of the application, the connection condition of the first electronic equipment and the internet is detected; when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted; detecting a second network generated by a second electronic device according to the first network; and awakening the first electronic equipment to enter a working mode according to the second network. When the network is disconnected, the first electronic equipment does not frequently enter the working mode, and only when the network is recovered, the first electronic equipment is controlled to enter the working mode, so that the electric quantity of the first electronic equipment is saved.
For a more detailed understanding of the apparatus control method provided in the embodiment of the present application, please refer to fig. 3, and fig. 3 is a second flowchart of the apparatus control method provided in the embodiment of the present application. The device control method may include the steps of:
201. and detecting the connection condition of the first electronic equipment and the Internet.
In some embodiments, the first electronic device is disconnected from the internet due to network fluctuations, operator cable failures, network device failures, and the like. It is therefore necessary that the first electronic device detects the connection to the internet at intervals.
For example, the first electronic device checks the connection between the first electronic device and the internet every ten minutes.
In some embodiments, the first electronic device may be an intelligent home device, such as an intelligent door lock, and the first electronic device is often connected to the internet by connecting to a router network, so as to be connected to the internet, when the router detects disconnection from the internet, the first electronic device sends a network disconnection signal to the first electronic device through a WiFi network, and the first electronic device only needs to detect the network disconnection signal, and if the network disconnection signal is detected, it is described that the first electronic device is disconnected from the internet at this time. And if the network disconnection signal is not detected, the connection between the first electronic equipment and the Internet is indicated.
202. When the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode.
When the first electronic device is disconnected from the internet, the first electronic device cannot implement some functions through the internet, for example, the first electronic device cannot receive a control instruction transmitted by another terminal through the internet and execute the control instruction.
At this time, the first electronic device may be controlled to enter a sleep mode, in which the first electronic device operates with extremely low power consumption, and at the same time, devices with large power consumption, such as a camera and a microphone, may not be actively operated. While the first electronic device does not actively attempt to connect to the internet.
Taking the first electronic device as an example of an intelligent door lock, when the first electronic device enters the sleep mode, the first electronic device does not call a microphone or a camera any more, and only basic functions such as basic password identification and fingerprint identification are reserved. At this time, the processor of the first electronic device operates in the low power consumption mode, and most programs of the first electronic device are in an inactive state, and only the main process is reserved to maintain the operation of the first electronic device.
In some embodiments, when the first electronic device is disconnected from the internet, the first electronic device may continuously detect the connection condition of the first electronic device with the internet for a preset detection time period; if the first electronic device is continuously disconnected with the internet within the preset detection duration, it is indicated that the first electronic device is actually disconnected with the internet at the moment, but not caused by network fluctuation, and at the moment, the first electronic device is controlled to enter a sleep mode.
203. And generating a first network corresponding to the target name according to the equipment information of the first electronic equipment.
In some embodiments, when the first electronic device enters the sleep mode, the first electronic device generates a first network, which may be a WiFi, bluetooth, etc. type wireless network.
In some embodiments, the first electronic device may generate a first network corresponding to the target name according to the device information of the first electronic device, and then broadcast the first network and the target name of the first network. For example, the first electronic device may obtain a unique identification code of the electronic device, such as a product Serial Number (SN), a network access license Number, an International Mobile Equipment Identity (IMEI), and other device information.
The first electronic device then generates an object name based on the device information, such as "ABC-12345678", i.e. the object name was generated by means of the device manufacturer's name in the front and the product serial code in the back.
204. A first network and a target name of the first network are broadcast.
In some embodiments, a first network of the target name may be generated using a WiFi module or a bluetooth module of the first electronic device and broadcast.
205. And determining the electronic equipment within the preset scanning range as the electronic equipment to be selected.
The first electronic device may scan the electronic devices within the preset range through the first network, and determine the scanned electronic devices as the electronic devices to be selected. Thus, the second electronic device determined by the first electronic device can be limited within a range, and the other electronic devices generate judgment that the second network interferes with the internet connection of the first electronic device.
206. And determining the second electronic equipment in the electronic equipment to be selected according to a first signal returned when the electronic equipment to be selected is connected with the first network.
In some embodiments, the electronic device to be selected returns a first signal to the first electronic device when connecting to the first network, and the first electronic device may determine the second electronic device in the electronic device to be selected according to the first signal returned when the electronic device to be selected connects to the first network.
For example, the first signal may be physical address information of the electronic device to be selected, or device model information of the electronic device to be selected, and when the first electronic device determines that the physical address and the device model of the electronic device to be selected are matched in the preset database, it is determined that the electronic device to be selected is the second electronic device.
207. And detecting a second network generated by the second electronic equipment according to the first network.
The second electronic device generates a second network after detecting or connecting to the first network, and the name of the second network may be the name of the target name, or the name of the second network is changed based on the target name. This is advantageous for the first electronic device to perform a fast detection of the second network.
208. And judging whether the name of the second network is consistent with the target name of the first network.
In some embodiments, when the first electronic device detects the second network, the name of the second network may be acquired, so as to determine whether the name of the second network is consistent with the target name.
If the name of the second network is consistent with the target name of the first network, step 209 is entered.
If the name of the second network does not coincide with the target name of the first network, step 207 is entered.
209. And if the name of the second network is consistent with the target name of the first network, awakening the first electronic equipment to enter a working mode.
In some embodiments, the electronic device may determine whether the name of the second network is consistent with the target name of the first network, and wake up the first electronic device to enter the operating mode if the name of the second network is consistent with the target name of the first network.
For example, when the first electronic device detects the second network, the name of the second network may be obtained, and if the name of the second network is the same as the target name "ABC-12345678", it indicates that the second electronic device is feeding back to the first electronic device that the internet has been repaired, and at this time, the first electronic device may enter an operating mode from the sleep mode, thereby actively connecting to the internet.
After the first electronic device enters the working mode, most main processes of the first electronic device can be started, devices such as a microphone and a camera can also be started, and the first electronic device can also realize corresponding functions such as unlocking, locking, face recognition and the like according to instructions received from the internet.
In the embodiment of the application, when the first electronic device is disconnected from the internet, in order to avoid frequent awakening of the first electronic device and attempt to connect to the internet, the first electronic device may enter a sleep mode at this time, so that power is saved. And awakening the first electronic equipment to enter a working mode until the Internet is recovered.
210. And closing the first network, and sending an online message to the target electronic equipment through the Internet.
In some embodiments, when the first electronic device is connected to the internet, an online message may be sent to the target electronic device through the internet, for example, an online message may be sent to a control terminal such as a smart phone, and then the smart phone may control the first electronic device through the internet, so as to control operations such as locking and unlocking of the first electronic device. And simultaneously the first electronic equipment closes the first network.
In some embodiments, the first electronic device is an intelligent door lock, and the first electronic device includes a lock body that is switchable to a locked state and an unlocked state. When the first electronic device recovers connection with the internet and is in a working state, the first electronic device can receive a control instruction sent by the target electronic device through the internet and control the lock body to be locked or unlocked through the control instruction.
In the embodiment of the application, by detecting the connection condition of the first electronic device and the internet, when the first electronic device is disconnected from the internet, the first electronic device is controlled to enter the sleep mode. And generating a first network corresponding to the target name according to the equipment information of the first electronic equipment, and broadcasting the first network and the target name of the first network.
And then determining the electronic equipment in the preset scanning range as the electronic equipment to be selected, determining second electronic equipment in the electronic equipment to be selected according to a first signal returned when the electronic equipment to be selected is connected with the first network, and detecting a second network generated by the second electronic equipment according to the first network.
And finally, judging whether the name of the second network is consistent with the target name of the first network. And if the name of the second network is consistent with the target name of the first network, awakening the first electronic equipment to enter a working mode. And closing the first network, and sending an online message to the target electronic equipment through the Internet.
In the embodiment of the application, when the network is disconnected, the first electronic device does not frequently enter the working mode, and only when the network is recovered, the first electronic device is controlled to enter the working mode, so that the electric quantity of the first electronic device is saved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an apparatus control device according to an embodiment of the present disclosure. The device control apparatus may include:
the first detecting module 310 is configured to detect a connection situation between the first electronic device and the internet.
The first detecting module 310 is further configured to continuously detect a connection condition between the first electronic device and the internet within a preset detection duration when the first electronic device is disconnected from the internet;
if the first electronic equipment is continuously disconnected with the Internet within the preset detection duration, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted.
The first control module 320 is configured to control the first electronic device to enter a sleep mode, generate a first network, and broadcast the first network when the first electronic device is disconnected from the internet.
The first control module 320 is further configured to generate a first network corresponding to the target name according to the device information of the first electronic device; a first network and a target name of the first network are broadcast.
The second detecting module 330 is configured to detect a second network generated by the second electronic device according to the first network.
The second detection module 330 is further configured to determine an electronic device within a preset scanning range as an electronic device to be selected; and determining the second electronic equipment in the electronic equipment to be selected according to a first signal returned when the electronic equipment to be selected is connected with the first network.
The second control module 340 is configured to wake up the first electronic device to enter the working mode according to the second network.
The second control module 340 is further configured to determine whether the name of the second network is consistent with the target name of the first network; and if the name of the second network is consistent with the target name of the first network, awakening the first electronic equipment to enter a working mode.
The second control module 340 is further configured to close the first network and send an online message to the target electronic device through the internet.
In the embodiment of the application, the connection condition of the first electronic equipment and the internet is detected; when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted; detecting a second network generated by a second electronic device according to the first network; and awakening the first electronic equipment to enter a working mode according to the second network. When the network is disconnected, the first electronic equipment does not frequently enter the working mode, and only when the network is recovered, the first electronic equipment is controlled to enter the working mode, so that the electric quantity of the first electronic equipment is saved.
Accordingly, embodiments of the present application also provide an electronic device, as shown in fig. 5, which may include an input unit 401, a display unit 402, a memory 403 including one or more computer-readable storage media, a sensor 405, a processor 404 including one or more processing cores, and a power supply 406. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 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 input unit 401 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. Specifically, in one particular embodiment, input unit 401 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 404, and can receive and execute commands sent by the processor 404. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 401 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 402 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 402 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 404 to determine the type of touch event, and then the processor 404 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The memory 403 may be used for storing software programs and modules, and the processor 404 executes various functional applications and data processing by operating the software programs and modules stored in the memory 403. The memory 403 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 (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 403 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 403 may also include a memory controller to provide the processor 404 and the input unit 401 access to the memory 403.
The electronic device may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the motion sensor is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of an electronic device, vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
The processor 404 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 403 and calling data stored in the memory 403, thereby performing overall monitoring of the electronic device. Optionally, processor 404 may include one or more processing cores; preferably, the processor 404 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 404.
The electronic device also includes a power supply 406 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 404 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 406 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.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 404 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 403 according to the following instructions, and the processor 404 runs the application programs stored in the memory 403, so as to implement various functions:
detecting the connection condition of the first electronic equipment and the Internet;
when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted;
detecting a second network generated by a second electronic device according to the first network;
and awakening the first electronic equipment to enter a working mode according to the second network.
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 instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the device control methods provided in the present application. For example, the instructions may perform the steps of:
detecting the connection condition of the first electronic equipment and the Internet;
when the first electronic equipment is disconnected with the Internet, the first electronic equipment is controlled to enter a sleep mode, a first network is generated, and the first network is broadcasted;
detecting a second network generated by a second electronic device according to the first network;
and awakening the first electronic equipment to enter a working mode according to the second network.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any device control method provided in the embodiments of the present application, beneficial effects that can be achieved by any device control method provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The above detailed description is provided for a device control method, an apparatus, an electronic device, and a storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A device control method is applied to a first electronic device, and is characterized by comprising the following steps:
detecting the connection condition of the first electronic equipment and the Internet;
when the first electronic equipment is disconnected with the Internet, controlling the first electronic equipment to enter a sleep mode, generating a first network, and broadcasting the first network;
detecting a second network generated by a second electronic device according to the first network;
and awakening the first electronic equipment to enter a working mode according to the second network.
2. The device control method according to claim 1, wherein the generating a first network and broadcasting the first network when the first electronic device is disconnected from the internet, comprises:
generating the first network corresponding to the target name according to the equipment information of the first electronic equipment;
broadcasting the first network and a target name of the first network.
3. The device control method according to claim 2, wherein the waking up the first electronic device into an operating mode according to the second network comprises:
judging whether the name of the second network is consistent with the target name of the first network or not;
and if the name of the second network is consistent with the target name of the first network, awakening the first electronic equipment to enter a working mode.
4. The device control method according to claim 1, wherein prior to the detecting a second network generated by a second electronic device from the first network, the method further comprises:
determining the electronic equipment in a preset scanning range as the electronic equipment to be selected;
and determining the second electronic equipment in the electronic equipment to be selected according to a first signal returned when the electronic equipment to be selected is connected with the first network.
5. The device control method according to claim 1, wherein before the controlling the first electronic device to enter a sleep mode, generating a first network, and broadcasting the first network, the method further comprises:
when the first electronic equipment is disconnected with the Internet, continuously detecting the connection condition of the first electronic equipment and the Internet within a preset detection time length;
and if the first electronic equipment is continuously disconnected from the Internet within the preset detection duration, controlling the first electronic equipment to enter a sleep mode, generating a first network, and broadcasting the first network.
6. The device control method according to any one of claims 1 to 5, wherein after the waking up the first electronic device according to the second network to enter an operating mode, the method further comprises:
and closing the first network, and sending an online message to the target electronic equipment through the Internet.
7. The device control method according to any one of claims 1-5, wherein the first electronic device comprises a lock, and after the waking up the first electronic device according to the second network to enter the working mode, the method further comprises:
receiving a control instruction sent by target electronic equipment through the Internet;
and controlling the lock body of the first electronic equipment to be locked or unlocked according to the control instruction.
8. An apparatus control device applied to a first electronic apparatus, comprising:
the first detection module is used for detecting the connection condition of the first electronic equipment and the Internet;
the first control module is used for controlling the first electronic equipment to enter a sleep mode, generating a first network and broadcasting the first network when the first electronic equipment is disconnected from the Internet;
the second detection module is used for detecting a second network generated by second electronic equipment according to the first network;
and the second control module is used for awakening the first electronic equipment to enter a working mode according to the second network.
9. An electronic device, comprising:
a memory storing executable program code, a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform the steps in the device control method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the device control method according to any one of claims 1 to 7.
CN202111530205.7A 2021-12-14 2021-12-14 Device control method, device, electronic device and storage medium Pending CN114155636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111530205.7A CN114155636A (en) 2021-12-14 2021-12-14 Device control method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111530205.7A CN114155636A (en) 2021-12-14 2021-12-14 Device control method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114155636A true CN114155636A (en) 2022-03-08

Family

ID=80450837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111530205.7A Pending CN114155636A (en) 2021-12-14 2021-12-14 Device control method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114155636A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190134A (en) * 2022-06-24 2022-10-14 广东好太太智能家居有限公司 Intelligent lock state synchronization method, intelligent lock, mobile terminal and readable medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102740420A (en) * 2011-04-08 2012-10-17 上海贝尔股份有限公司 State control method for non-access stratum of wireless network
US20160127308A1 (en) * 2014-10-31 2016-05-05 Acer Incorporated Method for keeping remote connection, electronic device and server
CN105722192A (en) * 2014-12-03 2016-06-29 联想(北京)有限公司 Network connection method, electronic device and system
CN105759934A (en) * 2014-12-19 2016-07-13 联想(北京)有限公司 Information processing method and electronic equipment
CN108513344A (en) * 2018-03-16 2018-09-07 广东小天才科技有限公司 Suspension reconnection method, device, wearable device and the medium of wearable device
US20190342830A1 (en) * 2016-12-30 2019-11-07 Huawei Technologies Co., Ltd. Data Processing Method and Terminal
CN112530056A (en) * 2020-11-18 2021-03-19 深圳Tcl新技术有限公司 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN112689320A (en) * 2020-12-25 2021-04-20 杭州当贝网络科技有限公司 Power consumption optimization method and system for 2.4G wireless audio system and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102740420A (en) * 2011-04-08 2012-10-17 上海贝尔股份有限公司 State control method for non-access stratum of wireless network
US20160127308A1 (en) * 2014-10-31 2016-05-05 Acer Incorporated Method for keeping remote connection, electronic device and server
CN105722192A (en) * 2014-12-03 2016-06-29 联想(北京)有限公司 Network connection method, electronic device and system
CN105759934A (en) * 2014-12-19 2016-07-13 联想(北京)有限公司 Information processing method and electronic equipment
US20190342830A1 (en) * 2016-12-30 2019-11-07 Huawei Technologies Co., Ltd. Data Processing Method and Terminal
CN108513344A (en) * 2018-03-16 2018-09-07 广东小天才科技有限公司 Suspension reconnection method, device, wearable device and the medium of wearable device
CN112530056A (en) * 2020-11-18 2021-03-19 深圳Tcl新技术有限公司 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN112689320A (en) * 2020-12-25 2021-04-20 杭州当贝网络科技有限公司 Power consumption optimization method and system for 2.4G wireless audio system and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190134A (en) * 2022-06-24 2022-10-14 广东好太太智能家居有限公司 Intelligent lock state synchronization method, intelligent lock, mobile terminal and readable medium

Similar Documents

Publication Publication Date Title
CN111143005B (en) Application sharing method, electronic equipment and computer readable storage medium
CN107835286B (en) Method for preventing mistaken unlocking and mobile terminal
CN109739429B (en) Screen switching processing method and mobile terminal equipment
CN111163260B (en) Camera starting method and electronic equipment
CN110335386B (en) Identity authentication method, device, terminal and storage medium
CN108804915B (en) Virus program cleaning method, storage device and electronic terminal
CN111459362A (en) Information display method, information display device, electronic apparatus, and storage medium
CN108304108B (en) Icon display method of application program and mobile terminal
CN111522575B (en) Application program upgrading method and electronic equipment
CN110335378B (en) Unlocking mode distribution method, device and system
CN114155636A (en) Device control method, device, electronic device and storage medium
CN108810284B (en) Mode switching method of camera and electronic equipment
CN108089935B (en) Application program management method and mobile terminal
JP2021524203A (en) Object recognition method and mobile terminal
CN110533800B (en) Intelligent door lock control method and device, electronic equipment and storage medium
CN106933576B (en) Terminal unlocking method and device and computer equipment
CN115828845A (en) Multimedia data viewing method, device, medium and equipment
CN114710816A (en) Network switching method and device, electronic equipment and storage medium
CN113420283A (en) Starting-up method and device of mobile terminal, storage medium and mobile terminal
WO2020207322A1 (en) Screen unlocking method and terminal
CN108681467B (en) System awakening method and terminal
CN109995849B (en) Information recording method and terminal equipment
CN108287755B (en) Application program control method and mobile terminal
CN111027406A (en) Picture identification method and device, storage medium and electronic equipment
CN112202952B (en) Mobile terminal testing method and device, storage medium and mobile terminal

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