Device control method, device and terminal device
By obtaining and analyzing the scene patterns of users not at home, generating device control strategies based on historical usage data, simulating users’ behavior at home, solving the problem that existing IoT security systems are difficult to effectively deter illegal elements when users are not at home, and improving the problem of Property safety.
Patent Information
- Application Number
- CN202010833910.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2040-08-18
AI Technical Summary
The existing IoT security system is difficult to effectively deter illegal elements when users are not at home, resulting in low property security.
By obtaining the scene mode of the first area, if it is a mode where the user is not at home, the device control policy is obtained, and the user's behavior at home is simulated and the target device is controlled based on the strategy generated by the user's historical use data.
It realizes that when the user is not at home, it can simulate user behavior, improve the deterrence effect of illegal elements, reduce the probability of theft, and improve the safety of user property.
Smart Images

Figure CN114077200B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and in particular, relates to a device control method, apparatus and terminal device. Background Art
[0002] With the development of science and technology, the Internet of Things has gradually entered people's work and life. The convenience and intelligence of Internet of Things devices can greatly improve the quality of users' daily lives.
[0003] In real life, users often leave their homes for various reasons. Criminals often take advantage of the time when users are away from home to commit illegal acts such as theft, resulting in property losses for users. In order to improve the safety of users' property, the Internet of Things has gradually incorporated some security measures. For example, some sensor devices and alarm devices are added to the Internet of Things. When users are not at home, these sensor devices are used for security monitoring, and alarm devices are used to alarm when danger is found. However, in actual applications, it is found that such security effects are poor and the ability to protect the safety of users' property is poor.
[0004] Therefore, a method for improving the safety of user's property is needed in the prior art. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a device control method, apparatus and terminal device, which can solve the problem of low security of user property in the prior art.
[0006] A first aspect of an embodiment of the present application provides a device control method, including:
[0007] Get the scene mode of the first area;
[0008] If the scene mode of the first area is the first mode, obtaining a device control policy associated with the first area, wherein the device control policy is a policy obtained based on historical usage data of a target device in the first area by a user;
[0009] The target device is controlled according to the device control strategy.
[0010] A second aspect of an embodiment of the present application provides a device control apparatus, including:
[0011] A mode acquisition module, used to acquire a scene mode of the first area;
[0012] a policy acquisition module, configured to acquire a device control policy associated with the first area when the scene mode of the first area is the first mode, wherein the device control policy is a policy obtained based on historical usage data of a target device in the first area by a user;
[0013] The device control module is used to control the target device according to the device control strategy.
[0014] A third aspect of an embodiment of the present application provides a terminal device, which includes a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the computer program, the steps of the device control method described in the first aspect above are implemented.
[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising: storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the device control method described in the first aspect above are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the device control method described in the first aspect above.
[0017] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application will first determine whether the scene mode of the first area is the first mode in which the user is not in the first area. If it is the first mode, the device control policy for each target device in the first area will be obtained, and the target device will be controlled according to the device control policy. The device control is a policy obtained by processing the historical usage data of the target device in the first area according to the user's actual use habits. Therefore, when the user is not in the first area, the embodiments of the present application can control the target device in the first area according to the user's historical usage habits. The user behavior simulation of "the user is normally in the first area" is realized, making it difficult for criminals to find that the user has left the first area. This effectively deters criminals, reduces the probability of criminals committing illegal acts such as theft in the first area, and improves the safety of user property. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0024] Figure 6 It is a schematic diagram of the implementation flow of the device control method provided in the embodiment of the present application;
[0025] Figure 7 is a schematic diagram of the structure of the device control device provided in an embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0028] In order to facilitate the understanding of the present application, the embodiments of the present application are briefly described here:
[0029] In real life, users often leave their homes for various reasons. Criminals often use the time when users are away from home to commit illegal acts such as theft, resulting in property losses to users. Therefore, a method is needed to improve the security of users' property when they are not at home.
[0030] In order to improve the safety of user property, the Internet of Things has gradually incorporated some security measures. For example, some sensor devices and alarm devices are added to the Internet of Things. When the user is not at home, these sensor devices are used for security monitoring, and the alarm devices are used to alarm when danger is found. However, in practice, it is found that this method is relatively passive. After many criminals find that the user is not at home, even if they know that they have been detected by the sensor, they will continue to commit illegal acts such as theft and robbery with a fluke mentality. Therefore, it is difficult to effectively deter illegal elements by adding sensor devices and alarm devices. This leads to poor security effects, making the safety of user property still low.
[0031] In the embodiment of the present application, the spatial area to be protected is referred to as the first area. In order to improve the safety of the user's property, it is first determined whether the scene mode of the first area is the first mode in which the user is not in the first area. If it is the first mode, the device control policy for each target device in the first area will be obtained, and the target device will be controlled according to the device control policy. The device control is a policy obtained by processing the historical usage data of the target device in the first area according to the user's actual use habits. Therefore, when the user is not in the first area, the embodiment of the present application can control the target device in the first area according to the user's historical usage habits. The user behavior simulation of "the user is normally in the first area" is realized, making it difficult for the criminals to find that the user has left the first area, and think that the user is still normally in the first area. In this way, effective deterrence against criminals is achieved, the probability of illegal acts such as theft by criminals in the first area is reduced, and the safety of user property is improved.
[0032] At the same time, some terms that may be involved in the embodiments of the present application are explained as follows:
[0033] The first area refers to a space area where property protection and user behavior simulation are required in the embodiment of the present application. Depending on the actual application scenario, the type and size of the area may also vary. For example, it may be a larger space area such as a house, office building, warehouse, or classroom building. It may also be a smaller space area such as a room or classroom. The specific needs to be determined according to the actual application scenario, and no excessive restrictions are made here.
[0034] Target device: refers to the device that needs to be controlled in the first area when the user behavior simulation is performed. For example, suppose there are lights, speakers and TVs in the first area, and suppose that the lights, speakers and TVs need to be turned on during the user behavior simulation. At this time, the lights, speakers and TVs are all target devices in the embodiment of the present application. If only the lights need to be turned on during the user behavior simulation, the lights are the target devices in the embodiment of the present application. The specific target devices that need to be controlled during the user behavior simulation can be set by the technician or the user. For example, all devices used by the user can be set as target devices, or some device types can be pre-set, and then the devices of these types among the devices used by the user can be set as target devices. Therefore, the specific device types and quantities included in the target devices need to be determined according to the actual application situation. In the embodiment of the present application, the target devices are all devices within the Internet of Things, that is, they all belong to Internet of Things devices.
[0035] Scenario mode: In the embodiment of the present application, the scenario is divided according to whether the user is in the first area, and the corresponding scenario mode is set for different scenarios. Among them, the first mode refers to the scenario mode when the user is not in the first area. For example, when the first area is a house, if the user needs to leave the house due to travel or business trip, the scenario mode of leaving the house due to travel or business trip is the first mode. In the first mode, the embodiment of the present application will simulate user behavior.
[0036] On the basis of including the first mode, the embodiments of the present application do not make too many restrictions on the scene division and the setting of the scene mode, which can be set by technical personnel according to actual needs. For example, in some optional embodiments, the scene modes corresponding to the scene of the user in the first area can be set to other modes. Alternatively, the scene of the user in the first area can be subdivided to obtain more scene modes.
[0037] Device control strategy: refers to the specific control scheme for each target device when simulating user behavior. For example, when to turn on the target device and when to turn off the target device. The embodiment of the present application does not impose too many restrictions on the precision of the device control strategy, which can be set by technical personnel or users according to actual needs. Among them, in theory, the higher the precision of the device control strategy, the better the effect of user behavior simulation, and thus the better the deterrent effect and the higher the safety of user property. For example, the device control strategy may only include the time to turn the target device on and off. It can also be further refined to set the specific task content to be performed by the target device during the on time period. For example, when the target device is a lamp with adjustable brightness, the device control strategy can include the turn-on and turn-off time of the lamp, and can also include the brightness setting of the lamp at different times. At this time, more detailed behavior simulation can be achieved.
[0038] In addition, the execution subject of the embodiment of the present application is described as follows:
[0039] The execution subject of the device control method provided in the embodiment of the present application is a terminal device, wherein the embodiment of the present application does not impose too many restrictions on the device type of the terminal device, and can be set by technical personnel according to actual conditions. For example, it can be a mobile terminal such as a mobile phone, a tablet computer or a wearable device, or a server, or an Internet of Things device in the first area, such as a smart gateway or a computer. Depending on the type of terminal device, when actually performing operations such as scene mode acquisition and target device control, there may be certain differences in the implementation details, which can be specifically referred to in Figure 1 Description of the illustrated embodiment. Since the IoT device includes the target device, the terminal device can also be the target device in theory.
[0040] In order to illustrate the technical solution described in the present application, the following takes the first area as the user's house, and divides the scene mode into the first mode and other modes as an example, and explains it through a specific embodiment. Among them, the other mode refers to the scene mode corresponding to the scene of the user in the first area. In actual applications, the first area can also be other types of spatial areas, and the scene mode can also have other division methods, which are not limited too much here.
[0041] Figure 1 The following is a flowchart of the device control method according to the first embodiment of the present application, which is described in detail as follows:
[0042] S101: Acquire a scene mode of a first area.
[0043] In the embodiment of the present application, the scene recognition of the house is first performed, that is, the scene mode of the house is obtained to determine whether the user is at home. The embodiment of the present application does not impose too many restrictions on the specific implementation method of scene recognition, which can be determined by technical personnel according to actual needs.
[0044] As an optional embodiment of the present application, the method for obtaining the scene mode includes at least the following two optional methods:
[0045] Method 1: Manual selection by the user.
[0046] Method 2: Automatic identification of terminal equipment.
[0047] For method 1, refer to Figure 2 , at this time S101 can be replaced by: S1011-S1012.
[0048] S1011, obtaining a mode setting instruction from a user, and determining a second mode pointed to by the mode setting instruction.
[0049] S1012: Determine a scene mode of the first area according to the second mode.
[0050] In mode 1, the user can set the scene mode of the house according to the needs, thereby meeting the actual needs of the user. For example, when the user is on a business trip or traveling, the user can manually set the scene mode to the first mode to start the user behavior simulation in the embodiment of the present application.
[0051] The implementation of S1011 may vary depending on the type of terminal device. Specifically, it can be divided into the following situations:
[0052] 1. When the terminal device is a device that the user can directly operate. For example, a mobile terminal such as a mobile phone, or an Internet of Things device that can achieve human-computer interaction through voice, buttons or touch screens. At this time, the embodiment of the present application will provide a scene mode setting function in the terminal device. The user can use this function in the terminal device by himself and input the mode setting instruction according to actual needs. The terminal device will identify the scene mode (i.e., the second mode) pointed to by the mode setting instruction entered by the user. For example, the user can set it to the first mode, or other modes.
[0053] 2. When the terminal device is a device that the user cannot directly operate and needs to interact with data through other devices. For example, the server of the target device manufacturer. At this time, the user can set the scene mode in other devices and enter the corresponding mode setting instruction. The other device sends the mode setting instruction to the terminal device, and the terminal device parses the instruction to determine the second mode pointed to.
[0054] In practical applications, the implementation process of S1011 needs to be determined according to the actual terminal device situation.
[0055] Since the embodiment of the present application divides the scene mode into the first mode and other modes, in the embodiment of the present application, the second mode is the first mode or other modes. After obtaining the second mode, the embodiment of the present application will determine the real scene mode of the house according to the second mode. As a feasible embodiment of the present application, the second mode can be used as the scene mode of the house. As another optional embodiment of the present application, some mode judgment rules can also be pre-set, and then the second mode is processed based on the rules to obtain the scene mode of the house. For example, when there is more than one owner of the house, the terminal device may receive multiple different second modes. At this time, the mode judgment rule can be set so that each user has an associated priority. When multiple second modes are received, the second mode corresponding to the user with the highest priority is set as the scene mode of the house.
[0056] For method 2, refer to Figure 3 , at this time S101 can be replaced by: S1013-S1014.
[0057] S1013: Acquire first data of a user entering a first area within a first time period, and determine a third mode according to the first data.
[0058] S1014: Determine a scene mode of the first area according to the third mode.
[0059] Considering that it may be inconvenient for users to set scene modes in actual applications, for example, special users such as the elderly and children cannot operate terminal devices. Or users may forget to set scene modes, for example, when users go out for urgent matters, it is easy to forget to set them. Therefore, in the embodiment of the present application, the terminal device can automatically identify whether the user is at home.
[0060] Specifically, the terminal device first obtains the data (i.e., the first data) of the user entering the house in the past period of time (i.e., the first time period). The specific range of the first time period can be set by the technician according to the actual situation, for example, it can be the past half day, one day or one week. After obtaining the first data, the embodiment of the present application will analyze the first data to determine whether the user is away from home and obtain the corresponding scene mode (i.e., the third mode). The embodiment of the present application does not limit the specific analysis method of the first data, which can be set by the technician according to the actual situation. For example, in some embodiments, a number threshold can be set, and the total number of times the user enters the house in the first time period can be counted according to the first data. When the total number is less than the number threshold, it is determined that the user has left home, and the third mode is the first mode. On the contrary, if the total number is greater than or equal to the threshold here, it can be determined that the user has not left home, but enters and exits the house normally. At this time, the third mode is other modes. Among them, the size of the number threshold can be set by the technician. Or in other embodiments, a threshold time for returning to the house at the latest can also be set. For example, it can be set to any time between 11 pm and 12 pm. Then, based on the first data, determine whether the user has entered the house before the threshold time on that day (the first time period can be set to that day in this case). If not, it is determined that the user has left home, and the third mode is the first mode at this time. On the contrary, it can be determined that the user has not left home, but has entered and exited the house normally. At this time, the third mode is other modes. It should also be noted that the embodiments of the present application do not impose too many restrictions on the method of obtaining the first data, and can be set by technical personnel according to actual conditions. For example, in some embodiments, when the terminal device is not an Internet of Things device in the house, the Internet of Things device can complete the recording of the first data and send it to the terminal device.
[0061] After obtaining the third mode, the embodiment of the present application determines the real scene mode of the first area according to the third mode. As a feasible embodiment of the present application, the third mode can be used as the scene mode of the first area. As another optional embodiment of the present application, some mode judgment rules can be pre-set, and then the third mode is processed based on the rules to obtain the scene mode of the first area.
[0062] It should be noted that the above-mentioned method 1 and method 2 are only two optional implementation methods. In practical applications, technicians can arbitrarily select one or more methods to obtain the scene mode. Among them, when the two methods are combined, if only the second mode or the third mode is obtained, it can be processed according to the contents of the above-mentioned methods 1 and 2. If the second mode and the third mode are obtained at the same time, it is necessary to select one of them and then process it. As an optional embodiment of the present application, the actual setting of the user can be given priority, the second mode can be selected, and then the content of method 1 can be processed. In addition, in practical applications, other methods other than method 1 and method 2 can also be selected to obtain the scene mode. For example, the user behavior simulation can be set to start the timer for the embodiment of the present application to meet the needs of some users with fixed habits of leaving home. At this time, S101 can be replaced by: the scene mode of the first area is obtained regularly, and the scene mode is the first mode set by default. The specific time for the timer start can be set by the technician or the user. For example, it can be set to 8 o'clock every Saturday morning or 7 o'clock on the morning of the 30th of each month.
[0063] S102: If the scene mode of the first area is the first mode, obtain a device control policy associated with the first area, wherein the device control policy is a policy obtained based on historical usage data of a target device in the first area by a user.
[0064] When the scene mode is the first mode, it means that the user has left home, and user behavior simulation is required at this time. In order to realize user behavior simulation, the embodiment of the present application will analyze the historical usage data of the user on the target device to determine the user's usage habits (i.e., the user's behavior) of the target device. Then generate the corresponding device control strategy. The generation operation of the device control strategy can be performed before S102 or in S102, and no excessive restrictions are made here. When executed before S102, for S102, when it is determined that user behavior simulation is required, the generated device control strategy can be obtained. And when executed in S102. For S102, when it is determined that user behavior simulation is required, the historical usage data will be analyzed to obtain the device control strategy. The embodiment of the present application does not impose too many restrictions on the specific analysis method of the historical usage data, and can be set by the technician according to the actual situation. For example, in some optional embodiments, the devices actually used by the user can be analyzed according to the historical usage data, and some or all of the devices can be selected as target devices, and the usage time period of each target device can be analyzed. When setting the user behavior simulation according to the usage time period, the startup time and shutdown time of each target device are set, and the startup time and shutdown time of these target devices are stored as a device control policy.
[0065] As an optional implementation method of generating a device control strategy in this application, the generation of the device control strategy can be implemented in S102. Figure 4 , at this time S102 can be replaced by: S401-S402.
[0066] S401, obtaining historical usage data of a target device in a first area by a user in a second time period.
[0067] Among them, the second time period is a sample time period for user behavior analysis. The embodiment of the present application does not impose too many restrictions on the specific scope of the second time period, which can be set by technical personnel according to actual needs, for example, it can be the past week, month or half a year, etc. On the one hand, in theory, the longer the second time period is, the larger the amount of data that can be obtained, and the better the effect of user behavior analysis will be at this time, and the effect of user behavior simulation will also be better. But on the other hand, due to the large differences in user behavior habits in different periods. That is, when the second time period is too long, the reference value of some historical data will be lower. This will affect the effect of user behavior simulation. Therefore, technical personnel can set the scope of the second time period according to the actual user situation. The method for obtaining historical usage data is not too limited here, and can be determined according to the actual scenario. For example, it can be collected and recorded by an Internet of Things device and sent to a terminal device (it can be forwarded via a server or other device in the middle). Or it can also be manually entered by the user or copied in through an external memory.
[0068] S402: Analyze the historical usage data and generate a device control strategy associated with the first area.
[0069] The embodiments of the present application do not impose too many restrictions on the specific analysis methods of historical usage data, which can be set by the technicians. For example, the above description of S102 can be referred to. Some big data analysis methods can also be used to implement the analysis. For example, the historical usage data can be classified, regressed, sorted, and associated, and then processed using learning models such as decision trees, genetic algorithms, or artificial neural networks, and then the user's behavior can be determined to obtain the corresponding device control strategy.
[0070] As an optional embodiment of the present application, the device control policy may be generated automatically by the terminal device or manually set by the user. That is, the user may set the device control policy according to the usage habits of the target device. In this case, S102 is to obtain the device control policy set by the user.
[0071] As an optional embodiment of the present application, based on the automatic generation of the device control policy by the terminal device, a policy modification function can be provided to the user. That is, the user can modify the device control policy according to his actual needs. At this time, S102 is to obtain the device control policy modified by the user.
[0072] As Figure 1 The embodiments shown and Figure 4 In the embodiment shown, a specific implementation method for analyzing historical usage data is provided. Figure 5 In the embodiment of the present application, the historical usage data includes the time period during which the user used the target device (i.e., the first usage time period), and the work location of the target device in the first area (i.e., the first work location) during the usage time period. The embodiment of the present application includes:
[0073] S501: Analyze a first usage time period and a first work location to obtain a second usage time period of a target device and a second work location in a second area.
[0074] S502: Generate a device control policy for the target device based on the second usage time period and the second work location.
[0075] In the embodiment of the present application, the user's use time period and work place of the target device are mainly analyzed. Among them, different precisions of the use time period can be set according to actual needs. For example, in some optional embodiments, if you only want to simulate user behavior in units of "single day". At this time, every day in the second time period is an equal processing object. The first use time period is the time period when the target device is used every day. For example, 8 to 9 o'clock. In other optional embodiments, in order to simulate user behavior more humanely, user behavior simulation can be performed in units of "single week". At this time, the embodiment will distinguish Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday every week in the second time period. The first use time period is the time period when the target device is used on different days of the week. For example, 8 to 9 o'clock from Monday to Friday, and 11 to 11:15 from Saturday to Sunday. At this time, the precision is higher than that of simulating user behavior in units of "single day".
[0076] On the basis of obtaining the first usage time period, the embodiment of the present application will analyze the first usage time period to determine the user's usage time habits for each target device. Then determine the time period (i.e., the second usage time period) for using each target device when simulating user behavior. Then realize the simulation of user behavior in the time dimension. Among them, the embodiment of the present application does not impose too many restrictions on the specific usage time period analysis method, which can be set by technical personnel according to actual needs. For example, the first usage time period can be used as the second usage time period, and some learning models can be used to learn the usage time period to obtain the second usage time period. As an optional embodiment of the present application, the usage time period can be analyzed with a single day as a unit. Analyze one or more first usage time periods used by the target device every day, and then conduct a comprehensive analysis and study of these first usage time periods in multiple days to obtain one or more second usage time periods corresponding to the target device in a single day.
[0077] Take an example to illustrate, assuming that in the past week (assuming that the second time period is set to the past week), and the analysis is performed in units of "single day". At the same time, assume that lamp A is used from 7 to 8 in the morning and from 7 to 12 in the evening. At this time, the first usage time period of lamp A is from 7 to 8 in the morning and from 7 to 12 in the evening every day in a week. On this basis, the first usage time period can be set as the second usage time period, and then the second usage time period of lamp A is from 7 to 8 in the morning and from 7 to 12 in the evening every day.
[0078] On the other hand, the work location of the target device refers to the specific location of the target device in the first area. Therefore, it is necessary to divide the first area into regional locations in advance. The embodiment of the present application does not impose too many restrictions on the division rules of regional locations, and the division can be performed by technical personnel according to actual conditions. For example, when the first area is a house, the work location of the target device can be a bedroom, a living room, a kitchen, or a study. When the first area is an office building, the work location of the target device can be offices on different floors.
[0079] In the embodiment of the present application, the working location of the target device can be divided into three situations:
[0080] 1. The working location is stable and unchanged during the first period of use. For example, a fixed lamp is used in the same location.
[0081] 2. The working location changes during the first use period. For example, the robot vacuum cleaner cleans different locations at different times, such as cleaning public areas in the morning and cleaning bedrooms in the evening.
[0082] 3. Unable to obtain the working location. Considering the actual application, the location information of some devices may be difficult to know. For example, the working location of some portable speakers will change with the user's usage needs and it is difficult to set in advance. At this time, if the user does not manually enter it, the terminal device will not be able to know the working location of the portable speaker.
[0083] In order to achieve a more accurate simulation of user behavior, the embodiment of the present application will analyze the location of use of the target device within the first use time period. Among them, for the above-mentioned target device belonging to the third type where the work place cannot be obtained, no analysis is required. However, for the first and second types, or the work place, it is necessary to analyze the work place of each target device, and then determine the work place (i.e., the second work place) where each target device is used when simulating user behavior. Then the simulation of user behavior in the spatial position dimension is realized. Among them, the embodiment of the present application does not impose too many restrictions on the analysis method of the first work place, and can be selected or set by the technician according to actual needs. For example, the first work place can be used as the second work place, or some learning models can be used to realize the learning of the work place. It should be particularly noted that as an optional embodiment of the present application, when a single target device has multiple second work places, the second use time periods corresponding to each second work place need to be recorded. If a single second use time period corresponds to multiple second work places, the order between these second work places needs to be recorded according to the corresponding time in the second use time period. For example, suppose the sweeping robot has two second use time periods: from 8 to 9 in the morning and from 9 to 11 in the evening. The second working location from 8 to 9 in the morning is the living room, and the second working location from 9 to 11 in the evening is the bedroom, dining room, and living room. In this case, it is necessary to record the second working locations from 9 to 11 in the evening in the following order: bedroom, dining room, and living room.
[0084] After obtaining the second use time period and the second work location, theoretically, it has been determined when and where the target device is used. Therefore, the embodiment of the present application generates a specific device control strategy based on the second use time period and the second work location. That is, a control scheme is generated for when the target device is turned on, where it works at different times, and when it stops working.
[0085] As an optional embodiment of the present application, Figure 5 On the basis of the embodiment shown, in order to achieve a more detailed simulation of user behavior. In the embodiment of the present application, the historical usage data also includes the operating parameters of the target device in the first usage period (i.e., the first operating parameters). For example, the brightness of the light or the volume of the speaker, etc. When generating the device control strategy, the operating parameters of the target device will be considered at the same time to achieve a detailed simulation of user behavior and increase the deterrence against illegal elements. Reference Figure 6 In the embodiment of the present application, S501 and S502 may be replaced by: S601-S602.
[0086] S601, analyzing a first usage time period, a first work location, and a first working parameter to obtain a second usage time period of a target device, a second work location within a first area, and a second working parameter within the second usage time period.
[0087] In the embodiment of the present application, the working parameters refer to the configuration parameters of the device during operation, such as brightness and volume. Since different target devices have different hardware and software configurations, there may be certain differences in the working parameters corresponding to different target devices. In the embodiment of the present application, the technicians can pre-set the working parameters that need to be acquired and controlled for different types of devices. For example, for lighting equipment such as lamps, the brightness is set as the corresponding working parameter. For playback devices such as speakers, the volume and other working parameters are set. For playback devices such as televisions, both brightness and volume can be set as working parameters.
[0088] On the basis of obtaining the first working parameter of the target device, the embodiment of the present application will analyze the working parameter to determine the user's parameter usage habits for each target device. Then determine the situation of the working parameters (i.e., the second working parameters) of each target device when simulating user behavior. Then realize the detailed simulation of user behavior. Among them, the embodiment of the present application does not impose too many restrictions on the specific working parameter analysis method used, which can be selected or set by technical personnel according to actual needs. For example, the first working parameter can be used as the second working parameter, or some learning models can be used to realize the learning of working parameters.
[0089] As an optional embodiment of the present application, after determining each first usage time period, the first working parameter of the first usage time period corresponding to each day in the second time period can be summarized and analyzed in units of "single day". The working parameter that the user is most likely to use for the target device in each first usage time period is obtained. Then the working parameter is set as the second working parameter corresponding to the second time period. For example, suppose that lamp B has two first usage time periods from 8 to 9 in the morning and from 9 to 11 in the evening. Among them, among the working parameters of each day in the second time period, the most used brightness is A from 8 to 9 in the morning, and the most used brightness is B from 9 to 11 in the evening. And set 8 to 9 in the morning and 9 to 11 in the evening as the second usage time period of lamp B. At this time, the working parameter corresponding to lamp B from 8 to 9 in the morning can be set to brightness A, and the working parameter corresponding to 9 to 11 in the evening can be set to brightness B.
[0090] S602: Generate a device control strategy for the target device based on the second usage time period, the second work location, and the second work parameter.
[0091] After obtaining the second use time period, the second work location and the second work parameter, it is theoretically determined when and where to use the target device (at this time, it may not only be turning the target device on and off). Therefore, the embodiment of the present application generates a specific device control strategy based on the second use time period, the second work location and the second work parameter. That is, a control scheme is generated for when to turn on the target device, where to work at different times, the work parameters set during specific work, and when to stop working.
[0092] S103: Control the target device in the first area according to the device control strategy.
[0093] After obtaining the device control strategy for the target device, the embodiment of the present application will implement the control of the target device based on the device control strategy to achieve user behavior simulation. Depending on the data actually contained in the device control strategy, different degrees of control of the target device can be achieved. For example, when the device control strategy only contains the use time period of the target device, the control of when the target device is turned on and off can be achieved. When the device control strategy also includes the use time period and the work place of the target device, accurate control of the switch and the use place of the target device can be achieved. When the device control strategy also includes the use time period, the work place and the working parameters, accurate control of the switch, the use place and the parameter configuration of the target device can be achieved. These different degrees of control can achieve the behavior simulation of the user in different dimensions. And then different precisions of user behavior simulation can be achieved, and then different degrees of deterrence can be played. In practical applications, technicians or users can set the data content contained in the device control strategy according to actual needs.
[0094] As an optional embodiment of the present application, according to Figure 5It can be seen from the description of the illustrated embodiment that the embodiment of the present application can set the precision of the use time period according to actual needs. Accordingly, when performing user behavior simulation, the target device can also be controlled according to the precision of the use time period. For example, user behavior simulation is performed in units of "single day". At this time, for a single target device, only one set of control schemes needs to be stored in the device control strategy. When controlling the target device, the content of the target device control is the same every day. When user behavior simulation is performed in units of "single week". For a single target device, up to 7 sets of control schemes can be stored in the device control strategy. When controlling the target device, the specific control scheme of the target device needs to be determined according to the day of the week. For example, in some embodiments, from Monday to Friday, light C can be controlled to light up at 8 to 9 in the morning with the setting of brightness A. From Saturday to Sunday, light C is controlled to light up at 10 to 11 in the morning with the setting of brightness C.
[0095] In an embodiment of the present application, it is first determined whether the user has left the first area. If the user has left the first area, that is, the first area is in the first mode. Then a pre-generated device control policy is obtained, or a device control policy is generated based on the user's historical usage data of the target device. Finally, the target device in the first area is controlled based on the device control policy, thereby simulating the user behavior of "the user is normally in the first area". It is difficult for criminals to find that the user has left the first area, and they think that the user is still normally in the first area. This effectively deters criminals, reduces the probability of criminals committing illegal acts such as theft in the first area, and improves the safety of user property.
[0096] At the same time, by analyzing the user's historical behavior from multiple dimensions such as device usage time, device working location, and device configuration working parameters, a device control strategy that includes multiple dimensional analysis results is obtained. This allows the embodiment of the present application to simulate user behavior more accurately when controlling the target device based on the device control strategy, making the simulation more effective and more deterrent to illegal elements. This in turn increases the security of user property.
[0097] Corresponding to the method of the above embodiment, Figure 7 A structural block diagram of a device control apparatus provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 6 The exemplary device control apparatus may be an execution subject of the device control method provided in the aforementioned first embodiment.
[0098] Reference Figure 7 , the equipment control device comprises:
[0099] The mode acquisition module 71 is used to acquire the scene mode of the first area.
[0100] The policy acquisition module 72 is used to acquire the device control policy associated with the first area when the scene mode of the first area is the first mode, wherein the device control policy is a policy obtained based on historical usage data of the target device in the first area by the user.
[0101] The device control module 73 is used to control the target device according to the device control strategy.
[0102] As an embodiment of the present application, the mode acquisition module 71 includes:
[0103] The first mode acquisition submodule is used to acquire a mode setting instruction from a user and determine a second mode pointed to by the mode setting instruction.
[0104] The first mode determination module is used to determine the scene mode of the first area according to the second mode.
[0105] As an embodiment of the present application, the mode acquisition module 71 includes:
[0106] The second mode acquisition submodule is used to acquire first data of a user entering a first area within a first time period, and determine a third mode according to the first data.
[0107] The second mode determination module is used to determine the scene mode of the first area according to the third mode.
[0108] As an embodiment of the present application, the policy acquisition module 72 includes:
[0109] The data acquisition module is used to acquire the historical usage data of the target device by the user in the second time period.
[0110] The strategy generation module is used to analyze the historical usage data and generate a device control strategy associated with the first area.
[0111] As an embodiment of the present application, the historical usage data includes: a first usage time period of the target device by the user in the second time period, and a first working location of the target device in the first area in the first usage time period. Accordingly, the policy generation module includes:
[0112] The first data analysis module is used to analyze the first usage time period and the first work location to obtain a second usage time period of the target device and a second work location in the first area.
[0113] The first policy generating submodule is used to generate a device control policy for the target device based on the second usage time and the second work location.
[0114] As an embodiment of the present application, the historical usage data includes: a first usage time period of the target device by the user in the second time period, a first working location of the target device in the first area in the first usage time period, and a first working parameter of the target device in the first usage time period. Accordingly, the policy generation module includes:
[0115] The second data analysis module is used to analyze the first usage time period, the first work location and the first working parameter to obtain the second usage time period of the target device, the second work location in the first area and the second working parameter in the second usage time period.
[0116] The second strategy generating submodule is used to generate a device control strategy for the target device based on the second use time, the second work location and the second work parameter.
[0117] The process of each module in the device control device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figure 1 The description of the first embodiment is not repeated here.
[0118] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0119] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0120] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0121] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0122] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions, and cannot be understood as indicating or suggesting relative importance. It should also be understood that although the terms "first", "second", etc. are used to describe various elements in some embodiments of the present application in the text, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first table can be named as the second table, and similarly, the second table can be named as the first table without departing from the scope of the various described embodiments. The first table and the second table are both tables, but they are not the same table.
[0123] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some 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 in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0124] The device control method provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
[0125] As an example but not limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0126] Figure 8 Schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Figure 8 As shown, the terminal device 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown in the figure), a memory 81, in which a computer program 82 that can be run on the processor 80 is stored. When the processor 80 executes the computer program 82, the steps in the above-mentioned device control method embodiments are implemented, such as Figure 1 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 7 The functions of modules 71 to 73 are shown.
[0127] The terminal device 8 may be a computing device such as a mobile phone, a tablet computer, a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that Figure 8 It is only an example of the terminal device 8 and does not constitute a limitation of the terminal device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input sending device, a network access device, a bus, etc.
[0128] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0129] In some embodiments, the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 8. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 81 may also be used to temporarily store data that has been sent or is to be sent.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0132] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0133] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0134] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0135] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A device control method, characterized in that: include: Get the scene mode of the first area; If the scene mode of the first area is the first mode, obtaining a device control policy associated with the first area, wherein the device control policy is a policy obtained based on historical usage data of the target device in the first area by the user, and the scene mode of the first area is a mode in which the user is not in the first area; Controlling the target device according to the device control strategy; The acquiring the scene mode of the first area includes: Acquire a mode setting instruction of the user, and determine a second mode pointed to by the mode setting instruction; Determining the scene mode of the first area according to the second mode; or The acquiring the scene mode of the first area includes: Acquire first data of the user entering the first area within a first time period, and determine a third mode according to the first data, wherein the total number of times the user enters the house within the first time period is counted according to the first data, and when the total number is less than a preset threshold, the third mode is determined; The scene mode of the first area is determined according to the third mode.
2. The device control method according to claim 1, characterized in that: The obtaining of the device control strategy associated with the first area further includes: Acquire historical usage data of the target device by the user in a second time period; The historical usage data is analyzed to generate the device control strategy associated with the first area.
3. The device control method according to claim 2, characterized in that: The historical usage data includes: a first usage time period of the target device by the user during the second usage time period, and a first working location of the target device in the first area during the first usage time period; Accordingly, the analyzing the historical usage data to generate the device control strategy associated with the first area includes: Analyze the first usage time period and the first work location to obtain a second usage time period of the target device and a second work location within the first area; The device control policy for the target device is generated based on the second usage time and the second work location.
4. The device control method according to claim 2, characterized in that: The historical usage data includes: a first usage time period of the target device by the user within the second time period, a first working location of the target device within the first area within the first usage time period, and a first working parameter of the target device within the first usage time period; Accordingly, the analyzing the historical usage data to generate the device control strategy associated with the first area includes: Analyze the first usage time period, the first work location, and the first working parameter to obtain a second usage time period of the target device, a second work location within the first area, and a second working parameter within the second usage time period; The device control policy for the target device is generated based on the second usage time, the second work location, and the second work parameter.
5. A device control device, characterized in that: include: A mode acquisition module, used to acquire a scene mode of the first area; a policy acquisition module, configured to acquire a device control policy associated with the first area when the scene mode of the first area is a first mode, wherein the device control policy is a policy obtained based on historical usage data of a target device in the first area by a user, and the scene mode of the first area is a mode in which the user is not in the first area; A device control module, used to control the target device according to the device control strategy; The mode acquisition module comprises: A first mode acquisition submodule, configured to acquire a mode setting instruction of the user and determine a second mode pointed to by the mode setting instruction; A first mode determining module, configured to determine a scene mode of the first area according to the second mode; or A second mode acquisition submodule is used to acquire first data of the user entering the first area within a first time period, and determine a third mode according to the first data, wherein the total number of times the user enters the house within the first time period is counted according to the first data, and when the total number is less than a preset threshold, the third mode is determined; The second mode determination module is used to determine the scene mode of the first area according to the third mode.
6. The device control apparatus according to claim 5, characterized in that: The strategy acquisition module includes: A data acquisition module, used to acquire historical usage data of the target device by the user in a second time period; A policy generation module is used to analyze the historical usage data and generate the device control policy associated with the first area.
7. A terminal device, characterized in that: The terminal device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Control method for device, apparatus and terminal device
CN109283872A
House security method and device, terminal and computer readable storage medium
CN109285306A