CN113347068A - Rule processing method and device, server and storage medium - Google Patents

Rule processing method and device, server and storage medium Download PDF

Info

Publication number
CN113347068A
CN113347068A CN202010099714.8A CN202010099714A CN113347068A CN 113347068 A CN113347068 A CN 113347068A CN 202010099714 A CN202010099714 A CN 202010099714A CN 113347068 A CN113347068 A CN 113347068A
Authority
CN
China
Prior art keywords
rule
execution
condition
automation
intelligent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010099714.8A
Other languages
Chinese (zh)
Other versions
CN113347068B (en
Inventor
魏红生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lutuo Technology Co Ltd
Original Assignee
Shenzhen Lutuo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lutuo Technology Co Ltd filed Critical Shenzhen Lutuo Technology Co Ltd
Priority to CN202010099714.8A priority Critical patent/CN113347068B/en
Publication of CN113347068A publication Critical patent/CN113347068A/en
Application granted granted Critical
Publication of CN113347068B publication Critical patent/CN113347068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • H04L12/2818Controlling appliance services of a home automation network by calling their functionalities from a device located outside both the home and the home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2823Reporting information sensed by appliance or service execution status of appliance services in a home automation network
    • H04L12/2825Reporting to a device located outside the home and the home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2823Reporting information sensed by appliance or service execution status of appliance services in a home automation network
    • H04L12/2827Reporting to a device within the home network; wherein the reception of the information reported automatically triggers the execution of a home appliance functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2823Reporting information sensed by appliance or service execution status of appliance services in a home automation network
    • H04L12/2827Reporting to a device within the home network; wherein the reception of the information reported automatically triggers the execution of a home appliance functionality
    • H04L12/2829Reporting to a device within the home network; wherein the reception of the information reported automatically triggers the execution of a home appliance functionality involving user profiles according to which the execution of a home appliance functionality is automatically triggered
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L2012/284Home automation networks characterised by the type of medium used
    • H04L2012/2841Wireless
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the application discloses a rule processing method, a rule processing device, a server and a storage medium, and relates to the technical field of intelligent home furnishing. The method comprises the following steps: acquiring an automation rule, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition; judging whether the automation rule meets a preset condition or not; and when the preset condition is met, sending indication information to the intelligent equipment, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition. According to the embodiment of the application, whether the automation rule can be preferentially processed locally by the intelligent equipment or not is determined by judging whether the automation rule meets the preset condition or not, the data processing pressure of the server is reduced, and the data processing efficiency is improved.

Description

Rule processing method and device, server and storage medium
Technical Field
The present application relates to the field of smart home technologies, and in particular, to a rule processing method, an apparatus, a server, and a storage medium.
Background
Most of devices in the intelligent home system can continuously report detected information events, such as temperature, humidity, illumination intensity, electric quantity and voltage and other numerical events, and door opening and closing or unmanned and other state events, and can perform condition judgment on the continuous information events and execute corresponding actions in most application scenes. However, with the rapid development of smart homes, the number of devices in a home system gradually increases, information events become very large, and the difficulty of data processing also increases.
Disclosure of Invention
The embodiment of the application provides a rule processing method, a rule processing device, a server and a storage medium, which can improve data processing efficiency.
In a first aspect, an embodiment of the present application provides a rule processing method, which is applied to a server in a home system, and the method includes: acquiring an automation rule, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition; judging whether the automation rule meets a preset condition or not; and when the preset condition is met, sending indication information to the intelligent equipment, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition.
In a second aspect, an embodiment of the present application provides a rule processing apparatus, which is applied to a server in a home system, and the apparatus includes: the device comprises a rule acquisition module, a condition judgment module and a rule processing module. The system comprises a rule acquisition module, a rule execution module and a rule execution module, wherein the rule acquisition module is used for acquiring an automation rule, and the automation rule comprises a trigger condition and an execution action responding to the trigger condition; the condition judgment module is used for judging whether the automation rule meets a preset condition or not; and the rule processing module is used for sending indication information to the intelligent equipment when the preset condition is met, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition.
In a third aspect, an embodiment of the present application provides a server, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the rule processing method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the rule processing method according to the first aspect.
In the embodiment of the application, an automation rule is obtained, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition, whether the automation rule meets a preset condition is judged, and when the preset condition is met, indication information is sent to the intelligent device, and the indication information is used for indicating whether the intelligent device controls the execution device to execute the execution action according to the trigger condition. According to the method and the device, whether the automation rule meets the preset condition or not is judged, whether the intelligent device can preferentially execute the execution action or not is determined, the execution device is controlled to execute the execution action according to the trigger condition, the data processing pressure of the server is reduced, and the data processing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of an application environment suitable for the embodiment of the present application.
Fig. 2 shows another schematic application environment applicable to the embodiment of the present application.
Fig. 3 is a flowchart illustrating a rule processing method according to an embodiment of the present application.
Fig. 4 is a flowchart illustrating a rule processing method according to another embodiment of the present application.
Fig. 5 shows a flowchart of step S230 in fig. 4 according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating a rule processing method according to another embodiment of the present application.
Fig. 7 is a flowchart illustrating a rule processing method according to still another embodiment of the present application.
Fig. 8 shows a flowchart of step S430 in fig. 7 according to an embodiment of the present application.
Fig. 9 shows another flowchart of step S430 in fig. 7 according to the embodiment of the present application.
Fig. 10 is a flowchart illustrating a rule processing method according to still another embodiment of the present application.
Fig. 11 is a flowchart illustrating a rule processing method according to yet another embodiment of the present application.
Fig. 12 is a block diagram illustrating a rule processing apparatus according to an embodiment of the present application.
Fig. 13 is a system configuration block diagram of a processing system suitable for the rule processing method according to the embodiment of the present application.
Fig. 14 is a block diagram of a hardware configuration of a server according to an embodiment of the present application.
Fig. 15 is a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
At present, smart homes already benefit more and more families, and users can purchase home equipment according to own needs, and remote control, linkage control and other automatic configurations of the home equipment are achieved through the internet of things technology. In some application scenarios, a user may also control home equipment or design an automation logic for running each device through an application program on a mobile phone terminal. Wherein automation (or automation linkage) can be understood as a linkage application built between intelligent gateways or sub-devices connected to the intelligent gateways, automation can comprise trigger conditions and execution actions, and devices in automation comprise trigger devices and execution devices, which can be in communication connection through the intelligent gateways.
In some application scenarios, the smart home system may perform automatic trigger condition determination according to the information event detected by the home device, so that the execution device may be controlled to execute a corresponding execution action when it is determined that the trigger device satisfies the trigger condition. For example, the automatic operation is "automatic light-on when the door is opened", and when an information event that the door is opened is detected, it is determined that the trigger condition is satisfied, and the light-on operation can be performed. However, with the rapid development of smart homes, the number of devices in a home system is gradually increased, and information events detected by the devices become very large, so that the data processing is more and more difficult, and high requirements are also placed on the real-time performance and the stability. Therefore, how to efficiently, stably and real-timely process the information event reported by the device is very urgent and important.
In the research process, the inventor researches the current processing situation of the current information event in the intelligent home, comprehensively considers the requirements of the user in practical application, and provides the rule processing method, the rule processing device, the rule processing server and the rule processing storage medium in the embodiment of the application, so that the data processing efficiency is improved, the automatic execution effect is ensured, and the user experience is optimized.
An application environment to which the present application relates will be described below.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment suitable for the embodiment of the present application. Fig. 1 provides an intelligent home system 10, where the intelligent home system 10 includes a gateway device 100, a home device 200 connected to the gateway device 100, and a server 300 connected to the gateway device 100. The number of the gateway devices 100 may be at least one, and the number of the home devices 200 may be at least one. When the number of gateway apparatuses 100 is plural, communication connection between different gateway apparatuses 100 is also possible.
In this embodiment, the gateway device 100 may be an intelligent gateway for intelligent home control, and may implement functions of system information acquisition, information input, information output, centralized control, remote control, linkage control, and the like. The gateway equipment can be responsible for specific security alarm, household appliance control and power utilization information acquisition. The gateway device 100 can also perform information interaction with products such as an intelligent interactive terminal in a wireless manner. The gateway device 100 also has a wireless routing function, excellent wireless performance, network security and coverage area.
In this embodiment, the household device 200 may include various intelligent household devices, sensing devices, detection devices, and the like, which are disposed in an indoor space, for example, an intelligent television, an intelligent refrigerator, an intelligent air conditioner, a temperature and humidity sensor, a pressure sensor, a smoke sensor, a human body sensor, a door and window sensor, an intelligent switch, a socket, an electric lamp, an infrared emission device, a camera device, and the like. The home devices 200 connected to the gateway device 100 may interact with the gateway device 100 for information and instructions. The gateway device 100 and the home device 200 may be connected through communication manners such as bluetooth, WiFi (Wireless-Fidelity), ZigBee (ZigBee technology), and the like, and of course, the connection manner of the gateway device 100 and the home device 200 may not be limited in this embodiment of the application.
In this embodiment, the server 300 may be a local server, a cloud server, or the like, and a specific server type may not be limited in this embodiment. The server 300 connected to the gateway apparatus 100 may wirelessly interact with the gateway apparatus 100. The gateway devices 100 disposed in different indoor spaces may be communicatively connected to the same server 300 through a network to perform information interaction between the server 300 and the gateway device 100.
Further, the smart home system 10 may further include a terminal device 400. The terminal device 400 may include a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), and the like, which are not limited herein. The terminal device 400 can interact information with the server 300 in a wireless mode such as 2G/3G/4G/5G/WiFi and the like. Of course, the connection mode between the terminal device 400 and the server 300 may not be limited in the embodiment of the present application. In some embodiments, the terminal device 400 may also be used for interaction with a user, so that the user may wirelessly communicate with the gateway device 100 through the terminal device 400 based on the router 500. In addition, the user can add account information to the gateway device 100 and the terminal device 400 at the same time, and the information synchronization between the gateway device 100 and the terminal device 400 is realized through the account information.
In some embodiments, the user may set different trigger scenarios or automated linkages through an Application (APP) of the terminal device 400. As one manner, the terminal device 400 may upload the scenario configuration information or the automation scheme to the server 300, so that when the trigger condition of the trigger scenario or the automation is reached, the server 300 may find a device corresponding to an execution action in the scenario configuration information or the automation scheme according to the stored scenario configuration information or the automation scheme, so as to notify the device to perform the execution action to meet the execution result of the trigger scenario or the automation. Alternatively, the server 300 may also send the scenario configuration information or the automation scheme to the gateway device 100, and the gateway device 100 finds a device corresponding to an execution action in the scenario configuration information or the automation scheme according to the stored scenario configuration information or the automation scheme. Meanwhile, the gateway device 100 may feed back the device's execution back to the server 300.
For example, referring to fig. 2, when the automation scheme set by the user through the APP of the terminal device 400 is "door and window open automatic lighting", the triggering condition of the automation scheme is "door and window open", and the action is performed as "intelligent switch control light bulb lighting". In this case, the triggering device is a door/window sensor 200a and the actuating device is a smart switch 200b connected to a light bulb 200 c. The automation scheme may be stored in the gateway device 100 or in the server 300, and the path for executing the automation linkage may be through a local area network or a wide area network.
If the automatic execution is performed locally in the gateway device 100 through the lan path, the door/window sensor 200a senses that the door/window is opened, reports an information event that the door/window is opened to the gateway device 100, and after receiving the information event, the gateway device 100 can find the device corresponding to the execution action in the automation scheme, in this case, the intelligent switch 200b, and notify the intelligent switch 200b to control the lighting, thereby realizing the automatic linkage of the automatic lighting when the door/window is opened.
If the automatic execution is performed on the server 300 through the wan path, the door/window sensor 200a senses that the door/window is opened, reports an information event of the door/window opening to the gateway device 100, the gateway device 100 reports the event to the server 300 after receiving the event, and the server 300 finds the device corresponding to the execution action in the automation scheme according to the stored automation scheme, in this case, the intelligent switch 200b, and notifies the intelligent switch 200b to control the lighting through the gateway device 100, thereby realizing the automatic linkage of the automatic lighting when the door/window is opened.
Further, after the lighting is turned on, the execution result of the successful lighting may be fed back to the gateway device 100, and after the gateway device 100 receives the information, the current time, the Identifier (ID) of the automation scheme, and the execution result of the automation scheme may be reported to the server 300 and stored by the server 300. The ID may be a symbol uniquely identifying the automation scheme, may be a number, a letter, or the like, and is not limited herein.
Embodiments in the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart illustrating a rule processing method according to an embodiment of the present application, where in an embodiment, the rule processing method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 3, the rule processing method may specifically include the following steps:
step S110: an automation rule is obtained, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition.
In the embodiment of the application, the automation rule may be a rule according to which an automation linkage scheme is executed, and may reflect a linkage relationship between states of a plurality of home devices. The home equipment in the intelligent home system can be automatically executed according to the set automation rule so as to realize automatic linkage. Wherein the automation rule may include a trigger condition and an execution action in response to the trigger condition.
In some embodiments, the devices in the automation rule may include a trigger device and an execution device, the trigger condition may be a condition that needs to be satisfied by the trigger device when the automation linkage scheme is executed, and the execution action may be an execution action that needs to be performed by the execution device to implement the automation linkage scheme when the trigger condition is satisfied. The triggering device may be a pressure sensor, a temperature sensor, a humidity sensor, a door and window sensor, or a smoke sensor, and the executing device may be an intelligent switch, an intelligent socket, an intelligent lamp, an infrared emitting device, or a camera device, which is not limited herein.
It should be noted that the triggering device and the executing device may be the same device, for example, the intelligent switch may be the triggering device and the executing device at the same time, a temperature sensor is provided in the intelligent switch, and when the intelligent switch detects that the temperature is higher than a preset temperature, the intelligent switch controls to turn on the air conditioner. In other words, the triggering device for detecting whether the triggering condition is met is an intelligent switch, and the executing device for executing the corresponding execution action is also an intelligent switch. The implementation principle of other similar devices is substantially the same as that of the aforementioned intelligent switch, and therefore, the description is not repeated herein, and the intelligent switch is taken as an example here for convenience of description, and does not limit the present solution.
In a specific application scenario, for example, a user sets an automation rule that a triggering condition is that a door and window sensor detects that a window is closed, and an execution action is that an indoor intelligent lamp is opened, a triggering device of the rule is the door and window sensor, and an execution device is an intelligent switch connected with the intelligent lamp. In some embodiments, the automation rules may also be described in a rule language that is machine-recognizable. For example, IF door.status is OFF and THEN SET light.status is ON.
In this embodiment, the server may obtain the automation rule, so as to dynamically adjust a processing policy of the automation rule according to a specific situation. The processing strategy can be that the server performs cloud processing or the intelligent device performs local processing.
Specifically, the automation rule is processed by the server in a cloud, and it can be understood that when the acquired information event reaches the trigger condition of the automation rule, the server finds the execution device corresponding to the execution action in the automation rule according to the automation rule stored in the cloud, and notifies the execution device of executing the execution action to realize the automation linkage. The method includes that an automation rule is locally processed by an intelligent device, and can be understood that when an acquired information event reaches a trigger condition of the automation rule, the intelligent device finds an execution device corresponding to an execution action in the automation rule according to the locally stored automation rule, and informs the execution device of executing the execution action to realize automatic linkage.
In some embodiments, the smart device may be a device in the smart home system, where the device may continuously operate, is connected to a smart home software platform (cloud server) through WIFI and has a local storage function, and the smart device may report information events without interruption (or replace reporting by other sub-devices connected together through a local area network communication protocol), and may also receive and execute a control command issued by the smart home software platform. In some embodiments, the smart device may be a triggering device, an executing device, or the gateway device, which is not limited herein.
In some embodiments, the server obtains the automation rule, which may be from a rule engine of the server. The rule engine is a software structure for defining, storing and judging the execution conditions of the automation rules, and can define the triggering conditions and the execution actions of the automation rules, the rule list for storing the automation rules and the judgment of the automation rules. In some embodiments, the automation rules in the rule engine may include automation rules processed by the server, or may include automation rules issued locally by the server to the smart device. As one approach, the automation rules may be tagged to determine whether to process locally at the smart device or at the server cloud.
In some embodiments, the server obtains the automation rule, which may be an ID to obtain the automation rule. Wherein, the ID may be a name given by the user to the automation rule, such as "turn on light when window is closed"; or the rule identifier generated when the automatic rule is successfully set may be in a form of a mixture of numbers, english, chinese, and english, such as 20150325170856 a.
Step S120: and judging whether the automation rule meets a preset condition or not.
In the embodiment of the application, when the server acquires the automation rule, it may be determined whether the automation rule meets a preset condition, so as to determine a processing policy of the automation rule according to a determination result. The preset condition may be a condition required when the processing policy is satisfied.
In some embodiments, the preset condition may be a condition that the processing policy needs to satisfy the automation rule when the processing policy is processed by the cloud of the server. As one approach, the preset condition may be a condition where the intelligent device cannot efficiently, stably, or process the automation rule in real time. For example, the complexity of the automation rule may be greater than a specified complexity, or the CPU occupancy of the central processing unit of the smart device may be greater than a specified threshold. When the automation rule meets the preset condition, the automation rule can be considered to be suitable for cloud processing by the server; when the automation rule does not satisfy the preset condition, the automation rule can be considered to be suitable for local processing by the intelligent device.
In other embodiments, the preset condition may also be a condition that the processing policy needs to be satisfied by the automation rule when the smart device processes locally. As one way, the preset condition may be a condition that the intelligent device can efficiently, stably, or process the automation rule in real time. For example, the complexity of the automation rule may be lower than a specified complexity, or the CPU occupancy of the central processing unit of the smart device may be lower than a specified threshold. When the automation rule meets the preset condition, the automation rule can be considered to be suitable for the intelligent equipment to preferentially perform local processing; when the automation rule does not satisfy the preset condition, the automation rule can be considered to be suitable for cloud processing by the server.
It should be understood that the preset conditions are only examples, and the specific preset conditions are not limited in the embodiments of the present application.
Step S130: and when the preset condition is met, sending indication information to the intelligent equipment, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition.
In the embodiment of the application, after the server determines whether the automation rule meets the preset condition, if a determination result that the automation rule meets the preset condition is obtained, the server may send the indication information to the intelligent device according to the determination result. The indication information is used for indicating whether the intelligent device controls the execution device to execute the execution action in the automation rule according to the trigger condition. The indication information may be information containing an automation rule or information containing an instruction, and a specific indication information form is not limited herein, and it is only necessary that the intelligent device can determine whether the automation rule can be locally processed according to the indication information.
In some embodiments, when the preset condition is a condition that the automation rule needs to satisfy when being processed by the server cloud, if the automation rule satisfies the preset condition, the automation rule may be considered to be suitable for cloud processing by the server. Further, as a mode, when the automation rule is that the server has issued to the intelligent device and the intelligent device performs local processing according to the automation rule, the server may send an indication message to the intelligent device to indicate the intelligent device to stop controlling the execution device to execute the execution action according to the trigger condition. That is, the server may upgrade the automation rule from local processing to cloud processing. Therefore, when the intelligent equipment cannot efficiently, stably or in real time process the information event meeting the automation rule, the acquired information event can be uploaded to the server so as to process the information event by means of the strong processing capacity of the server, and therefore the automatic linkage can be efficiently, stably and in real time. As another mode, when the automation rule is locally processed by the server and the intelligent device does not store the automation rule, the server may not send an indication message to the intelligent device to indicate the intelligent device to stop local processing.
In other embodiments, when the preset condition is a condition that the automation rule needs to satisfy when being processed by the cloud of the server, if the automation rule does not satisfy the preset condition, the automation rule may be considered to be suitable for local processing by the smart device. As one mode, when the automation rule is cloud-processed by the server, but the smart device stores the automation rule, the server may send an indication message to the smart device to instruct the smart device to control the execution device to execute the execution action according to a trigger condition in the stored automation rule. That is, the server may issue the automation rule from the cloud process to the local process. Therefore, when the intelligent equipment can efficiently, stably or real-timely process the information events meeting the automation rules, the intelligent equipment can preferentially carry out local processing, network transmission is reduced, and execution efficiency is improved. Meanwhile, the execution of some automation rules or the processing of real-time information events can be supported in the case of network disconnection. Alternatively, the server may not send the instruction information to the smart device to instruct the smart device to perform the local processing when the automation rule is locally processed by the smart device.
Similarly, in still other embodiments, when the preset condition is a condition that the automation rule needs to satisfy when processed locally by the smart device, the automation rule may be deemed suitable for local processing by the smart device if the automation rule satisfies the preset condition. Further, as a mode, when the automation rule is processed by the server in the cloud, but the smart device stores the automation rule, the server may send an indication message to the smart device to instruct the smart device to control the execution device to execute the execution action according to the trigger condition in the stored automation rule. That is, the server may issue the automation rule from the cloud process to the local process. Alternatively, the server may not send an instruction to the smart device to instruct the smart device to stop local processing when the automation rule is locally processed by the smart device.
In still other embodiments, when the preset condition is a condition that the automation rule needs to satisfy when being processed locally by the smart device, if the automation rule does not satisfy the preset condition, the automation rule may be considered to be suitable for cloud processing by the server. As one way, when the automation rule is processed locally by the smart device, the server may send an indication message to the smart device to instruct the smart device to stop controlling the execution device to execute the execution action according to the trigger condition, that is, the server may upgrade the automation rule from local processing to cloud processing. As another mode, when the automation rule is locally processed by the server and the intelligent device does not store the automation rule, the server may not send an indication message to the intelligent device to indicate the intelligent device to stop local processing.
In conclusion, whether the automation rule meets the preset condition or not is judged, the processing strategy of the automation rule is dynamically adjusted according to the judgment result, the efficiency, the stability and the real-time performance of information event processing are improved, and the intelligent home system can operate on the automation linkage scene to form an efficient closed loop. In addition, by means of a powerful data processing engine of the software platform server, more complex automatic linkage can be supported, and the automation diversity of the intelligent home scene is increased.
In some embodiments, the server may perform the judgment of the automation rule at intervals of a specified time, may perform the judgment of the automation rule in real time, and may also perform the judgment of the automation rule according to a received instruction to determine whether to adjust a processing policy of the automation rule, where a specific triggering manner of the judgment is not limited herein.
According to the rule processing method provided by the embodiment of the application, the automation rule is obtained, whether the automation rule meets the preset condition is judged, and when the preset condition is met, the indication information is sent to the intelligent equipment and used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition in the automation rule. According to the method and the system, whether the automation rule meets the preset condition or not is judged in real time, whether the intelligent equipment can preferentially execute the execution action or not is dynamically determined, the execution equipment is controlled to execute the execution action according to the trigger condition, the data processing pressure of the server is reduced, and the data processing efficiency is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a rule processing method according to another embodiment of the present application, where the method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 4, the rule processing method may specifically include the following steps:
step S210: and acquiring a new rule, wherein the new rule comprises a new trigger condition and a new execution action.
In this embodiment of the present application, the automation rule acquired by the server may be a new rule, where the new rule includes a new trigger condition and a new execution action in response to the new trigger condition.
In some embodiments, the User may set the new rule through a Web User Interface (Web UI). The Web UI may be a management Web interface of an intelligent home software platform (server), and the Web UI may be used to edit the automation rule by the user. For example, a user creates a rule "turn on light when window is closed" through a Web UI, selects a creation trigger condition to turn on the window, creates an execution action to turn on light, and then saves the creation rule.
Step S220: and judging whether the newly-built rule meets a rule issuing condition or not.
In some embodiments, after acquiring the new rule, the server may determine whether the new rule satisfies a rule issuing condition, so as to determine whether the new rule can be issued to the local intelligent device. In some embodiments, the issuing of the automation rule may be performed by a control command issuing module of the server. The control command issuing module is used for issuing a control command (such as actions of adjusting the brightness of light, restarting or closing the equipment and the like) and an automation rule to the intelligent equipment.
As an embodiment, the rule issuing condition may be that the newly created rule is a composite rule composed of a plurality of single rules. That is, when the newly created rule is a composite rule composed of a plurality of single rules, the newly created rule meets the rule issuing condition, and the newly created rule can be issued to the intelligent device for local processing; when the newly-built rule is not a composite rule formed by a plurality of single rules, the newly-built rule does not meet the rule issuing condition, the newly-built rule can not be issued to the intelligent equipment locally, and cloud processing is directly carried out by the server. As a mode, the composite rule may be split into a plurality of simple rules, and then the simple rules are issued to the local of the intelligent device, so that the intelligent device can efficiently, stably or in real time process information events meeting the simple rules.
For example, a new rule "when intrusion of a stranger is detected, a camera is started to store a screenshot, then the screenshot is sent to an owner mailbox and the owner is notified by a short message, and all alarm devices are sounded" is a composite rule composed of a plurality of single rules, namely "when intrusion of the stranger is detected, the camera is started to store the screenshot", "when intrusion of the stranger is detected, the screenshot is sent to the owner mailbox", "when intrusion of the stranger is detected, the owner is notified by a short message", and "when intrusion of the stranger is detected, all the alarm devices are sounded".
As another embodiment, the system resources of the smart device may be consumed by detecting and recording a plurality of persistent information events in real time (e.g., the human body sensor detects that no human is present for 10 minutes or human is present for 1 hour), which may increase the load of the smart device, or the service life of the device may be reduced by frequently reading and writing the storage when executing the new rule. Therefore, the rule issuing condition may be that a time parameter required in the process of detecting whether the new trigger condition is satisfied is smaller than a time threshold. That is, when the time parameter required in the process of detecting whether the new trigger condition is met is smaller than the time threshold, the new rule meets the rule issuing condition; and when the time parameter required in the process of detecting whether the new trigger condition is met is larger than the time threshold, the new rule does not meet the rule issuing condition. The time threshold value can be pre-stored in the server and can be reasonably set according to the specific automatic scene. For example, the time threshold may be set to 1 minute. Therefore, the newly-built rules of the system resources of the intelligent equipment which do not need to be consumed can be preferentially issued to the intelligent equipment for processing, and network transmission is reduced, so that the automation execution efficiency is improved.
In another embodiment, the determination may be made from system resources that the smart device needs to consume. Specifically, the rule issuing condition may be that a performance parameter required in the process of detecting whether the new trigger condition is satisfied is smaller than a performance threshold, where the performance parameter includes at least one of a CPU parameter of a central processing unit and a memory parameter. That is, when the performance parameter required in the process of detecting whether the new trigger condition is met is smaller than the performance threshold, the new rule meets the rule issuing condition; and when the performance parameter required in the process of detecting whether the new trigger condition is met is larger than the performance threshold, the new rule does not meet the rule issuing condition. The performance parameter may be CPU occupancy rate, memory occupancy rate, or CPU occupation space and memory occupation space, which is not limited herein, and only needs to embody system resources occupied by the intelligent device when detecting the new trigger condition, for example, the performance parameter may also be a comprehensive parameter of the CPU and the memory. The performance threshold may correspond to the type of the performance parameter, and may be different performance thresholds corresponding to different types of the performance parameter. The performance threshold may be set according to a specific automation rule, or may be a uniform standard. For example, where the performance parameter is CPU occupancy, the performance threshold may be set to 10%.
As another embodiment, when the triggering device and the executing device are the same intelligent device, the intelligent device may perform automatic determination by itself without processing by a server. Therefore, the rule issuing condition may also be that the triggering device to which the new triggering condition is applied and the executing device corresponding to the new executing action are both the smart device. That is, when the triggering device and the executing device of the newly-built rule are both intelligent devices, the newly-built rule meets the rule issuing condition; and when the triggering equipment and the executing equipment of the newly-built rule are not intelligent equipment, the newly-built rule does not meet the rule issuing condition. For example, the intelligent switch can be an intelligent switch for triggering equipment and executing equipment at the same time, a temperature sensor is arranged in the intelligent switch, and when the intelligent switch detects that the temperature is higher than a preset temperature, the intelligent switch controls to turn on the air conditioner.
As another embodiment, when the triggering device and the executing device are both connected to the same smart device, the smart device may dispatch the two devices, so that the smart device may implement automatic linkage. Therefore, the rule issuing condition may also be communication connection between the triggering device for the newly created triggering condition and the executing device corresponding to the newly created executing action and the smart device. For example, if the triggering device "door and window sensor" and the executing device "intelligent lamp" in the new rule "door and window closed and light on" are both connected to the same intelligent gateway, the new rule can be issued to the intelligent gateway for local processing.
As yet another example, smart devices may not be suitable for performing network-related automation scenarios, such as those that require a better network status, such as uploading files, sending instant messages or mails, etc. Therefore, the rule issuing condition may be that the network bandwidth parameter required for the new execution action is less than the bandwidth threshold. That is, when the network bandwidth parameter required by the newly-built execution action is smaller than the bandwidth threshold, the newly-built rule meets the rule issuing condition; and when the network bandwidth parameter required by the newly-built execution action is greater than the bandwidth threshold, the newly-built rule does not meet the rule issuing condition. The bandwidth threshold value can be prestored in the server and can be reasonably set according to a specific automatic scene. For example, the bandwidth threshold may be set to 100 kbps.
It is to be understood that the rule issuing condition may also be a combination of the above multiple rule issuing conditions, and the specific combination form is not limited herein.
In a specific application scenario, for example, a user creates an automation rule through a Web UI, that is, "turn on a light when closing a window", a rule engine of an intelligent home software platform can determine whether to issue the rule to the local of an intelligent device after receiving the created rule, and since a door, a window, and an intelligent lamp are connected to the same intelligent device, the rule engine can issue the rule to the local of the intelligent device. Therefore, the server can issue the newly-established rule to the corresponding intelligent equipment through the control command issuing module, and the intelligent equipment can be added into a local rule list after receiving the newly-established rule. Therefore, in an application scene, the door and window can trigger an information event that the door and window is opened when the window is closed, and the information event can be reported to the intelligent device because the door and window does not have the event processing capacity. After receiving the report of the information event, the intelligent device searches whether a processing method for defining the information event exists in a local rule list of the intelligent device, and thus the intelligent device can find an automatic rule of turning on the light when the window is closed, so that the intelligent device can send a light-on command to the intelligent lamp, and at the moment, the state of the intelligent lamp changes (the state is changed from the light-off state to the light-on state). Therefore, the scene defined by the automation rule can be processed without a server (an intelligent home software platform).
In another specific application scenario, for example, a user creates an automation rule, "alarm and screenshot in case of illegal intrusion", selects a trigger condition and an action to be performed as "when the door lock detects illegal unlocking or multiple authentication identity errors, the camera beside the door lock is called to start video recording and screenshot functions, and the functions are stored in a file server through a network, and the screenshot needs to be sent to a mailbox of the user (provided by the user during registration), and a short message is sent to notify the user and sound all alarm systems". After the new rule is submitted to the rule engine, since many pieces of equipment intelligent equipment in the new rule cannot be executed or scheduled locally, the rule engine can judge that the new rule cannot be issued locally, and the new rule is reserved in a server (an intelligent home software platform) for cloud processing.
Thus, in an application scene, when the door lock detects that other people illegally intrudes, an information event of the illegal intrusion is triggered, after the door lock reports the information event to the intelligent equipment, the intelligent equipment cannot find a processing method for defining the information event in a local rule list, the intelligent equipment reports the information event to the server (an intelligent home software platform), after the server receives the information event, a real-time stream processing engine of the server inquires the rule list stored in a cloud, when the automatic rule of 'alarming and shooting screenshot under the condition of the illegal intrusion' is inquired, the server can execute the automatic rule by utilizing strong real-time processing capacity, for example, a camera near the door lock is opened to shoot and store the shot to a remote file server, the shot is sent to a mailbox of a user, and a notice (the illegal intrusion of people) is issued, and sound the entire alarm system.
Step S230: and when the rule issuing condition is met, sending the newly-built rule serving as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control execution equipment to execute the newly-built execution action according to the newly-built triggering condition.
In the embodiment of the application, after the server determines whether the new rule meets the rule issuing condition, if a determination result that the automation rule meets the rule issuing condition is obtained, the server may send the new rule to the intelligent device as the first indication information. Therefore, the intelligent device can store the new rule and judge whether the new trigger condition of the new rule is met according to the acquired information event. The first indication information is used for indicating the intelligent equipment to control the execution equipment to execute the execution action in the automation rule according to the newly-built trigger condition. That is, the smart device locally performs the processing of the newly created rule.
In some embodiments, when the rule issuing condition is that the newly created rule is a composite rule composed of a plurality of single rules, referring to fig. 5, step S230 may include:
step S231: and when the newly-built rule is a composite rule formed by a plurality of single rules, acquiring one or more target single rules which meet specified conditions in the plurality of single rules, wherein the single rules comprise single triggering conditions and single execution actions.
In some embodiments, when the newly-created rule is a composite rule composed of a plurality of single rules, the server may split the composite rule into the plurality of single rules, and select one or more target single rules that satisfy specified conditions from the plurality of single rules, so as to send the target single rules to the smart device for local processing.
As an embodiment, the specified condition may be a condition that a single rule is satisfied by the smart device's local processing. For example, a time parameter required in the process of detecting whether the single trigger condition is met is smaller than a time threshold, a performance parameter required in the process of detecting whether the single trigger condition is met is smaller than a performance threshold, a single network bandwidth parameter required for executing the action is smaller than a bandwidth threshold, both the trigger device and the execution device in the single rule are intelligent devices, and both the trigger device and the execution device in the single rule are connected to the same intelligent device.
For example, the new rule is a plurality of simple rules, such as "when an intrusion of a stranger is detected, a camera is started to store a screenshot, then the screenshot is sent to an owner mailbox and all alarm devices are sounded", the new rule can be disassembled into a single rule A "when the intrusion of the stranger is detected, the camera is started to store the screenshot, a single rule B" when the intrusion of the stranger is detected, the screenshot is sent to the owner mailbox ", a single rule C" when the intrusion of the stranger is detected, the owner is notified by a short message ", a single rule D" when the intrusion of the stranger is detected, all the alarm devices are sounded ", and the like. The server can issue the rules such as the single rule A and the single rule D which do not need to occupy excessive system resources of the intelligent equipment to the intelligent equipment for local processing.
Step S232: and correspondingly sending the one or more target single rule as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control the execution equipment to execute the corresponding single execution action according to the single trigger condition in the target single rule.
In some embodiments, when the server acquires the one or more target single rule satisfying the specified condition, the server may correspondingly send the one or more target single rule to the intelligent device as the first indication information. Therefore, the intelligent device can store the target single rule and judge whether the single trigger condition of the target single rule is met according to the acquired information event. The first indication information is used for indicating the intelligent equipment to control the execution equipment to execute the corresponding single execution action according to the single trigger condition in the target single rule.
In some embodiments, when there are a plurality of target single rules, the triggering device and the executing device corresponding to each target single rule may be different, which may result in that there may be a plurality of intelligent devices processing the target single rules. The server can send the plurality of target single rules to the corresponding intelligent devices according to the calling condition and the processing efficiency of each intelligent device, and the corresponding intelligent devices process the corresponding target single rules.
According to the rule processing method provided by the embodiment of the application, the newly-built rule is obtained, whether the newly-built rule meets the rule issuing condition or not is judged, and when the rule issuing condition is met, the server can send the newly-built rule to the intelligent equipment as the first indication information. The first indication information is used for indicating the intelligent equipment to control the execution equipment to execute a new execution action according to a new trigger condition in a new rule. Therefore, the automation rules defined by the user are subjected to rule issuing judgment to determine whether the automation rules can be issued to the intelligent equipment locally for execution or not, so that network transmission is reduced, and the automation execution efficiency is improved. Meanwhile, the method also can support the execution of some automation rules or the processing of real-time information events under the condition of network disconnection.
Referring to fig. 6, fig. 6 is a flow chart illustrating a rule processing method according to another embodiment of the present application, where the method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 6, the rule processing method may specifically include the following steps:
step S310: an automation rule is obtained, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition.
In some embodiments, the automation rule may also be a rule that has been issued locally to the smart device by the server and that has been stored in the smart device, that is, the automation rule has been preferentially processed and executed by the smart device. The server judges whether to adjust the processing strategy of the automation rule or not by acquiring the automation rule, namely whether to upgrade the automation rule to the server for cloud processing or not.
In other embodiments, the automation rule may be a rule processed by a cloud of the server. As a mode, the rule may be a rule that after being issued to the smart device for local processing, the rule is upgraded to the server for cloud processing. The server judges whether to adjust the processing strategy of the automation rule or not by acquiring the automation rule, namely whether to issue the automation rule to the intelligent equipment for local processing or not.
Step S320: and acquiring the processing information of the intelligent equipment.
In this embodiment, the processing information of the smart device may be information capable of embodying the current processing capability of the smart device on the automation rule. For example, the current system resource occupancy rate of the smart device, the recent processing of the automation rules by the smart device, the automatic linkage speed, and so on.
In some embodiments, the server obtains the processing information of the intelligent device, where the server sends an inquiry request corresponding to the processing information to the intelligent device, so as to wait for the intelligent device to feed back the corresponding processing information; or the server may calculate the processing information of the intelligent device according to an automatic execution result reported by the intelligent device, which is not limited in this time. The server may obtain the processing information of the intelligent device periodically or in real time, which is not limited herein.
Step S330: and judging whether the automation rule meets a rule upgrading condition or not according to the processing information.
In this embodiment, after the server obtains the processing information of the intelligent device, it may determine whether the automation rule satisfies the rule upgrading condition according to the processing information, so as to determine whether the automation rule is processed by the server or locally by the intelligent device. The rule upgrading condition may be a condition that the intelligent device cannot efficiently, stably or real-time process the automation rule, for example, the processing efficiency of the intelligent device is lower than an efficiency threshold or the delay is higher than the efficiency threshold.
In some embodiments, when an automation rule has been executed by a smart device local priority process, if the automation rule is determined to satisfy a rule upgrade condition based on the processing information, the automation rule may be considered not to be currently processed locally at the smart device, and the automation rule may be upgraded to a server process. On the contrary, if the automation rule is judged not to meet the rule upgrading condition, the automation rule is still suitable for being locally processed in the intelligent equipment, and the intelligent equipment continues to locally and preferentially process the automation rule.
In some embodiments, when the automation rule is processed by the cloud of the server, if the automation rule is determined to satisfy the rule upgrading condition according to the processing information, the automation rule may be considered to be still suitable for cloud processing by the server, and the server may continue to process the automation rule. The automation rules may be upgraded to server processing. On the contrary, if the automation rule is judged not to meet the rule upgrading condition, the intelligent device can be considered to be capable of efficiently, stably or real-timely processing the automation rule, and the automation rule can be issued to the intelligent device for local processing.
It can be understood that, when the automation rule is issued to the intelligent device for local processing and then upgraded to the server for cloud processing, the server may further determine the automation rule according to the current processing information of the intelligent device to determine whether the automation rule currently satisfies the rule upgrading condition, and when the rule upgrading condition is not satisfied, the automation rule may be issued to the intelligent device again for local processing. Therefore, the automation rules are dynamically issued to the intelligent equipment for local processing or dynamically upgraded to the server for cloud processing through the actual processing condition of the intelligent equipment, and the real-time execution of the automation rules is guaranteed. Meanwhile, when the amount of detected information events is very large, the problems of large information processing difficulty, low real-time performance, poor stability and the like caused by a fixed processing mode can be solved by combining a local processing mode and a cloud processing mode.
Step S340: and when the rule upgrading condition is met, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
In the embodiment of the application, after the server determines whether the automation rule meets the rule upgrading condition, if the determination result that the automation rule meets the rule upgrading condition is obtained, the server may process the automation rule, that is, the server may control the execution device to execute the execution action in the automation rule according to the triggering condition in the automation rule. Meanwhile, the server can send second indication information to the intelligent device to indicate the intelligent device to stop controlling the execution device to execute the execution action in the automation rule according to the trigger condition in the automation rule. In other words, the smart device cannot process the automation rule locally, and needs to be upgraded to a server for cloud processing.
In some embodiments, when the automation rule is a rule that is executed by the smart device local priority processing, the automation rule is added to a rule list stored locally by the smart device. As a manner, when the intelligent device receives the second indication information, the intelligent device may delete the automation rule from the locally stored rule list, so that when the intelligent device obtains an information event satisfying the triggering condition in the automation rule, the intelligent device cannot process the information event because the automation rule cannot be found in the local rule list, that is, a processing method for defining the information event cannot be found, and then the intelligent device may upload the information event to the server, and the server searches the automation rule from the rule list stored in the cloud, and when the information event is found, may control the execution device to execute the execution action in the automation rule according to the automation rule, thereby implementing the automation linkage.
As another mode, when the intelligent device receives the second indication information, the intelligent device may also pull the automation rule into a blacklist, so that when the intelligent device acquires an information event that satisfies a trigger condition in the automation rule, the information event is not processed, but is directly uploaded to a server, and is processed by the server. Further, when the intelligent device can process the automation rule, the intelligent device can remove the automation rule from the blacklist. In some embodiments, the intelligent device pulls the automation rule into or removes the blacklist, which may be achieved by changing a state value corresponding to a designated flag bit. For example, if the state value corresponding to the designated flag bit is 1, the execution is allowed, and if the state value is 0, the execution is not allowed, and the intelligent device may be controlled to process the automation rule by changing the state value of the designated flag bit to 1 or 0.
In some embodiments, when the automation rule is a rule that is processed by the cloud of the server, if a determination result that the automation rule satisfies a rule upgrading condition is obtained, the server may not send the second indication information to the smart device.
In some embodiments, if a determination is made that the automation rule does not satisfy the rule upgrade condition, the server may not process the automation rule, and the server may issue the automation rule to the smart device for local processing. By one approach, when the automation rule is not in the rule list stored locally by the smart device, the server may send the automation rule to the smart device as an indication to cause the smart device to add (or re-add) the automation rule to the local rule list. Alternatively, when the automation rule is stored in the local rule list of the smart device but the automation rule is in a non-allowed processing state, the server may send an allow execution instruction to the smart device to cause the smart device to adjust the automation rule to an allowed processing state.
According to the rule processing method provided by the embodiment of the application, the automation rule and the processing information of the intelligent device are obtained, whether the automation rule meets the rule upgrading condition or not is judged according to the processing information, and when the rule upgrading condition is met, the server controls the execution device to execute the execution action in the automation rule according to the triggering condition in the automation rule and sends the second indication information to the intelligent device. And the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the trigger condition. Therefore, according to the actual processing condition of the intelligent equipment, the automation rule is dynamically issued to the intelligent equipment for local processing or dynamically upgraded to the server for cloud processing, and the execution real-time performance of the automation rule is guaranteed. Meanwhile, when the amount of detected information events is very large, the problems of large information processing difficulty, low real-time performance, poor stability and the like caused by a fixed processing mode can be solved by combining a local processing mode and a cloud processing mode.
Referring to fig. 7, fig. 7 is a flowchart illustrating a rule processing method according to another embodiment of the present application, where the method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 7, the rule processing method may specifically include the following steps:
step S410: the method comprises the steps of obtaining an automation rule stored in the intelligent device, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition.
In the embodiment of the present application, step S410 may refer to the related description of step S310, and is not described herein again.
Step S420: and obtaining execution feedback information of the intelligent device, wherein the execution feedback information is used for representing that the intelligent device controls the execution device to execute the execution action successfully or representing that the intelligent device controls the execution device to execute the execution action unsuccessfully.
In this embodiment of the application, the processing information of the intelligent device acquired by the server may be acquired feedback information of the intelligent device on the execution of the automation rule. The execution feedback information is used for representing that the intelligent device control execution device successfully executes the execution action in the automation rule or representing that the intelligent device control execution device fails to execute the execution action in the automation rule.
In some embodiments, the smart device controls the execution device to execute the execution action in the automation rule, and may be that the smart device sends an execution instruction to the execution device to cause the execution device to execute the execution action according to the execution instruction. For example, the intelligent gateway sends a light-on command to the intelligent switch, so that the intelligent switch performs a light-on action. Further, in some embodiments, after the intelligent device sends the execution instruction to the execution device, the intelligent device may receive feedback of success or failure of execution, and may report the execution feedback to the server for storage, so that the server may obtain the execution feedback information of the intelligent device on the automation rule.
Step S430: and judging whether the automation rule meets a rule upgrading condition or not according to the execution feedback information.
In the embodiment of the application, the server can judge whether the automation rule meets the rule upgrading condition according to the execution feedback information of the intelligent device on the automation rule. The automatic rule upgrading method can realize that the automatic rule which is not suitable for being processed in the intelligent equipment at present is upgraded to the server for processing according to the real-time processing condition of the intelligent equipment.
In some embodiments, the server may determine, according to the execution feedback information, an execution duration of the automation rule by the smart device, so as to determine whether the automation rule satisfies the rule upgrade condition according to the execution duration. Specifically, referring to fig. 8, step S430 may include:
step S431 a: and when the execution feedback information is designated feedback information, acquiring the execution duration of the execution action executed by the execution equipment controlled by the intelligent equipment, wherein the designated feedback information is used for representing that the execution action executed by the execution equipment controlled by the intelligent equipment is successful.
In some embodiments, when the intelligent device acquires the specified execution feedback information, the intelligent device may acquire an execution duration for the self-control execution device to execute the execution action in the automation rule, and then report the specified feedback information and the execution duration to the server, so that the server may acquire the specified feedback information and the execution duration. And the specified feedback information is used for representing that the intelligent equipment controls the execution equipment to successfully execute the execution action.
In some embodiments, the execution duration may be understood as a length of time consumed from the time the smart device sends the execution instruction to the execution device to the time the feedback is received. As one mode, the smart device may start a timer to start timing when sending the execution instruction to the execution device, stop timing until receiving the feedback, and then take the time counted by the timer as the execution duration.
Step S432 a: and judging whether the execution time length is greater than a first threshold value.
After the server obtains the execution duration, whether the execution duration is greater than a first threshold value or not can be judged, and whether the automation rule meets the rule upgrading condition or not is judged according to the judgment result.
The first threshold may be a critical value used for representing whether the execution duration corresponding to the execution of the automation rule by the intelligent device is qualified, may be set correspondingly according to a specific automation rule, or may be a unified standard, which is not limited herein. For example, the first threshold may be set to 10 ms. In some embodiments, the first threshold may also be a length of time that the intelligent device normally consumes to execute the automation rule.
Step S433 a: and when the automatic rule is larger than the first threshold value, judging that the automatic rule meets a rule upgrading condition.
In some embodiments, when the server obtains a determination result that the execution duration is greater than the first threshold, it may be considered that the automation linkage time corresponding to the automation rule of the intelligent device is too long, and the execution efficiency of the automation rule is too low, it may be considered that the intelligent device is not suitable for processing the automation rule locally, and the intelligent device may be upgraded to the server for cloud processing. That is, the server may determine that the automation rule satisfies the rule upgrade condition.
In some embodiments, when the server obtains a determination result that the execution duration is less than the first threshold, it may be considered that the intelligent device is capable of efficiently, stably, or real-time processing the automation rule, it may be considered that the intelligent device is still suitable for processing the automation rule locally, and the cloud processing may not be performed by upgrading to the server. That is, the server may determine that the automation rule does not satisfy the rule upgrade condition.
In other embodiments, the server may also determine, according to the execution feedback information, an execution success probability of the automation rule by the smart device, so as to determine whether the rule upgrade condition is satisfied according to the execution success probability. Specifically, referring to fig. 9, step S430 may also include:
step S431 b: and acquiring the ratio of the number of times of success of the intelligent equipment for controlling the execution equipment to execute the execution action to the total historical number of times according to the execution feedback information.
In some embodiments, the server may obtain, from an information base storing all execution feedback information, historical execution feedback information of the intelligent device on the automation rule, count the number of the historical execution feedback information as the historical total number of times, and then count the number of the specified feedback information as the success number. Then the server divides the success times and the historical total times to obtain the ratio of the success times to the historical total times. The ratio may be in the form of a numerical value or a percentage, and is not limited herein.
In some embodiments, the server may also obtain a ratio of recent successes to historical total. Specifically, the ratio of the number of successes of the execution device to the historical total number of executions of the action in the automation rule executed by the smart device control execution device in a specified time period before the current time may be obtained. The specified time period may be set correspondingly according to a specific automation rule, or may be a unified standard, which is not limited herein. For example, the specified period of time may be set to 3 hours.
Step S432 b: and judging whether the ratio is smaller than a second threshold value.
In some embodiments, after obtaining the ratio, the server may determine whether the ratio is smaller than a second threshold, so as to determine whether the automation rule meets a rule upgrading condition according to the determination result.
The second threshold may be a critical value used to characterize whether the corresponding execution success probability is qualified when the intelligent device executes the automation rule. The setting can be made manually. For example, the second threshold may be set to 80%.
Step S433 b: and when the value is smaller than a second threshold value, judging that the automation rule meets a rule upgrading condition.
In some embodiments, when the server obtains a determination result that the ratio is smaller than the second threshold, it may be considered that the success probability of the intelligent device implementing the automation rule is too low, it may be considered that the intelligent device is not suitable for processing the automation rule locally, and the server may be upgraded to perform cloud processing. That is, the server may determine that the automation rule satisfies the rule upgrade condition.
In some embodiments, when the server obtains the determination result that the ratio is greater than the second threshold, it may be considered that the intelligent device can stably process the automation rule in real time, it may be considered that the intelligent device is still suitable for processing the automation rule locally, and the server may not be upgraded to perform cloud processing. That is, the server may determine that the automation rule does not satisfy the rule upgrade condition.
Step S440: and when the rule upgrading condition is met, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
In the embodiment of the application, after the server determines whether the automation rule meets the rule upgrading condition according to the execution feedback information of the intelligent device on the automation rule, if the determination result that the automation rule meets the rule upgrading condition is obtained, the server can process the automation rule, that is, the server can control the execution device to execute the execution action in the automation rule according to the trigger condition in the automation rule. Meanwhile, the server can send second indication information to the intelligent device to indicate the intelligent device to stop controlling the execution device to execute the execution action in the automation rule according to the trigger condition in the automation rule. In other words, the smart device cannot process the automation rule locally, and needs to be upgraded to a server for cloud processing. On the contrary, if the judgment result that the automation rule does not meet the rule upgrading condition is obtained, the intelligent device is considered to be locally suitable for processing the automation rule at present, and the automation rule is not upgraded to a server for cloud processing. For details, reference may be made to the foregoing embodiments, which are not described herein again.
Further, in some embodiments, after the automation rule is updated to the server for processing for a period of time, it may be determined again whether the current rule may be issued to the smart device again for local processing. Specifically, referring to fig. 6 again, the rule processing method according to the embodiment of the present application may further include:
step S450: and judging whether the automation rule meets the rule upgrading condition or not according to the execution feedback information acquired again after a preset time period, wherein the intelligent equipment controls the execution equipment to execute the execution action again according to the triggering condition after the preset time period.
In some embodiments, after the automation rule is upgraded to the server to process the preset time period, if the intelligent device obtains an information event meeting the trigger condition of the automation rule, the intelligent device may attempt to send an execution instruction to the execution device, and then report the execution feedback information received this time to the server, so that the server may obtain the execution feedback information after the preset time period.
The server can judge whether the automatic rules upgraded to the server processing still meet the rule upgrading conditions according to the execution feedback information acquired again after the preset time period. If so, the intelligent device is considered to be locally unsuitable for processing the automation rule, and cloud processing is still performed by the server. Otherwise, if the automatic rule is not satisfied, the intelligent device can be considered to be locally suitable for processing the automatic rule, and the automatic rule can be issued to the intelligent device locally for processing again.
Step S460: and when the rule upgrading condition is not met, stopping controlling the execution equipment to execute the execution action according to the triggering condition, and sending third indication information to the intelligent equipment, wherein the third indication information is used for indicating the intelligent equipment to control the execution equipment to execute the execution action according to the triggering condition.
In some embodiments, when the server determines that the automation rule does not satisfy the rule upgrading condition according to the execution feedback information acquired again after the preset time period, the server may stop controlling the execution device to execute the execution action in the automation rule according to the trigger condition in the automation rule, that is, the server may not come out of the automation rule. Meanwhile, the server may send third indication information to the smart device to indicate the smart device to control the execution device to execute the execution action according to the trigger condition. In other words, the server may again issue the automation rules locally to the smart device for processing. Therefore, the processing condition of the intelligent equipment is detected in real time, and the automation rule is preferentially issued to the intelligent equipment to be executed locally as much as possible, so that network transmission is reduced, and the execution efficiency is also improved. Meanwhile, the realization of some automatic linkage or the processing of real-time information events can be supported under the condition of network disconnection.
According to the rule processing method provided by the embodiment of the application, the stored automation rule of the intelligent device is obtained, then the execution feedback information of the intelligent device on the automation rule is obtained, whether the automation rule meets the rule upgrading condition or not is judged according to the execution feedback information, and when the rule upgrading condition is met, the server can control the execution device to execute the execution action in the automation rule according to the triggering condition in the automation rule. Meanwhile, the server can send second indication information to the intelligent device to indicate the intelligent device to stop controlling the execution device to execute the execution action according to the trigger condition. Further, after the automation rule is upgraded to the server for processing for a period of time, the server can judge whether the current rule can be sent to the intelligent device again for local processing. Therefore, the processing condition of the intelligent equipment is detected in real time, and the automation rule is preferentially issued to the intelligent equipment to be executed locally as much as possible, so that network transmission is reduced, and the execution efficiency is also improved. Meanwhile, the realization of some automatic linkage or the processing of real-time information events can be supported under the condition of network disconnection.
Referring to fig. 10, fig. 10 is a flowchart illustrating a rule processing method according to another embodiment of the present application, where the method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 10, the rule processing method may specifically include the following steps:
step S510: an automation rule is obtained, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition.
In the embodiment of the present application, step S510 may refer to the description of step S310, and is not described herein again.
Step S520: and acquiring the current performance parameters of the intelligent equipment, wherein the performance parameters comprise at least one of CPU parameters and memory parameters.
In this embodiment of the application, the processing information of the intelligent device obtained by the server may be obtained by obtaining a current performance parameter of the intelligent device, so as to determine a current system resource utilization condition of the intelligent device. The performance parameter may include at least one of a current CPU parameter and a memory parameter of the smart device.
It can be understood that when the rule list in which the automation rule is locally stored in the intelligent device is large, the locally acquired information events are many, or the intelligent device is busy, the current system resource utilization rate of the intelligent device is high, so that the efficiency of locally processing the automation rule by the intelligent device is low or the delay is large. In order to ensure the real-time property of information event processing and the real-time property of automation linkage, part of automation rules stored locally can be upgraded to a server for processing. Conversely, when the current system resource utilization rate of the intelligent device is low, the server can also send a part of automation rules to the intelligent device for local processing. Therefore, the server can obtain the current performance parameters of the intelligent equipment first to judge whether to upgrade the automation rules according to the performance parameters.
Step S530: and judging whether the performance parameter is larger than a parameter threshold value.
The parameter threshold may be a minimum requirement that the performance parameter of the smart device needs to meet when the smart device is capable of executing the automation rule efficiently, stably, and in real time, and is set according to a type of the corresponding performance parameter. The setting may be performed manually, for example, when the performance parameter is a CPU occupancy type, the parameter threshold may be set to 80%.
Step S540: and when the parameter is larger than the parameter threshold value, judging that the automation rule meets a rule upgrading condition.
In some embodiments, when the server obtains a determination result that the current performance parameter of the smart device is greater than the parameter threshold, it may be considered that the current system resource utilization rate of the smart device is high, and the efficiency of the smart device for processing the automation rule may be low or the delay may be large. Therefore, the smart device is not currently suitable for processing too many automation rules, and the automation rules can be upgraded to the server for cloud processing. That is, the server may determine that the automation rule satisfies the rule upgrade condition.
In some embodiments, when the server obtains a determination result that the current performance parameter of the intelligent device is smaller than the parameter threshold, it may be considered that the current system resource utilization rate of the intelligent device is low, and the intelligent device can efficiently, stably, or in real time process the automation rule. Thus, the smart device is currently adapted to process the automation rule locally, which may not be cloud processed by the server. That is, the server may determine that the automation rule does not satisfy the rule upgrade condition.
Step S550: and when the automation rule meets the rule upgrading condition, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
In the embodiment of the present application, step S550 can refer to the description of the foregoing embodiment, and is not described herein again.
In some embodiments, the server may also select a plurality of target automation rules from the automation rules stored in the smart device to upgrade to the server for processing, so as to reduce resource utilization of the smart device. As one way, the target automation rule may be selected according to a complexity level in the automation rules stored in the smart device, for example, an automation rule with a higher complexity rank is selected as the target automation rule.
According to the rule processing method provided by the embodiment of the application, the automatic rule and the current performance parameters of the intelligent device are obtained, whether the automatic rule meets the rule upgrading condition or not is judged according to the processing information, and when the rule upgrading condition is met, the server controls the execution device to execute the execution action in the automatic rule according to the triggering condition in the automatic rule and sends the second indication information to the intelligent device. And the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the trigger condition. Therefore, according to the actual processing condition of the intelligent equipment, the automation rule is dynamically issued to the intelligent equipment for local processing or dynamically upgraded to the server for cloud processing, and the execution real-time performance of the automation rule is guaranteed. Meanwhile, when the amount of detected information events is very large, the problems of large information processing difficulty, low real-time performance, poor stability and the like caused by a fixed processing mode can be solved by combining a local processing mode and a cloud processing mode.
Referring to fig. 11, fig. 11 is a flowchart illustrating a rule processing method according to yet another embodiment of the present application, where the method is applicable to the server. As will be described in detail with respect to the flow shown in fig. 11, the rule processing method may specifically include the following steps:
step S610: an automation rule is obtained, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition.
In the embodiment of the present application, step S610 may refer to the description of step S610, which is not described herein again.
Step S620: and acquiring a time period of historical statistics, wherein the performance parameter of the intelligent equipment is greater than a parameter threshold value.
In this embodiment of the application, the processing information of the intelligent device obtained by the server may be a time period during which the performance parameter of the intelligent device, which is obtained through historical statistics, is greater than a parameter threshold, so as to determine a period when the system resource utilization rate of the intelligent device is high, that is, a busy period of the intelligent device. The performance parameters and the parameter threshold may refer to the description of the foregoing embodiments, and are not described herein again.
In some embodiments, the server may obtain the performance parameter of the smart device in real time, so as to determine the time period in which the performance parameter is greater than the parameter threshold according to the historical fluctuation rule of the performance parameter. So that busy periods of the smart device can be determined.
Step S630: and judging whether the current time is in the time period.
After the server acquires the time period, whether the current time is in the time period can be judged so as to determine whether the current busy period of the intelligent device is reached.
Step S640: and when the time period is within the time period, judging that the automation rule meets a rule upgrading condition.
When the server obtains the judgment result that the current time is in the time period, the current system resource utilization rate of the intelligent device is considered to be high, and the efficiency of the intelligent device for processing the automation rule at present may be low or the delay may be large. Therefore, the smart device is not currently suitable for processing too many automation rules, and the automation rules can be upgraded to the server for cloud processing. That is, the server may determine that the automation rule satisfies the rule upgrade condition.
When the server obtains the judgment result that the current time is not in the time period, the current system resource utilization rate of the intelligent device can be considered to be low, and the intelligent device can efficiently, stably or in real time process the automation rule. Thus, the smart device is currently adapted to process the automation rule locally, which may not be cloud processed by the server. That is, the server may determine that the automation rule does not satisfy the rule upgrade condition.
Step S650: and when the automation rule meets the rule upgrading condition, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
In the embodiment of the present application, step S650 may refer to the description of the foregoing embodiment, and is not described herein again.
According to the rule processing method provided by the embodiment of the application, whether the current time is in the time period is judged by acquiring the automation rule and acquiring the time period of the historical statistics that the performance parameter of the intelligent device is larger than the parameter threshold, when the current time is in the time period, the automation rule is judged to meet the rule upgrading condition, the server can control the execution device to execute the execution action in the automation rule according to the triggering condition in the automation rule, and second indication information is sent to the intelligent device. And the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the trigger condition. Therefore, whether the current time is in the historical busy period of the intelligent equipment or not is judged, the automation rule is determined to be dynamically issued to the intelligent equipment for local processing or dynamically upgraded to a server for cloud processing, and the execution real-time performance of the automation rule is guaranteed. Meanwhile, when the detected information event quantity of the intelligent device is very large, the intelligent device can process the information event quantity by means of the strong processing capacity of the cloud.
Referring to fig. 12, fig. 12 is a block diagram illustrating a rule processing apparatus 700 according to the present application, which may include: a rule obtaining module 710, a condition judging module 720 and a rule processing module 730. The rule obtaining module 710 is configured to obtain an automation rule, where the automation rule includes a trigger condition and an execution action in response to the trigger condition; the condition judgment module 720 is configured to judge whether the automation rule meets a preset condition; the rule processing module 730 is configured to send indication information to the intelligent device when the preset condition is met, where the indication information is used to indicate whether the intelligent device controls an execution device to execute the execution action according to the trigger condition.
In some embodiments, the rule obtaining module 710 may be specifically configured to: and acquiring a new rule, wherein the new rule comprises a new trigger condition and a new execution action. The rule processing module 730 may be specifically configured to: and when a rule issuing condition is met, sending the newly-built rule serving as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control execution equipment to execute the newly-built execution action according to the newly-built triggering condition.
In some embodiments, the rule issuing condition may include one or more of the following conditions: the newly-built rule is a composite rule formed by a plurality of single rules; the time parameter required in the process of detecting whether the new trigger condition is met is smaller than a time threshold value; in the process of detecting whether the newly-built trigger condition is met, the required performance parameter is smaller than a performance threshold value, wherein the performance parameter comprises at least one of a Central Processing Unit (CPU) parameter and a memory parameter; the triggering device corresponding to the newly-established triggering condition and the executing device corresponding to the newly-established executing action are both the intelligent device; the triggering device corresponding to the newly-established triggering condition and the executing device corresponding to the newly-established executing action are in communication connection with the intelligent device; and the network bandwidth parameter required by the newly-built execution action is smaller than a bandwidth threshold value.
In some embodiments, the rule issuing condition is that the newly created rule is a composite rule formed by a plurality of single rules, and the rule processing module 730 may be specifically configured to: when the newly-built rule is a composite rule formed by a plurality of single rules, acquiring one or more target single rules which meet specified conditions in the plurality of single rules, wherein the single rules comprise single triggering conditions and single execution actions; and correspondingly sending the one or more target single rule as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control the execution equipment to execute the corresponding single execution action according to the single trigger condition in the target single rule.
In some embodiments, the intelligent device stores the automation rule, and the condition determining module 720 may include: an information acquisition unit and an information judgment unit. The information acquisition unit is used for acquiring processing information of the intelligent equipment; and the information judgment unit is used for judging whether the automation rule meets the rule upgrading condition or not according to the processing information. The rule processing module 730 may be specifically configured to: and when the rule upgrading condition is met, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
In some embodiments, the information obtaining unit may be specifically configured to: and obtaining execution feedback information of the intelligent device, wherein the execution feedback information is used for representing that the intelligent device controls the execution device to execute the execution action successfully or representing that the intelligent device controls the execution device to execute the execution action unsuccessfully.
In some embodiments, the processing information is the execution feedback information, and the information determining unit may be specifically configured to: when the execution feedback information is designated feedback information, acquiring execution duration for the intelligent device to control the execution device to execute the execution action, wherein the designated feedback information is used for representing that the intelligent device controls the execution device to execute the execution action successfully; judging whether the execution duration is greater than a first threshold value; and when the automatic rule is larger than the first threshold value, judging that the automatic rule meets a rule upgrading condition.
In other embodiments, the processing information is the execution feedback information, and the information determining unit may be further specifically configured to: acquiring the ratio of the number of times of success of the intelligent equipment for controlling the execution equipment to execute the execution action to the total number of times of history according to the execution feedback information acquired by history; judging whether the ratio is smaller than a second threshold value; and when the value is smaller than a second threshold value, judging that the automation rule meets a rule upgrading condition.
In some embodiments, the rule processing apparatus 700 may further include: a judgment updating module and a rule processing updating module. The judgment and update module is used for judging whether the automation rule meets a rule upgrading condition according to execution feedback information acquired again after a preset time period, wherein the intelligent device controls the execution device to execute the execution action again according to the triggering condition after the preset time period; and the rule processing updating module is used for stopping controlling the execution equipment to execute the execution action according to the trigger condition when the rule upgrading condition is not met, and sending third indication information to the intelligent equipment, wherein the third indication information is used for indicating the intelligent equipment to control the execution equipment to execute the execution action according to the trigger condition.
In other embodiments, the information obtaining unit may also be specifically configured to: and acquiring the current performance parameters of the intelligent equipment, wherein the performance parameters comprise at least one of CPU parameters and memory parameters. The information determination unit may be specifically configured to: judging whether the performance parameter is larger than a parameter threshold value; and when the parameter is larger than the parameter threshold value, judging that the automation rule meets a rule upgrading condition.
In still other embodiments, the information obtaining unit may be further specifically configured to: and acquiring a time period of historical statistics, wherein the performance parameter of the intelligent equipment is greater than a parameter threshold value. The information determination unit may be specifically configured to: judging whether the current time is in the time period; and when the time period is within the time period, judging that the automation rule meets a rule upgrading condition.
It can be clearly understood by those skilled in the art that the rule processing device provided in the embodiment of the present application can implement each process in any method embodiment of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11, and for convenience and simplicity of description, the specific working processes of the above-described device, module, and unit may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
To sum up, an embodiment of the present application provides a rule processing apparatus, which includes: the device comprises a rule acquisition module, a condition judgment module and a rule processing module. The system comprises a rule acquisition module, a rule execution module and a rule execution module, wherein the rule acquisition module is used for acquiring an automation rule, and the automation rule comprises a trigger condition and an execution action responding to the trigger condition; the condition judgment module is used for judging whether the automation rule meets a preset condition or not; and the rule processing module is used for sending indication information to the intelligent equipment when the preset condition is met, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition. According to the method and the device, whether the automation rule meets the preset condition or not is judged, whether the intelligent device can preferentially execute the execution action or not is determined, the execution device is controlled to execute the execution action according to the trigger condition, the data processing pressure of the server is reduced, and the data processing efficiency is improved.
An embodiment of the present application provides a processing system, where a server includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement a rule processing method as provided in the above method embodiment, such as any one of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11. In this embodiment, the server may be a mobile phone, a notebook computer, an intelligent wearable device, an intelligent television, an intelligent sound box, a vehicle-mounted terminal, a gateway, and other terminal devices capable of running an application program. The server may be a local server, a cloud server, or the like.
Referring to fig. 13, fig. 13 is a block diagram illustrating a system architecture of a processing system according to an embodiment of the present application. The processing system comprises intelligent equipment and an intelligent home software platform. The intelligent equipment is connected with the intelligent home software platform through WIFI.
The intelligent equipment can be equipment devices in an intelligent home, and the equipment devices can continuously work, are connected with the intelligent home software platform through WIFI and have a local storage function. In one example, the smart device may store the rule list locally. The method can not only report the real-time stream events without interruption (or replace the reporting of other sub-devices connected together through a local area network communication protocol), but also receive and execute the issued control commands of the intelligent home software platform. The real-time stream event is an information event which is reported uninterruptedly and has a time attribute and certain continuity and real-time performance, and can be also called as a real-time event stream.
The intelligent home software platform can comprise a real-time event receiving module, a control command issuing module, a rule engine, a Web UI and a real-time stream processing engine. Wherein:
and the real-time event receiving module is used for receiving the real-time event stream reported by the intelligent equipment and sending the real-time event stream to the real-time stream processing engine module in real time.
The control command issuing module is used for issuing a control command (such as actions of adjusting the brightness of light, restarting or closing the equipment and the like) to the household equipment and issuing an automation rule (or an automation rule list) to the intelligent equipment.
And the rule engine is used for defining automation rules, storing a rule list and judging the rules (if the temperature is more than 26 ℃, executing the action of turning on the air conditioner). The automation rules include trigger conditions and execution actions. The rule list comprises a rule list of the software platform and a rule list issued to the intelligent device locally. In one example, the rules engine can mark the automation rules to determine whether to execute locally on the smart device or on the smart home software platform.
The Web UI is a management Web interface of the intelligent home software platform and is used for editing and issuing management of the automation rules by the user on the interface.
The real-time stream processing engine is data processing software and is used for receiving the event stream reported by the intelligent equipment from the real-time event receiving module in real time, acquiring a rule list from the rule engine and executing subsequent execution action processing. For example, third party pushing is performed or the command issuing module controls other equipment to be linked.
In addition, the smart home software platform may also provide richer rules to enrich the automation scenario, for example, the trigger condition may be detection of a local weather condition (e.g., sunrise, rainstorm, etc.), and the execution action may be sending of a microblog, a WeChat, etc.
It should be noted that, when the server is used as a smart home software platform in the processing system, the rule processing method provided in the foregoing method embodiment, for example, any one of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11, may be executed and implemented, so as to improve the real-time performance and throughput of the processing system.
The processing system provided by the embodiment of the application can preferentially perform localized processing on the intelligent device for the real-time event stream reported by the intelligent device, perform complex or cross-complex linkage event stream processing by means of the powerful real-time stream processing engine at the cloud, and perform richer third-party linkage (such as third-party pushing or storing audio and video to a remote server). Therefore, the real-time stream event can be processed more efficiently, stably and in real time, and the intelligent home system can operate on an automatic scene to form an efficient closed loop. In addition, by means of a strong real-time stream data processing engine of the intelligent home software platform, stronger triggering conditions and execution actions can be supported, and the automation diversity of the intelligent home scene is increased.
An embodiment of the present application provides a server, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the rule processing method as provided in the above method embodiment, such as any one of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11. In this embodiment, the server may be a mobile phone, a notebook computer, an intelligent wearable device, an intelligent television, an intelligent sound box, a vehicle-mounted terminal, a gateway, and other terminal devices capable of running an application program. The server may be a local server, a cloud server, or the like.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
Fig. 14 is a block diagram of a hardware structure of a server 1200 according to an embodiment of the present application. Specifically, the server may execute and implement the rule processing method as provided in the above method embodiment as a server in a wireless network system, where the server may be an image capture device, a gateway, a server, or other server capable of running an application program, and the rule processing method is as shown in any one of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11.
As shown in fig. 14, the server 1200 may have a large difference due to different configurations or performances, and may include one or more processors 1210 (the processors 1210 may include but are not limited to processing devices such as a microprocessor MCU or a programmable logic device FPGA), a memory 1230 for storing data, and one or more storage media 1220 (such as one or more mass storage devices) for storing application programs 1223 or data 1222. Memory 1230 and storage media 1220, among other things, may be transient storage or persistent storage. The program stored in the storage medium 1220 may include one or more modules, each of which may include a series of instruction operations for the server 1200. Further, the processor 1210 may be configured to communicate with the storage medium 1220 to execute a series of instruction operations in the storage medium 1220 on the server 1200. The server 1200 may also include one or more power supplies 1260, one or more wired or wireless network interfaces 1250, one or more input-output interfaces 1240, and/or one or more operating systems 1221, such as Windows Server, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
It should be noted that the power supply 1260 may include a separate power supply module to supply power to the server 1200, or may be used to connect an external power supply to supply power to the server 1200.
The input/output interface 1240 may be used to receive or transmit data via a network. The specific example of the network described above may include a wireless network provided by a communication provider of the server 1200. In one example, the input/output interface 1240 includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the internet. In one example, the input/output interface 1240 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 14 is only an illustration, and is not intended to limit the structure of the server. For example, server 1200 may also include more or fewer components than shown in FIG. 14, or have a different configuration than shown in FIG. 14.
To sum up, the server provided in the embodiments of the present application performs the following steps: the method comprises the steps of receiving voice data, carrying out voice analysis on the voice data to obtain first text content, replacing at least part of target words in the first text content with template words meeting set conditions to obtain second text content so as to obtain a control instruction corresponding to the second text content, and executing preset operation according to the control instruction when a confirmation instruction of the control instruction is obtained. The comprehensiveness of control instruction matching is improved, and the generalization capability and the user experience of the voice interaction device in the home system are improved.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the processes of the foregoing rule processing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium includes, for example, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 15 is a block diagram of a computer-readable storage medium 800 according to an embodiment of the present disclosure. The computer readable storage medium 800 stores a program code, which can be called by a processor to execute the rule processing method provided by the above method embodiment, such as any one of the rule processing methods of fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, fig. 8, fig. 9, fig. 10, and fig. 11. The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. A rule processing method is applied to a server in a home system, and comprises the following steps:
acquiring an automation rule, wherein the automation rule comprises a trigger condition and an execution action responding to the trigger condition;
judging whether the automation rule meets a preset condition or not;
and when the preset condition is met, sending indication information to the intelligent equipment, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition.
2. The method of claim 1, wherein the obtaining automation rules comprises:
acquiring a new rule, wherein the new rule comprises a new trigger condition and a new execution action;
when meeting the preset condition, sending indication information to the intelligent device, including:
and when a rule issuing condition is met, sending the newly-built rule serving as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control execution equipment to execute the newly-built execution action according to the newly-built triggering condition.
3. The method of claim 2, wherein the rule issuing condition comprises one or more of the following conditions:
the newly-built rule is a composite rule formed by a plurality of single rules;
the time parameter required in the process of detecting whether the new trigger condition is met is smaller than a time threshold value;
in the process of detecting whether the newly-built trigger condition is met, the required performance parameter is smaller than a performance threshold value, wherein the performance parameter comprises at least one of a Central Processing Unit (CPU) parameter and a memory parameter;
the triggering device corresponding to the newly-established triggering condition and the executing device corresponding to the newly-established executing action are both the intelligent device;
the triggering device corresponding to the newly-established triggering condition and the executing device corresponding to the newly-established executing action are in communication connection with the intelligent device;
and the network bandwidth parameter required by the newly-built execution action is smaller than a bandwidth threshold value.
4. The method according to claim 3, wherein the rule issuing condition is that the newly created rule is a composite rule composed of a plurality of single rules, and when the rule issuing condition is satisfied, the newly created rule is sent to the smart device as first indication information, including:
when the newly-built rule is a composite rule formed by a plurality of single rules, acquiring one or more target single rules which meet specified conditions in the plurality of single rules, wherein the single rules comprise single triggering conditions and single execution actions;
and correspondingly sending the one or more target single rule as first indication information to the intelligent equipment, wherein the first indication information is used for indicating the intelligent equipment to control the execution equipment to execute the corresponding single execution action according to the single trigger condition in the target single rule.
5. The method of claim 1, wherein the smart device stores the automation rule, and the determining whether the automation rule satisfies a preset condition comprises:
acquiring processing information of the intelligent equipment;
judging whether the automation rule meets a rule upgrading condition or not according to the processing information;
when meeting the preset condition, sending indication information to the intelligent device, including:
and when the rule upgrading condition is met, controlling the execution equipment to execute the execution action according to the triggering condition, and sending second indication information to the intelligent equipment, wherein the second indication information is used for indicating the intelligent equipment to stop controlling the execution equipment to execute the execution action according to the triggering condition.
6. The method of claim 5, wherein the obtaining the processing information of the smart device comprises:
and obtaining execution feedback information of the intelligent device, wherein the execution feedback information is used for representing that the intelligent device controls the execution device to execute the execution action successfully or representing that the intelligent device controls the execution device to execute the execution action unsuccessfully.
7. The method of claim 6, wherein the processing information is the execution feedback information, and wherein determining whether the automation rule satisfies a rule upgrade condition according to the processing information comprises:
when the execution feedback information is designated feedback information, acquiring execution duration for the intelligent device to control the execution device to execute the execution action, wherein the designated feedback information is used for representing that the intelligent device controls the execution device to execute the execution action successfully;
judging whether the execution duration is greater than a first threshold value;
and when the automatic rule is larger than the first threshold value, judging that the automatic rule meets a rule upgrading condition.
8. The method of claim 6, wherein the processing information is the execution feedback information, and wherein determining whether the automation rule satisfies a rule upgrade condition according to the processing information comprises:
according to the execution feedback information, acquiring the ratio of the number of times of success of the intelligent equipment for controlling the execution equipment to execute the execution action to the total historical number of times;
judging whether the ratio is smaller than a second threshold value;
and when the value is smaller than a second threshold value, judging that the automation rule meets a rule upgrading condition.
9. The method according to any one of claims 6-8, wherein after the controlling the executing device to execute the executing action according to the trigger condition and sending a second indication message to the smart device, the method further comprises:
judging whether the automation rule meets the rule upgrading condition or not according to the execution feedback information acquired again after a preset time period, wherein the intelligent equipment controls the execution equipment to execute the execution action again according to the triggering condition after the preset time period;
and when the rule upgrading condition is not met, stopping controlling the execution equipment to execute the execution action according to the triggering condition, and sending third indication information to the intelligent equipment, wherein the third indication information is used for indicating the intelligent equipment to control the execution equipment to execute the execution action according to the triggering condition.
10. The method of claim 5, wherein the obtaining the processing information of the smart device comprises:
acquiring current performance parameters of the intelligent equipment, wherein the performance parameters comprise at least one of CPU parameters and memory parameters;
the judging whether the automation rule meets a rule upgrading condition or not according to the processing information comprises the following steps:
judging whether the performance parameter is larger than a parameter threshold value;
and when the parameter is larger than the parameter threshold value, judging that the automation rule meets a rule upgrading condition.
11. The method of claim 5, wherein the obtaining the processing information of the smart device comprises:
acquiring a time period of historical statistics that the performance parameter of the intelligent equipment is greater than a parameter threshold;
the judging whether the automation rule meets a rule upgrading condition or not according to the processing information comprises the following steps:
judging whether the current time is in the time period;
and when the time period is within the time period, judging that the automation rule meets a rule upgrading condition.
12. A rule processing device, applied to a server in a home system, the device comprising:
the system comprises a rule acquisition module, a rule selection module and a rule execution module, wherein the rule acquisition module is used for acquiring an automation rule, and the automation rule comprises a trigger condition and an execution action responding to the trigger condition;
the condition judgment module is used for judging whether the automation rule meets a preset condition or not;
and the rule processing module is used for sending indication information to the intelligent equipment when the preset condition is met, wherein the indication information is used for indicating whether the intelligent equipment controls the execution equipment to execute the execution action according to the trigger condition.
13. A server, characterized by comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the rule processing method according to any one of claims 1 to 11.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the rule processing method according to any one of claims 1 to 11.
CN202010099714.8A 2020-02-18 2020-02-18 Rule processing method and device, server and storage medium Active CN113347068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010099714.8A CN113347068B (en) 2020-02-18 2020-02-18 Rule processing method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010099714.8A CN113347068B (en) 2020-02-18 2020-02-18 Rule processing method and device, server and storage medium

Publications (2)

Publication Number Publication Date
CN113347068A true CN113347068A (en) 2021-09-03
CN113347068B CN113347068B (en) 2022-08-19

Family

ID=77467040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010099714.8A Active CN113347068B (en) 2020-02-18 2020-02-18 Rule processing method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113347068B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115069A (en) * 2021-12-06 2022-03-01 深圳市海曼科技股份有限公司 Cloud local combination linkage method and system
CN116931446A (en) * 2023-09-15 2023-10-24 北京小米移动软件有限公司 Household equipment control method and device, electronic equipment and storage medium
WO2024087995A1 (en) * 2022-10-26 2024-05-02 京东方科技集团股份有限公司 Internet-of-things device linkage method and system, electronic device and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487394A (en) * 2015-11-30 2016-04-13 青岛海尔智能家电科技有限公司 Intelligent household appliance control method and device and gateway
CN105577493A (en) * 2016-01-04 2016-05-11 青岛海信电器股份有限公司 Control method and device of smart home devices and system
US20160170390A1 (en) * 2014-12-16 2016-06-16 Samsung Electronics Co., Ltd. Method and apparatus for controlling device using a service rule
CN108445788A (en) * 2018-03-20 2018-08-24 山东比特智能科技股份有限公司 A kind of hotel's scenery control method and relevant apparatus
CN108572554A (en) * 2017-03-07 2018-09-25 中移(杭州)信息技术有限公司 A kind of intelligent home control system, method and relevant device
CN109445848A (en) * 2018-11-07 2019-03-08 深圳市云威物联科技有限公司 Equipment linkage method and device
CN109752960A (en) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 A kind of smart home inter-linked controlling method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160170390A1 (en) * 2014-12-16 2016-06-16 Samsung Electronics Co., Ltd. Method and apparatus for controlling device using a service rule
CN105487394A (en) * 2015-11-30 2016-04-13 青岛海尔智能家电科技有限公司 Intelligent household appliance control method and device and gateway
CN105577493A (en) * 2016-01-04 2016-05-11 青岛海信电器股份有限公司 Control method and device of smart home devices and system
CN108572554A (en) * 2017-03-07 2018-09-25 中移(杭州)信息技术有限公司 A kind of intelligent home control system, method and relevant device
CN109752960A (en) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 A kind of smart home inter-linked controlling method and device
CN108445788A (en) * 2018-03-20 2018-08-24 山东比特智能科技股份有限公司 A kind of hotel's scenery control method and relevant apparatus
CN109445848A (en) * 2018-11-07 2019-03-08 深圳市云威物联科技有限公司 Equipment linkage method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴志勇等: "基于语义推理的智能家居系统研究", 《电视技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115069A (en) * 2021-12-06 2022-03-01 深圳市海曼科技股份有限公司 Cloud local combination linkage method and system
WO2024087995A1 (en) * 2022-10-26 2024-05-02 京东方科技集团股份有限公司 Internet-of-things device linkage method and system, electronic device and readable storage medium
CN116931446A (en) * 2023-09-15 2023-10-24 北京小米移动软件有限公司 Household equipment control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113347068B (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN113347068B (en) Rule processing method and device, server and storage medium
CN110262261B (en) Method for controlling equipment service, cloud server and intelligent home system
US10334304B2 (en) Set top box automation
US9930519B2 (en) Method and apparatus for controlling home devices on group basis based upon history of the home devices
US11782590B2 (en) Scene-operation method, electronic device, and non-transitory computer readable medium
EP3072257B1 (en) Method and apparatus for controlling home devices on group basis in a home network system
CN109725540B (en) Equipment control method and device, electronic equipment and storage medium
WO2017020520A1 (en) Customizable control method and system for smart home appliance
CN111025925A (en) Intelligent home furnishing system based on cloud computing
CN107533094B (en) Method and system for optimizing execution of user commands related to power management
CN111641540A (en) Intelligent household control panel, setting method thereof, server and storage medium
CN104767866B (en) The automatic method and mobile terminal for replacing wallpaper for mobile terminal
CN1825233A (en) Method for transmitting monitoring and controlling apparatus by instant message
JP2015163920A (en) Voice system
WO2016070823A1 (en) Instruction processing method and device
US11196827B2 (en) Data management for connected devices
CN110677899A (en) Data transmission method and device, terminal equipment and storage medium
JP2007282111A (en) Mobile terminal device and server device used for safety confirmation system
US20200389528A1 (en) Service-oriented internet of things platform and control method therefor
US10673688B2 (en) Group association fallback for improved network resilience
CN110324217B (en) Equipment triggering control method and device, electronic equipment and storage medium
CN113412468A (en) SDK plug-in loading method and device, mobile terminal and storage medium
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN108931923B (en) Device control method and apparatus, storage medium, and electronic apparatus
CN112995264B (en) Method, device and storage medium for preventing data from being deleted by mistake

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant