Device control method, apparatus and device
Patent Information
- Application Number
- CN202310202486.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-02-23
AI Technical Summary
然而,在上述过程中,一级设备中存储的设备控制流程通常是固定的,不易更改,且一级设备通常是通过驱动与二级设备进行通信,导致对二级设备的控制灵活性差
[0082] This application provides a device control method, apparatus, and device. It can acquire a device control flow in a primary device and, based on the device control flow and at least one second communication component, control at least one secondary device to obtain control feedback information from the at least one secondary device, and process the control feedback information according to the device control flow. Since the device control flow can be sent from a cloud device to multiple primary devices, dynamically distributing the device control flow from the cloud device to the primary devices facilitates updating the device control flows in multiple primary devices. Furthermore, the primary device can communicate with at least one secondary device through the second communication component, eliminating the need for manual installation of the corresponding driver for the secondary device in the primary device. Therefore, the overall control flexibility of the secondary devices is improved.
Smart Images

Figure CN116192918B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a device control method, apparatus, and device. Background Technology
[0002] In the Internet of Things (IoT), devices with complex processing capabilities can be called Level 1 devices. For example, a Level 1 device could be a computer. Edge devices with simpler functions can be called Level 2 devices, such as webcams and sensors. A Level 1 device can communicate with multiple Level 2 devices to control them.
[0003] In related technologies, primary devices store device control flows, which can be used to control multiple secondary devices. However, in the above process, the device control flows stored in the primary devices are usually fixed and not easily changed, and the primary devices typically communicate with the secondary devices through drivers, resulting in poor control flexibility for the secondary devices. Summary of the Invention
[0004] This application provides a method, apparatus, and device for controlling equipment, thereby improving the control flexibility of secondary equipment.
[0005] In a first aspect, embodiments of this application provide a device control method applied to a primary device, the primary device including a proxy component, a first communication component, and at least one second communication component, the method comprising:
[0006] The device control flow is obtained in the first-level device, and the device control flow is received from the cloud device through the proxy component and the first communication component;
[0007] According to the device control process and the at least one second communication component, control at least one secondary device to obtain control feedback information from the at least one secondary device;
[0008] The control feedback information is processed according to the device control process.
[0009] In one possible implementation, according to the device control flow and the at least one second communication component, at least one secondary device is controlled to obtain control feedback information from the at least one secondary device, including:
[0010] Among the multiple process nodes of the device control process, the target process node to be executed is determined;
[0011] Determine the target device corresponding to the target process node among the at least one secondary device;
[0012] The target device is controlled by the second communication component corresponding to the target device according to the target process node, so as to obtain the control feedback information of the target device.
[0013] In one possible implementation, the target process node is a data acquisition node; the target device is controlled according to the target process node through a second communication component corresponding to the target device to obtain control feedback information of the target device, including:
[0014] Generate a data acquisition instruction based on the target process node;
[0015] The data acquisition instruction is sent to the target device through the second communication component corresponding to the target device;
[0016] The control feedback information includes the feedback data, which is received by the second communication component corresponding to the target device, and the feedback data is received by the second communication component corresponding to the data acquisition instruction sent by the target device.
[0017] In one possible implementation, the target process node is a control node; the target device is controlled according to the target process node via a second communication component corresponding to the target device to obtain control feedback information of the target device, including:
[0018] Generate device control instructions based on the target process node;
[0019] The device control command is sent to the target device through the second communication component corresponding to the target device;
[0020] The device control result corresponding to the device control command sent by the target device is received through the second communication component corresponding to the target device, and the control feedback information includes the device control result.
[0021] In one possible implementation, among the multiple process nodes of the device control flow, determining the target process node to be executed includes:
[0022] Determine the last executed first process node in the device control process;
[0023] The target process node is determined in the device control process based on the control feedback information corresponding to the first process node.
[0024] In one possible implementation, prior to obtaining the device control flow in the primary device, the method further includes:
[0025] The process file sent by the cloud device is received through the proxy component and the first communication component;
[0026] The equipment control process is determined according to the process document;
[0027] The device control process is stored in the preset storage space of the primary device.
[0028] In one possible implementation, determining the device control flow based on the process document includes:
[0029] The process file is parsed to obtain an initial device control process, which includes at least one item to be updated.
[0030] Determine the equipment information of at least one secondary device controlled by the primary device;
[0031] Based on the device information of the at least one secondary device, update the at least one item to be updated in the initial device control flow to obtain the device control flow.
[0032] In one possible implementation, updating the at least one item to be updated in the initial device control flow based on the device information of the at least one secondary device includes:
[0033] For any one of the at least one items to be updated, determine the secondary device corresponding to the item to be updated and the first information type of the item to be updated;
[0034] Based on the first information type, obtain the attribute value of the secondary device corresponding to the item to be updated, wherein the type of the attribute value is the first information type;
[0035] Replace the item to be updated in the initial device control flow with the attribute value.
[0036] In one possible implementation, the control feedback information is processed according to the device control flow, including:
[0037] The control feedback information is processed by protocol conversion to obtain target data;
[0038] The target data is processed according to the device control process.
[0039] In one possible implementation, processing the target data according to the device control flow includes:
[0040] If the device control flow instructs that the target data be sent to the third device, then the target data is sent to the third device through the first communication component.
[0041] Secondly, embodiments of this application provide a device control apparatus, the apparatus comprising: a first acquisition module, a control module, and a processing module, wherein,
[0042] The first acquisition module is used to acquire the device control flow in the primary device, wherein the device control flow is received from the cloud device through the proxy component and the first communication component;
[0043] The control module is used to control at least one secondary device according to the device control process and at least one second communication component, so as to obtain control feedback information from the at least one secondary device.
[0044] The processing module is used to process the control feedback information according to the device control process.
[0045] In one possible implementation, the control module is specifically used for:
[0046] Among the multiple process nodes of the device control process, the target process node to be executed is determined;
[0047] Determine the target device corresponding to the target process node among the at least one secondary device;
[0048] The target device is controlled by the second communication component corresponding to the target device according to the target process node, so as to obtain the control feedback information of the target device.
[0049] In one possible implementation, the control module is specifically used for:
[0050] Generate a data acquisition instruction based on the target process node;
[0051] The data acquisition instruction is sent to the target device through the second communication component corresponding to the target device;
[0052] The control feedback information includes the feedback data, which is received by the second communication component corresponding to the target device, and the feedback data is received by the second communication component corresponding to the data acquisition instruction sent by the target device.
[0053] In one possible implementation, the control module is specifically used for:
[0054] Generate device control instructions based on the target process node;
[0055] The device control command is sent to the target device through the second communication component corresponding to the target device;
[0056] The device control result corresponding to the device control command sent by the target device is received through the second communication component corresponding to the target device, and the control feedback information includes the device control result.
[0057] In one possible implementation, the control module is specifically used for:
[0058] Determine the last executed first process node in the device control process;
[0059] The target process node is determined in the device control process based on the control feedback information corresponding to the first process node.
[0060] In one possible implementation, the device further includes a second acquisition module, a determination module, and a storage module.
[0061] The second acquisition module is used to receive the process file sent by the cloud device through the proxy component and the first communication component;
[0062] The determining module is used to determine the device control process based on the process file;
[0063] The storage module is used to store the device control process into the preset storage space of the primary device.
[0064] In one possible implementation, the determining module is specifically used for:
[0065] The process file is parsed to obtain an initial device control process, which includes at least one item to be updated.
[0066] Determine the equipment information of at least one secondary device controlled by the primary device;
[0067] Based on the device information of the at least one secondary device, update the at least one item to be updated in the initial device control flow to obtain the device control flow.
[0068] In one possible implementation, the determining module is specifically used for:
[0069] For any one of the at least one items to be updated, determine the secondary device corresponding to the item to be updated and the first information type of the item to be updated;
[0070] Based on the first information type, obtain the attribute value of the secondary device corresponding to the item to be updated, wherein the type of the attribute value is the first information type;
[0071] Replace the item to be updated in the initial device control flow with the attribute value.
[0072] In one possible implementation, the processing module is specifically used for:
[0073] The control feedback information is processed by protocol conversion to obtain target data;
[0074] The target data is processed according to the device control process.
[0075] In one possible implementation, the processing module is specifically used for:
[0076] If the device control flow instructs that the target data be sent to the third device, then the target data is sent to the third device through the first communication component.
[0077] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0078] The memory stores computer-executed instructions;
[0079] The processor executes computer execution instructions stored in the memory, causing the processor to perform the device control method according to any one of the first aspects.
[0080] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the device control method described in any of the first aspects.
[0081] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the device control method shown in any of the first aspects.
[0082] This application provides a device control method, apparatus, and device. It can acquire a device control flow in a primary device and, based on the device control flow and at least one second communication component, control at least one secondary device to obtain control feedback information from the at least one secondary device, and process the control feedback information according to the device control flow. Since the device control flow can be sent from a cloud device to multiple primary devices, dynamically distributing the device control flow from the cloud device to the primary devices facilitates updating the device control flows in multiple primary devices. Furthermore, the primary device can communicate with at least one secondary device through the second communication component, eliminating the need for manual installation of the corresponding driver for the secondary device in the primary device. Therefore, the overall control flexibility of the secondary devices is improved. Attached Figure Description
[0083] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0084] Figure 1 A schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application;
[0085] Figure 2 A flowchart illustrating a device control method provided for an exemplary embodiment of this application;
[0086] Figure 3 A schematic diagram of a device control process provided for an exemplary embodiment of this application;
[0087] Figure 4 A schematic diagram illustrating a primary device connecting multiple secondary devices, provided as an exemplary embodiment of this application;
[0088] Figure 5 A flowchart illustrating another device control method provided for an exemplary embodiment of this application;
[0089] Figure 6 A schematic diagram of a device control method provided for an exemplary embodiment of this application;
[0090] Figure 7 A schematic diagram of the structure of a device control apparatus provided for an exemplary embodiment of this application;
[0091] Figure 8 A schematic diagram of another device control apparatus provided as an exemplary embodiment of this application;
[0092] Figure 9 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0093] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0094] Figure 1 Please refer to the schematic diagram of an application scenario provided for an exemplary embodiment of this application. Figure 1This includes cloud devices, primary devices, and at least one secondary device. For example, at least one secondary device can be secondary device 1, secondary device 2, ..., secondary device n.
[0095] Cloud devices and primary devices can communicate with each other, and primary devices can communicate with any secondary device. For example, a cloud device can be a computer, a primary device can be a computer, and a secondary device can be a webcam.
[0096] Cloud devices can send device control procedures to primary devices. Upon receiving the device control procedure, the primary device can control at least one secondary device according to the procedure and obtain control feedback information from at least one secondary device. For example, in a traffic scenario, multiple network cameras need to be controlled. If device control procedure 1 can be used to control the network cameras, the cloud device can send device control procedure 1 to the primary device. The primary device can then control the multiple network cameras to take pictures according to device control procedure 1 and obtain the photos taken by the multiple network cameras.
[0097] In related technologies, primary devices store device control flows, which can be used to control multiple secondary devices. However, in the above process, the device control flows stored in the primary devices are usually fixed and not easily changed, and the primary devices typically communicate with the secondary devices through drivers, resulting in poor control flexibility for the secondary devices.
[0098] In this embodiment, the primary device may include a proxy component, a first communication component, and at least one second communication component. The primary device can receive device control flow from the cloud device in real time through the proxy component and the first communication component. Based on the device control flow, it can communicate with at least one secondary device through the at least one second communication component and receive control feedback information from the at least one secondary device. Since the device control flow in the primary device can be dynamically received from the cloud device, the cloud device can send device control flow to multiple primary devices in a unified batch. Furthermore, the primary device can communicate with at least one secondary device through the second communication component without needing to download the corresponding driver for the secondary device, thus comprehensively improving the control flexibility of the secondary devices.
[0099] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.
[0100] Figure 2 This is a schematic flowchart illustrating a device control method provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 2The method may include:
[0101] S201. Obtain the equipment control process from the primary equipment.
[0102] The execution entity in this application embodiment can be a primary device, or a visual programming component or device control device installed in the primary device. The device control device can be implemented by software or by a combination of software and hardware. The device control device can be a processor in the primary device. For ease of understanding, the following description will use a primary device as the execution entity.
[0103] Level 1 devices can be electronic devices with complex processing capabilities. For example, a Level 1 device can be a computer.
[0104] The device control process can be obtained by sending data from cloud devices to primary devices. The device control process may include multiple process nodes.
[0105] Below, in conjunction with Figure 3 The equipment control process is explained.
[0106] Figure 3 This is a schematic diagram of a device control process provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 3 The equipment control process can include 9 process nodes, namely sending a temperature query command, obtaining temperature data, determining whether the temperature is greater than 30 degrees, sending an air conditioner start command, sending an air conditioner temperature command, sending a humidity query command, obtaining humidity data, determining whether the humidity is less than 50%, and sending a humidifier start command.
[0107] Optionally, the primary device may include a proxy component, a first communication component, and a visual programming component.
[0108] The agent component can be used to retrieve files sent by cloud devices.
[0109] The first communication component can be used for communication between Tier 1 devices and cloud devices. For example, the first communication component can be a Message Queuing Telemetry Transport (MQTT) component.
[0110] Visual programming components can be used to acquire and run device control flows within a primary device. For example, a visual programming component could be a Node-RED component.
[0111] In one alternative embodiment, the cloud device may send device control procedures to at least one Tier 1 device via Over-The-Air (OTA) technology.
[0112] For any given Level 1 device, it can receive at least one device control flow from the cloud device via a proxy component and a first communication component. After receiving the device control flow, the Level 1 device can retrieve and run it using a visual programming component. For example, if the cloud device sends device control flow 1 to the Level 1 device, the Level 1 device can receive device control flow 1 via the proxy component and the first communication component, retrieve and run device control flow 1 using the visual programming component.
[0113] S202. According to the equipment control process and at least one second communication component, control at least one secondary device to obtain control feedback information from at least one secondary device.
[0114] The second communication component can be used for communication between a primary device and at least one secondary device. For example, if the second communication component is a Long Range Radio (LoRa) component, the primary device can communicate with multiple secondary devices through the LoRa component.
[0115] Secondary devices can be relatively simple electronic devices. For example, secondary devices can be sensors, air conditioners, network cameras, etc.
[0116] Control feedback information refers to the result obtained by secondary equipment in response to the control of primary equipment.
[0117] Since a primary device can connect to multiple secondary devices to control the connected secondary devices, at least one secondary communication component can be set in the primary device to communicate with the corresponding secondary device.
[0118] Below, in conjunction with Figure 4 This section explains the connection between primary and secondary equipment.
[0119] Figure 4 This is a schematic diagram illustrating the connection of a primary device to multiple secondary devices, provided as an exemplary embodiment of this application. Please refer to... Figure 4 The primary device may include multiple secondary communication components. For example, the secondary communication components may be serial port components, LoRa components, or Rapid Spanning Tree Protocol (RSTP) components.
[0120] Serial wireless device 1, LoRa wireless device 1, and RSTP wireless device 1 are all wireless devices located closer to the primary device; Serial wireless device 2, LoRa wireless device 2, and RSTP wireless device 2 are all wireless devices located closer to the secondary device.
[0121] Assume the secondary devices connected to the primary device include a humidity sensor, a temperature sensor, and a webcam. For any given secondary device, there can be a corresponding second communication component. For example, if the secondary device connected to the primary device is a humidity sensor, and the second communication component corresponding to the humidity sensor is a serial port component, then the primary device can establish a wireless connection with serial port wireless device 1 via the serial port component. Serial port wireless device 1 can then wirelessly connect with serial port wireless device 2 via the serial port protocol. Serial port wireless device 2 can then establish a wireless connection with the humidity sensor, enabling the primary device to communicate wirelessly with the humidity sensor via the serial port component. Similarly, if the second communication component corresponding to the temperature sensor is a LoRa component, then the primary device can communicate wirelessly with the temperature sensor via the LoRa component using the LoRa protocol. If the second communication component corresponding to the webcam is an RSTP component, then the primary device can communicate wirelessly with the webcam via the RSTP component using the RSTP protocol.
[0122] After a primary device establishes a wireless connection with at least one secondary device, since the device control process can include multiple process nodes, and any process node can have a corresponding secondary device, the primary device can control at least one secondary device according to the device control process and the second communication component.
[0123] In an optional embodiment, at least one secondary device can be controlled according to the device control flow and at least one second communication component to obtain control feedback information of at least one secondary device in the following manner: determining the target flow node to be executed among multiple flow nodes of the device control flow; determining the target device corresponding to the target flow node among at least one secondary device; and controlling the target device according to the target flow node through the second communication component corresponding to the target device to obtain control feedback information of the target device.
[0124] For example, if a primary device controls four secondary devices: a temperature sensor, a humidity sensor, an air conditioner, and a humidifier, and the device control process is as follows: Figure 3 As shown in the diagram, the target process node to be executed can be determined in the device control flow. Assuming the target process node to be executed is sending a temperature query command, the target device corresponding to this target process node can be determined to be a temperature sensor among the four secondary devices. If the second communication component corresponding to the temperature sensor is a LoRa component, a temperature query command can be sent to the temperature sensor according to this target process node to obtain temperature data.
[0125] S203. Process the control feedback information according to the equipment control process.
[0126] In one optional embodiment, the control feedback information can be processed according to the device control flow in the following manner: performing protocol conversion processing on the control feedback information to obtain target data; and processing the target data according to the device control flow.
[0127] Protocol conversion processing refers to converting data received through different communication protocols into data that can be uniformly recognized. Target data can include image data, digital data, etc.
[0128] The target data is the data obtained by the primary device after performing protocol conversion processing on the control feedback information. For example, if the control feedback information 1 sent by the secondary device 1 includes "Active", which indicates that the secondary device 1 is in the on state, then "Active" can be processed by protocol conversion to obtain the target data "01", which indicates that the secondary device 1 is in the on state.
[0129] Since different secondary devices may have different second communication components, the data format of the control feedback information sent by the secondary devices may also be different. Therefore, it is necessary to perform protocol conversion processing on the control feedback information to obtain target data that can be uniformly identified.
[0130] For example, if the second communication component used by secondary device 1 is a LoRa component, and the second communication component used by secondary device 2 is a serial port component, then the control feedback information sent by secondary device 1 and secondary device 2 can be protocol-converted separately to obtain recognizable target data. For example, if control feedback information 1 sent by secondary device 1 includes "Active", and control feedback information 2 sent by secondary device 2 includes "true (correct)", then "Active" and "true" can be protocol-converted to obtain uniformly recognizable data. For example, "Active" and "true" can be protocol-converted to obtain "01", which can be used to indicate that the corresponding device is in an on state.
[0131] Optionally, after obtaining the target data, the primary equipment can also process the target data according to the equipment control process.
[0132] For example, if the equipment control process is as follows Figure 3 As shown, the equipment control process includes process node 3 for determining whether the temperature is greater than 30 degrees. If the primary equipment obtains the target data as 28 degrees, the primary equipment can process 28 degrees according to process node 3 of the equipment control process, that is, it can determine whether 28 degrees is greater than 30 degrees.
[0133] In this embodiment, the device control flow can be obtained from a primary device, and at least one secondary device can be controlled based on the device control flow and at least one second communication component to obtain control feedback information from the at least one secondary device. This control feedback information can then be processed according to the device control flow. Since the device control flow can be sent from a cloud device to multiple primary devices, dynamically distributing the device control flow from the cloud device to the primary devices facilitates the updating and management of the device control flows across multiple primary devices. Furthermore, the primary device can communicate with at least one secondary device through the second communication component, eliminating the need for manual installation of the corresponding driver for the secondary device in the primary device. Therefore, the overall control flexibility of the secondary devices is improved.
[0134] Below, in Figure 2 Based on the illustrated embodiments, combined with Figure 5 The above-mentioned equipment control methods will be further explained in detail.
[0135] Figure 5 A schematic flowchart illustrating another device control method provided for an exemplary embodiment of this application. Please refer to... Figure 5 The method may include:
[0136] S501, Receive process files sent by the cloud device through the proxy component and the first communication component.
[0137] Optionally, a visual programming application can be installed on the cloud-based device. Users can arrange device control processes by dragging and dropping multiple components within the visual programming application. For any process node in the device control process, corresponding secondary device information can be configured for that node.
[0138] Optionally, the visual programming application may include multiple device control flow templates, allowing users to quickly program device control flows that meet their needs based on the templates.
[0139] The cloud-based device can generate a corresponding process file based on the device control flow. Optionally, the process file can be a compressed file. For example, a user can program device control flow 1 in the visual programming application of the cloud-based device, and the cloud-based device can then generate a corresponding process file 1 based on device control flow 1.
[0140] After generating the process file corresponding to the device control process, the cloud device can send the process file to the primary device via OTA technology. The primary device can receive the process file sent by the cloud device through the proxy component and the first communication component. For example, if the process file corresponding to device control process 1 is process file 1, the cloud device can send process file 1 to the primary device via OTA technology. The primary device can receive process file 1 through the proxy component and the first communication component.
[0141] S502. Determine the equipment control process based on the process document.
[0142] Optionally, after the primary device obtains the process file, it can parse and process the process file using a visual programming component to obtain the device control process.
[0143] Specifically, the equipment control process can be determined based on the process document in the following way: the process document is parsed to obtain the initial equipment control process; the equipment information of at least one secondary device controlled by the primary device is determined; based on the equipment information of at least one secondary device, at least one item to be updated in the initial equipment control process is updated to obtain the equipment control process.
[0144] Since cloud devices can send the same device control flow to at least one primary device, but different primary devices may be associated with different secondary devices, in order to enable cloud devices to send device control flows to at least one primary device in a unified batch, the information items of the corresponding secondary devices in the device control flow can be set as items to be updated to generate the initial device control flow.
[0145] The initial device control flow may include at least one item to be updated. In the initial device flow, for any item to be updated, there is a corresponding attribute value, which can be represented using placeholders. For example, if item 1 to be updated is the Internet Protocol (IP) address of a secondary device, then in this item, the IP address can be represented by the placeholder ${IP}; if item 2 to be updated is the device name of a secondary device, then in this item, the device name can be represented by the placeholder ${device name}.
[0146] Optionally, after the primary device obtains the process file, it can parse and process the process file using a visual programming component. That is, the computer code corresponding to the process file can be identified and the process file can be decompressed to obtain the initial device control process.
[0147] For example, if the process file obtained by the Level 1 device is process file 1, then process file 1 can be parsed and processed using a visual programming component to obtain the initial device control process 1. If the initial device control process 1 includes an item to be updated 1, and item to be updated 1 is an IP address, then item to be updated 1 can be represented by the placeholder ${IP}.
[0148] Optionally, after obtaining the initial device control flow, at least one secondary device controlled by the primary device and the device information of at least one secondary device can be determined through a visual programming component.
[0149] Device information may include device name, device type, IP address, port number and / or device identifier, etc.
[0150] Optionally, the visual programming component can determine at least one secondary device controlled by a primary device in the following two ways.
[0151] Method 1: The primary device can actively scan ports using a visual programming component to discover at least one secondary device and obtain its device information. The primary device can then send this device information to the cloud device, enabling the cloud device to determine the confirmation result of the at least one secondary device. The confirmation result indicates whether the secondary device is controlled by the primary device or not. The primary device can also receive the confirmation result from the cloud device and, based on this result, identify the at least one secondary device controlled by the primary device.
[0152] Method 2: Secondary devices can send their own device information and operating status to primary devices through an open second communication component. The device information may include the communication protocol used by the secondary device, the device type, and the device identifier. Primary devices can use a visual programming component to determine at least one secondary device associated with the primary device based on the device information sent by the secondary device.
[0153] Optionally, after determining that at least one secondary device is controlled by the primary device, the device information of at least one secondary device can be determined. For example, if it is determined that there are four secondary devices controlled by the primary device, namely a temperature sensor, a humidity sensor, an air conditioner, and a humidifier, the device information of these four secondary devices can be determined through a visual programming component.
[0154] In an optional embodiment, at least one item to be updated in the initial device control flow can be updated in the following manner, based on the device information of at least one secondary device: for any one of the at least one item to be updated, determine the secondary device corresponding to the item to be updated and the first information type of the item to be updated; obtain the attribute value of the secondary device corresponding to the item to be updated based on the first information type, wherein the type of the attribute value is the first information type; and replace the item to be updated in the initial device control flow with the attribute value.
[0155] Optionally, the process node to which the item to be updated belongs can be determined, and based on the process node, the secondary device corresponding to the item to be updated and the first information type of the item to be updated can be determined.
[0156] For example, if the initial device process includes an item to be updated (Item 1), and Item 1 belongs to process node 1, and if process node 1 is sending a temperature query command, then based on process node 1, it can be determined that the secondary device corresponding to Item 1 is a temperature sensor, and the first information type corresponding to Item 1 can also be determined. Assume that the first information type corresponding to Item 1 can be an IP address.
[0157] Optionally, after determining the secondary device corresponding to the item to be updated and the first information type of the item to be updated, the attribute value of the secondary device corresponding to the item to be updated can be obtained according to the first information type. Since the attribute value of the item to be updated is represented by a placeholder in the initial device control flow, the placeholder of the item to be updated can be replaced with the attribute value according to the attribute value of the secondary device.
[0158] For example, if the initial equipment process includes item 1 to be updated, and the corresponding secondary device for item 1 is a temperature sensor, and the corresponding first information type can be an IP address, then the attribute value of the temperature sensor, i.e., the IP address, can be obtained based on the first information type. Assuming the obtained IP address is 192.168.100.126 / 25, then the placeholder ${IP} in item 1 to be updated can be replaced with "192.168.100.126 / 25" based on this IP address.
[0159] Optionally, for any item to be updated in the initial device control flow, the secondary device corresponding to the item to be updated and the first information type can be determined, and the attribute value of the corresponding secondary device can be obtained according to the first information type, so as to replace the item to be updated with the attribute value, thereby obtaining the device control flow.
[0160] S503. Store the equipment control process in the preset storage space of the primary equipment.
[0161] For example, if the corresponding device control flow 1 is obtained based on the initial device control flow 1, then the device control flow 1 can be stored in the preset storage space of the first-level device.
[0162] S504. Obtain the equipment control process from the primary equipment.
[0163] Optionally, the device control flow can be obtained from the preset storage space of the primary device through a visual programming component.
[0164] For example, if device control flow 1 is stored in the preset storage space of a primary device, then device control flow 1 can be obtained from the preset storage space through a visual programming component.
[0165] S505. Among the multiple process nodes in the equipment control process, determine the target process node to be executed.
[0166] In an optional embodiment, the target process node to be executed can be determined among multiple process nodes in the device control process in the following manner: determine the last executed first process node in the device control process; determine the target process node in the device control process based on the control feedback information corresponding to the first process node.
[0167] For example, if the equipment control process is as follows Figure 3 As shown, if the last executed first process node in the equipment control flow is to acquire temperature data, then the control feedback information corresponding to the first process node is the temperature data. Assuming the temperature data is 35 degrees Celsius, the target process node in the equipment control flow can be determined based on the control feedback information. That is, the temperature can be judged to determine whether the temperature is greater than 30 degrees Celsius. If it is greater than 30 degrees Celsius, the target process node can be determined to be sending an air conditioning start command; if the temperature is not greater than 30 degrees Celsius, the target process node can be determined to be sending a humidity query command.
[0168] S506. Determine the target device corresponding to the target process node in at least one secondary device.
[0169] Since a primary device can control at least one secondary device, after determining the target process node, the target device corresponding to the target process node can be determined from at least one secondary device.
[0170] For example, if the target process node is to send a humidity query command, then the target device corresponding to the target process node can be determined to be a humidity sensor in at least one secondary device.
[0171] S507. Control the target device according to the target process node through the second communication component corresponding to the target device to obtain control feedback information of the target device.
[0172] Optionally, after determining the target device, a second communication component corresponding to the target device can be determined. For example, if the target device is a temperature sensor, the corresponding second communication component can be a LoRa component.
[0173] In one optional embodiment, controlling the target device according to the target process node to obtain control feedback information from the target device may include the following two cases:
[0174] Scenario 1: The target process node is a data acquisition node.
[0175] In this case, a data acquisition instruction can be generated based on the target process node; the data acquisition instruction can be sent to the target device through the second communication component corresponding to the target device; the feedback data corresponding to the data acquisition instruction sent by the target device can be received through the second communication component corresponding to the target device, and the control feedback information includes the feedback data.
[0176] For example, if the target device is a temperature sensor and the corresponding second communication component is a LoRa component, then a data acquisition command, i.e., a temperature acquisition command, can be sent to the temperature sensor via the LoRa component. After receiving the temperature acquisition command, the temperature sensor can collect temperature data according to the command and send the collected temperature data to the primary device. The primary device can receive control feedback information sent by the temperature sensor via the LoRa component, and the control feedback information may include temperature data.
[0177] Scenario 2: The target process node is a control node.
[0178] In this case, device control instructions can be generated based on the target process node; the device control instructions can be sent to the target device through the second communication component corresponding to the target device; and the device control results corresponding to the device control instructions sent by the target device can be received through the second communication component corresponding to the target device, with the control feedback information including the device control results.
[0179] For example, if the target device is an air conditioner and the corresponding second communication component is a LoRa component, then a device control command, i.e., a command to turn on the air conditioner, can be sent to the air conditioner via the LoRa component. After receiving the command to turn on the air conditioner, it can turn it on and send a device control result to the primary device. The device control result can be "Active," indicating successful startup. The primary device can receive control feedback information sent by the air conditioner via the LoRa component, and the control feedback information can include "Active."
[0180] S508. Perform protocol conversion processing on the control feedback information to obtain the target data.
[0181] Optionally, after obtaining the control feedback information, the target data can be obtained by converting the protocol. For example, if control feedback information 1 sent by secondary device 1 includes "Active" and control feedback information 2 sent by secondary device 2 includes "true", then "Active" and "true" can be converted using a protocol to obtain uniformly identifiable data. For example, "Active" and "true" can be converted using a protocol to obtain "01", which can be used to indicate that the device is in the on state.
[0182] S509. Process the target data according to the equipment control process.
[0183] In one optional embodiment, processing the target data according to the device control flow may include the following three cases:
[0184] Scenario 1: The device control process instructs the sending of target data to the cloud device.
[0185] In this case, the target data can be sent to the cloud device through the first communication component.
[0186] Optionally, the target data can be sent to the cloud device in the following ways: the target data can be sent to the cloud device through the proxy component and the first communication component; or, the target data can be sent to the cloud device through the visual programming component and the first communication component.
[0187] For example, if the target data is image data, and the device control process includes process node 5 for sending the target data to the cloud device, then the target data, i.e., the image data, can be sent to the cloud device through the proxy component and the first communication component.
[0188] Scenario 2: The device control process instructs the application to send target data.
[0189] For example, if the primary device includes application 1, and the device control flow 1 includes process node 10 for sending target data to application 1, then application 1 can be identified in the primary device, and target data can be sent to application 1.
[0190] Scenario 3: The equipment control process instructs the sending of target data to a third device.
[0191] In this case, the target data is sent to the third device through the first communication component.
[0192] For example, if the target data is image data and the third device is a display device, and if the device control flow includes process node 7 for sending the target data to the third device, then the third device is determined to be the display device, and the target data, i.e., the image data, is sent to the third device. After receiving the image data, the third device can display an image based on the image data.
[0193] It should be noted that if the control feedback information includes video, the video can be converted into image format using a video conversion component. This can be done according to video streaming protocols such as RSTP, Real Time Messaging Protocol (RTMP), and the images can be output as structured data to cloud devices or third-party devices.
[0194] In this embodiment, a primary device can receive a process file sent by a cloud device through a proxy component and a first communication component. Based on the process file, it determines the device control process and stores it in a preset storage space. The primary device can obtain the device control process and, among multiple process nodes, determine the target process node to be executed. It can also determine the target device corresponding to the target process node in at least one secondary device. Furthermore, it can control the target device according to the target process node through the second communication component corresponding to the target device to obtain control feedback information from the target device. The primary device can perform protocol conversion processing on the control feedback information to obtain target data and process the target data according to the device control process. Since the device control process can be sent from the cloud device to multiple primary devices, dynamically distributing the device control process from the cloud device to the primary devices facilitates the updating and management of device control processes across multiple primary devices. Moreover, the primary device can communicate with at least one secondary device through the second communication component, eliminating the need for manual installation of the corresponding driver for the secondary device in the primary device. Therefore, the overall control flexibility of the secondary devices is improved.
[0195] Below, based on any of the above embodiments, combined with Figure 6 The above-mentioned equipment control method will be further explained in detail through specific examples.
[0196] Figure 6 This is a schematic diagram illustrating a device control method provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 6 This includes cloud devices, primary devices, and at least one secondary device.
[0197] Optionally, the cloud device may include a visual programming application, a secondary device management module, a secondary device monitoring module, and communication components.
[0198] Users can orchestrate device control processes by dragging and dropping multiple components in a visual programming application. Cloud-based devices can then generate corresponding process files based on the device control flow.
[0199] Optionally, when arranging the equipment control process, users can add parallel processing logic to multiple components of the equipment control process so that when the equipment control process is running in the primary equipment, the process nodes can be processed in parallel to ensure the stable operation of the primary equipment.
[0200] Cloud-based devices can manage at least one secondary device through a secondary device management module. This means that a secondary device can be registered in the cloud based on its primary device information, thus storing its information in the cloud. Optionally, the secondary device information may include device type, device identifier, and associated primary device. For example, if secondary device 1's information includes: device type is a temperature sensor, corresponding device identifier is 001, and associated primary device is computer 1, then secondary device 1 can be registered in the cloud based on its information, allowing the cloud to store its device information.
[0201] Cloud devices can monitor at least one secondary device through the secondary device monitoring module, which means it can monitor the operating status and network status of at least one secondary device.
[0202] Cloud devices can receive data sent by primary devices through communication components. For example, the communication component can be an MQTT component.
[0203] In step ①, the cloud device can generate a corresponding process file according to the device control process, and send the process file to the primary device through OTA technology.
[0204] The primary device may include a proxy component, a primary communication component, a visual programming component, and a secondary communication component. The visual programming component may include a parsing module, a secondary device discovery module, and a protocol conversion module.
[0205] Level 1 devices can receive process files through the agent component and the first communication component. In step ②, the visual programming component can obtain the process file and parse it through the parsing module to obtain the initial device control process.
[0206] Optionally, the visual programming component can use the secondary device discovery module to identify at least one secondary device controlled by the primary device. After identifying the at least one secondary device controlled by the primary device, the device information of the at least one secondary device can be determined.
[0207] In step ③, the primary device can use a visual programming component to update at least one item to be updated in the initial device control flow based on the device information of at least one secondary device, in order to obtain the device control flow.
[0208] Optionally, after obtaining the device control flow, the device control flow can be stored in a preset storage space.
[0209] In step ④, the primary device can obtain the device control flow from the preset storage space through the visual programming component.
[0210] In step ⑤, the primary device can control at least one secondary device through a visual programming component, based on the device control flow and the second communication component, to achieve device linkage between at least one secondary device. Specifically, the primary device can use the visual programming component to determine the target flow node to be executed among multiple flow nodes in the device control flow, and determine the target device corresponding to the target flow node among at least one secondary device. Then, it can use the second communication component corresponding to the target device to send instructions to the target device according to the target flow node to control the target device. The second communication component may include a serial port component, a LoRa component, and an RSTP component, etc.
[0211] In step ⑥, the secondary device can generate control feedback information corresponding to the instruction and send the control feedback information to the primary device.
[0212] After receiving control feedback information from the secondary device via the corresponding second communication component, in step ⑦, the primary device can perform protocol conversion and parsing processing on the control feedback information using a visual programming component to obtain the target data. Optionally, the target data may include metadata and feedback data. After obtaining the target data, it can be stored in a cache.
[0213] In step ⑧, if the device control flow instructs that target data be sent to the application, the primary device can retrieve the target data from the cache and send the target data to the application.
[0214] Optionally, after obtaining the target data, the application can process the target data to obtain processed data. For example, the application can perform filtering, calculations, and other processing on the target data.
[0215] Optionally, after acquiring the processed data, in step 9, the primary device can send the processed data to the cloud device through the proxy component and the first communication component. The cloud device can acquire the processed data through the communication component.
[0216] Optionally, the communication component in the cloud device can link to the user database to send the acquired processed data to the user database.
[0217] In this embodiment, the cloud device can generate a process file based on the device control flow and send the process file to the primary device. The primary device can receive the process file sent by the cloud device through a proxy component and a first communication component, determine the device control flow based on the process file, and store the device control flow in a preset storage space of the primary device. The device control flow can be obtained in the primary device, and among the multiple process nodes of the device control flow, the target process node to be executed can be determined. The target device corresponding to the target process node can be determined in at least one secondary device. Then, the target device can be controlled according to the target process node through the second communication component corresponding to the target device to obtain the control feedback information of the target device. The primary device can perform protocol conversion processing on the control feedback information to obtain target data, and process the target data according to the device control flow to obtain processed data. The primary device can send the processed data to the cloud device through the proxy component and the first communication component. Since the device control process can be sent from the cloud device to multiple primary devices, and the device control process is dynamically distributed from the cloud device to the primary device, it is convenient to update and manage the device control processes in multiple primary devices. Furthermore, the primary device can communicate with at least one secondary device through the second communication component, without the need for manual installation of the corresponding driver for the secondary device in the primary device. Therefore, the overall control flexibility of the secondary device is improved.
[0218] Figure 7 This is a schematic diagram of a device control apparatus provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 7 The device control unit 10 includes: a first acquisition module 11, a control module 12, and a processing module 13, wherein,
[0219] The first acquisition module 11 is used to acquire the device control flow in the primary device, wherein the device control flow is received from the cloud device through the proxy component and the first communication component;
[0220] The control module 12 is used to control at least one secondary device according to the device control process and at least one second communication component, so as to obtain control feedback information of the at least one secondary device.
[0221] The processing module 13 is used to process the control feedback information according to the device control process.
[0222] The device control apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0223] In one possible implementation, the control module 12 is specifically used for:
[0224] Among the multiple process nodes of the device control process, the target process node to be executed is determined;
[0225] Determine the target device corresponding to the target process node among the at least one secondary device;
[0226] The target device is controlled by the second communication component corresponding to the target device according to the target process node, so as to obtain the control feedback information of the target device.
[0227] In one possible implementation, the control module 12 is specifically used for:
[0228] Generate a data acquisition instruction based on the target process node;
[0229] The data acquisition instruction is sent to the target device through the second communication component corresponding to the target device;
[0230] The control feedback information includes the feedback data, which is received by the second communication component corresponding to the target device, and the feedback data is received by the second communication component corresponding to the data acquisition instruction sent by the target device.
[0231] In one possible implementation, the control module 12 is specifically used for:
[0232] Generate device control instructions based on the target process node;
[0233] The device control command is sent to the target device through the second communication component corresponding to the target device;
[0234] The device control result corresponding to the device control command sent by the target device is received through the second communication component corresponding to the target device, and the control feedback information includes the device control result.
[0235] In one possible implementation, the control module 12 is specifically used for:
[0236] Determine the last executed first process node in the device control process;
[0237] The target process node is determined in the device control process based on the control feedback information corresponding to the first process node.
[0238] In one possible implementation, the processing module 13 is specifically used for:
[0239] The control feedback information is processed by protocol conversion to obtain target data;
[0240] The target data is processed according to the device control process.
[0241] In one possible implementation, the processing module 13 is specifically used for:
[0242] If the device control flow instructs that the target data be sent to the third device, then the target data is sent to the third device through the first communication component.
[0243] The device control apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0244] Figure 8 A schematic diagram of another device control apparatus provided for an exemplary embodiment of this application. Please refer to... Figure 8 ,exist Figure 7 Based on the illustrated embodiment, the device control device 10 further includes a second acquisition module 14, a determination module 15, and a storage module 16, wherein,
[0245] The second acquisition module 14 is used to receive the process file sent by the cloud device through the proxy component and the first communication component;
[0246] The determining module 15 is used to determine the device control process based on the process document;
[0247] The storage module 16 is used to store the device control process into the preset storage space of the primary device.
[0248] In one possible implementation, the determining module 15 is specifically used for:
[0249] The process file is parsed to obtain an initial device control process, which includes at least one item to be updated.
[0250] Determine the equipment information of at least one secondary device controlled by the primary device;
[0251] Based on the device information of the at least one secondary device, update the at least one item to be updated in the initial device control flow to obtain the device control flow.
[0252] The device control apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0253] In one possible implementation, the determining module 15 is specifically used for:
[0254] For any one of the at least one items to be updated, determine the secondary device corresponding to the item to be updated and the first information type of the item to be updated;
[0255] Based on the first information type, obtain the attribute value of the secondary device corresponding to the item to be updated, wherein the type of the attribute value is the first information type;
[0256] Replace the item to be updated in the initial device control flow with the attribute value.
[0257] The device control apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0258] An exemplary embodiment of this application provides a structural schematic diagram of an electronic device. Please refer to [link / reference]. Figure 9 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.
[0259] The memory 22 stores computer-executed instructions;
[0260] The processor 21 executes the computer execution instructions stored in the memory 22, causing the processor 21 to perform the device control method as shown in the above method embodiment.
[0261] Figure 9 The electronic device shown can be a primary device as described in any of the above embodiments.
[0262] Accordingly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the device control method described in the above method embodiments.
[0263] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the device control method shown in the above method embodiments.
[0264] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0265] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0266] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0267] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0268] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0269] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0270] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0271] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0272] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A device control method, characterized in that, Applied to a primary device, the primary device including a proxy component, a first communication component, and at least one second communication component, the method includes: The device control flow is obtained from the first-level device, and the device control flow is determined by the flow file received from the cloud device through the proxy component and the first communication component; According to the device control process and the at least one second communication component, control at least one secondary device to obtain control feedback information from the at least one secondary device; The control feedback information is processed according to the device control process. The process for acquiring device control includes: The process file is parsed to obtain an initial device control process, which includes at least one item to be updated. Determine the equipment information of at least one secondary device controlled by the primary device; Based on the device information of the at least one secondary device, the at least one item to be updated in the initial device control flow is updated to obtain the device control flow, which includes multiple process nodes, wherein any process node has a corresponding secondary device.
2. The method according to claim 1, characterized in that, Based on the device control flow and the at least one second communication component, control at least one secondary device to obtain control feedback information from the at least one secondary device, including: Among the multiple process nodes of the device control process, the target process node to be executed is determined; Determine the target device corresponding to the target process node among the at least one secondary device; The target device is controlled by the second communication component corresponding to the target device according to the target process node, so as to obtain the control feedback information of the target device.
3. The method according to claim 2, characterized in that, The target process node is a data acquisition node; the target device is controlled according to the target process node through the second communication component corresponding to the target device to obtain control feedback information of the target device, including: Generate a data acquisition instruction based on the target process node; The data acquisition instruction is sent to the target device through the second communication component corresponding to the target device; The control feedback information includes the feedback data, which is received by the second communication component corresponding to the target device, and the feedback data is received by the second communication component corresponding to the data acquisition instruction sent by the target device.
4. The method according to claim 2, characterized in that, The target process node is a control node; the target device is controlled according to the target process node through the second communication component corresponding to the target device, so as to obtain the control feedback information of the target device, including: Generate device control instructions based on the target process node; The device control command is sent to the target device through the second communication component corresponding to the target device; The device control result corresponding to the device control command sent by the target device is received through the second communication component corresponding to the target device, and the control feedback information includes the device control result.
5. The method according to any one of claims 2-4, characterized in that, Among the multiple process nodes of the device control process, the target process node to be executed is determined, including: Determine the last executed first process node in the device control process; The target process node is determined in the device control process based on the control feedback information corresponding to the first process node.
6. The method according to any one of claims 1-5, characterized in that, Before obtaining the equipment control flow from the first-level equipment, the following is also included: The process file sent by the cloud device is received through the proxy component and the first communication component; The equipment control process is determined according to the process document; The device control process is stored in the preset storage space of the primary device.
7. The method according to claim 1, characterized in that, Based on the equipment information of the at least one secondary device, update the at least one item to be updated in the initial device control flow, including: For any one of the at least one items to be updated, determine the secondary device corresponding to the item to be updated and the first information type of the item to be updated; Based on the first information type, obtain the attribute value of the secondary device corresponding to the item to be updated, wherein the type of the attribute value is the first information type; Replace the item to be updated in the initial device control flow with the attribute value.
8. The method according to any one of claims 1-7, characterized in that, The control feedback information is processed according to the device control flow, including: The control feedback information is processed by protocol conversion to obtain target data; The target data is processed according to the device control process.
9. The method according to claim 8, characterized in that, The target data is processed according to the device control flow, including: If the device control flow instructs that the target data be sent to the third device, then the target data is sent to the third device through the first communication component.
10. A device control apparatus, characterized in that, The device includes: a first acquisition module, a control module, and a processing module, wherein, The first acquisition module is used to acquire the device control flow in the primary device, wherein the device control flow is determined by a flow file received from the cloud device through the proxy component and the first communication component; The control module is used to control at least one secondary device according to the device control process and at least one second communication component, so as to obtain control feedback information from the at least one secondary device. The processing module is used to process the control feedback information according to the device control process; The first acquisition module is specifically used for: The process file is parsed to obtain an initial device control process, which includes at least one item to be updated. Determine the equipment information of at least one secondary device controlled by the primary device; Based on the device information of the at least one secondary device, the at least one item to be updated in the initial device control flow is updated to obtain the device control flow, which includes multiple process nodes, wherein any process node has a corresponding secondary device.
11. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the device control method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the device control method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program that, when executed by a processor, implements the device control method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Internet of things equipment control method and device, gateway and readable storage medium
CN112153090A
Equipment network access control method and device, interactive panel and storage medium
CN115379022A
Proxy Remote Control
US20110140948A1