Event-driven rule data interaction method and device, equipment and storage medium
Through the event-driven rule data interaction method, the rule data is obtained and constructed in response to the user's new rule operation, and sent to the end-side device, solving the loss and blockage problems caused by data interaction in multi-device linkage scenarios, and achieving efficient information transmission in IoT scenarios.
Patent Information
- Application Number
- CN202411989025.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In multi-device linkage scenarios, when the number of devices is large, data interaction between each linkage device will lead to data loss, data blockage and device downtime.
Through the event-driven rule data interaction method, the rule content is obtained in response to the new rule operation sent by the user, and the rule data is constructed based on the content, and sent to the end-side device to make it run the rule data. This method obtains the rule content of the Internet of Things scenario through cloud devices, constructs and interacts with the end-side devices to avoid direct data interaction between devices.
It realizes that the end-side device can only interact with the cloud device to obtain IoT scenario information, avoiding the problems of data loss and data blockage.
Smart Images

Figure CN119906727A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to an event-driven rule data interaction method, device, equipment and storage medium. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, the number of devices connected to IoT has increased dramatically, especially in multi-device linkage scenarios, where data interaction is required between linked devices to obtain linkage execution rules. So, when the number of devices in the device linkage scenario is huge, the data interaction between linked devices requires multiple devices to establish network connections before data interaction, which may result in data loss between some devices, or data blockage or even device downtime due to some devices interacting with the same device at the same time.
[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 an event-driven rule data interaction method, device, equipment and storage medium 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 an event-driven rule data interaction method, wherein the event-driven rule data interaction method specifically includes:
[0006] In response to the new rule operation sent by the user end, obtain the rule content corresponding to the new rule operation;
[0007] Rule data is constructed based on the rule content, and the rule data is sent to the terminal side device so that the terminal side device runs the rule data.
[0008] The event-driven rule data interaction method, wherein the step of constructing rule data based on the rule content specifically includes:
[0009] Read the trigger category of the newly created rule operation;
[0010] If the trigger category is device trigger, the rule content is converted into rule data according to a preset rule template, and the end-side device is used as placeholder information.
[0011] The event-driven rule data interaction method, wherein the step of constructing rule data based on the rule content specifically includes:
[0012] Read the trigger category of the newly created rule operation;
[0013] If the trigger category is a super device trigger, the rule content is converted into rule data according to a preset rule template, and the device node information matched by the terminal device is used as placeholder information to construct rule data containing the device node information.
[0014] The event-driven rule data interaction method, wherein when the device node information matched by the terminal device is used as the placeholder information, the method further includes:
[0015] When a device node associated with the end-side device fails, a device of the same type as the device node is used to replace the device node.
[0016] The event-driven rule data interaction method, wherein the rule data is constructed based on the rule content, and the rule data is sent to the terminal side device so that the terminal side device runs the rule data, and the method further includes:
[0017] The operation processes reported in batches by the receiving end-side devices are used to facilitate the cloud to track the operation processes of the end-side devices.
[0018] The event-driven rule data interaction method, wherein the method further comprises:
[0019] In response to the rule disabling operation sent by the user end, a rule deletion instruction is sent to the end-side device;
[0020] Based on the deletion rule instruction, the terminal side device is controlled to stop running the rule data and delete the rule information corresponding to the rule data.
[0021] The event-driven rule data interaction method, wherein the method further comprises:
[0022] The end-side device saves the log information generated by the operation rule data when communication is abnormal;
[0023] When communication returns to normal, the log information sent by the receiving device is received, and the operation process formed during the communication abnormality period is synchronized based on the log information.
[0024] The second aspect of the present application provides an event-driven rule data interaction device, wherein the event-driven rule data interaction device specifically includes:
[0025] An acquisition module, used to respond to a new rule operation sent by a user terminal and acquire the rule content corresponding to the new rule operation;
[0026] A construction module is used to construct rule data based on the rule content, and send the rule data to the terminal side device so that the terminal side device runs the rule data.
[0027] A third aspect of the present application 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 any of the event-driven rule data interaction methods described above.
[0028] A fourth aspect of the present application provides a server, which includes: a processor and a memory;
[0029] The memory stores a computer-readable program executable by the processor;
[0030] When the processor executes the computer-readable program, the steps in any of the event-driven rule-data interaction methods described above are implemented.
[0031] Beneficial effects: Compared with the prior art, the present application provides an event-driven rule data interaction method, device, equipment and storage medium, the method comprising responding to a new rule operation sent by a user end, obtaining the rule content corresponding to the new rule operation; constructing rule data based on the rule content, and sending the rule data to the end-side device so that the end-side device runs the rule data. The present application obtains the rule content of the IoT scene through a cloud device, then constructs the rule data based on the rule content, and interacts the rule data with the end-side device included in the IoT scene, so that the end-side device only needs to interact with the cloud device to obtain the scene information of the IoT scene, without the need for data interaction between the device nodes in the IoT scene, thereby avoiding data loss and data congestion caused by too much interaction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] 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.
[0033] Figure 1 A flowchart of an event-driven rule data interaction method provided in an embodiment of the present application.
[0034] Figure 2 This is the principle block diagram of the rule engine system.
[0035] Figure 3 A principle block diagram of an event-driven rule data interaction device provided in an embodiment of the present application.
[0036] Figure 4 A block diagram of the server provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application provide an event-driven rule data interaction method, device, equipment and storage medium. 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] After research, it was found that with the rapid development of Internet of Things (IoT) technology, the number of devices connected to the IoT has increased dramatically, especially in multi-device linkage scenarios, where data interaction is required between the linked devices to obtain linkage execution rules. Then, when the number of devices in the device linkage scenario is large, the data interaction between the linked devices requires multiple devices to establish a network connection before data interaction. This will cause the loss of interaction data between some devices, or some devices interacting with the same device at the same time, resulting in data blockage, or even device downtime.
[0042] In order to solve the above problems, in an embodiment of the present application, in response to a new rule operation sent by the user end, the rule content corresponding to the new rule operation is obtained; rule data is constructed based on the rule content, and the rule data is sent to the end-side device so that the end-side device runs the rule data. The present application obtains the rule content of the IoT scene through a cloud device, then constructs the rule data based on the rule content, and interacts the rule data with the end-side device included in the IoT scene, so that the end-side device only needs to interact with the cloud device to obtain the scene information of the IoT scene, without the need for data interaction between the device nodes in the IoT scene, thereby avoiding data loss and data congestion caused by too much interactive data.
[0043] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0044] This embodiment provides an event-driven rule data interaction method, which is applied to cloud devices, such as Figure 1 As shown, the method includes:
[0045] S10. Respond to the new rule creation operation sent by the user terminal and obtain the rule content corresponding to the new rule creation operation.
[0046] Specifically, a new rule operation can be a front-end visual operation sent by the user end to the cloud device. The new rule operation can be used as an event to determine the interaction of rule data between the cloud device and the end-side device. In other words, the rule operation that can be input by the user end can be used as a driving time to drive the end-side device to interact with the cloud device for rule data, wherein the rule operation can be a new rule operation, a disabled rule operation, and an adjusted rule operation, etc. In the embodiment of the present application, the adjusted rule operation is also used as a new rule operation, that is, when the rule data needs to be adjusted, the adjusted rule data is directly constructed in the form of new rule data. For this reason, the rule operations in the embodiment of the present application include a new procedure operation and a disabled procedure operation.
[0047] The new rule operation may carry rule content or may not carry rule content. When the new rule operation carries rule content, the rule content carried by the new rule operation may be directly read to obtain the rule content corresponding to the new rule operation. When the new rule operation does not carry rule content, a rule content acquisition request may be sent to the user end based on the new rule operation, and then the rule content fed back by the user end based on the acquisition request may be received to obtain the rule content corresponding to the new rule operation. Of course, in actual applications, the new rule operation may include a download address for the rule content, and the cloud device obtains the rule content corresponding to the new rule operation based on the download address.
[0048] Cloud devices can be equipped with rule engine systems, such as Figure 2 As shown, the rule engine system includes an application layer, a rule engine layer, a task execution layer, a data storage layer, an asset control and a log record. 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 instance, and schedule the task execution layer to execute the thread task formed based on the rule instance, and the task execution layer is used to execute the thread task formed by the rule engine layer in parallel. The data storage layer is used to store the execution data formed during the execution of the thread task, such as process data, log data, instance data, etc.; the asset control is used to utilize AOP aspect programming, which can be achieved through annotations; the log record is used to write log information in the form of date rolling, for example, write 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 enabling and disabling of rule instances, etc.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] Furthermore, the rule content 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 entrance will be formed.
[0053] 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.
[0054] S20: construct rule data based on the rule content, and send the rule data to the terminal side device so that the terminal side device runs the rule data.
[0055] Specifically, constructing rule data based on rule content refers to converting rule content into rule data according to a preset rule template, that is, converting rule content into a preset rule template form to obtain rule data. The preset rule template includes node information of task nodes, association relationships of task nodes, and trigger conditions of task nodes. The node information is used as a node identifier of the task node. The association relationship of the task node refers to the linkage relationship between the task node and other nodes. The trigger condition of the task node refers to the execution factor of the task node.
[0056] For this reason, when the rule content is converted into rule data according to the preset rule template, the task nodes included in the rule content and the topological structure of each task node can be obtained, and the topological structure includes the association relationship of the task nodes and the triggering condition of the task nodes. Then, the node rule data of the task node can be determined based on the task node and the topological structure of the task node, and the set composed of the node rule data of all task nodes is used as the rule data corresponding to the rule content. Wherein, the task nodes included in the rule content 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 can be determined based on the execution order between the task nodes, for example, two task nodes adjacent to the execution order are determined to have an association relationship, and the task node located before the task node and adjacent to the task node according to the execution order is used as the pre-order task node, and the task node located after the task node and adjacent to the task node according to the execution order is used as the post-order task node, and the topological structure of the task node includes the pre-order task node and the post-order task node of the task node.
[0057] The end-side device can be a super device in the linkage scenario or a device node directly. To this end, when constructing rule data based on the rule content, the trigger category of the newly created rule operation can be determined, and the trigger category includes device trigger and ultrasonic device trigger, and the placeholder information is configured for the device node involved in the rule data based on the trigger category.
[0058] Based on this, in one implementation, the step of constructing rule data based on the rule content specifically includes:
[0059] Read the trigger category of the newly created rule operation;
[0060] If the trigger category is device trigger, the rule content is converted into rule data according to a preset rule template, and the end-side device is used as placeholder information.
[0061] Specifically, when the trigger category is device trigger, the end-side device recorded in the cloud device (i.e., the rule engine system) needs to be consistent with the end-side device running the rule data, that is, the end-side device recorded in the cloud device is the same as the device information in the end-side device of the rule data. To this end, after converting the rule content into rule data, the end-side device is directly used as placeholder information, that is, the device identifier of the end-side device is used as placeholder information to maintain consistency between the two.
[0062] Based on this, in another implementation, the constructing rule data based on the rule content specifically includes:
[0063] Read the trigger category of the newly created rule operation;
[0064] If the trigger category is a super device trigger, the rule content is converted into rule data according to a preset rule template, and the device node information matched by the terminal device is used as placeholder information to construct rule data containing the device node information.
[0065] Specifically, when the trigger category is an ultrasonic device trigger, the end-side device is a super device, and the end-side device is associated with a device node to form a device group. If the device identifier of the end-side device is directly used as the placeholder information, when the device node associated with the end-side device fails, it will cause the entire device group corresponding to the end-side device to fail. For this reason, when the trigger category is a super device trigger, the device node information matched by the end-side device is used as the placeholder information, so that the cloud device only needs to record the device node information matched by the end-side device, and when the device node associated with the end-side device fails, the same type of device can be used to replace the device node without affecting the normal operation of the device group managed by the end-side device. Among them, the device node information matched by the end-side device can be the device type of the device node managed by the end-side device, or the functional role played by the device node managed by the end-side device.
[0066] In an embodiment of the present application, the device node information matched by the end-side device can be the device type of the node managed by the end-side device. And when the device node information matched by the end-side device is used as placeholder information, the method also includes: when the device node associated with the end-side device fails, the device node is replaced with a device of the same type as the device node. For example, super device A manages device node B, and device node B fails during operation, then device node B can be replaced with a device C of the same type as device node B, so that super device A can continue to execute rule data.
[0067] In one implementation, after constructing rule data based on the rule content and sending the rule data to the end-side device so that the end-side device runs the rule data, the method further includes:
[0068] The operation processes reported in batches by the receiving end-side devices are used to facilitate the cloud to track the operation processes of the end-side devices.
[0069] Specifically, the end-side device will generate an operation process in the process of running the rule data, and in order to facilitate the cloud device to track the operation process corresponding to the rule data. When the end-side device generates the operation process, it will synchronize the operation process to the cloud device, wherein the end-side device can report the operation process to the cloud device when the operation process is generated (wherein, when multiple operation processes are generated at the same time, multiple operation processes will be reported to the cloud device in batches), or it can report the operation process to the cloud device in batches at preset intervals. In an embodiment of the present application, the end-side device reports the operation process to the cloud device in batches.
[0070] In one implementation, the rule data of the terminal device will be synchronized with the cloud device regularly. For example, the terminal device sends a rule data synchronization request to the cloud device at a preset interval. The cloud device obtains the rule data of the terminal device based on the rule data synchronization request, and compares the obtained rule data with the rule data stored locally. If the comparison is consistent, the rule data of the terminal device is kept unchanged. If the comparison is inconsistent, the rule data of the terminal device is corrected based on the locally stored rule data. In addition, the cloud device can also disable the rule data of the terminal device based on the disable rule operation sent by the user. That is, the method also includes:
[0071] In response to the rule disabling operation sent by the user end, a rule deletion instruction is sent to the end-side device;
[0072] Based on the deletion rule instruction, the terminal side device is controlled to stop running the rule data, and the rule information corresponding to the rule data is deleted.
[0073] Specifically, the disabling rule operation can prohibit all rule data running on the end-side device, or it can also disable part of the rule data running on the end-side device, or it can also prohibit part of the rules in the rule data, etc. When the cloud device responds to the disabling rule operation sent by the user end, it will send a delete rule instruction to the end-side device, so that the end-side device stops running the rule data corresponding to the delete rule instruction, and deletes the rule data corresponding to the rule instruction. The present application can delete the rule data running on the end-side device by deleting the rule instruction, so that when some rules become invalid, the end-side device can quickly stop running the invalid rules to avoid the problem of misoperation.
[0074] Furthermore, when the end-side device is running the rule data, if a communication anomaly occurs between the end-side device and the cloud device, the end-side device will continue to run the rule data, and record the operation process formed by running the rule data during the communication anomaly time period, and report the operation process formed during the communication anomaly time period to the cloud when the communication anomaly is restored, so that the cloud device can track the operation process during the communication anomaly time period. Based on this, the method also includes:
[0075] The end-side device saves the log information generated by the operation rule data when communication is abnormal;
[0076] When communication returns to normal, the log information sent by the receiving device is received, and the operation process formed during the communication abnormality period is synchronized based on the log information.
[0077] Specifically, the log information is used to record the operation process formed by the operation rule data during the communication abnormal time period, and when the communication is restored to normal, the terminal device will send the log information to the cloud device, so that the cloud device can synchronize the operation process formed during the communication abnormal time period based on the log information. In addition, in order to avoid excessive log information and occupying a large amount of storage resources, a space threshold can be set. When the storage space occupied by the log information reaches the space threshold, the terminal device actively re-establishes a connection with the cloud device. If the re-establishment of the connection fails, the terminal device can send an abnormal notification to the user end to inform the user end that the communication with the cloud device is abnormal, and receive feedback information from the user end. If the feedback information is to continue running and store the log information in a circular overwrite manner (that is, the newly generated log information replaces the earliest generated log information in the storage), the terminal device continues to run the rule data. If it is to suspend operation, the terminal device suspends operation. This can avoid the log information from occupying too much storage space on the one hand, and on the other hand, it can avoid the problem of execution errors caused by the inability to know the instructions of all or part of the rule data being disabled due to abnormal communication between the terminal device and the cloud device.
[0078] Of course, in actual applications, the duration of communication anomalies can also be monitored. When the duration of communication anomalies reaches a preset duration, an abnormal notification is sent to the user end to inform the user end that the communication with the cloud device is abnormal, or the operation of rule data is directly suspended.
[0079] In summary, the present embodiment provides an event-driven rule data interaction method, apparatus, device and storage medium, the method comprising responding to a new rule operation sent by a user end, obtaining the rule content corresponding to the new rule operation; constructing rule data based on the rule content, and sending the rule data to the end-side device so that the end-side device runs the rule data. The present application obtains the rule content of the IoT scene through a cloud device, then constructs the rule data based on the rule content, and interacts the rule data with the end-side device included in the IoT scene, so that the end-side device only needs to interact with the cloud device to obtain the scene information of the IoT scene, without the need for data interaction between the device nodes in the IoT scene, thereby avoiding data loss and data congestion caused by too much interaction data.
[0080] Based on the above event-driven rule data interaction method, this embodiment provides an event-driven rule data interaction device, such as Figure 3 As shown, the event-driven rule data interaction device specifically includes:
[0081] The acquisition module 100 is used to respond to the rule creation operation sent by the user terminal and acquire the rule content corresponding to the rule creation operation;
[0082] The construction module 200 is used to construct rule data based on the rule content, and send the rule data to the terminal side device so that the terminal side device runs the rule data.
[0083] Based on the above event-driven rule-data interaction method, 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 event-driven rule-data interaction method as described in the above embodiment.
[0084] Based on the above event-driven rule data interaction method, the present application also provides a server, 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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. An event-driven rule data interaction method, characterized in that: The event-driven rule data interaction method specifically includes: In response to the new rule operation sent by the user end, obtain the rule content corresponding to the new rule operation; Rule data is constructed based on the rule content, and the rule data is sent to the terminal side device so that the terminal side device runs the rule data.
2. The event-driven rule data interaction method according to claim 1, characterized in that: The constructing rule data based on the rule content specifically includes: Read the trigger category of the newly created rule operation; If the trigger category is device trigger, the rule content is converted into rule data according to a preset rule template, and the end-side device is used as placeholder information.
3. The event-driven rule data interaction method according to claim 1, characterized in that: The constructing rule data based on the rule content specifically includes: Read the trigger category of the newly created rule operation; If the trigger category is a super device trigger, the rule content is converted into rule data according to a preset rule template, and the device node information matched by the terminal device is used as placeholder information to construct rule data containing the device node information.
4. The event-driven rule data interaction method according to claim 3, characterized in that: When the device node information matched by the terminal side device is used as the placeholder information, the method further includes: When a device node associated with the end-side device fails, a device of the same type as the device node is used to replace the device node.
5. The event-driven rule data interaction method according to claim 1, characterized in that: After constructing the rule data based on the rule content and sending the rule data to the terminal device so that the terminal device runs the rule data, the method further includes: The operation processes reported in batches by the receiving end-side devices are used to facilitate the cloud to track the operation processes of the end-side devices.
6. The event-driven rule data interaction method according to claim 1, characterized in that: The method further comprises: In response to the rule disabling operation sent by the user end, a rule deletion instruction is sent to the end-side device; Based on the deletion rule instruction, the terminal side device is controlled to stop running the rule data and delete the rule information corresponding to the rule data.
7. The event-driven rule data interaction method according to claim 1, characterized in that: The method further comprises: The end-side device saves the log information generated by the operation rule data when communication is abnormal; When communication returns to normal, the log information sent by the receiving device is received, and the operation process formed during the communication abnormality period is synchronized based on the log information.
8. An event-driven rule data interaction device, characterized in that: The event-driven rule data interaction device specifically includes: An acquisition module, used to respond to a new rule operation sent by a user terminal and acquire the rule content corresponding to the new rule operation; A construction module is used to construct rule data based on the rule content, and send the rule data to the terminal side device so that the terminal side device runs the rule data.
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 event-driven rule data interaction method 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 event-driven rule-data interaction method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Service logic processing method and device, electronic device, storage medium and system
CN115442228A
Automatic equipment diagnosis self-repairing method and system
CN118612044A
System and method for defining interactions between internet of things (IOT) devices using graphic user interface (GUI) based tool
US20180034655A1
Method and apparatus for controlling internet-of-things device, and related device
WO2024199508A1