Intelligent household scene control method and equipment based on edge gateway and storage medium
Technical Field
The invention relates to the technical field of intelligent home, in particular to an intelligent home scene control method, equipment and a storage medium based on an edge gateway.
Background
In recent years, with the technical development of artificial intelligence and the internet of things, computing power, data and algorithms based on the cloud are increasingly improved, more and more technologies are developed at the beginning, and cloud computing service facing industrial application is provided at the moment, so that the development of smart homes is promoted objectively.
At present, the whole technical system of the smart home is mainly realized around the cloud, the edge and the end, the cloud is mainly used in product linkage control logic, meanwhile, the functions of end-side products are greatly weakened from the aspects of product production cost and bargaining acceptance capability of consumers, the end-side products similar to edge gateways can only realize simple message communication transparent transmission, and no way is provided for bearing more flexible control capability to improve user experience.
The intelligent home is developed for a plurality of years, home appliances are not purely physically experienced, automatic experience is improved through the single chip microcomputer module, remote control experience is improved through a wireless technology, core experience of 'intelligence' is not solved all the time, whether intelligent service can be provided around a life scene to quickly meet user requirements or not, even user requirements are predicted, and the fact that users meet the requirements instantly is reflected.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the present invention is to provide an intelligent home scene control method based on an edge gateway, where the edge gateway pre-judges a pre-judged scene corresponding to the current environment and automatically executes the pre-judged scene, so as to improve the degree of intelligence and improve the user experience.
Another object of the present invention is to provide an electronic device.
It is a further object of the present invention to provide a storage medium.
One of the purposes of the invention is realized by adopting the following technical scheme:
the intelligent home scene control method based on the edge gateway comprises the following steps:
step S1: receiving pre-judging scene model data issued by a cloud, and extracting network equipment with the highest use probability in the current environment and state characteristics thereof from the pre-judging scene model data according to the acquired current environment data;
step S2: generating a corresponding pre-judging scene according to the network equipment with the maximum use probability and the state characteristics thereof, extracting a local scene instruction corresponding to the pre-judging scene, and triggering the corresponding network equipment to automatically execute corresponding operation according to the local scene instruction;
step S3: judging whether a user modifies the current scene state, if so, modifying the corresponding network equipment state under the current scene according to the user requirement and executing once, generating a weight coefficient which is in negative correlation with the use probability of the modified network equipment, and controlling the weight coefficient to gradually decrease according to the time gradient; if not, returning to the step S1;
step S4: judging whether a replacement instruction fed back by a user is received or not in the process of decreasing the weight coefficient to zero, if so, controlling the weight coefficient corresponding to the modified network equipment in the step S3 to be zero to enable the use probability of the network equipment to be maximum, and returning to the step S1 to guide the dimension of the next scene; if not, the weighting coefficients corresponding to the network devices modified in the step S3 are reset and gradually decreased, and the step S4 is repeated.
Further, the environmental data includes continuous time, temperature, humidity, and exposure data.
Further, the pre-judgment scene model data issued by the cloud is stored in a local database.
Further, before triggering the corresponding network device to automatically execute the corresponding operation according to the local scene instruction in step S2, it is further determined whether the automatic execution authority of the network device has been opened, and if not, a prompt message is sent.
Further, in step S3, it is determined whether the user has modified the current scene state as follows:
and judging whether modification information for modifying the state of any network equipment in the current scene or closing information for closing a switch of the current scene, which is sent by a user terminal, is received or not during a period of continuous setting starting at the automatic execution time of the pre-determined scene, judging that the user modifies the current scene if one of the modification information and the closing information is received, and judging that the user does not modify the current scene if the modification information or the closing information is not received.
Further, in the step S3, the weighting factor is decreased in a time gradient (0.05 × n), where n is the decreasing number.
Further, the step S4 further includes:
when the weight coefficient is decreased to a set threshold value, generating a prompt instruction and sending the prompt instruction to the user terminal so as to remind the user whether to replace the self-set scene with a preset scene; when a user triggers a key agreeing to replace in a user terminal, generating a corresponding replacing instruction; and if the user triggers a non-approved replacing key in the user terminal or does not perform any operation within the set time, not generating a replacing instruction.
Further, the step S4 includes determining whether the number of times of resetting the weight coefficient reaches a set number of times of circulation, and if no replacement instruction fed back by the user is received within the set number of times of circulation, stopping circulation and maintaining the original use probability of the network device in the local database.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the intelligent home scene control method based on the edge gateway is realized.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium having a computer program stored thereon, the computer program, when executed, implementing the above-mentioned edge gateway-based smart home scene control method.
Compared with the prior art, the invention has the beneficial effects that:
the edge gateway can push a corresponding pre-judging scene according to the current environment, automatically execute the pre-judging scene and reduce manual intervention; in addition, when the user requirement is not consistent with the pre-judging scene, the user can adjust the state of the local network equipment in the scene, the adjustment of the user can generate a weight coefficient related to the use probability of the network equipment, and the weight coefficient can guide the next pre-judging result, so that the intelligent degree is improved; meanwhile, the edge gateway preferentially performs local processing, extracts a local scene instruction stored locally, and directly operates the local equipment network, so that network time delay in a cloud control mode is reduced, and the experience of a user is improved.
Drawings
Fig. 1 is a schematic flow diagram of an intelligent home scene control method based on an edge gateway according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Referring to fig. 1, the intelligent home scene control method based on the edge gateway includes:
step S1: receiving pre-judging scene model data issued by a cloud, and extracting the network equipment with the maximum use probability in the current environment and the state characteristics thereof from the pre-judging scene model data according to the acquired current environment data.
The cloud end stores a large amount of different user data, a pre-judging scene model is established according to the different user data, the pre-judging scene model comprises scene dimensions compiled by environment data, network equipment corresponding to each scene dimension and states thereof, the use probability of each network equipment and other data, and the state characteristics of the network equipment with the maximum probability under a certain dimension can be calculated by using the pre-judging scene model; the pre-judging scene module data is issued to the edge gateway by the cloud, and the edge gateway pre-judges the user requirement and automatically pushes the pre-judging scene which accords with the current environment to the user.
In this embodiment, the current environmental data is acquired by using the sensor, the environmental data includes, but is not limited to, continuous time, temperature, humidity, light sensitivity and the like, the continuous data can be processed into discretized scene dimension data, and the network device with the maximum use probability and the state characteristics thereof can be counted based on the scene dimension data in the current environment by pre-judging the scene model.
Step S2: generating a corresponding pre-judging scene according to the network equipment with the maximum use probability and the state characteristics thereof, extracting a local scene instruction corresponding to the pre-judging scene, and triggering the corresponding network equipment to automatically execute corresponding operation according to the local scene instruction.
The edge gateway stores the scene dimension data sent by the cloud end, the network equipment with the maximum use probability and other pre-judging scene model data in a local database, can predict the user requirement at the moment according to the information, and then searches the pre-judging scene suitable for the current scene dimension from the pre-judging scene model and pushes the pre-judging scene to the user terminal. Local scene instructions corresponding to different scenes are also stored in the local database, and the different scene instructions can control the states of different network devices. After the corresponding pre-judging scene is generated, a local scene instruction can be extracted from the local database according to the pre-judging scene, and the corresponding network equipment is controlled to automatically execute the corresponding operation.
In addition, before controlling the corresponding network device to automatically start according to the local scene instruction, whether the automatic execution authority of the network device is opened or not needs to be judged, and if the automatic execution authority of the network device is opened, the network device can be automatically started; if not, sending out prompt information and sending the prompt information to the user terminal to prompt the user to start the corresponding authority in the setting interface.
Step S3: judging whether a user modifies the current scene state, if so, modifying the corresponding network equipment state under the current scene according to the user requirement and executing once, generating a weight coefficient which is in negative correlation with the use probability of the modified network equipment, and controlling the weight coefficient to gradually decrease according to the time gradient; if not, the process returns to step S1.
When the pre-judging scene is automatically started, the user can modify the state of the current scene according to the self requirement, and the user controls the state of each network device through the user terminal. And after the user modifies the current scene state, modifying the corresponding network equipment state under the current scene according to the user requirement and executing the state once.
When the user requirement is inconsistent with the pre-judging scene, obtaining a weight coefficient according to a preset experience value of a cloud end aiming at the modified network equipment, wherein the weight coefficient is gradually decreased progressively (0.05 x n) according to the time gradient, and n is the decreasing times; the weighting factor may affect the probability of use of the network device the next time the scenario executes. The weight coefficient and the use probability are in a negative correlation relationship, and when the weight coefficient of a certain network device is reduced to zero, the use probability of the network device becomes maximum.
In this embodiment, the method for determining whether the user modifies the current scene state includes:
judging whether modification information for modifying the state of any network equipment in the current scene or closing information for closing a switch of the current scene, which is sent by a user terminal, is received or not during a period of continuous setting starting at the automatic execution time of the pre-judged scene, judging that the user modifies the current scene if one of the modification information and the closing information is received, and judging that the user does not modify the current scene if the modification information or the closing information is not received; after the pre-judged scene is automatically executed, the modification of the scene state by the user in a set time period is effective, and the modification can influence the use probability of the next automatic start of the network equipment; if the user modifies the scene state after the set time, the modification does not affect the next pre-judged scene pushing result.
Step S4: judging whether a replacement instruction fed back by a user is received or not in the process of decreasing the weight coefficient to zero, if so, controlling the weight coefficient corresponding to the modified network equipment in the step S3 to be zero to enable the use probability of the network equipment to be maximum, and returning to the step S1 to guide the dimension of the next scene; if not, the weighting coefficients corresponding to the network devices modified in the step S3 are reset and gradually decreased, and the step S4 is repeated.
When the weight coefficient is decreased progressively and the system can decrease progressively to a set threshold value, a prompt instruction is generated and sent to the user terminal to remind the user whether to replace the preset scene with the self-set scene; at the moment, a key for determining whether to approve replacement is popped up in the user terminal, when the user triggers the key for approving replacement in the user terminal, a corresponding replacement instruction is generated, at the moment, the weight coefficient corresponding to the modified network equipment is set to be zero, namely, the use probability of the modified network equipment in the local database is adjusted to be maximum, and the network equipment with the maximum use probability can be automatically started in the next scene dimension; if the user triggers a disagreement with the replacement key in the user terminal or does not perform any operation within the set time, the replacement instruction is not generated, at this time, the weight coefficient corresponding to the modified network device is reset to the original value, and the weight coefficient starts to gradually decrease according to the time, so that the recycling step S4 is realized.
In the process of the recycling step S4, it is further determined whether the number of times of resetting the weight coefficient reaches a set number of times of recycling, and if a replacement instruction fed back by a user is not received within the set number of times of recycling, the recycling is stopped and the original usage probability of the network device in the local database is maintained, that is, an unmodified scene state is continuously executed in the next scene dimension; and if the replacement instruction is received within the set cycle number, setting the use probability of the network equipment in the local database to be maximum to replace the original use probability of the network equipment in the local database, so that the corresponding network equipment can be started according to the latest use probability in the next scene dimension.
Example two
The embodiment provides an electronic device, which comprises a processor, a memory and a computer program, wherein the computer program is stored on the memory and can run on the processor; in addition, the present embodiment also provides a storage medium, on which a computer program is stored, where the computer program is executed to implement the foregoing intelligent home scene control method based on an edge gateway.
The apparatus and the storage medium in this embodiment are based on two aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.