Equipment control method and system, electronic equipment and storage medium

By using a visual node editor and automated validation to generate target expressions, the problem of traditional scenario orchestration being unable to adapt to users' personalized needs is solved, achieving low-code orchestration and improved system stability.

CN121832391APending Publication Date: 2026-04-10CISDI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional scene orchestration, which uses forms or scripts to configure scene logic, is difficult to adapt to users' dynamically changing personalized needs and requires a high level of user expertise.

Method used

By acquiring visual node data, scene arrangement is performed using a visual node editor, generating multiple nodes and their connection relationships, and performing automated verification to generate target expressions for device control.

Benefits of technology

It reduces the difficulty of user orchestration, enables low-code or no-code personalized orchestration, improves the flexibility of scenario orchestration and system stability, and ensures the consistency and executability of expressions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832391A_ABST
    Figure CN121832391A_ABST
Patent Text Reader

Abstract

The invention provides an equipment control method and system, electronic equipment and a storage medium, and the method comprises the steps: obtaining visual node data, enabling the visual node data to carry out visual scene arrangement and generation based on a user, and enabling the visual node data to comprise a plurality of nodes and a node connection relation, the plurality of nodes at least comprise a trigger condition node group and an execution action node group, the trigger condition node group represents a trigger condition, the execution action node group represents an execution action, each node has a corresponding node parameter, the node parameter of each node and a node connection relationship are verified, and after the verification is passed, the execution action is executed. A target expression is generated according to the node parameters of all the nodes and the node connection relation, and equipment control is carried out based on the target expression; the scene logic is concrete as the visual nodes and the node connection relationship, so that the development difficulty and threshold of scene arrangement by a user are reduced, low-code or code-free personalized arrangement is realized, and the flexibility of scene arrangement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scene arrangement and automated control technology, and in particular to a device control method, system, electronic device and storage medium. Background Technology

[0002] With the development of IoT technology, IoT scenario services are becoming increasingly popular. These services integrate devices, data, and intelligent decision-making through IoT technology to meet specific scenario needs, enabling automated and intelligent linkage between devices and scenarios. This provides users with an efficient, intelligent, and convenient experience, and the orchestration of scenario services has become a key link in realizing device linkage and intelligent decision-making.

[0003] Traditional scene orchestration typically uses forms or scripts to configure scene logic. While this can achieve basic automated linkage, this static configuration mode is difficult to adapt to users' dynamically changing personalized needs and requires a high level of expertise from users. Summary of the Invention

[0004] This invention provides a device control method, system, electronic device, and storage medium to solve the technical problem that traditional scene orchestration usually configures scene logic using forms or scripts. This static configuration mode is difficult to adapt to the dynamic and personalized needs of users and requires a high level of expertise from users.

[0005] This invention provides a device control method, the method comprising: acquiring visualization node data, the visualization node data being generated based on user-organized visualization scenes, the visualization node data including multiple nodes and node connection relationships, the multiple nodes including at least a trigger condition node group and an execution action node group, the trigger condition node group representing a trigger condition, the execution action node group representing an execution action, and each node having corresponding node parameters; verifying the node parameters of each node and the node connection relationships, and after passing the verification, generating a target expression based on the node parameters of each node and the node connection relationships; and performing device control based on the target expression.

[0006] In one embodiment of the present invention, obtaining visual node data includes: displaying multiple initial nodes through a pre-set visual node editor; obtaining the user's node selection information, user configuration information, and node connection information; determining each node from the multiple initial nodes according to the node selection information, generating node parameters for each node according to the user configuration information, and generating the node connection relationship according to the node connection information, so as to use each node, the node parameters of each node, and the node connection relationship as the visual node data.

[0007] In one embodiment of the present invention, the node parameters of each node and the node connection relationship are verified, including: checking whether the node parameters of each node are complete and checking whether the node connection relationship is correct, and generating a verification result; if the verification result meets a preset condition, the verification passes, wherein the preset condition includes that the node parameters of each node are complete and the context of each node is correct; if the verification result does not meet the preset condition, the verification fails.

[0008] In one embodiment of the present invention, checking whether the node connection relationship is correct includes: determining whether the downstream node of the device execution node is a device action function node, wherein the execution action node group includes the device execution node and the device action function node; determining whether the downstream node of the trigger condition class master node is a trigger condition class child node, wherein the trigger condition node group includes the trigger condition class master node and the trigger condition class child node.

[0009] In one embodiment of the present invention, checking whether the node connection relationship is correct further includes: if the number of trigger condition node groups is one, then determining whether the downstream node of the trigger condition class sub-node is the device execution node; if the number of trigger condition node groups is multiple, then determining whether the downstream node of each trigger condition class sub-node is an execution relationship class node, and whether the downstream node of the execution relationship class node is the device execution node.

[0010] In one embodiment of the present invention, checking whether the node connection relationship is correct further includes: if the plurality of nodes also includes an execution condition node group, determining whether the downstream node of the trigger condition class sub-node is an execution condition node, whether the downstream node of the execution condition node is an execution condition attribute node, and whether the downstream node of the execution condition attribute node is the device execution node, wherein the execution condition node group includes the execution condition node and the execution condition attribute node.

[0011] In one embodiment of the present invention, generating a target expression based on the node parameters of each node and the node connection relationships includes: According to the first preset format and the node connection relationship, the node parameters of each node in the trigger condition node group are format-converted to obtain the trigger condition expression; according to the first preset format and the node connection relationship, the node parameters of each node in the execution action node group are format-converted to obtain the execution action expression; the trigger condition expression and the execution action expression are combined to obtain the target expression; or, The nodes in the execution action node group are divided into time nodes and non-time nodes; the node parameters of the time nodes are format-converted according to a second preset format to obtain a time expression; the node parameters of each node in the trigger condition node group are format-converted according to the first preset format and the node connection relationship to obtain the trigger condition expression; the node parameters of each non-time node are format-converted according to the first preset format and the node connection relationship to obtain the execution action expression; the target expression is obtained by combining the time expression, the trigger condition expression, and the execution action expression.

[0012] The present invention also provides a device control system, the system comprising: an orchestration module, used by a user to orchestrate a visual scene through a visual node editor, generating visual node data, the visual node data including multiple nodes and node connection relationships, the multiple nodes including at least a trigger condition node group and an execution action node group, the trigger condition node group representing a trigger condition, the execution action node group representing an execution action, and each node having corresponding node parameters; a data processing module, used to verify the node parameters of each node and the node connection relationships, and after passing the verification, generating a target expression based on the node parameters of each node and the node connection relationships; and a control module, used to control the device according to control instructions, the control instructions being generated based on the target expression.

[0013] The present invention also provides an electronic device, the electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the device control method described above.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform the device control method described above.

[0015] The beneficial effects of this invention are as follows: This invention proposes a device control method, system, electronic device, and storage medium. This method, by visualizing scene logic as visual nodes and node connections, reduces the development difficulty and threshold for users in scene orchestration, enabling low-code or no-code personalized orchestration and improving the flexibility of scene orchestration. By automatically verifying node parameters and node connections, logical errors or conflicts can be effectively reduced, ensuring the consistency and executability of expressions, so that subsequently generated device control commands are accurate and executable, improving system stability. Based on the visual node data, standardized target expressions are generated, achieving automatic conversion from visual nodes to machine language, enabling the scene logic to be parsed by the system and providing strong adaptability. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0017] In the attached diagram: Figure 1 A schematic diagram illustrating the implementation environment of a device control method according to an embodiment of the present invention; Figure 2 A flowchart of a device control method provided in an embodiment of the present invention; Figure 3 This is a block diagram of a device control system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0019] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0020] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0021] The embodiments of the present invention provide a device control method, a device control system, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail below.

[0022] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the implementation environment of a device control method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the implementation environment can include client 110 and server 120. Client 110 can be an electronic device with an operable display panel, such as a mobile phone, computer, smart TV, or tablet; this is not limited. Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms; this is also not limited. Client 110 and server 120 can be the same electronic device or separate electronic devices; this is also not limited. Users can arrange visual scenes using a pre-configured visual node editor in client 110, enabling client 110 to generate visual node data and transmit it to server 120. Server 120 processes the visual node data to generate target expressions for device control.

[0023] In illustrative terms, server 120 acquires visual node data. This data is generated by the user through a pre-configured visual node editor on client 110, where the user orchestrates a visual scene. The visual node data includes multiple nodes and their connections. Each node includes at least one trigger condition node group and one execution action node group. The trigger condition node group represents the trigger condition, and the execution action node group represents the execution action. Each node has corresponding node parameters. The node parameters and connections of each node are validated. After successful validation, a target expression is generated based on these parameters and connections. Device control is then performed based on the target expression. As can be seen, the technical solution of this embodiment of the invention, by visualizing scene logic as nodes and their connections, reduces the development difficulty and threshold for users in scene orchestration, enabling low-code or no-code personalized orchestration and improving the flexibility of scene orchestration. Automated validation of node parameters and connections effectively reduces logical errors or conflicts, ensuring the consistency and executability of expressions, so that subsequently generated device control commands are accurate and executable, improving system stability. Standardized target expressions are generated based on visualized node data, enabling automatic conversion from visualized nodes to machine language, allowing the system to parse the scenario logic and ensuring strong adaptability.

[0024] It should be noted that the device control method provided in this embodiment of the invention is generally executed by the server 120.

[0025] Please see Figure 2 , Figure 2 This is a flowchart illustrating a device control method according to an embodiment of the present invention. This device control method can be applied to... Figure 1 The implementation environment shown is specifically executed by server 120 within that implementation environment. It should be understood that this device control method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the device control method is applicable. Figure 2 As shown, in an exemplary embodiment, the device control method includes at least steps S210 to S230, which are described in detail below: Step S210: Obtain the visualized node data.

[0026] Step S220: Verify the node parameters and node connection relationships of each node in the visualized node data, and generate the target expression based on the node parameters and node connection relationships of each node after the verification is passed.

[0027] Step S230: Perform device control based on the target expression.

[0028] In step S210, the visualized node data is generated based on the user's visualization scene arrangement using a visualized node editor. This visualized node editor is used to select nodes, connect nodes, and configure node information to complete the scene arrangement and obtain the visualized node data. Users can perform operations such as dragging and dropping nodes, connecting nodes, and configuring information through the visualized node editor to achieve visualized scene arrangement and generate visualized node data. Information configuration includes selecting preset information and / or entering custom information. Furthermore, users can also perform node layout and node scaling operations through the visualized node editor.

[0029] The visualized node data includes multiple nodes and node connection relationships. Among the multiple nodes, there is at least one trigger condition node group and one execution action node group. A trigger condition node group represents a trigger condition, and an execution action node group represents an execution action. Each node has corresponding node parameters.

[0030] Node connection relationships indicate the execution order or flow of nodes, conditional branches or parallel execution relationships, such as who the upstream node (previous connection node) of the current node is, and who the downstream node (next connection node) is.

[0031] Node parameters include the node's identifier, name, and user configuration information. The node identifier represents the node's number, such as node 01, node 02, etc. The node name indicates the node's type and whether it is a master or child node within that type. For example, a node named "Device Trigger Node" is a master node in the trigger condition category, and a node named "Device Attribute Node" is a child node in the trigger condition category. Node types can include trigger condition, action, relationship, and condition types. The node's user configuration information represents the information configured by the user for that node, including user-selected preset information and / or user-inputted custom information.

[0032] The trigger condition node group includes a trigger condition class master node and trigger condition class child nodes. These nodes and their corresponding node parameters together constitute the trigger conditions of the scene. For example, a trigger condition node group includes a trigger condition class master node and a trigger condition class child node. The name of the master node is Device Trigger Node and the user configuration information is "a certain temperature sensor". The name of the child node is Device Attribute Node and the user configuration information is "temperature greater than 28℃". Correspondingly, the trigger condition represented by this trigger condition node group is "the temperature of a certain temperature sensor is greater than 28℃".

[0033] An execution action node group includes a main execution action node and execution action child nodes. These nodes and their corresponding node parameters together constitute the execution action of the scene. For example, an execution action node group includes an execution action class main node and an execution action class child node. The name of the main node is Device Execution Node and the user configuration information is "XFan". The name of the child node is Device Action Function Node and the user configuration information is "Fan Switch: On". Correspondingly, the execution action represented by this execution action node group is "Turn on the fan".

[0034] In some embodiments, the plurality of nodes may further include at least one of a start node, an execution relationship node, an execution condition node group, etc.

[0035] In step S220, the verification includes at least one of the following: the completeness of node parameters, the correctness of node connection relationships, whether there are condition conflicts among multiple trigger condition node groups, and whether there are execution conflicts among multiple execution action node groups. After the verification passes, the node parameters and node connection relationships of each node are formatted and translated into low-level code or instructions that can be directly and efficiently executed by the machine, which serves as the target expression.

[0036] In step S230, the target expression can be loaded and parsed by the rule engine. Based on the triggering conditions and execution actions defined in the target expression, a schedulable task queue is formed. When the rule engine detects an event that meets the triggering conditions, such as a change in sensor data or a timer trigger, it determines the target device based on the execution actions in the target expression and generates a device control command, which is then sent to the target device to drive it to perform corresponding operations such as switching, adjusting, or changing modes.

[0037] In one embodiment of the present invention, obtaining visual node data includes: displaying multiple initial nodes through a pre-set visual node editor; obtaining the user's node selection information, user configuration information, and node connection information; determining each node from the multiple initial nodes according to the node selection information, generating node parameters for each node according to the user configuration information, and generating node connection relationships according to the node connection information, so as to use each node and its node parameters and node connection relationships as visual node data.

[0038] In this embodiment, the visual node editor includes a toolbar and a canvas. The toolbar includes different types of initial nodes and connection tools. Initial nodes refer to nodes that have not yet been configured with node parameters, specifically including trigger condition nodes, action execution nodes, execution condition nodes, and execution relationship nodes.

[0039] The process begins with the user dragging initial nodes onto the canvas, generating node selection information. This information determines the selected nodes, their names, and identifiers, resulting in individual nodes. The user then configures the nodes on the canvas, selecting from preset information and / or inputting custom information, generating user configuration information. Finally, the user connects the nodes using a connection tool, generating node connection information. Next, visual node data is extracted, converting the node connections into structured data. This data includes node IDs (Identity Documents), node types (node ​​names), user configuration information, x-coordinates, y-coordinates, context, hierarchy, left node set, and right node set. Node parameters are generated based on node IDs, types, user configuration information, x-coordinates, and y-coordinates. Node connections are then generated based on the context, hierarchy, left node set, and right node set.

[0040] It should be understood that users can configure information before connecting nodes, or connect nodes before configuring information; there is no restriction on the order of information configuration and node connection.

[0041] In some embodiments, the canvas has a default start node that is not editable or deleteable, and at least one other type of node is connected to the start node. Therefore, the start node is included among the multiple nodes to indicate the beginning of the scene represented by the visualized node data.

[0042] In some embodiments, trigger condition nodes include device trigger nodes, device attribute nodes, device status nodes, scene trigger nodes, scene status nodes, timed trigger nodes, system event trigger nodes, and system event parameter nodes.

[0043] The device trigger node is used to configure the device identifier of the device related to the trigger condition (hereinafter referred to as the trigger device). It can display preset device identifiers such as device type (e.g., human body detection sensor, smart air conditioner, temperature sensor), device brand, device name, etc., for users to select.

[0044] The device attribute node is used to configure the device attributes that trigger the device. It can display the corresponding optional attributes of the device, such as "Is anyone here", temperature, wind speed, etc., for users to select and further select or input relevant information, such as "Is anyone here", "Below 26℃", "Greater than level 1", etc.

[0045] The device status node is at the same level as the device attribute node and is used to configure the device status conditions that trigger the device. It can display the available statuses of the corresponding device, such as: normal, offline, fault, alarm, etc., for the user to select.

[0046] The scene trigger node is used to configure the scene type of the scene related to the trigger condition (hereinafter referred to as the trigger scene). It can display preset scene types, such as kitchen, living room, bedroom, etc., for users to choose from.

[0047] The scene status node is used to configure the scene status that triggers the scene. It can display preset scene statuses such as temperature, humidity, and light intensity for users to select and further select or input relevant information, such as: less than 26℃, greater than 60%, less than 1000 lx, etc.

[0048] The timed trigger node is used to define the timing rules for triggering, including the time dimension (such as daily, statutory holidays, statutory working days, weekly, monthly, trigger only once), the trigger frequency type (such as repeated triggering within a daily time period, triggering once a day), the trigger time period (selected between 0:00 and 23:59:59), and the trigger frequency (such as how many seconds / minutes / hours after triggering once) to trigger again. Users can form the timed trigger conditions by selecting the time dimension, trigger frequency type, trigger time period, and trigger frequency.

[0049] The system event trigger node is used to configure the system event types related to the trigger conditions (hereinafter referred to as triggering system events). It can display predefined system event types, such as message queues and internal interface calls, for users to select.

[0050] The System Event Parameters node is used to configure the system event parameters that trigger system events. It can display optional system event parameters such as complete and status, allowing users to select and further select or enter relevant information, such as complete = '1', status = '1', etc.

[0051] Among them, a device trigger node and a device attribute node constitute a trigger condition node group, representing a device attribute trigger condition. In this trigger condition node group, the device trigger node is the master node and the device attribute node is the child node. A device trigger node and a device status node constitute a trigger condition node group, representing a device status trigger condition. In this trigger condition node group, the device trigger node is the master node and the device status node is the child node. A scene trigger node and a scene status node constitute a trigger condition node group, representing a scene status trigger condition. In this trigger condition node group, the scene trigger node is the master node and the scene status node is the child node. A system event trigger node and a system event parameter node constitute a trigger condition node group, representing a system event trigger condition. In this trigger condition node group, the system event trigger node is the master node and the system event parameter node is the child node.

[0052] For example, the visual node editor can automatically generate device attribute nodes or device status nodes and automatically connect them based on the device selected by the user for the device trigger node; it can automatically generate system event parameter nodes and automatically connect them based on the system event selected by the user for the system event trigger node; and it can automatically generate scene status nodes and automatically connect them based on the scene selected by the user for the scene trigger node.

[0053] In some embodiments, the execution action type node includes device execution node, device action function node, execution time node, system event execution node, and delayed execution node.

[0054] The device execution node is used to configure the device identifier of the device related to the execution action (hereinafter referred to as the execution device). It can display the device type (such as smart light bulb, smart curtain), device name, etc., for users to select.

[0055] The device action function node is used to configure the action functions of the device. It can display the available functions of the corresponding device, such as switch, gear, etc., for the user to select and further select or input related actions or functions, such as: open, lower, etc.

[0056] The execution time node is used to configure the time when the execution device performs actions and functions; The system event node is used to configure the system events to be executed. It can display predefined system events, such as SMS notifications and external interface calls, for users to select.

[0057] The delayed execution node is used to configure the delay time for the execution device to perform an action function, indicating how many seconds / minutes / hours the execution device needs to delay before performing the action function.

[0058] An execution action node group includes at least a device execution node and a device action function node, representing an execution action. In this execution action node group, the device execution node is the master node, and the device action function node is the child node. Of course, an execution action node group may also include execution time nodes or delayed execution nodes, and may also include system event execution nodes.

[0059] For example, the visual node editor can automatically generate device action function nodes and automatically connect them based on the device selected by the user for the device execution node.

[0060] In some embodiments, the execution condition class node includes the execution condition node and the execution condition attribute node.

[0061] The execution condition node is used to configure the device identifiers of the execution condition-related devices (referred to as condition devices). It can display preset device identifiers such as device type and brand for users to select.

[0062] The execution condition attribute node is used to configure the device attributes or status of the condition device. It can display the corresponding device's optional attributes or status, such as "Is anyone here", temperature, wind speed, etc., for users to select and further select or input relevant information, such as: someone here, less than 26℃, greater than level 1, etc.

[0063] An execution condition node group consists of execution condition nodes and execution condition attribute nodes, representing the prerequisites for performing a certain action function, such as "air conditioning" -> "temperature" -> "greater than 26℃". In this execution condition node group, the execution condition node is the master node, and the execution condition attribute node is the child node. The execution condition node group is used in conjunction with device trigger condition nodes to primarily address the issue of frequent device data changes leading to altered trigger conditions when the node chain is long. The trigger condition classes include device trigger condition classes and scene trigger condition classes.

[0064] In some embodiments, the execution relationship class node includes a simultaneous satisfaction node and an any condition satisfaction node, both of which are used in conjunction with the trigger condition class node. The simultaneous satisfaction node is used to indicate that the subsequent node is executed only when multiple trigger conditions are satisfied simultaneously, and the any condition satisfaction node is used to indicate that the subsequent node can be executed when any one of the multiple trigger conditions is satisfied.

[0065] The following example illustrates the arrangement of visual scenes in the visual node editor.

[0066] The scenario is as follows: when the temperature sensor temperature is >28℃, the fan is turned on and the maintenance department is notified via SMS.

[0067] In this scenario, using the visual node editor, users can drag and drop device trigger nodes onto the canvas, connecting them to the right of the start node. By selecting "Temperature Sensor" on the device trigger node, the user configuration information for that node is created. The visual node editor then automatically generates a device attribute node based on the user's selection of "Temperature Sensor" and connects it to the right of the device trigger node. Similarly, users can select "Temperature" and input (or select) "Greater than 28℃" on the device attribute node, creating its user configuration information. Users can also drag and drop device execution nodes onto the canvas, connecting them to the right of the device attribute node. By selecting "Fan" on the device execution node, the visual node editor automatically generates a device action function node based on the user's selection and connects it to the right of the device execution node. Finally, users can drag and drop system event execution nodes onto the canvas, connecting them to the right of the device action function node and selecting "SMS Notification Maintenance" on the system event execution node, creating its user configuration information.

[0068] Correspondingly, the resulting node chain (node ​​connection relationship) is: Start node → Device trigger node (temperature sensor) → Device attribute node (temperature greater than 28) → Device execution node (fan) → Device action function node (fan switch: on) → System event execution node (SMS notification to maintenance).

[0069] In one embodiment of the present invention, the node parameters and node connection relationships of each node are verified, including: checking whether the node parameters of each node are complete and checking whether the node connection relationships are correct, and generating a verification result; if the verification result meets the preset conditions, the verification passes, wherein the preset conditions include that the node parameters of each node are complete and the context of each node is correct; if the verification result does not meet the preset conditions, the verification fails.

[0070] In this embodiment, if the user configuration information of other nodes, except for the start node and execution relationship nodes, is not empty, it indicates that the node parameters of each node are complete. The context of each node refers to whether the upstream and downstream nodes of each node are correct. For example, an action-type node cannot precede a triggering condition-type node.

[0071] In one embodiment of the present invention, checking whether the node connection relationship is correct includes: determining whether the downstream node of the device execution node is a device action function node, wherein the execution action node group includes the device execution node and the device action function node; and determining whether the downstream node of the trigger condition class master node is a trigger condition class child node, wherein the trigger condition node group includes the trigger condition class master node and the trigger condition class child node.

[0072] In this embodiment, correct node connection relationships can be predetermined to form preset rules. The current node connection relationships are checked for errors according to these preset rules. In these preset rules, the downstream node of a device execution node is a device action function node. Determining whether the downstream node of a trigger condition class main node is a trigger condition class sub-node includes: determining whether the downstream node of a device trigger node is a device attribute node when the trigger condition node group includes both device trigger nodes and device attribute nodes; determining whether the downstream node of a device trigger node is a device status node when the trigger condition node group includes both device trigger nodes and device status nodes; and determining whether the downstream node of a scene trigger node is a scene status node when the trigger condition node group includes both scene trigger nodes and scene status nodes. In the preset rules, the downstream node of a device trigger node is either a device attribute node or a device status node, and the downstream node of a scene trigger node is a scene status node.

[0073] In one embodiment of the present invention, checking whether the node connection relationship is correct further includes: if the number of trigger condition node groups is one, then determining whether the downstream node of the trigger condition class sub-node is a device execution node; if the number of trigger condition node groups is multiple, then determining whether the downstream node of each trigger condition class sub-node is an execution relationship class node, and whether the downstream node of the execution relationship class node is a device execution node.

[0074] In this embodiment, a trigger condition sub-node in a trigger condition node group includes one of a device status node, a device attribute node, and a scene status node. In the preset rules, when there is only one trigger condition node group, the downstream node of the trigger condition sub-node is a device execution node; when there are multiple trigger condition node groups, the downstream nodes of the trigger condition sub-nodes are execution relationship nodes, and the downstream nodes of the execution relationship nodes are device execution nodes. The execution relationship node indicates whether the trigger conditions represented by each trigger condition node group are met simultaneously or only one of them is met to trigger the execution action represented by the subsequent execution action node group.

[0075] In one embodiment of the present invention, checking whether the node connection relationship is correct further includes: if the multiple nodes also include an execution condition node group, determining whether the downstream node of the trigger condition class sub-node is an execution condition node, whether the downstream node of the execution condition node is an execution condition attribute node, and whether the downstream node of the execution condition attribute node is a device execution node, wherein the execution condition node group includes execution condition nodes and execution condition attribute nodes.

[0076] In this embodiment, according to the preset rules, when there are execution condition type nodes in the visualized node data, the downstream node of the trigger condition type sub-node is the execution condition node, the downstream node of the execution condition node is the execution condition attribute node, and the downstream node of the execution condition attribute node is the device execution node. Specifically, the trigger condition type sub-node in a trigger condition node group includes one of a device status node, a device attribute node, and a scene status node.

[0077] In one embodiment of the present invention, generating a target expression based on the node parameters of each node and the node connection relationships includes: According to the first preset format and node connection relationship, the node parameters of each node in the trigger condition node group are format-converted to obtain the trigger condition expression; according to the first preset format and node connection relationship, the node parameters of each node in the execution action node group are format-converted to obtain the execution action expression; combining the trigger condition expression and the execution action expression, the target expression is obtained. or, The nodes in the action node group are divided into time nodes and non-time nodes. The node parameters of the time nodes are formatted according to the second preset format to obtain the time expression. The node parameters of each node in the trigger condition node group are formatted according to the first preset format and node connection relationship to obtain the trigger condition expression. The node parameters of each non-time node are formatted according to the first preset format and node connection relationship to obtain the action expression. The target expression is obtained by combining the time expression, the trigger condition expression, and the action expression.

[0078] In this embodiment, the first preset format can be an EL (Expression Language) format or a format of other expression languages, and the second preset format can be a Cron format or a format of other timing expressions. Time nodes include execution time nodes or delayed execution nodes. Execution time nodes indicate when the action is executed, and delayed execution nodes indicate how long the action is delayed before execution.

[0079] The technical solution of the present invention will be illustrated below by providing a specific embodiment in actual work.

[0080] The process for generating the target expression is as follows: S1. Obtain the visualization node data and cache the delay nodes or execution time nodes for subsequent separate generation of time expressions; S2. Locate the starting node based on the node connection relationship. Starting from the starting node, perform node context and integrity checks according to preset rules. The preset rules include: Rule (1) must contain a trigger condition class node that constitutes at least one trigger condition and an execution action class node that constitutes at least one execution action; Rule (2) Except for the starting node, all nodes must have a left-side connected node as the upstream node. The left-side connected node represents the upstream node. Rule (3) Execution relationships require that there be at least two nodes connected to the left side of the node and at least one node connected to the right side, with the nodes connected to the right side representing downstream nodes; Rule (4) Except for the start node and execution relationship nodes, the user configuration information of other nodes must not be empty; Rule (5) The right-hand connection node of the device trigger node must be a device status node or a device attribute node; Rule (6) The right-hand connecting node of the device execution node must be a device attribute node. Rule (7) The execution time node cannot be earlier than the start time of the timed trigger node; Rule (8) The left-hand connecting node of an execution relationship node must be a trigger condition node; Rule (9) The node connected to the right of the scene trigger node must be a scene state node; Rule (10) The right-side connecting node of a scene state node cannot be a node that simultaneously satisfies the condition; Rule (11) When multiple trigger condition nodes point to the same execution action node, an execution relationship node must be added in between for logical judgment; Rule (12) The node connected to the right of the starting node can only be one node and must be a trigger condition node; Rule (13) The node connected to the right side of an execution relationship node must be an execution action node; Rule (14) The right-hand connecting node of the execution condition node must be an execution condition attribute node.

[0081] S3, Assemble the node context, which includes user configuration information for each different type of node, Cron expression transformations corresponding to time nodes, etc. S4. Recursively perform a depth-first traversal to construct expressions, including at least a trigger condition expression and an execution action expression. If the trigger condition node group or the execution action node group has only one child node, the corresponding expression is processed serially, which can be represented by the identifier "THEN" enclosed in parentheses. If the number of child nodes in the trigger condition node group or the execution action node group is greater than 1, the corresponding expression is processed in parallel, which can be represented by the identifier "WHEN" enclosed in parentheses. If there are no execution relationship nodes, only the expression needs to be appended sequentially for each execution path. If there are execution relationship nodes, the expressions need to be cached and grouped for processing in each sub-path. S5. Returns the complete expression string as the target expression.

[0082] Please see Figure 3 , Figure 3 This is a block diagram of a device control system according to an embodiment of the present invention. This system can be applied to... Figure 1 The implementation environment shown can also be applied to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the system is applicable.

[0083] like Figure 3As shown, the exemplary device control system includes: an orchestration module 310, used by the user to orchestrate a visual scene through a visual node editor, generating visual node data, which includes multiple nodes and node connection relationships. Among the multiple nodes, there is at least one trigger condition node group and one execution action node group. The trigger condition node group represents the trigger condition, and the execution action node group represents the execution action. Each node has corresponding node parameters; a data processing module 320, used to verify the node parameters and node connection relationships of each node, and after the verification is passed, to generate a target expression based on the node parameters and node connection relationships of each node; and a control module 330, used to control the device according to control instructions, which are generated based on the target expression.

[0084] In this embodiment, the orchestration module 310 can be a client device with an operable display panel, such as a mobile phone, computer, smart TV, or tablet, which is equipped with a visual node editor. The data processing module 320 can be a server such as a local server or cloud server, or an edge computing box. The control module 330 can be a control chip, or a controller such as a PLC (Programmable Logic Controller), or a server. The orchestration module 310, data processing module 320, and control module 330 can be configured in the same electronic device or can be independent electronic devices. No restrictions are imposed here.

[0085] This equipment control system utilizes a visual node editor to visualize scene logic as visual nodes and their connections, reducing the development difficulty and barrier for users in scene orchestration. This enables low-code or no-code personalized orchestration, enhancing its flexibility. Automated verification of node parameters and connections effectively reduces logical errors and conflicts, ensuring the consistency and executability of expressions. This guarantees accurate and executable subsequent device control commands, improving system stability. Standardized target expressions are generated based on visual node data, enabling automatic conversion from visual nodes to machine language. This allows the system to parse scene logic, resulting in strong adaptability.

[0086] It should be noted that the equipment control system provided in the above embodiments and the equipment control method provided in the above embodiments belong to the same concept. The specific way in which each module performs its operation has been described in detail in the method embodiments, and will not be repeated here. In practical applications, the equipment control system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0087] In one embodiment of the present invention, an electronic device is also provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the device control methods provided in the above embodiments.

[0088] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. It should be noted that... Figure 4 The electronic device 400 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0089] like Figure 4 As shown, the electronic device 400 includes a processor 401, a memory 402, and a communication bus 403; the communication bus 403 is used to connect the processor 401 and the memory 402; the processor 401 is used to execute the computer program stored in the memory 402 to implement one or more methods in the above embodiments.

[0090] In one embodiment of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored. When executed by a computer's processor, the computer program causes the computer to perform the device control method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0091] In one embodiment of the present invention, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the device control methods provided in the various embodiments described above.

[0092] The electronic device provided in this embodiment of the invention includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic device performs the various steps of the above method.

[0093] In embodiments of the present invention, the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.

[0094] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0095] As will be understood by those skilled in the art, the computer-readable storage medium in the embodiments of the present invention can implement all or part of the steps of the above method embodiments by hardware related to computer programs. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disks, or optical disks.

[0096] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A device control method characterized by, The method comprises: obtaining visual node data, the visual node data being generated based on a user to arrange a visual scene, the visual node data comprising a plurality of nodes and a node connection relationship, the plurality of nodes comprising at least one trigger condition node group and one execution action node group, the trigger condition node group representing a trigger condition, the execution action node group representing an execution action, each node having corresponding node parameters; checking the node parameters of each node and the node connection relationship, and after the checking is passed, generating a target expression according to the node parameters of each node and the node connection relationship; controlling a device based on the target expression.

2. The device control method according to claim 1, characterized by, Obtaining visual node data comprises: displaying a plurality of initial nodes through a pre-set visual node editor; obtaining node selection information, user configuration information and node connection information of the user; determining each node from the plurality of initial nodes according to the node selection information, generating node parameters of each node according to the user configuration information, and generating the node connection relationship according to the node connection information, so as to take each node and the node parameters of each node, the node connection relationship as the visual node data.

3. The device control method according to claim 1, wherein Checking the node parameters of each node and the node connection relationship comprises: checking whether the node parameters of each node are complete and whether the node connection relationship is correct to generate a checking result; if the checking result meets a pre-set condition, the checking is passed, wherein the pre-set condition comprises that the node parameters of each node are complete and the context of each node is correct; if the checking result does not meet the pre-set condition, the checking is not passed.

4. The device control method according to claim 3, characterized by, Checking whether the node connection relationship is correct comprises: determining whether a downstream node of a device execution node is a device action function node, wherein the execution action node group comprises the device execution node and the device action function node; determining whether a downstream node of a trigger condition main node is a trigger condition sub-node, wherein the trigger condition node group comprises the trigger condition main node and the trigger condition sub-node.

5. The device control method according to claim 4, wherein Checking whether the node connection relationship is correct further comprises: if the number of the trigger condition node groups is one, determining whether a downstream node of the trigger condition sub-node is the device execution node; if the number of the trigger condition node groups is multiple, determining whether a downstream node of each trigger condition sub-node is an execution relationship node, and whether a downstream node of the execution relationship node is the device execution node.

6. The device control method according to claim 4, wherein Checking whether the node connection relationship is correct further comprises: if the plurality of nodes further comprise an execution condition node group, determining whether a downstream node of the trigger condition sub-node is an execution condition node, whether a downstream node of the execution condition node is an execution condition attribute node, and whether a downstream node of the execution condition attribute node is the device execution node, wherein the execution condition node group comprises the execution condition node and the execution condition attribute node.

7. The device control method according to claim 1, wherein Generating a target expression according to the node parameters of each node and the node connection relationship comprises: The node parameters of each node in the trigger condition node group are format-converted according to the first preset format and the node connection relationship, to obtain a trigger condition expression; the node parameters of each node in the execution action node group are format-converted according to the first preset format and the node connection relationship, to obtain an execution action expression; and the trigger condition expression and the execution action expression are integrated to obtain the target expression. Or, The nodes in the execution action node group are divided to obtain time nodes and non-time nodes; the node parameters of the time nodes are format-converted according to a second preset format to obtain a time expression; the node parameters of each node in the trigger condition node group are format-converted according to the first preset format and the node connection relationship to obtain the trigger condition expression; the node parameters of each non-time node are format-converted according to the first preset format and the node connection relationship to obtain the execution action expression; and the time expression, the trigger condition expression and the execution action expression are integrated to obtain the target expression.

8. An apparatus control system characterized by comprising: The system comprises: An arrangement module configured to arrange a visual scene by a user through a visual node editor, to generate visual node data, wherein the visual node data comprises a plurality of nodes and node connection relationships, the plurality of nodes at least comprising a trigger condition node group and an execution action node group, the trigger condition node group representing a trigger condition, the execution action node group representing an execution action, and each node having corresponding node parameters; A data processing module configured to verify the node parameters of each node and the node connection relationships, and to generate a target expression according to the node parameters of each node and the node connection relationships after the verification is passed; A control module configured to perform device control according to a control instruction, the control instruction being generated based on the target expression.

9. An electronic device, comprising: The electronic device comprises: One or more processors; A storage device configured to store one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the device control method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, which, when executed by a processor of a computer, causes the computer to perform the device control method according to any one of claims 1-7.