Control method, device and equipment of Internet of Things, and storage medium
By obtaining the rule content of the IoT scenario and generating rule examples, and using the rule engine system to perform task actions, the problem of inefficient configuration of the IoT scenario is solved, and efficient configuration and multi-device linkage are achieved.
Patent Information
- Application Number
- CN202411990677.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
Smart Images

Figure CN119906728A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a control method, device, equipment and storage medium of the Internet of Things. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, more and more devices are connected to the IoT, and the application scenarios of the IoT are also increasing. For each IoT scenario, the execution conditions of the IoT scenario need to be pre-configured, and then when the execution conditions are met, the task action of the IoT scenario will be triggered to respond to the IoT scenario. However, when the number of devices involved in the corresponding IoT scenario increases, the configuration of the IoT scenario needs to be divided into a lot of time, which in turn affects the configuration efficiency of the IoT scenario.
[0003] Therefore the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The technical problem to be solved by the present application is to provide a control method, device, equipment and storage medium for the Internet of Things in view of the deficiencies in the prior art.
[0005] In order to solve the above technical problems, the first aspect of the present application provides a control method of the Internet of Things, wherein the control method of the Internet of Things specifically includes:
[0006] Obtaining the rule content of the Internet of Things scenario, and determining the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content;
[0007] Determine a rule instance corresponding to the Internet of Things scenario based on the topological structure;
[0008] The rule instance is started to execute the task action of the Internet of Things scenario.
[0009] The control method of the Internet of Things, wherein the topological structure includes task nodes having a contextual relationship with the task nodes and the execution conditions of the task nodes themselves.
[0010] The control method of the Internet of Things, wherein the starting the rule instance to execute the task action of the Internet of Things scenario specifically includes:
[0011] Starting the rule instance and configuring a task process for the rule instance;
[0012] Each task node is executed in sequence according to the topological structure of each task node through the task process to execute the task action of the Internet of Things scenario.
[0013] The control method of the Internet of Things, wherein the method further comprises:
[0014] When starting a rule instance, each task node is controlled to subscribe to its corresponding event information according to its corresponding topological structure, wherein the event information is the trigger information of the Internet of Things scenario or the execution result information of the task node.
[0015] The control method of the Internet of Things, wherein the method further comprises:
[0016] Monitor the data flow during the execution of IoT scenarios in the form of embedded logs;
[0017] When an exception is monitored, the exception is handled based on the exception handling method corresponding to the Internet of Things scenario.
[0018] The control method of the Internet of Things, wherein the processing of the exception based on the exception processing method corresponding to the Internet of Things scenario specifically includes:
[0019] Read the preset configuration information, and determine the exception handling method corresponding to the IoT scenario based on the preset configuration information;
[0020] If the exception handling method is release, the exception is captured and processed by the exception capture mechanism;
[0021] If the exception handling method is not to publish, the Internet of Things scenario is terminated.
[0022] The control method of the Internet of Things, wherein the method further comprises:
[0023] Detect whether there are parallel IoT scenarios that are executed in parallel;
[0024] When there are parallel IoT scenarios, the standby rule engine is started to execute the parallel IoT scenarios through the standby rule engine system.
[0025] A second aspect of the present application provides a control device for an Internet of Things, wherein the control device for the Internet of Things specifically includes:
[0026] An acquisition module, used to acquire the rule content of the Internet of Things scenario, and determine the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content;
[0027] A determination module, configured to determine a rule instance corresponding to the Internet of Things scenario based on the topological structure;
[0028] A startup module is used to start the rule instance to execute the task action of the Internet of Things scenario.
[0029] A third aspect of the present application provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any of the control methods of the Internet of Things as described above.
[0030] A fourth aspect of the present application provides a server, which includes: a processor and a memory;
[0031] The memory stores a computer-readable program executable by the processor;
[0032] When the processor executes the computer-readable program, the steps in any of the above-described methods for controlling the Internet of Things are implemented.
[0033] Beneficial effects: Compared with the prior art, the present application provides a control method, device, equipment and storage medium for the Internet of Things, the method comprising obtaining the rule content of the Internet of Things scenario, and determining the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content; determining the rule instance corresponding to the Internet of Things scenario based on the topological structure; and starting the rule instance to execute the task action of the Internet of Things scenario. The present application sends the rule content of the Internet of Things scenario to the rule engine system, generates a rule instance for the Internet of Things scenario through the rule engine system, and then executes the task action of the Internet of Things scenario by starting the rule instance. In this way, the execution conditions of the Internet of Things scenario are configured through the rule engine system, and the process execution of the Internet of Things scenario is promoted, which can not only improve the configuration efficiency of the Internet of Things, but also realize the scene linkage triggered by multiple devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 This is a functional block diagram of the rule engine system provided in an embodiment of the present application.
[0036] Figure 2 A flowchart of a control method for the Internet of Things provided in an embodiment of the present application.
[0037] Figure 3 This is a functional block diagram of a control device for the Internet of Things provided in an embodiment of the present application.
[0038] Figure 4 A block diagram of the server provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present application provide a control method, device, equipment and storage medium for the Internet of Things. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0041] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0042] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0043] After research, it was found that with the rapid development of Internet of Things (IoT) technology, more and more devices are connected to the IoT, and the application scenarios of the IoT are also increasing. For each IoT scenario, the execution conditions of the IoT scenario need to be pre-configured, and then when the execution conditions are met, the task action of the IoT scenario will be triggered to respond to the IoT scenario. However, when the number of devices involved in the corresponding IoT scenario increases, the configuration of the IoT scenario needs to be divided into a lot of time, which in turn affects the configuration efficiency of the IoT scenario.
[0044] In order to solve the above problems, in an embodiment of the present application, the rule content of the IoT scenario is obtained, and the task nodes corresponding to the IoT scenario and the topological structure of the task nodes are determined based on the rule content; the rule instance corresponding to the IoT scenario is determined based on the topological structure; and the rule instance is started to execute the task action of the IoT scenario. The present application sends the rule content of the IoT scenario to the rule engine system, generates a rule instance for the IoT scenario through the rule engine system, and then executes the task action of the IoT scenario by starting the rule instance. In this way, the execution conditions of the IoT scenario are configured through the rule engine system, and the process execution of the IoT scenario is promoted, which can not only improve the configuration efficiency of the IoT, but also realize the scene linkage triggered by multiple devices.
[0045] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0046] This embodiment provides a control method for the Internet of Things, using a rule engine system, such as Figure 1 As shown, the rule engine system includes an application layer, a rule engine layer and a task execution layer, and the application layer, the rule engine layer and the task execution layer are arranged in sequence from top to bottom, wherein the application layer is used to provide a logical interface for accessing the rule engine layer, the rule engine layer is used to manage the business functions of the rule instances, and schedule the task execution layer to execute the thread tasks formed based on the rule instances, and the task execution layer is used to execute the thread tasks formed by the rule engine layer in parallel.
[0047] The application layer includes a business interface layer, a logic control layer, and a business logic layer, which are arranged in order from top to bottom. The business interface layer is used to provide a business interface, such as an OpenAPI interface and a basic business operation interface. The logic control layer is used to provide a control interface for the rule engine, and the control interface of the rule engine may include a rule editing control entry, a rule instance operation control entry, and a scenario linkage control entry. The business logic layer is used to provide a control interface for the rule instance in the rule engine, wherein the control interface for the rule instance in the rule engine can receive a rule instance start operation, a rule instance stop operation, and the like.
[0048] The rule engine layer is used to manage the business functions of the rule instance and schedule the task execution layer to execute the thread task formed based on the rule instance. The rule engine layer includes a parser, a converter and a launcher; the parser is used to convert the rule data connected to the rule engine system into a rule instance; the converter is used to convert the rule instance into a thread task executable by the task execution layer; the launcher is used to control the start and stop of the thread task.
[0049] The task execution layer is used to execute the node tasks of each task node. The task execution layer is scheduled by a scheduler so that the thread tasks of the task nodes are executed in parallel through the task execution layer to realize the parallel operation of different rule instances. For a rule instance, since there is an association relationship between the node tasks included in the rule instance, the task execution layer will execute each node task in sequence according to the association relationship between the node tasks. For task nodes that have no association relationship, each task node can also be executed in parallel, thereby improving the execution efficiency of the task nodes.
[0050] In one implementation, the rule engine system also includes a data storage layer, asset control and log records; the data storage layer is used to store the execution data generated during the execution of thread tasks, such as process data, log data, instance data, etc.; the asset control is used to use AOP aspect programming, which can be implemented through annotations; the log records are used to write log information in the form of date rolling, for example, writing event triggering and rule triggering log information to ES in the form of date rolling. In addition, the rule instance can be in json format to support batch import and export of rule instances, batch enablement and disablement of rule instances, etc.
[0051] Based on the above rule engine system, such as Figure 2 As shown, the control method of the Internet of Things provided in this embodiment specifically includes:
[0052] S10: Obtain the rule content of the Internet of Things scenario, and determine the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content.
[0053] Specifically, the rule content of the Internet of Things scenario is formed through the rule editing control portal based on the front-end rule visualization operation. For example, the Internet of Things scenario is a conference room scene, and the conference room scene includes a controller, a sensor, and an air conditioner. The rule editing control portal receives that when the conference room sensor senses someone, the air conditioner will be turned on and the air conditioner temperature will be set to 26 degrees. Then the rule content of the Internet of Things scenario is that when the conference room sensor senses someone, the air conditioner will be turned on and the air conditioner temperature will be set to 26 degrees.
[0054] Furthermore, the rule content of the IoT scenario may include a trigger part, a condition judgment part, and an action part. The trigger part is used to receive a trigger instruction, wherein the trigger instruction may be formed by different triggering methods, and different triggering methods correspond to different triggering parameters. Specifically, since the IoT scenario includes interaction with devices and interaction with users (such as a single inspection of the device), the triggering method may include a device triggering method and a manual triggering method, wherein when the triggering method is a device triggering method, the triggering instruction will provide information related to the triggering device, and the triggering device related information may be expressed as {identification, action}, the identification is the device identification of the triggering device, and the action may be attribute operations related to the object model (such as reading, writing, reporting, etc.), capability calls, and event reporting, etc.; when the triggering method is a manual triggering method, the trigger request may be formed by clicking a preset button, that is, when the preset button is clicked, a trigger request sent to the rule editing entry will be formed.
[0055] The conditional judgment part is used to make conditional judgments based on the rule data determined by the upstream trigger part, for example, whether the reported execution attribute value is greater than or less than the preset threshold, etc. It is also used to adapt the operator according to the value type of the rule data determined by the upstream trigger part, for users to use when planning business rules. In the action execution part, common businesses have serial and parallel operations. There can be further conditional judgment processing (i.e., execution conditional judgment part) during the execution of the action execution part. In the conference room scenario described above, after the air conditioner is required to be turned on in the execution action, if the device replies that it is turned on successfully, the air conditioner temperature is set.
[0056] Further, after obtaining the rule content, the task node and the topological structure corresponding to the task node are determined based on the rule content, wherein the task node can be determined based on the action execution part in the rule content, for example, each action in the action execution part can be regarded as a task node, etc. The association relationship of the task node refers to the execution order relationship between the task nodes, wherein the preceding task node of the task node refers to the task node that is located before the task node and adjacent to the task node in the execution order, and the following task node of the task node refers to the task node that is located after the task node and adjacent to the task node in the execution order. That is to say, after receiving the rule data formed based on the user visual operation interface, the task node can be determined based on the action execution part of the rule data, and then the preceding task node and the following task node of each task node are determined according to the execution order of each action in the rule execution part, and then the topological structure corresponding to the task node is constructed based on the task node and its corresponding preceding task node and following task node, wherein the topological structure includes the task node having a preceding and following association relationship with the task node and the execution condition of the task node itself, the preceding task node is used as the input node corresponding to the task node, and the following task node is used as the output node corresponding to the task node.
[0057] Exemplarily, the topological structure of the task node can be expressed as:
[0058]
[0059] S20. Determine a rule instance corresponding to the Internet of Things scenario based on the topological structure.
[0060] Specifically, after obtaining the topological structure of each task node, the topological structure set composed of the topological structures of all task nodes is used as the rule instance corresponding to the Internet of Things scenario. Then, the triggering conditions of each task node and the association relationship between each task node can be determined through the rule instance. In this way, the execution process of the Internet of Things scenario can be promoted through the rule instance to realize the functions required by the Internet of Things scenario. For example, when the sensor in the conference room senses that there is someone, the air conditioner will be turned on and the air conditioner temperature will be set to 26 degrees.
[0061] S30: Start the rule instance to execute the task action of the physical network scenario.
[0062] Specifically, after forming a rule instance, the rule instance is converted into a thread task executable by the task execution layer, that is, after the rule data is converted into a rule instance by the parser, the model task operation can be performed on the rule instance by the converter to convert the rule instance into a thread task executable by the task execution layer. When converting the rule instance into a thread task executable by the task execution layer, all task nodes in the rule instance can be converted into a thread task, that is, each task node can be processed in sequence through the thread task; or each task node can be converted into a thread task, and each task node can be asynchronously processed through the thread task corresponding to each task node.
[0063] In one implementation, the starting the rule instance to execute the task action of the physical network scenario specifically includes:
[0064] Starting the rule instance and configuring a task process for the rule instance;
[0065] Each task node is executed in sequence according to the topological structure of each task node through the task process to execute the task action of the Internet of Things scenario.
[0066] Specifically, the task process is used to execute each task node in the rule instance to advance the task flow of the IoT scenario. The topological structure of each task node includes the preceding task node and the subsequent task node associated with the task node, as well as the triggering condition of the task node. That is to say, the task process can determine the task order and triggering condition of each task node according to the topological structure of each task node, and then execute each task node according to the task order of the task node, and each task node is executed when its triggering condition is met, so that the task flow in the IoT scenario can be advanced to execute the task action of the IoT scenario.
[0067] Furthermore, when starting a rule instance, in order to facilitate each task node to determine whether its own triggering condition is met, each task node needs to subscribe to event information, and then obtain the event information subscribed by each task node through the event bus, thereby determining whether to execute each task node. Based on this, the method also includes:
[0068] When starting a rule instance, control each task node to subscribe to its corresponding event information according to its corresponding topology structure
[0069] Specifically, the event information is the data information required by the triggering condition of the task node, that is, the event information corresponding to the task node is determined based on the triggering condition of the task node. For example, if the triggering condition of the task node is that the sensor senses someone, then the event information of the task node is the MQTT Topic reported by the event (that is, the sensor senses someone). In addition, since the triggering condition of the task node can be detected by the device of the scene device in the Internet of Things scene, it can also be the execution result of the task node of the Internet of Things scene, so the event information is the triggering information of the Internet of Things scene or the execution result information of the task node.
[0070] For example: Assume that the IoT scenario is the conference room scenario described above, and the task nodes are the sensor event reporting node, the air conditioner turning on node, and the air conditioner temperature setting node. The event reporting node is recorded as task node A, the air conditioner turning on node is recorded as task node B, and the air conditioner temperature setting node is recorded as task node C. The event information corresponding to task node A is the MQTT Topic of the event report (that is, the sensor senses someone), the event information corresponding to task node B is the device information required to turn on the air conditioner, and the event information corresponding to task node C is the device's reply that the air conditioner has been successfully turned on.
[0071] In addition, during the process of advancing the rule instance corresponding to the physical network scenario, problems such as abnormal execution of task nodes or data congestion may occur. To this end, during the process of starting the rule instance to execute the task action of the physical network scenario, the data flow during the execution process can also be monitored. Accordingly, the method also includes:
[0072] Monitor the data flow during the execution of IoT scenarios in the form of embedded logs;
[0073] When an exception is monitored, the exception is handled based on the exception handling method corresponding to the Internet of Things scenario.
[0074] Specifically, monitoring the data flow during the execution of the IoT scenario in the form of a tracking log means that a number of tracking points can be pre-set, and then in the process of starting the rule instance to execute the task action of the physical network scenario, each time the tracking point is executed, the tracking log will be read to monitor the data flow during the execution of the IoT scenario to detect whether there is any abnormality in the execution of the IoT scenario, for example, node task execution failure, task data blockage, or task node loss.
[0075] When an exception is monitored, the exception handling method corresponding to the IoT scenario can be read, and then the monitored exception can be handled through the exception handling method, wherein the exception handling methods corresponding to different IoT scenarios can be the same or different. The exception handling method corresponding to the IoT scenario can be pre-set, or it can be determined based on the scenario information of the IoT scenario. For example, the rule engine system can be configured with an exception handling method identifier for the IoT scenario, and when an exception is monitored, the exception handling method identifier of the IoT scenario is called to determine the exception handling method corresponding to the IoT scenario; for another example, the correspondence between the exception handling method and the scenario requirements of the IoT scenario can be pre-set. When the scenario requirement is successful execution, the exception handling method can be published, and when the scenario requirement is accuracy, the exception handling method can be not published. Then, when an exception is monitored, the exception handling method is determined by reading the scenario requirements.
[0076] Exemplarily, the processing of the exception based on the exception processing method corresponding to the Internet of Things scenario specifically includes:
[0077] Read the preset configuration information, and determine the exception handling method corresponding to the IoT scenario based on the preset configuration information;
[0078] If the exception handling method is release, the exception is captured and processed by the exception capture mechanism;
[0079] If the exception handling method is not to publish, the Internet of Things scenario is terminated.
[0080] Specifically, the preset configuration information is information used to determine the exception handling method, wherein the preset configuration information can be a preset exception handling method identifier, or a scenario requirement, etc. After reading the preset configuration information, the exception handling method corresponding to the IoT scenario is determined based on the preset configuration information, wherein the exception handling method can include publishing and not publishing, and publishing corresponds to the exception capture mechanism capturing and processing the exception, and not publishing corresponds to terminating the IoT scenario. In other words, when the exception handling method is publishing, the exception capture mechanism captures and processes the exception, so that the IoT scenario can continue to be executed after the exception is excluded, and when the exception handling method is not publishing, the IoT scenario will be terminated and will not be executed further.
[0081] In one implementation, multiple IoT scenarios can be processed in parallel by the rule engine system, and when an exception occurs in the execution process of an IoT scenario, all IoT scenarios cannot be executed, because the procedure flow corresponding to the IoT scenario cannot suspend the process, pause, or resume the running process after running. To this end, in actual applications, a backup rule engine system of the rule engine system can be deployed. Accordingly, when the exception is processed based on the exception processing method corresponding to the IoT scenario, the method also includes: detecting whether there are parallel IoT scenarios executed in parallel; when there are parallel IoT scenarios, starting the backup rule engine to execute the parallel IoT scenarios through the backup rule engine system. In the embodiment of the present application, when there are parallel IoT scenarios, the parallel IoT scenarios can be executed through the backup rule engine system, and the parallel IoT scenarios cannot be executed. It should be noted that since the rule engine system has determined the rule instance of the parallel IoT scenario, when the backup rule engine system executes the parallel IoT scenario, the rule instance of the parallel IoT scenario can be directly transmitted to the backup rule engine system, so that the backup rule engine system does not need to rebuild the rule instance, so that on the one hand, the user can realize the master-slave switching without feeling, and on the other hand, the response efficiency of the parallel IoT scenario can be improved.
[0082] In summary, this embodiment provides a control method for the Internet of Things, the method comprising obtaining the rule content of the Internet of Things scenario, and determining the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content; determining the rule instance corresponding to the Internet of Things scenario based on the topological structure; and starting the rule instance to execute the task action of the Internet of Things scenario. This application implements the method of sending the rule content of the Internet of Things scenario to the rule engine system, generating a rule instance for the Internet of Things scenario through the rule engine system, and then executing the task action of the Internet of Things scenario by starting the rule instance. In this way, the execution conditions of the Internet of Things scenario are configured through the rule engine system, and the process execution of the Internet of Things scenario is promoted, which can not only improve the configuration efficiency of the Internet of Things, but also realize the scene linkage triggered by multiple devices.
[0083] Based on the above-mentioned control method of the Internet of Things, this embodiment provides a control device of the Internet of Things, such as Figure 3 As shown, the control device of the Internet of Things specifically includes:
[0084] The acquisition module 100 is used to acquire the rule content of the Internet of Things scenario, and determine the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content;
[0085] A determination module 200, configured to determine a rule instance corresponding to the IoT scenario based on the topology structure;
[0086] The starting module 300 is used to start the rule instance to execute the task action of the physical network scenario.
[0087] Based on the above-mentioned control method of the Internet of Things, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the control method of the Internet of Things as described in the above-mentioned embodiment.
[0088] Based on the above-mentioned control method of the Internet of Things, the present application also provides a service end, such as Figure 4 As shown, the server is loaded with a rule engine system, and the server includes at least one processor; and a memory, and may also include a communication interface and a bus. The processor, the memory and the communication interface may communicate with each other through the bus. The communication interface may transmit information. The processor may call the logic instructions in the memory to execute the method in the above embodiment.
[0089] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0090] The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor executes functional applications and data processing by running the software programs, instructions or modules stored in the memory, that is, implementing the methods in the above embodiments.
[0091] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the server, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.
[0092] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the server has been described in detail in the above-mentioned method, and will not be described here one by one.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A control method for the Internet of Things, characterized in that: The control method of the Internet of Things specifically includes: Obtaining the rule content of the Internet of Things scenario, and determining the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content; Determine a rule instance corresponding to the Internet of Things scenario based on the topological structure; The rule instance is started to execute the task action of the Internet of Things scenario.
2. The control method of the Internet of Things according to claim 1, characterized in that: The topological structure includes task nodes that have a contextual relationship with the task nodes and execution conditions of the task nodes themselves.
3. The control method of the Internet of Things according to claim 1, characterized in that: The task action of starting the rule instance to execute the IoT scenario specifically includes: Starting the rule instance and configuring a task process for the rule instance; Each task node is executed in sequence according to the topological structure of each task node through the task process to execute the task action of the Internet of Things scenario.
4. The control method of the Internet of Things according to claim 1 or 3, characterized in that: The method further comprises: When starting a rule instance, each task node is controlled to subscribe to its corresponding event information according to its corresponding topological structure, wherein the event information is the trigger information of the Internet of Things scenario or the execution result information of the task node.
5. The control method of the Internet of Things according to claim 1, characterized in that: The method further comprises: Monitor the data flow during the execution of IoT scenarios in the form of embedded logs; When an exception is monitored, the exception is handled based on the exception handling method corresponding to the Internet of Things scenario.
6. The control method of the Internet of Things according to claim 5, characterized in that: The processing of the exception based on the exception processing method corresponding to the Internet of Things scenario specifically includes: Read the preset configuration information, and determine the exception handling method corresponding to the IoT scenario based on the preset configuration information; If the exception handling method is release, the exception is captured and processed by the exception capture mechanism; If the exception handling method is not to publish, the Internet of Things scenario is terminated.
7. The control method of the Internet of Things according to claim 1, characterized in that: The method further comprises: Detect whether there are parallel IoT scenarios that are executed in parallel; When there are parallel IoT scenarios, the standby rule engine is started to execute the parallel IoT scenarios through the standby rule engine system.
8. A control device for the Internet of Things, characterized in that: The control device of the Internet of Things specifically includes: An acquisition module, used to acquire the rule content of the Internet of Things scenario, and determine the task nodes corresponding to the Internet of Things scenario and the topological structure of the task nodes based on the rule content; A determination module, configured to determine a rule instance corresponding to the Internet of Things scenario based on the topological structure; A startup module is used to start the rule instance to execute the task action of the Internet of Things scenario.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the control method of the Internet of Things as described in any one of claims 1-7.
10. A server, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the control method of the Internet of Things as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Internet of Things card anomaly detection method and device
CN110505196A
Internet of Things equipment monitoring rule engine
CN111131423A
Internet of Things equipment linkage control method and device, storage medium and electronic device
CN114301953A
Asynchronous load Internet of Things rule engine design method based on scene linkage
CN119201045A
Rule-based autonomous database cloud service framework
US20190102411A1
Cited By
Internet of Things scene construction method and device, equipment and storage medium
CN121396778A