CN115857376A - Method and device for supporting programmable scene linkage, electronic equipment and storage medium - Google Patents

Method and device for supporting programmable scene linkage, electronic equipment and storage medium Download PDF

Info

Publication number
CN115857376A
CN115857376A CN202310174572.0A CN202310174572A CN115857376A CN 115857376 A CN115857376 A CN 115857376A CN 202310174572 A CN202310174572 A CN 202310174572A CN 115857376 A CN115857376 A CN 115857376A
Authority
CN
China
Prior art keywords
event
linkage
equipment
scene
expression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310174572.0A
Other languages
Chinese (zh)
Inventor
张国梁
董亚龙
吴建添
黄词辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Jinpeng Technology Co ltd
Original Assignee
Guangdong Jinpeng 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 Guangdong Jinpeng Technology Co ltd filed Critical Guangdong Jinpeng Technology Co ltd
Priority to CN202310174572.0A priority Critical patent/CN115857376A/en
Publication of CN115857376A publication Critical patent/CN115857376A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

The invention relates to the technical field of computers, and provides a method and a device for supporting programmable scene linkage, electronic equipment and a storage medium, wherein the method comprises the following steps: determining linkage equipment and equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment; constructing a first conditional event based on a first preset control expression, linkage equipment, equipment attributes, attribute triggering conditions and time triggering conditions; determining an event to be executed; nesting is carried out based on a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out based on the first scene linkage event. The invention uses the preset control expression to carry out linkage programming on the equipment attribute, the attribute triggering condition, the time triggering condition and the event to be executed, so that more complex scenes can be supported, richer scene equipment linkage of users is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.

Description

Method and device for supporting programmable scene linkage, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for supporting programmable scene linkage, electronic equipment and a storage medium.
Background
The trigger linkage rule in the prior art is mainly used for carrying out simple logical operation judgment on single equipment attribute parameters and numerical values by using comparison operators.
However, the conditions of a rule are yes/or relations, and only simple scene equipment linkage triggering the rule condition can be supported.
Therefore, the trigger linkage rules of the prior art cannot support users to realize more complex linkage trigger conditions and trigger scenarios in a programmable manner.
Disclosure of Invention
The invention provides a linkage method and device supporting programmable scenes, electronic equipment and a storage medium, and aims to realize more complex linkage triggering conditions and triggering scenes in a programmable mode.
In a first aspect, the present invention provides a method for supporting programmable scene linkage, including:
determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute trigger condition and the time trigger condition;
determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
nesting is carried out on the basis of a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out on the basis of the first scene linkage event.
In one embodiment, the first preset control expression includes an attribute expression, a time expression, and a conditional expression.
Constructing a first conditional event based on the first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition, wherein the first conditional event comprises:
constructing a first attribute description event based on the attribute expression, the linkage equipment, the equipment attribute and the attribute triggering condition;
constructing a time description event based on the time expression and the time trigger condition;
and constructing the first conditional event based on the conditional expression, the first attribute description event and the time description event.
The second preset control expression comprises a selection expression and an execution expression.
Nesting is carried out on the basis of a second preset control expression, the first conditional event and the event to be executed, and a first scene linkage event is constructed, and the method comprises the following steps:
determining a first device based on the selection expression and the first conditional event;
performing linkage programming on the basis of the execution expression, the event to be executed and the first equipment to obtain a first equipment execution event;
updating the first conditional event based on the first device execution event to obtain a second conditional event;
determining a second device based on the second conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the second equipment to obtain a second equipment execution event;
nesting the first device execution event and the second device execution event to obtain the first scene linkage event.
After the scene linkage is performed based on the first scene linkage event, the method further includes:
receiving the attribute of the equipment to be updated reported by the message queue, and updating the first conditional event based on the attribute of the equipment to be updated to obtain a third conditional event;
determining a third device based on the third conditional event and the selection expression;
performing linkage programming based on the execution expression, the event to be executed and the third equipment to obtain a third equipment execution event;
updating the third conditional event based on the third device execution event to obtain a fourth conditional event;
determining a fourth device based on the fourth condition event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the fourth equipment to obtain a fourth equipment execution event;
and performing linkage programming on the third equipment execution event and the fourth equipment execution event to obtain a second scene linkage event, and performing scene linkage based on the second scene linkage event.
The method for supporting programmable scene linkage further comprises the following steps:
and constructing a third scene linkage event based on a cyclic expression and the first scene linkage event or the second scene linkage event, and performing scene linkage based on the third scene linkage event.
In a second aspect, the present invention provides a device for supporting a programmable scene linkage, comprising:
the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining linkage equipment and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
the construction module is used for constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
the second determining module is used for determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
the nested linkage module is used for nesting based on a second preset control expression, the first condition event and the event to be executed, constructing a first scene linkage event, and performing scene linkage based on the first scene linkage event.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the programmable scene linkage method is implemented.
In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium comprising a computer program which, when executed by the processor, implements the method of supporting programmable scene linking of the first aspect.
In a fifth aspect, the present invention further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by the processor, the method for supporting programmable scene linkage according to the first aspect is implemented.
The invention provides a method and a device for supporting programmable scene linkage, electronic equipment and a storage medium, which are used for determining linkage equipment and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment; constructing a first conditional event based on a first preset control expression, linkage equipment, equipment attributes, attribute triggering conditions and time triggering conditions; determining an event to be executed; the event to be executed is an event to be executed when a first conditional event is triggered; nesting is carried out based on a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out based on the first scene linkage event.
In the scene linkage process, the device attribute, the attribute triggering condition, the time triggering condition and the event to be executed are subjected to linkage programming by using the preset control expression, so that more complex scenes can be supported, richer scene device linkage of a user is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required for the embodiment or the prior art description will be briefly introduced below, and it is apparent that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without inventive efforts.
FIG. 1 is a flow chart of a method for supporting programmable scene linking provided by the present invention;
FIG. 2 is a schematic diagram of the present invention providing a programmable scene linkage;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown or described.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for supporting programmable scene linkage according to the present invention. The method for supporting programmable scene linkage provided by the embodiment of the invention comprises the following steps:
step 101, determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
102, constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
step 103, determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
and 104, nesting based on a second preset control expression, the first condition event and the event to be executed, constructing a first scene linkage event, and performing scene linkage based on the first scene linkage event.
In the embodiment of the present invention, the scene linkage device is taken as an execution subject for example, and the method for supporting programmable scene linkage is described, but the execution subject is not limited to the scene linkage device.
Specifically, when scene linkage is performed, the scene linkage device first needs to determine the devices to be linked, that is, determine the linkage devices, where one or more linkage devices may be used in the embodiment of the present invention. Further, the scene linkage device determines the device attribute, the attribute triggering condition and the time triggering condition of the linkage device, wherein the device attribute in the embodiment of the invention may be one or more.
In one embodiment, the linkages are thermometer sensors weather glass and PM2.5 monitoring devices PMMonitor. The device attribute of the thermometer sensor weather is temperature, the attribute trigger condition of the thermometer sensor weather is temperature greater than 25 ℃ (centigrade), and the time trigger condition of the thermometer sensor weather is 20 o 'clock to 6 o' clock in the morning. The device attribute of the PM2.5 monitoring device PMmonitor is a PM value, the attribute trigger condition of the PM2.5 monitoring device PMmonitor is that the PM value is more than 50, and the time trigger condition of the PM2.5 monitoring device PMmonitor is from 20 points to 6 points in the morning.
Further, the scene linkage device takes linkage equipment, equipment attributes, attribute triggering conditions and time triggering conditions as variables, and carries out visual programming through a first preset control expression to construct a first condition event, wherein the first preset control expression is set by technicians and comprises but not limited to attribute expressions, time expressions and condition expressions.
Therefore, it can be understood that the scene linkage device takes the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition as variables, performs visual programming by combining the attribute expression, the time expression and the condition expression, constructs an executable code, and renders the executable code to construct a first condition event.
Further, the scene linkage device determines an event to be executed, wherein the event to be executed is an event to be executed after the first conditional event is triggered. Further, the scene linkage device establishes an incidence relation between the first conditional event and the event to be executed through a second preset control expression, namely, the first conditional event and the event to be executed are nested through the second preset control expression to establish the first scene linkage event, wherein the second preset control expression is set by a technician and includes but is not limited to a selection expression and an execution expression.
Therefore, the scene linkage device can be understood as nesting the first condition event and the event to be executed by selecting the expression and executing the expression to construct the first scene linkage event.
Further, the scene linkage device performs scene linkage according to the first scene linkage event, and as can be seen from the above, the first scene linkage event is an executable code. Therefore, the scene linkage device needs to parse the executable code of the first scene linkage event through the code interpretation executor so as to realize the scene linkage.
The method for supporting the programmable scene linkage determines linkage equipment, and determines equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment; constructing a first condition event based on a first preset control expression, linkage equipment, equipment attributes, attribute triggering conditions and time triggering conditions; determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered; nesting is carried out based on a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out based on the first scene linkage event.
In the scene linkage process, the device attribute, the attribute triggering condition, the time triggering condition and the event to be executed are subjected to linkage programming by using the preset control expression, so that more complex scenes can be supported, richer scene device linkage of a user is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Further, the step 102 of constructing a first conditional event based on the first preset control expression, the linkage device, the device attribute, the attribute trigger condition, and the time trigger condition includes:
constructing a first attribute description event based on the attribute expression, the linkage equipment, the equipment attribute and the attribute triggering condition;
constructing a time description event based on the time expression and the time trigger condition;
and constructing the first conditional event based on the conditional expression, the first attribute description event and the time description event.
It should be noted that the first preset control expression includes a time expression (cron), an attribute expression (expr), and a conditional expression condition (if, else).
Specifically, the scene linkage device constructs a first attribute description event according to the attribute expression, the linkage equipment, the equipment attribute and the attribute triggering condition. In an embodiment, the total maximum power allowed by the household electricity scene is 6kw (attribute trigger condition), the linkage devices are respectively an external automobile charging pile p1, a bath water heater p2, a living room air conditioner p3, a bedroom air conditioner p4, an electric heating kettle p5 and a living room lamp p6, the device attribute of the linkage devices is power, and a first attribute description event is established to be expr = (p 1+ p2+ p3+ p4+ p5+ p 6) >6.
Further, the scene linkage device constructs a time description event according to the time expression and the time trigger condition. In one embodiment, the time trigger condition is 18 to 8 am, and therefore, a time description event is constructed as cron = (18 to 8 am).
Further, the scene linkage device conditional expression, the first attribute description event and the time description event construct a first conditional event. It should be noted that, since the first conditional event is constructed by the attribute description event and the time description event, it is understood that the first conditional event may include an attribute conditional event and a time conditional event.
Therefore, the scene linkage device conditional expression, the first attribute description event, and the time description event construct that the attribute condition event is if (expr) and the time condition event is if (cron), and therefore the first condition event is if (expr) + if (cron). It can be further understood that the scene linkage device performs visual programming according to the attribute expression, the linkage equipment, the equipment attribute, the attribute triggering condition, the time expression, the time triggering condition and the condition expression to obtain a first condition event of the complex executable condition json code.
In the scene linkage process, the device attribute, the attribute triggering condition and the time triggering condition are subjected to linkage programming by using the first preset control expression, so that more complex scenes can be supported, richer scene device linkage of a user is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Further, the nesting based on the second preset control expression, the first conditional event and the event to be executed, which is recorded in step 104, constructs a first scene linkage event, including:
determining a first device based on the selection expression and the first conditional event;
performing linkage programming on the basis of the execution expression, the event to be executed and the first equipment to obtain a first equipment execution event;
updating the first conditional event based on the first device execution event to obtain a second conditional event;
determining a second device based on the second conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the second equipment to obtain a second equipment execution event;
nesting the first device execution event and the second device execution event to obtain the first scene linkage event.
It should be noted that the second preset control expression includes a selection expression (select) and an execution expression (do).
Specifically, when the scene linkage device determines that a first condition event is triggered, the first device which needs to execute the event to be executed is determined by selecting an expression. In an embodiment, the first conditional event is that the household electricity consumption exceeds 6kw, and therefore, when the household electricity consumption exceeds 6kw, it is determined by selecting an expression (select) that the external automobile charging pile p1 is preferentially closed, that is, the first device is the external automobile charging pile p1.
And further, the scene linkage device carries out linkage programming according to the execution expression, the event to be executed and the first equipment to obtain the first equipment execution event. In one embodiment, the first device is an external automobile charging pile p1, and the event to be executed is a device closing event, namely a colse event, so that linkage programming is performed according to the execution expression, the event to be executed and the first device to obtain that the first device execution event is do close (p 1).
Further, the scene linkage device updates the first conditional event according to the first device execution event to obtain a second conditional event. In one embodiment, the first conditional event is if { expr = (p 1+ p2+ p3+ p4+ p5+ p 6) >6, cron = (18 point to 8 am) }, the first device execution event is do close (p 1), and thus, the updated second conditional event is if { expr = (p 2+ p3+ p4+ p5+ p 6) >6, cron = (18 point to 8 am) }.
Further, when the scene linkage device determines that the second conditional event is triggered, the second device that needs to execute the event to be executed is determined by selecting the expression, which may refer to the process of the first device specifically, and is not described herein again. Further, the scene linkage device performs linkage programming according to the execution expression, the event to be executed, and the second device to obtain the second device execution event, which may specifically refer to the process of executing the event by the first device, and is not described herein again.
Further, the scene linkage device nests the first equipment execution event and the second equipment execution event to obtain the first scene linkage event.
In one embodiment, the first conditional event is if { expr = (p 2+ p3+ p4+ p5+ p 6) >6, cron = (18 to 8 a morning) }, when the household power consumption exceeds 6kw, the external automobile charging pile p1 is preferentially closed, if the household power consumption is still overloaded by 6kw, the bath water heater p2 is closed, and if the household power consumption is still overloaded, the electric kettle p5 is closed. Therefore, if the first scene linkage event is if { expr = (p 1+ p2+ p3+ p4+ p5+ p 6) >6, cron = (18 to 8 am) }, then do close (p 1); if { expr = (p 2+ p3+ p4+ p5+ p 6) >6, cron = (18 to 8 am) }, then do close (p 2); if { expr = (p 3+ p4+ p5+ p 6) >6, cron = (18 to 8 am) }, do close (p 5).
In the scene linkage process, the second preset control expression, the first condition event and the event to be executed are nested, so that more complex scenes can be supported, richer scene equipment linkage of a user is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Further, after the scene linkage is performed based on the first scene linkage event, the method further includes:
receiving the attribute of the equipment to be updated reported by the message queue, and updating the first conditional event based on the attribute of the equipment to be updated to obtain a third conditional event;
determining a third device based on the third conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the third equipment to obtain a third equipment execution event;
updating the third conditional event based on the third device execution event to obtain a fourth conditional event;
determining a fourth device based on the fourth condition event and the selection expression;
performing linkage programming based on the execution expression, the event to be executed and the fourth equipment to obtain a fourth equipment execution event;
and performing linkage programming on the third equipment execution event and the fourth equipment execution event to obtain a second scene linkage event, and performing scene linkage based on the second scene linkage event.
Specifically, the scene linkage device receives the attribute of the device to be updated reported by the message queue in real time, and updates the first conditional event through the attribute of the device to be updated to obtain a third conditional event.
In one embodiment, the first conditional event is if { expr = (p 1+ p2+ p3+ p4+ p 5) >6, and when the linkage device p6 accesses the home circuit, the first conditional event is updated according to the device attribute of the linkage device p6, so that the third conditional event is if { expr = (p 1+ p2+ p3+ p4+ p5+ p 6) >6.
In another embodiment, the first conditional event is if { expr = (p 1+ p2+ p3+ p4+ p 5) >6, the original device attribute of the linkage device p2 is a, that is, the first conditional event is if { expr = (p 1+ p2= [ a ] + p3+ p4+ p 5) >6, at a certain time, the device attribute to be updated of the linkage device p2 is b, and the third conditional event is if { expr = (p 1+ p2= [ b ] + p3+ p4+ p 5) >6. In this embodiment, it can be understood that: and caching the latest equipment attribute of the linkage equipment, such as storing the latest uploaded temperature attribute temperature of the thermometer sensor weather glass, and storing the latest uploaded attribute PM value of the PM2.5 monitoring equipment PMMonitor.
Further, when the scene linkage device determines that the third conditional event is triggered, the third device that needs to execute the event to be executed is determined by selecting the expression, and the process of the first device and the process of the second device may be specifically referred to, which is not described herein again.
Further, the scene linkage device performs linkage programming according to the execution expression, the event to be executed, and the third device to obtain a third device execution event, and specifically, reference may be made to a process of executing the event by the first device and a process of executing the event by the second device, which is not described herein again.
Further, the scene linkage device updates the third conditional event according to the event executed by the third device to obtain the fourth conditional event, which may specifically refer to the process of updating the first conditional event, and is not described herein again.
Further, when the scene linkage device determines that the fourth condition event is triggered, the fourth device that needs to execute the event to be executed is determined by selecting the expression, and the process of the third device may be specifically referred to, which is not described herein again. Further, the scene linkage device performs linkage programming according to the execution expression, the event to be executed, and the fourth device to obtain a fourth device execution event, which may specifically refer to a process of executing the event by the third device, and is not described herein again.
And finally, the scene linkage device performs linkage programming on the third equipment execution event and the fourth equipment execution event to obtain a second scene linkage event, performs scene linkage according to the second scene linkage event, specifically refers to the process of the first scene linkage event, and is not repeated here.
In the scene linkage process, the condition event is updated in real time according to the device attribute to be updated, and the device attribute, the attribute triggering condition, the time triggering condition and the event to be executed are subjected to linkage programming by using the preset control expression, so that more complex scenes can be supported, richer scene device linkage of a user is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Further, the method for supporting the programmable scene linkage further comprises the following steps:
and constructing a third scene linkage event based on a cyclic expression and the first scene linkage event or the second scene linkage event, and performing scene linkage based on the third scene linkage event.
Specifically, for the first scene linkage event, the scene linkage device determines the complexity of the first scene linkage event, and determines whether a loop expression is required to be added in the first scene linkage event according to the complexity, wherein the loop expression includes, but is not limited to, a loop while expression and a skip goto expression. The scene linkage device can also be understood as embedding a loop while expression or/and a skip goto expression into the first scene linkage event according to the complexity of the first scene linkage event to construct a more complex third scene linkage event, and performing scene linkage according to the constructed third scene linkage event.
For the second scene linkage event, the scene linkage device determines the complexity of the second scene linkage event, embeds a loop expression or/and a jump goto expression into the second scene linkage event according to the complexity of the second scene linkage event, constructs a more complex fourth scene linkage event, and carries out scene linkage according to the constructed fourth scene linkage event.
In the scene linkage process, the embodiment of the invention embeds the cyclic expression in the scene linkage event, so that more complex scenes can be supported, richer scene equipment linkage of users is met, and more complex linkage triggering conditions and triggering scenes are realized in a programmable mode.
Furthermore, the scene linkage device supporting programmable interaction provided by the invention and the scene linkage method supporting programmable interaction provided by the invention are mutually correspondingly referenced.
Fig. 2 is a schematic structural diagram of a scene linkage device supporting programmable programming according to the present invention, where the scene linkage device supporting programmable programming includes:
a first determining module 201, configured to determine a linkage device, and determine a device attribute, an attribute triggering condition, and a time triggering condition of the linkage device;
a constructing module 202, configured to construct a first conditional event based on a first preset control expression, the linkage device, the device attribute, the attribute triggering condition, and the time triggering condition;
a second determining module 203, configured to determine an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
the nesting linkage module 204 is configured to nest based on a second preset control expression, the first conditional event, and the event to be executed, construct a first scene linkage event, and perform scene linkage based on the first scene linkage event.
Further, the building module 202 is further configured to:
constructing a first attribute description event based on the attribute expression, the linkage equipment, the equipment attribute and the attribute triggering condition;
constructing a time description event based on the time expression and the time trigger condition;
and constructing the first conditional event based on the conditional expression, the first attribute description event and the time description event.
Further, the nested linkage module 204 is further configured to:
determining a first device based on the selection expression and the first conditional event;
performing linkage programming on the basis of the execution expression, the event to be executed and the first equipment to obtain a first equipment execution event;
updating the first conditional event based on the first device execution event to obtain a second conditional event;
determining a second device based on the second conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the second equipment to obtain a second equipment execution event;
nesting the first device execution event and the second device execution event to obtain the first scene linkage event.
Further, the nested linkage module 204 is further configured to:
receiving the attribute of the equipment to be updated reported by the message queue, and updating the first conditional event based on the attribute of the equipment to be updated to obtain a third conditional event;
determining a third device based on the third conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the third equipment to obtain a third equipment execution event;
updating the third conditional event based on the third device execution event to obtain a fourth conditional event;
determining a fourth device based on the fourth condition event and the selection expression;
performing linkage programming based on the execution expression, the event to be executed and the fourth equipment to obtain a fourth equipment execution event;
and performing linkage programming on the third equipment execution event and the fourth equipment execution event to obtain a second scene linkage event, and performing scene linkage based on the second scene linkage event.
Further, the nested linkage module 204 is further configured to:
and constructing a third scene linkage event based on a cyclic expression and the first scene linkage event or the second scene linkage event, and performing scene linkage based on the third scene linkage event.
The specific embodiment of the device for supporting programmable scene linkage provided by the invention is basically the same as each embodiment of the method for supporting programmable scene linkage, and details are not repeated herein.
Fig. 3 illustrates a physical structure diagram of an electronic device, and as shown in fig. 3, the electronic device may include: a processor (processor) 310, a communication Interface (communication Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication Interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to perform a method of supporting programmable scene linking, the method comprising:
determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
nesting is carried out on the basis of a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out on the basis of the first scene linkage event.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a method for supporting programmable scene linking provided by the above methods, the method comprising:
determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute trigger condition and the time trigger condition;
determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
nesting is carried out on the basis of a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out on the basis of the first scene linkage event.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method for supporting programmable scene linking provided above, the method comprising:
determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
nesting is carried out on the basis of a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out on the basis of the first scene linkage event.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for supporting programmable scene linking, comprising:
determining linkage equipment, and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
nesting is carried out on the basis of a second preset control expression, the first condition event and the event to be executed, a first scene linkage event is constructed, and scene linkage is carried out on the basis of the first scene linkage event.
2. The method of claim 1, wherein the first pre-defined control expression comprises an attribute expression, a temporal expression, and a conditional expression.
3. The method of claim 2, wherein constructing a first conditional event based on a first preset control expression, the linkage device, the device attribute, the attribute trigger condition, and the time trigger condition comprises:
constructing a first attribute description event based on the attribute expression, the linkage equipment, the equipment attribute and the attribute triggering condition;
constructing a time description event based on the time expression and the time trigger condition;
and constructing the first conditional event based on the conditional expression, the first attribute description event and the time description event.
4. The method of claim 1, wherein the second predetermined control expression comprises a selection expression and an execution expression.
5. The method for supporting programmable scenario linkage according to claim 4, wherein the nesting based on the second preset control expression, the first conditional event and the event to be executed to construct the first scenario linkage event comprises:
determining a first device based on the selection expression and the first conditional event;
performing linkage programming based on the execution expression, the event to be executed and the first equipment to obtain a first equipment execution event;
updating the first conditional event based on the first device execution event to obtain a second conditional event;
determining a second device based on the second conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the second equipment to obtain a second equipment execution event;
nesting the first device execution event and the second device execution event to obtain the first scene linkage event.
6. The method of any of claims 1 to 5, wherein after the performing scene linking based on the first scene linking event, further comprising:
receiving the attribute of the equipment to be updated reported by the message queue, and updating the first conditional event based on the attribute of the equipment to be updated to obtain a third conditional event;
determining a third device based on the third conditional event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the third equipment to obtain a third equipment execution event;
updating the third conditional event based on the third device execution event to obtain a fourth conditional event;
determining a fourth device based on the fourth condition event and the selection expression;
performing linkage programming on the basis of the execution expression, the event to be executed and the fourth equipment to obtain a fourth equipment execution event;
and performing linkage programming on the third equipment execution event and the fourth equipment execution event to obtain a second scene linkage event, and performing scene linkage based on the second scene linkage event.
7. The method of claim 6, further comprising:
and constructing a third scene linkage event based on a cyclic expression and the first scene linkage event or the second scene linkage event, and performing scene linkage based on the third scene linkage event.
8. An apparatus for supporting a programmable scene linkage, comprising:
the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining linkage equipment and determining equipment attributes, attribute triggering conditions and time triggering conditions of the linkage equipment;
the construction module is used for constructing a first conditional event based on a first preset control expression, the linkage equipment, the equipment attribute, the attribute triggering condition and the time triggering condition;
the second determining module is used for determining an event to be executed; the event to be executed is an event to be executed when the first conditional event is triggered;
the nested linkage module is used for nesting based on a second preset control expression, the first condition event and the event to be executed, constructing a first scene linkage event, and performing scene linkage based on the first scene linkage event.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of supporting programmable scene linking of any of claims 1 to 7 when executing the computer program.
10. A non-transitory computer readable storage medium including a computer program, wherein the computer program when executed by a processor implements the method of supporting programmable scene linking of any of claims 1 to 7.
CN202310174572.0A 2023-02-28 2023-02-28 Method and device for supporting programmable scene linkage, electronic equipment and storage medium Pending CN115857376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310174572.0A CN115857376A (en) 2023-02-28 2023-02-28 Method and device for supporting programmable scene linkage, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310174572.0A CN115857376A (en) 2023-02-28 2023-02-28 Method and device for supporting programmable scene linkage, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115857376A true CN115857376A (en) 2023-03-28

Family

ID=85659288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310174572.0A Pending CN115857376A (en) 2023-02-28 2023-02-28 Method and device for supporting programmable scene linkage, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115857376A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117014247A (en) * 2023-08-28 2023-11-07 广东金朋科技有限公司 Scene generation method, system and storage medium based on state learning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113050446A (en) * 2021-03-26 2021-06-29 广东好太太智能家居有限公司 Linkage control method and device for intelligent scene and storage medium
CN115460051A (en) * 2022-09-13 2022-12-09 浪潮软件科技有限公司 Equipment linkage model configuration method based on industry Internet of things scene

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113050446A (en) * 2021-03-26 2021-06-29 广东好太太智能家居有限公司 Linkage control method and device for intelligent scene and storage medium
CN115460051A (en) * 2022-09-13 2022-12-09 浪潮软件科技有限公司 Equipment linkage model configuration method based on industry Internet of things scene

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117014247A (en) * 2023-08-28 2023-11-07 广东金朋科技有限公司 Scene generation method, system and storage medium based on state learning

Similar Documents

Publication Publication Date Title
CN108919669B (en) Intelligent home dynamic decision method and device and service terminal
EP3734519A1 (en) Method for generating universal learned model
CN107003836B (en) Flexible device template for connected consumer devices
CN115857376A (en) Method and device for supporting programmable scene linkage, electronic equipment and storage medium
JP2006518894A (en) Process control system and method for configuring a process control system
CN112287214B (en) Clothes airing recommendation method based on clothes airing machine, intelligent terminal and storage device
CN108055179A (en) The method, apparatus and system of Intelligent housing
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN112637024A (en) Control method, control device, electronic equipment and storage medium
CN111059687A (en) Control method and device of air conditioner and storage medium
Vastardis et al. A user behaviour-driven smart-home gateway for energy management
CN116996546A (en) Control method, device and equipment of Internet of things equipment and storage medium
CN110262275A (en) Intelligent household system and control method thereof
CN110324217A (en) Control method, device, electronic equipment and the storage medium of equipment triggering
CN109752962A (en) A kind of Control System of Intelligent
CN110162361A (en) Intelligent prompt method, device, terminal and storage medium based on user behavior
CN112667334B (en) Configuration method and device of equipment control information, electronic equipment and storage medium
CN115599260A (en) Intelligent scene generation method, device and system, storage medium and electronic device
CN117031973A (en) Household appliance control method, device, equipment and storage medium
CN111831380A (en) Task execution method and device, storage medium and electronic device
CN115309063A (en) Method and device for updating device scene, storage medium and electronic device
CN117908856A (en) Work order construction method and device, storage medium and electronic device
CN115314245B (en) Authority management method, system, storage medium and electronic device
CN116301511A (en) Equipment interaction method and device, storage medium and electronic device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230328