A method and device for recognizing a scenario of leaving and returning home

Detecting Wi-Fi connection behavior through routing devices and portable electronic devices, identifying the user's situation of leaving home and going home, solving the problem of not being able to identify the user's leaving home and going home in the smart home system, achieving higher recognition accuracy and user experience.

CN116074139BActive Publication Date: 2025-08-05HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111275153.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-08-05
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the prior art, smart home systems cannot accurately identify the user's home-from-home scene without installing smart door locks or smart cameras, resulting in poor user experience.

Method used

Using commonly used routing devices and portable electronic devices in the home, we can identify the user's situation of going home by detecting and controlling the connection behavior of the device and routing devices, especially the offline method of Wi-Fi connection.

Benefits of technology

The user's scene of leaving home without a smart door lock or smart camera can be accurately identified, which improves the accuracy of scene recognition and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074139B_ABST
    Figure CN116074139B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for recognizing scenarios of leaving home and returning home. The method can be applied to a routing device, which is connected to multiple electronic devices. In this method, the routing device and a portable electronic device are used as control devices to detect the behavior of the control device connecting to Wi-Fi. Then, when the control device disconnects the Wi-Fi connection and reconnects to the Wi-Fi again, the scenarios of disconnecting the communication connection and reconnecting the communication connection of the control device are identified according to the offline mode to determine whether the scenario of disconnecting the communication connection is a leaving-home scenario and whether the scenario of the control device re-establishing the communication connection is a returning-home scenario. In this way, it is possible to recognize the leaving-home and returning-home scenarios of the user without installing an intelligent door lock or an intelligent camera. Moreover, determining the scenario according to the offline mode can improve the recognition accuracy of the scenario, thereby enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a method and device for recognizing the scenarios of leaving home and returning home. Background Art

[0002] With the development of the economy and the progress of technology, people's consumption concepts and life ideas have gradually changed. In order to better meet people's requirements for a quality life, it has gradually developed from single intelligent devices to full-scenario smart homes. Therefore, how to recognize the scenarios of users leaving home and returning home is a technical problem to be solved.

[0003] Currently, the scenarios of users leaving home and returning home are mainly recognized through smart door locks or smart cameras. Taking the smart door lock as an example, when the user closes the door when leaving home, the smart door lock on the door can recognize that the user is about to leave home. At this time, the smart home in the house can enter the leaving-home mode, such as turning off the lights, water heaters, air conditioners, etc. in the house. When the user returns home, such as when opening the smart door lock, the smart door lock can recognize that the user is about to return home. At this time, the lights, TV sets, water heaters, etc. in the house can be turned on to achieve full-house intelligence, bringing a lot of convenience to users. However, the above process depends on the smart door lock or smart camera. If there is no smart door lock or smart camera installed in the home, the scenarios of users leaving home and returning home cannot be recognized. Summary of the Invention

[0004] This application provides a method and device for recognizing the scenarios of leaving home and returning home, which are used to solve the dependence on smart door locks or smart cameras for scenario recognition, so that scenario recognition cannot be performed when the corresponding devices are not installed. At the same time, the accuracy of scenario recognition is improved, and the user experience is enhanced.

[0005] In a first aspect, this application provides a method for recognizing the scenarios of leaving home and returning home. This method can be applied to a routing device, and the routing device is connected to multiple electronic devices. The method includes: First, when the routing device detects that a control device disconnects the communication connection with itself, it determines the offline mode of the control device; the control device is one of the multiple electronic devices, and the control device is a portable electronic device; Then, the routing device recognizes whether the scenario in which the control device disconnects the communication connection is a leaving-home scenario according to the offline mode of the control device; when the routing device detects that the control device re-establishes the communication connection with the routing device, it recognizes whether the scenario in which the control device re-establishes the communication connection is a returning-home scenario according to the offline mode of the control device.

[0006] Through the above technical solution, common routing devices and portable electronic devices in the home can be used as control devices, and the user's leaving and arriving home scenarios can be determined by detecting the connection behavior between the control device and the routing device. In addition, by determining the offline mode of the control device and determining the scenario according to the offline mode when the control device goes online again, the recognition accuracy of the scenario can be improved, thereby enhancing the user experience. In the solution of this application, the user's leaving and arriving home scenarios can be recognized without a smart door lock or a smart camera.

[0007] In a possible implementation, the routing device determines the offline mode of the control device, including:

[0008] If the routing device detects that the user modifies the Wi-Fi parameters, it determines that the offline mode of the control device is the first offline mode; if the routing device receives a preset message sent by the control device, it determines that the offline mode of the control device is the second offline mode; if the routing device does not receive the preset message sent by the control device and / or does not detect that the user modifies the Wi-Fi parameters, it determines that the offline mode of the control device is the third offline mode; or if the routing device determines that the signal strength and the change in the number of packets sent within a preset time before the control device disconnects from the routing device conform to the set rules, it determines that the offline mode of the control device is the third offline mode.

[0009] Through the above technical solution, the routing device can identify the offline mode of the control device, and then determine the user's leaving and arriving home scenarios according to the offline mode, which can improve the accuracy of scenario recognition.

[0010] In a possible implementation, the routing device determines whether the scenario in which the control device disconnects from the communication connection is a leaving home scenario according to the offline mode of the control device, including:

[0011] If the routing device determines that the offline mode of the control device is the first offline mode or the second offline mode, it determines that the scenario in which the control device disconnects from the communication connection is a non-leaving home scenario; if the routing device determines that the offline mode of the control device is the third offline mode, it determines that the scenario in which the control device disconnects from the communication connection is a leaving home scenario.

[0012] Through the above technical solution, it can be determined whether the control device is in a leaving home scenario when the control device is offline. When the offline mode of the control device is the third offline mode, it can be determined that the scenario of the control device going offline is the user leaving home scenario. It should be understood that the third offline mode is the aging offline mode in the following embodiments.

[0013] In a possible implementation, the routing device determines whether the scenario in which the control device re-establishes the communication connection is an arriving home scenario according to the offline mode of the control device, including:

[0014] If the routing device determines that the offline mode of the control device is the first offline mode, it determines that the scenario for the control device to re - establish a communication connection is a non - home scenario; if the routing device determines that the offline mode of the control device is the second offline mode, it determines the scenario for the control device to re - establish a communication connection according to the first received signal strength RSSI and the second RSSI, where the first RSSI is the RSSI when the control device disconnects the communication connection with the routing device, and the second RSSI is the RSSI when the control device re - establishes the communication connection with the routing device; if the routing device determines that the offline mode of the control device is the third offline mode, it determines that the scenario for the control device to re - establish a communication connection is a home scenario.

[0015] Through the above technical solution, when the control device goes online again, it can be determined whether the scenario of the control device going online is a home scenario according to the offline mode, which can improve the judgment accuracy of the home scenario.

[0016] In a possible implementation, the routing device determines the scenario for the control device to re - establish a communication connection according to the first received signal strength RSSI and the second RSSI, including:

[0017] If the routing device determines that the difference between the first RSSI and the second RSSI is greater than the set threshold, it determines that the scenario for the control device to re - establish a communication connection is a home scenario; if the routing device determines that the difference between the first RSSI and the second RSSI is less than the set threshold, it determines that the scenario for the control device to re - establish a communication connection is a non - home scenario.

[0018] Through the above technical solution, by comparing the difference between the RSSI when the control device goes online and offline with the set threshold to further determine the online scenario, the recognition accuracy of the home scenario can be improved.

[0019] In a possible implementation, the routing device includes a router. Of course, in this application, the routing device may also include other devices, and this application does not limit this.

[0020] In a second aspect, this application provides a routing device, which includes one or more processors; one or more memories; and one or more computer programs;

[0021] Among them, the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions. When the instructions are called and executed by the one or more processors, the device executes the method of the first aspect and any possible design of the first aspect. Exemplarily, when the instructions are called and executed by the one or more processors, the device executes the following steps:

[0022] When it is detected that the control device is disconnected from the communication connection, the offline mode of the control device is determined; the control device is one of multiple electronic devices, and the control device is a portable electronic device; according to the offline mode of the control device, it is identified whether the scenario in which the control device disconnects the communication connection is a leaving home scenario; when it is detected that the control device re-establishes the communication connection with the routing device, it is identified whether the scenario in which the control device re-establishes the communication connection is a returning home scenario according to the offline mode of the control device.

[0023] In a third aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed on a routing device, the routing device executes the first aspect and any possible design method of the first aspect.

[0024] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a routing device, the routing device executes the method of the first aspect of the embodiment of the present application and any possible design of the first aspect thereof.

[0025] For each of the above-mentioned aspects from the second to the fourth aspects and the technical effects that may be achieved by each of the aspects, please refer to the above-mentioned description of the technical effects that can be achieved by various possible solutions in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0027] Figure 2 A flow chart of a method for identifying a leaving home and returning home scenario provided in an embodiment of the present application;

[0028] Figure 3 A flowchart of a method for identifying a leaving-home scenario provided in an embodiment of the present application;

[0029] Figure 4 A flow chart of a method for identifying a homecoming scene provided in an embodiment of the present application;

[0030] Figure 5 A flow chart of a method for identifying a homecoming scene provided in an embodiment of the present application;

[0031] Figure 6 A flow chart of a leaving home and returning home identification method provided in an embodiment of the present application;

[0032] Figure 7 A schematic diagram of the structure of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification and appended claims of this application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" mean one or more than two (including two). The term "and / or" is used to describe the association relationship of associated objects and indicates that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0034] Reference to "one embodiment" or "some embodiments" etc. described in this specification means that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprise", "include", "have" and their variants mean "including but not limited to", unless otherwise specifically emphasized. The term "connect" includes direct connection and indirect connection, unless otherwise stated.

[0035] Hereinafter, the terms "first" and "second" are only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.

[0036] In the embodiments of this application, words such as "exemplarily" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as more preferred or more advantageous than other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.

[0037] At present, the emergence of smart homes has brought a lot of convenience to users' lives. However, the convenience of current smart homes depends on smart door locks or smart cameras to identify the scenarios of users leaving and returning home. For example, when the user closes the door and leaves home, the smart door lock can detect that the user is leaving home. At this time, it can check whether the doors and windows of the house are closed and output a reminder message. Also, it can turn off electrical appliances such as TVs, air conditioners, water heaters, etc. that do not need to work when leaving home, as well as the lights that are on. When the user opens the smart door lock and returns home, the smart door lock can detect that the user is home. At this time, it can turn on the lights, air conditioners, water heaters, etc. in the house, which can bring convenience when the user leaves and returns home. However, if there is no smart door lock or smart camera installed in the house, the scenarios of users leaving and returning home cannot be identified.

[0038] In view of this, the embodiments of this application use common routing devices (such as routers) and mobile phones in the home to identify the scenarios of users leaving and returning home, and then enable corresponding modes for the smart homes in the house in the corresponding scenarios. Specifically, it can detect the behavior of the mobile phone connecting to wireless fidelity (Wi-Fi) through the routing device to identify whether the user is in the leaving-home scenario or the returning-home scenario, that is, it can achieve the identification of the scenarios of users leaving and returning home without relying on smart door locks or smart cameras, which can improve the user experience.

[0039] First, the application scenarios of the embodiments of this application will be introduced below. Refer to Figure 1 As shown, the application scenario may include a routing device 10 and at least one electronic device 20, such as the smart screen 21, speaker 22, and mobile phone 23 shown in the figure. Among them, the routing device 10 and the at least one electronic device 20 can be interconnected through a communication network. Exemplarily, the communication network can be a local area network, such as a wireless fidelity (Wi-Fi) hotspot network. At least one electronic device can be connected to the same routing device through the communication network. It should be understood that Figure 1 only three electronic devices are used as examples for the introduction, and the number of electronic devices in the embodiments of this application is not specifically limited. And the electronic device can be Harmony and other operating systems, which are not limited thereto. It should be understood that Figure 1 is only a schematic illustration. In actual applications, there can also be multiple routing devices in the user's home, and there can also be more electronic devices.

[0040] It should be noted that the routing device used to identify the scenarios of users leaving and returning home in this application can include a router. For example, it can also include a customer premise equipment (CPE), etc., which is not limited in this application.

[0041] Since the mobile phone 23 is almost an electronic device carried by users at all times, and the smart screen 21 and the speaker 22 are non-portable electronic devices in the home, in the embodiments of the present application, a portable electronic device, such as the behavior of a mobile phone connecting to Wi-Fi, can be used to identify the user's going-home and leaving-home scenarios. For example, when the mobile phone disconnects from Wi-Fi, the routing device can identify that the user is in the leaving-home scenario; when the mobile phone switches from disconnecting from Wi-Fi to connecting to Wi-Fi, the routing device can identify that the user is in the going-home scenario.

[0042] As Figure 2 shown, it is a flowchart of a method for identifying going-home and leaving-home scenarios provided by an embodiment of the present application. Referring to Figure 2 shown, the method may include the following steps:

[0043] S201. The routing device detects whether the control device is in the list of connected devices of the routing device.

[0044] Considering that there is generally at least one mobile phone in a family, a mobile phone can be set as the control device, and the routing device only needs to detect the behavior of the control device connecting to Wi-Fi to identify the user's going-home and leaving-home scenarios. Among them, the control device can be set by the user according to the actual application scenario, or can be set by the routing device, and the present application does not make any limitation in this regard.

[0045] Exemplarily, assuming that the application scenario is a scenario where the user lives alone and the user has only one mobile phone, at this time, the routing device can use the only mobile phone as the control device, or the user can set this mobile phone as the control device, and then the routing device detects whether this mobile phone is connected to Wi-Fi. Another example, assuming that the application scenario is a scenario where the user lives alone and the user has multiple mobile phones, the routing device can select any one of the multiple mobile phones as the control device, or the user sets one of the multiple mobile phones as the frequently used control device.

[0046] It should be noted that the control device can be changed according to the actual application scenario, and the present application does not make any specific limitation in this regard. For example, user A can set his own mobile phone as the control device. If user A's parents come to user A's home and are at home when user A goes out to work, in this case, it may not be necessary to make the smart home in the home enter the leaving-home mode, that is, there is no need to turn off the TV, air conditioner, etc. in the home. At this time, user A can change the control device to his mother's mobile phone or his father's mobile phone.

[0047] In some embodiments, after the electronic device connects to Wi-Fi, the connected device list of the routing device can display the electronic device. That is, by judging whether there is a control device in the connected device list, it can be judged whether the control device is connected to the Wi-Fi of the routing device.

[0048] S202. If the control device is not in the list of connected devices of the routing device, the routing device identifies this scenario as the leaving-home scenario.

[0049] S203. If the control device changes from not being in the list of connected devices of the routing device to being in the list of connected devices of the routing device, the routing device identifies this scenario as the arriving-home scenario.

[0050] In some embodiments, if the control device is not in the list of connected devices of the routing device, it can be understood that the control device is not connected to Wi-Fi, and at this time, it can be considered that the user has left home. If the control device changes from not being in the list of connected devices of the routing device to being in the list of connected devices of the routing device, it can be understood that the control device has switched from not being connected to Wi-Fi to being connected to Wi-Fi, and at this time, it can be considered that the user has returned home.

[0051] Through the above embodiments, it is possible to identify the leaving-home and arriving-home scenarios of the user without installing a smart door lock or a smart camera in the user's home, and then set the smart home in the home to the corresponding arriving-home and leaving-home modes to improve the user experience.

[0052] Furthermore, since there are many ways for users to access the Internet, if the user does not connect to Wi-Fi, for example, using mobile data can also achieve the Internet access function. At this time, it may not be accurate enough to judge the leaving-home and arriving-home scenarios of the user only based on whether the user is connected to Wi-Fi. Or, when the user has left home, for example, when waiting for the elevator at the door of the home, the mobile phone has not disconnected from Wi-Fi and only disconnects from Wi-Fi when it is far away from the routing device a few minutes after leaving home. Then, judging only based on whether it is connected to Wi-Fi may result in misjudging the scenario where the user is waiting for the elevator at the door of the home as a non-leaving-home scenario. Or, due to reasons such as the user accidentally touching and disconnecting Wi-Fi and then reconnecting Wi-Fi, etc., it may cause unnecessary opening or closing of the smart devices in the home, affecting the normal use of the user and resulting in a poor user experience.

[0053] Based on this, in the embodiments of the present application, in order to avoid the situation of misjudging scenarios, the routing device can mark the offline method of the control device, and then judge the leaving-home and arriving-home scenarios of the user according to the mark of the offline method when the control device goes online again.

[0054] In some embodiments, the situation where the electronic device is offline, that is, disconnects from the Wi-Fi connection, may include the following several cases:

[0055] The first case: The user modifies the Wi-Fi parameters (such as password, name, etc.), resulting in the routing device kicking out the electronic device.

[0056] The second case: The electronic device can send a deauthentication / disassociation (deauth / disassoc) packet to the routing device.

[0057] As a possible implementation, when the electronic device is in the screen-off state and may disconnect the Wi-Fi connection after being in the screen-off state for a period of time, the electronic device will send a deauth / disassoc packet to the routing device. Alternatively, when the user actively turns off the Wi-Fi switch of the electronic device, the routing device will also receive the deauth / disassoc packet sent by the electronic device.

[0058] The third case: The electronic device moves away from the routing device until the Wi-Fi connection is disconnected.

[0059] For the third case, when the electronic device moves away from the routing device until the Wi-Fi connection is disconnected, the electronic device does not send a deauth / disassoc packet to the routing device, that is, the routing device does not receive the deauth / disassoc packet sent by the electronic device.

[0060] It should be understood that the above several offline methods are only illustrative descriptions, and there may also be other offline methods, which are not limited in this application.

[0061] Optionally, the routing device can mark the electronic device based on different offline methods. For example, for the case where the disconnection of the Wi-Fi connection of the electronic device is caused by the routing device kicking out the device, the electronic device can be marked as: routed kicked-out device; for the case where the disconnection of the Wi-Fi connection of the electronic device is caused by the electronic device being in the screen-off sleep state, the electronic device can be marked as: active offline; for the case where the disconnection of the Wi-Fi connection of the electronic device is caused by the electronic device moving away from the routing device until the Wi-Fi connection is disconnected, the electronic device can be marked as: aging offline. Of course, it can also be marked as A, B, C, etc., which are not limited in this application.

[0062] In a possible implementation manner, if the routing device does not receive the deauth / disassoc packet sent by the electronic device, it can be determined that the offline method of the electronic device is a non-active offline method. On this basis, in order to improve the accuracy of scene detection, the routing device can detect the signal strength of the electronic device and the change in the number of packets sent, and then determine that the electronic device is aging offline based on the signal strength of the electronic device and the change in the number of packets sent within a preset time (for example, 2 minutes before offline). In this way, when the electronic device goes online, it can be determined whether the scene when the electronic device goes online is the user's homecoming scene according to the mark of aging offline.

[0063] Exemplarily, as Figure 3 shown, it is a flowchart of a method for recognizing a leaving-home scene provided by an embodiment of this application. Referring to Figure 3 shown, the method may include the following steps:

[0064] S301. The routing device detects an offline event.

[0065] S302. The routing device determines the offline method of the offline event.

[0066] In some embodiments, if the routing device detects that the user modifies the Wi-Fi parameters, causing the control device to be unable to access the routing device, the routing device will kick out the control device, making it disconnect from the Wi-Fi connection. Then, it can be determined that the offline method of the control device is offline caused by the routing device kicking it out. If the routing device detects that the control device sends a deauth / disassoc packet to itself, it can be determined that the offline method of the control device is active offline. If the routing device does not receive the deauth / disassoc packet sent by the control device and does not detect the operation of the user modifying the Wi-Fi parameters, it is determined that the offline method of the control device is aging offline. Or, if the routing device detects that the signal strength and the number of packets sent by the control device within a preset time meet the set rules, it is determined that the offline method of the control device is aging offline.

[0067] Optionally, when the routing device receives the deauth / disassoc packet sent by the control device, it can obtain the received signal strength indication (RSSI) when the control device is offline, so as to compare it with the RSSI when the control device goes online later to determine whether the online event is a home scene.

[0068] S303. The routing device determines whether the offline event is a leaving-home scene according to the offline method.

[0069] S304. If the offline method is the first offline method or the second offline method, it is determined that the offline event is not a leaving-home scene.

[0070] S305. If the offline method is the third offline method, it is determined that the offline event is a leaving-home scene.

[0071] For the convenience of description, the offline method of the routing device kicking out the device can be recorded as the "first offline method", the offline method of active offline can be recorded as the "second offline method", and the offline method of aging offline can be recorded as the "third offline method". That is to say, if the routing device determines that the offline method of the control device is routing kick-out or active offline, it is determined that the offline event is not a leaving-home scene. If the offline method of the control device is aging offline, it is determined that the offline event is a leaving-home scene.

[0072] Exemplarily, as Figure 4 shown, it is a flowchart of a method for identifying a home scene provided by an embodiment of the present application. Referring to Figure 4 shown, the method may include the following steps:

[0073] S401: A routing device detects an online event of a control device.

[0074] In some embodiments, when the routing device detects that the control device is online, that is, the control device changes from not being connected to Wi-Fi to being connected to Wi-Fi, the RSSI of the online control device can be obtained.

[0075] S402: The routing device obtains the offline mode of the control device.

[0076] As a possible implementation, after detecting an offline event, the routing device may determine an offline mode corresponding to the offline event, and then the routing device may record the offline mode of the electronic device, for example, as shown in Table 1 below.

[0077] Table 1

[0078] Electronic device Offline mode Electronic device 1 Active offline Electronic device 2 Aging offline Electronic device 3 Router kickout Electronic device 4 ​

[0079] It should be understood that the electronic devices in Table 1 are schematic diagrams of electronic devices connected to the routing device. Different electronic devices may have different or the same offline mode. Of course, the table may also include the offline time and online time of the electronic device, which is not limited in this application.

[0080] Optionally, the routing device may update Table 1 based on the online and offline behavior of the electronic device (including the online and offline behavior of the device caused by restarting the routing device or modifying the Wi-Fi parameters). In addition, the offline mode recorded in Table 1 may be the offline mode of the electronic device's most recent offline state, or may record the offline modes of the electronic device's multiple offline states.

[0081] S403: The routing device determines whether the online event is a homecoming scenario according to the offline mode of the control device.

[0082] In this application, S403 is introduced using the above three offline modes as an example. If the offline mode of the control device is one of the above three offline modes, then when the control device comes online again, the routing device needs to obtain the offline mode of the control device when it was last offline, that is, the offline mode corresponding to the offline time closest to the current time, and then determine whether it is a home scene based on the last offline mode of the control device.

[0083] For example, ​ As shown in FIG. 1 , a flow chart of a method for identifying a home scene according to an embodiment of the present application is provided. ​ As shown, the method may include the following steps:

[0084] S501. The routing device determines whether the offline mode of the control device is the first offline mode. If the offline mode of the control device is the first offline mode, it is determined that the online event is a non-home scenario. If the offline mode of the control device is not the first offline mode, S502 is continued to be executed.

[0085] S502. The routing device determines whether the offline mode of the control device is the second offline mode. If the offline mode of the control device is the second offline mode, S503 is continued to be executed. If the offline mode of the control device is not the second offline mode, S504 is continued to be executed.

[0086] S503. The routing device determines whether the difference between the RSSI of the online event and the RSSI of the offline event is greater than the set threshold. If it is greater than the set threshold, it is determined that the current online event is a home scenario. If it is less than the set threshold, it is determined that the current online event is a non-home scenario.

[0087] Wherein, the set threshold is a value learned by the routing device within the set duration. For example, the set threshold is 10 db. Of course, the set threshold can also be 15 db, 20 db, etc., and this application does not make a limit on this.

[0088] S504. The routing device determines whether the offline mode of the control device is the third offline mode. If the offline mode of the control device is the third offline mode, it is determined that the current online event is a home scenario. If the offline mode of the control device is not the third offline mode, S503 is executed.

[0089] That is to say, when the offline mode of the control device obtained by the routing device is the first offline mode, it can be determined that the online event is a non-home scenario. When the offline mode of the control device obtained by the routing device is the second offline mode or not the third offline mode, it can be further determined whether the online event is a home scenario according to the RSSI difference between online and offline.

[0090] Or it can also be understood that in the embodiment of this application, if the offline mode of the control device obtained by the routing device is the way of routing kicking out the device, it is determined that the current online event is a non-home scenario; if the offline mode of the control device obtained by the routing device is the aging offline mode, it is determined that the current online event is a home scenario; if the offline mode of the control device obtained by the routing device is the active offline mode, it continues to determine whether the RSSI difference between online and offline is greater than the set threshold. If the difference is greater than the set threshold, it is determined that the online event is a home scenario. If the difference is less than the set threshold, it is determined that the online event is a non-home scenario.

[0091] In the introduction of the above embodiments, the routing device can mark the offline method of the control device. Therefore, when the control device goes online again, the routing device can determine whether the online event is a home scene based on the mark. Exemplarily, as ​ shown, it is a flowchart of a method for identifying leaving and arriving home provided by an embodiment of the present application. Refer to ​ shown, the method includes the following steps:

[0092] S601. When the routing device detects an offline event of the control device, mark the type of the offline event.

[0093] In the embodiment of the present application, marking can be performed according to different offline methods. For example, it can include several offline methods shown in the figure. For the offline methods shown in the figure, refer to the introduction of the foregoing embodiments, and details will not be repeated here.

[0094] Among them, when the offline method of the control device is aging offline, it can be determined that the offline event of the control device is a user leaving home scene.

[0095] S602. The routing device detects an online event of the control device.

[0096] S603. The routing device determines whether there is a routing kick-out flag. If there is a routing kick-out flag, the online event is a non-home scene. If there is no routing kick-out flag, continue to execute S604.

[0097] S604. The routing device determines whether there is an active offline flag. If there is an active offline flag, continue to execute S605. If there is no active offline flag, continue to determine whether there is an aging offline flag. If there is no aging offline flag, continue to execute S605. If there is an aging offline flag, determine that the online event is a home scene.

[0098] In some embodiments, when the routing device goes online, it can determine whether the offline flag marked by the routing device when the control device was offline last time is a routing kick-out flag, and then determine whether there is an active offline flag and an aging offline flag, so as to quickly determine the scene of the online event. Of course, it is also possible to first determine whether there is an active offline flag and an aging offline flag, and then determine whether there is a routing kick-out flag, etc. The present application does not make specific limitations on the order of judgment of the above several flags or several offline methods.

[0099] S605. The routing device determines whether the RSSI difference between the online and offline is greater than a set threshold. If it is greater than the set threshold, determine that the online event is a home scene. If it is less than the set threshold, the online event is a non-home scene.

[0100] Taking an actual application scenario as an example, assume that the mobile phone of user A is the control device. After user A modifies the password of the routing device, the mobile phone of user A can disconnect the Wi-Fi connection. At this time, the routing device can mark the offline method of the mobile phone of user A as being kicked out by the router. After user A reconnects to the Wi-Fi by re-entering the password, the routing device can detect the online event of the mobile phone of user A, and then find that the previous offline method was being kicked out by the router. At this time, it can be determined that the user has not left home, that is, this online event is a non-home scenario.

[0101] If user A is going to take a lunch break and places the mobile phone aside, after a period of time, the mobile phone may enter the screen-off sleep state, thereby disconnecting the Wi-Fi connection. At this time, the routing device can mark the offline method of the mobile phone of user A as actively offline. After user A wakes up from the lunch break and plays with the mobile phone, and the mobile phone reconnects to the Wi-Fi, the routing device can detect the online event. At this time, generally, the difference in the RSSI of the mobile phone A during the online and offline periods will not be greater than the set threshold. Therefore, this online event is a non-home scenario.

[0102] If user A leaves home and goes downstairs, and the distance from the routing device becomes farther and farther, at this time, the routing device can mark the offline method of the mobile phone of user A as aging offline. After the user returns home and the mobile phone reconnects to the Wi-Fi, the routing device can detect the online event. At this time, if the routing device finds that the previous offline method was aging offline, it can be determined that this online event is a home scenario.

[0103] Through the method of this application, it is possible to identify the user's leaving and returning home scenarios without installing a smart door lock or a smart camera, and then adjust the smart home to the corresponding leaving and returning home modes. Moreover, by the routing device identifying the offline method of the control device and determining the user's leaving and returning home scenarios based on the offline method of the control device, the accuracy of scenario identification can be improved, thereby enhancing the user experience.

[0104] In the above embodiments provided by this application, the method provided by this application is introduced from the perspective of the electronic device as the execution subject. To implement the various functions in the method provided by this application embodiment, the electronic device may include a hardware structure and / or software module, and implement the above various functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether a certain function among the above various functions is executed in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraint conditions of the technical solution.

[0105] As ​ shown, some other embodiments of this application disclose a device, and this device can be the routing device (for example, a router), an electronic device in the foregoing embodiments. Refer to ​As shown, the device 700 includes: one or more processors 701; one or more memories 702; a transceiver 703; and one or more computer programs 704 (not shown in the figure). Each of the above components can be connected through one or more communication buses 705.

[0106] Among them, the transceiver 703 can be used to receive or send messages, etc. One or more computer programs are stored in the memory 702, and the one or more computer programs include instructions. The processor 701 invokes the instructions stored in the memory 702, causing the device 700 to execute the following steps:

[0107] When detecting that the control device disconnects the communication connection with itself, determine the offline mode of the control device; the control device is one of the multiple electronic devices, and the control device is a portable electronic device; according to the offline mode of the control device, identify whether the scenario where the control device disconnects the communication connection is a leaving-home scenario; when detecting that the control device re-establishes the communication connection with the routing device, according to the offline mode of the control device, identify whether the scenario where the control device re-establishes the communication connection is a returning-home scenario.

[0108] In a possible implementation, when the instructions are invoked and executed by the one or more processors, the device is caused to execute the following steps:

[0109] If it is detected that the user modifies the Wi-Fi parameters, determine that the offline mode of the control device is the first offline mode; if a preset message sent by the control device is received, determine that the offline mode of the control device is the second offline mode; if the preset message sent by the control device is not received and / or the user's modification operation on the Wi-Fi parameters is not detected, determine that the offline mode of the control device is the third offline mode; or determine that the signal strength and the change situation of the number of packets sent within a preset time before the control device disconnects the communication connection with the routing device conform to the set rules, and determine that the offline mode of the control device is the third offline mode.

[0110] In a possible implementation, when the instructions are invoked and executed by the one or more processors, the device is caused to execute the following steps:

[0111] If it is determined that the offline mode of the control device is the first offline mode or the second offline mode, determine that the scenario where the control device disconnects the communication connection is a non-leaving-home scenario; if it is determined that the offline mode of the control device is the third offline mode, determine that the scenario where the control device disconnects the communication connection is a leaving-home scenario.

[0112] In a possible implementation, when the instructions are invoked and executed by the one or more processors, the device is caused to execute the following steps:

[0113] If it is determined that the offline mode of the control device is the first offline mode, then determine that the scenario for the control device to re - establish a communication connection is a non - home scenario; if it is determined that the offline mode of the control device is the second offline mode, then determine the scenario for the control device to re - establish a communication connection according to the first received signal strength RSSI and the second RSSI, where the first RSSI is the RSSI when the control device disconnects the communication connection with the routing device, and the second RSSI is the RSSI when the control device re - establishes the communication connection with the routing device; if it is determined that the offline mode of the control device is the third offline mode, then determine that the scenario for the control device to re - establish a communication connection is a home scenario.

[0114] In a possible implementation, when the instruction is called and executed by the one or more processors, the device is caused to perform the following steps:

[0115] If it is determined that the difference between the first RSSI and the second RSSI is greater than a set threshold, then determine that the scenario for the control device to re - establish a communication connection is a home scenario; if it is determined that the difference between the first RSSI and the second RSSI is less than the set threshold, then determine that the scenario for the control device to re - establish a communication connection is a non - home scenario.

[0116] In a possible implementation, the routing device includes a router.

[0117] In the embodiments of the present application, the processor 701 may be a general - purpose processor, a digital signal processor, an application - specific integrated circuit, a field - programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general - purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being completed by the hardware processor, or executed by the combination of hardware and software modules in the processor. The software module may be located in the memory 702, and the processor 701 reads the program instructions in the memory 702 and combines its hardware to complete the steps of the above - mentioned method.

[0118] In the embodiments of the present application, the memory 702 may be a non - volatile memory, such as a hard disk drive (HDD) or a solid - state drive (SSD), etc., or may also be a volatile memory, such as RAM. The memory may also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing instructions and / or data.

[0119] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0120] Based on the above embodiments, the present application also provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer is made to execute the method provided by the above embodiments.

[0121] The embodiments of the present application also provide a computer program product, including instructions, which when running on a computer, make the computer execute the method provided by the above embodiments.

[0122] The embodiments of the present application are described by referring to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be realized by instructions. These instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in ​ one process or multiple processes and / or blocks ​ one block or multiple blocks.

[0123] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device realizes the functions specified in ​ one process or multiple processes and / or blocks ​ one block or multiple blocks.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, so that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for realizing the functions specified in ​ one process or multiple processes and / or blocks ​ one block or multiple blocks.

Claims

1. A method for identifying a leaving home and returning home scene, applied to a routing device connected to a plurality of electronic devices, characterized in that: include: The routing device determines an offline mode of the control device when detecting that the control device is disconnected from the communication connection with the routing device; The control device is one of the plurality of electronic devices, and the control device is a portable electronic device; The routing device identifies, according to the offline mode of the control device, whether the scenario in which the control device disconnects the communication connection is a leaving home scenario; When the routing device detects that the control device re-establishes a communication connection with the routing device, the routing device identifies, based on the offline mode of the control device, whether the scenario in which the control device re-establishes a communication connection is a homecoming scenario; The routing device determines the offline mode of the control device, including: If the routing device detects a modification operation of the wireless fidelity Wi-Fi parameter by the user, the routing device determines that the offline mode of the control device is the first offline mode; If the routing device receives the preset message sent by the control device, it determines that the offline mode of the control device is the second offline mode; If the routing device does not receive the preset message sent by the control device and / or does not detect the user's modification operation on the Wireless Fidelity Wi-Fi parameters, then the routing device determines that the offline mode of the control device is the third offline mode; or if the routing device determines that changes in signal strength and the number of packets sent within a preset time before the control device and the routing device disconnect the communication connection meet a set rule, then the routing device determines that the offline mode of the control device is the third offline mode; The routing device identifies, according to the offline mode of the control device, whether a scenario in which the control device disconnects the communication connection is a leaving home scenario, including: If the routing device determines that the offline mode of the control device is the first offline mode or the second offline mode, then the routing device determines that the scenario in which the control device disconnects the communication connection is a non-away scenario; if the routing device determines that the offline mode of the control device is the third offline mode, then the routing device determines that the scenario in which the control device disconnects the communication connection is the away scenario; Alternatively, if the routing device determines that the offline mode of the control device is the first offline mode, it determines that the scenario in which the control device re-establishes the communication connection is a non-going home scenario; if the routing device determines that the offline mode of the control device is the second offline mode, it determines the scenario in which the control device re-establishes the communication connection based on the first received signal strength RSSI and the second RSSI; wherein the first RSSI is the RSSI when the control device and the routing device disconnect the communication connection, and the second RSSI is the RSSI when the control device and the routing device re-establish the communication connection; if the routing device determines that the offline mode of the control device is the third offline mode, it determines that the scenario in which the control device re-establishes the communication connection is the going home scenario.

2. The method according to claim 1, wherein The routing device determines, according to the first received signal strength RSSI and the second RSSI, a scenario in which the control device re-establishes a communication connection, including: If the routing device determines that the difference between the first RSSI and the second RSSI is greater than a set threshold, the routing device determines that the scenario in which the control device re-establishes the communication connection is the homecoming scenario; If the routing device determines that the difference between the first RSSI and the second RSSI is less than a set threshold, it determines that the scenario in which the control device re-establishes the communication connection is the non-returning home scenario.

3. The method according to claim 1 or 2, wherein: The routing device includes a router.

4. A routing device, characterized in that: The routing device includes one or more processors; one or more memories; and one or more computer programs; The one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions. When the instructions are called and executed by the one or more processors, the device performs the following steps: When detecting that a control device is disconnected from the control device, determining an offline mode of the control device; the control device is one of a plurality of electronic devices, and the control device is a portable electronic device; identifying, according to the offline mode of the control device, whether the scenario in which the control device disconnects the communication connection is a leaving-home scenario; When detecting that the control device re-establishes a communication connection with the routing device, identifying whether a scenario in which the control device re-establishes a communication connection is a homecoming scenario according to an offline mode of the control device; The routing device determines the offline mode of the control device, including: If a modification operation of the wireless fidelity Wi-Fi parameter by the user is detected, determining that the offline mode of the control device is a first offline mode; If a preset message sent by the control device is received, determining that the offline mode of the control device is a second offline mode; If no preset message sent by the control device is received and / or no modification operation of the wireless fidelity Wi-Fi parameters by the user is detected, the offline mode of the control device is determined to be the third offline mode; or if it is determined that changes in signal strength and the number of packets sent within a preset time before the control device and the routing device disconnect the communication connection meet a set rule, the offline mode of the control device is determined to be the third offline mode; The routing device identifies, according to the offline mode of the control device, whether a scenario in which the control device disconnects the communication connection is a leaving home scenario, including: If it is determined that the offline mode of the control device is the first offline mode or the second offline mode, then the scenario in which the control device disconnects the communication connection is determined to be a non-away scenario; if it is determined that the offline mode of the control device is the third offline mode, then the scenario in which the control device disconnects the communication connection is determined to be the away scenario; Alternatively, if it is determined that the offline mode of the control device is the first offline mode, the scenario in which the control device re-establishes the communication connection is determined to be a non-going home scenario; if it is determined that the offline mode of the control device is the second offline mode, the scenario in which the control device re-establishes the communication connection is determined based on the first received signal strength RSSI and the second RSSI; wherein, the first RSSI is the RSSI when the control device and the routing device disconnect the communication connection, and the second RSSI is the RSSI when the control device and the routing device re-establish the communication connection; if it is determined that the offline mode of the control device is the third offline mode, the scenario in which the control device re-establishes the communication connection is determined to be the going home scenario.

5. The device according to claim 4, characterized in that When the instruction is called and executed by the one or more processors, the device is caused to perform the following steps: determining that a difference between the first RSSI and the second RSSI is greater than a set threshold, then determining that the scenario in which the control device re-establishes the communication connection is the homecoming scenario; If it is determined that the difference between the first RSSI and the second RSSI is less than a set threshold, it is determined that the scenario in which the control device re-establishes the communication connection is the non-returning home scenario.

6. The device according to claim 4 or 5, characterized in that The routing device includes a router.

7. A computer-readable storage medium storing instructions, characterized in that: When the instruction is executed on a routing device, the device is caused to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Management control method for intelligent device and management control system

    CN107453962A