A device data transfer method, device, and medium based on an Internet of Things platform

By using a combination solution of message bus and rule engine nodes on the Internet of Things platform, the problem of slow response ability of the Internet of Things platform when large-scale scenario linkage is solved, and fast response and high-availability device data flow is achieved.

CN116016584BActive Publication Date: 2025-06-27INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211549027.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-06-27
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

IoT platforms have slow response capabilities when dealing with large-scale scenario linkage, resulting in inefficient device data flow.

Method used

The device data is distributed to the corresponding rule engine node through the message bus, multiple scene linkage rules corresponding to the device are retrieved, and corresponding action information is executed according to the rules, and the device or associated device is called through the Internet of Things platform to respond.

Benefits of technology

It realizes scenario linkage for IoT platforms to quickly respond to device data, especially when dealing with large-scale scenario linkage, and has fast response capabilities and high availability, improving system availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016584B_ABST
    Figure CN116016584B_ABST
Patent Text Reader

Abstract

The present application discloses a device data transfer method, device and medium based on an Internet of Things platform. The method includes: obtaining device data uploaded by the Internet of Things platform; distributing the device data to corresponding rule engine nodes through a message bus; retrieving multiple scenario linkage rules corresponding to the device in the rule engine nodes; determining the trigger condition of the specified scenario linkage rule corresponding to the device data in a pre-constructed scenario mapping table; determining the specified scenario linkage rule of the device data according to the trigger condition of the specified scenario linkage rule; judging whether the device data matches the scenario linkage condition in the specified scenario linkage rule; if so, determining the action information to be executed by the device or the scenario-associated device according to the scenario linkage action in the specified scenario linkage rule; and sending the action information to the Internet of Things platform through the message bus. During the device data transfer process, the Internet of Things platform has a fast response ability when dealing with large-scale scenario linkages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, device, and medium for device data transfer based on an Internet of Things (IoT) platform. Background Art

[0002] Scene linkage in the field of the Internet of Things has become one of the core applications in this field. It has important application value, especially in the fields of industrial Internet of Things and smart home. Devices are interconnected and interact with each other, driving the continuous development of the Internet of Things field.

[0003] Currently, more and more devices are connected to the IoT platform, and the application scenarios are becoming more and more complex. There are also more and more application scenarios that require device processing or interaction between devices. However, during the process of device data transfer, when the IoT platform responds to large-scale scene linkages, the response ability is slow. Summary of the Invention

[0004] Embodiments of this application provide a method, device, and medium for device data transfer based on an IoT platform, which are used to solve the problem that when the IoT platform responds to large-scale scene linkages during the process of device data transfer, the response ability is slow.

[0005] Embodiments of this application adopt the following technical solutions:

[0006] On the one hand, embodiments of this application provide a method for device data transfer based on an IoT platform. The method includes: obtaining device data uploaded by the IoT platform; distributing the device data to corresponding rule engine nodes through a message bus; retrieving multiple scene linkage rules corresponding to the device in the rule engine nodes; where each scene linkage rule includes a scene linkage rule trigger condition, a scene linkage condition, and a scene linkage action; determining a specified scene linkage rule trigger condition corresponding to the device data in a pre-constructed scene mapping table; determining a specified scene linkage rule corresponding to the device data according to the specified scene linkage rule trigger condition; determining whether the device data matches the scene linkage condition in the specified scene linkage rule; if so, determining action information to be executed by the device or scene-associated device according to the scene linkage action in the specified scene linkage rule; and sending the action information to the IoT platform through the message bus so that the device or scene-associated device can perform an action response according to the action information.

[0007] In one example, before distributing the device data to the corresponding rule engine nodes through the message bus, the method further includes: constructing a rule engine node cluster, determining the IoT platform as the topic publisher, and determining the rule engine node cluster as the message subscriber; constructing multiple scenario topics, and subscribing each rule engine node in the rule engine node cluster to the corresponding scenario topic; the step of distributing the device data to the corresponding rule engine nodes through the message bus specifically includes: sending the device data to the message bus through the IoT platform; in the message bus, publishing the device data to the specified scenario topic; retrieving the rule engine nodes subscribing to the specified scenario topic; determining the rule engine node associated with the device corresponding to the device data; and distributing the device data to the associated rule engine node through the message bus.

[0008] In one example, the step of storing the device data to the specified topic in the message bus specifically includes: constructing the message bus according to the Redis node cluster; storing the device data to the corresponding Redis node of the message bus; and publishing the device data to the specified topic through the corresponding Redis node.

[0009] In one example, before sending the action information to the IoT platform through the message bus, the method further includes: determining the IoT platform as the message publisher, determining the rule engine node cluster as the topic publisher, and subscribing the IoT platform to the action information of each rule engine node; the step of sending the action information to the IoT platform through the message bus specifically includes: sending the action information to the message bus; in the message bus, publishing the action information to the action information topic; and sending the action information to the IoT platform through the message bus.

[0010] In one example, after sending the action information to the IoT platform through the message bus, the method further includes: obtaining the data processing volume of each rule engine node; calculating the difference between the data processing volume and the maximum load capacity of the rule engine node; determining whether the difference exceeds a preset threshold; if so, sending an overload prompt of the rule engine node to the IoT platform.

[0011] In one example, after sending an overload prompt of the rule engine node to the Internet of Things platform if the condition is met, the method further includes: obtaining configuration information of a newly added rule engine node based on a user's operation; adding the newly added rule engine node to a rule engine node cluster according to the configuration information; and constructing multiple scenario linkage rules corresponding to the device in the newly added rule engine node to distribute newly added device data of the device to the newly added rule engine node.

[0012] In one example, the device data is device data of multiple devices. Distributing the device data to corresponding rule engine nodes through a message bus specifically includes: sending the device data to a pre-constructed load balancing module through the message bus; and in the load balancing module, distributing the device data of each device to the corresponding rule engine node through a random load balancing strategy.

[0013] In one example, distributing the device data of each device to the corresponding rule engine node through a random load balancing strategy specifically includes: in the load balancing module, randomly selecting a specified rule engine node from a rule engine node list according to a random function; and in the rule engine node list, starting from the specified rule engine node, sequentially distributing the device data of each device to each rule engine node in turn.

[0014] On the other hand, an embodiment of the present application provides a device data transfer device based on an Internet of Things platform, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to: obtain device data uploaded by the Internet of Things platform; distribute the device data to corresponding rule engine nodes through a message bus; retrieve multiple scenario linkage rules corresponding to the device in the rule engine node; wherein each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action; determine a specified scenario linkage rule trigger condition corresponding to the device data in a pre-constructed scenario mapping table; determine a specified scenario linkage rule corresponding to the device data according to the specified scenario linkage rule trigger condition; determine whether the device data matches the scenario linkage condition in the specified scenario linkage rule; if so, determine action information to be executed by the device or scenario-associated device according to the scenario linkage action in the specified scenario linkage rule; and send the action information to the Internet of Things platform through the message bus so that the device or scenario-associated device performs an action response according to the action information.

[0015] On the other hand, an embodiment of the present application provides a non-volatile computer storage medium for device data transfer based on an Internet of Things platform, storing computer-executable instructions, and the computer-executable instructions are set as follows: obtaining device data uploaded by the Internet of Things platform; distributing the device data to corresponding rule engine nodes through a message bus; in the rule engine nodes, retrieving multiple scenario linkage rules corresponding to the device; wherein each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action; in a pre-constructed scenario mapping table, determining a specified scenario linkage rule trigger condition corresponding to the device data; according to the specified scenario linkage rule trigger condition, determining a specified scenario linkage rule corresponding to the device data; determining whether the device data matches the scenario linkage condition in the specified scenario linkage rule; if so, determining action information to be executed by the device or scenario-associated device according to the scenario linkage action in the specified scenario linkage rule; and sending the action information to the Internet of Things platform through the message bus so that the device or scenario-associated device performs an action response according to the action information.

[0016] The above at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects:

[0017] Through the message bus, the device data is distributed to the corresponding rule engine nodes. In the rule engine nodes, the scenario linkage rules corresponding to the device data are determined, so that the scenario linkage actions corresponding to the device data are automatically processed according to the scenario linkage rules, enabling the Internet of Things platform to automatically call the device or associated device to perform an action response, which can realize the fast response of the Internet of Things platform to the scenario linkage of device data, especially having fast response ability and high availability when dealing with large-scale scenario linkages, and improving the availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the present application, some embodiments of the present application will be described in detail below with reference to the drawings, in which:

[0019] Figure 1 is a schematic flowchart of a method for device data transfer based on an Internet of Things platform provided by an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of a device data transfer system based on an Internet of Things platform provided by an embodiment of the present application;

[0021] Figure 3 is a schematic structural diagram of a device for device data transfer based on an Internet of Things platform provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] 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 the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of this application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0023] The following will refer to the drawings to elaborate on some embodiments of this application.

[0024] Figure 1 It is a schematic flowchart of a device data flow method based on an Internet of Things platform provided by an embodiment of this application. This method can be applied to different business fields, such as Internet finance business fields, e-commerce business fields, instant messaging business fields, game business fields, official business fields, etc. Some input parameters or intermediate results in this process allow manual intervention and adjustment to help improve accuracy.

[0025] The implementation of the analysis method involved in the embodiments of this application can be a terminal device or a server, and this application does not make special restrictions on this. For the convenience of understanding and description, the following embodiments will be described in detail taking the server as an example, such as a data flow server.

[0026] It should be noted that this server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not make specific limitations on this.

[0027] Figure 1 The process in can include the following steps:

[0028] S101: Obtain device data uploaded by the Internet of Things platform.

[0029] Among them, the Internet of Things device sends the device data to the data bus, and thus sends the device data to the Internet of Things platform through the data bus. The currently obtained device data can be the device data of one device or can include the device data corresponding to multiple devices respectively.

[0030] S102: Distribute the device data to the corresponding rule engine nodes through the message bus.

[0031] In some embodiments of this application, a rule engine node cluster is pre-constructed, that is, including multiple rule engine nodes, and the rule engine can be deployed in a cluster form, which can improve the ability to handle high-concurrency application scenarios and provide high availability. The failure of any node in the cluster will not cause the unavailability of the entire system.

[0032] In addition, the message bus is implemented using a topic-based publish-subscribe model. The message bus enables cross-node communication and is used to transfer messages between upstream and downstream application nodes. The upstream node, as an event publisher, publishes messages to a specified topic, and the downstream node, as a message subscriber, can receive all messages of the topics it subscribes to. The message bus achieves logical and physical decoupling between nodes. The upstream node sending the message only needs to depend on the message bus and does not need to depend on other services.

[0033] In addition, the message bus is implemented based on a Redis node cluster. The Redis node cluster realizes the horizontal expansion of Redis, that is, multiple Redis nodes are started, and the entire data is distributed and stored in these nodes, thereby dispersing the pressure on the Redis nodes and enabling the message bus to handle massive data.

[0034] Based on this, the IoT platform is determined as the topic publisher, and the rule engine node cluster is determined as the message subscriber. Then, multiple scenario topics are constructed, and each rule engine node in the rule engine node cluster subscribes to the corresponding scenario topic respectively. For example, the scenario topics include device temperature control, video data alarm control, etc. It should be noted that each rule engine node can correspond to one or more scenario topics.

[0035] Therefore, when distributing device data to the corresponding rule engine node, first, the IoT platform sends the device data to the message bus, then in the message bus, the device data is published to the specified scenario topic, then the rule engine node corresponding to subscribing to the specified scenario topic is retrieved, and finally, the rule engine node associated with the device corresponding to the device data is determined, and the device data is distributed to the associated rule engine node. That is to say, each rule engine node is respectively bound to the corresponding device. Usually, one device is bound to one rule engine node, that is, the device data of this device is processed by this rule engine node. Usually, one rule engine node is bound to multiple devices of the same manufacturer and the same model.

[0036] Thus, similar devices are classified into the same rule engine node, which can improve the processing speed of each rule engine node.

[0037] Among them, when storing device data to the specified topic, the message bus stores the device data in the corresponding Redis node, and through the corresponding Redis node, the device data is published to the specified topic.

[0038] In some embodiments of the present application, due to the function that the load balancing component can distribute data to different rule engine nodes, the ability of the rule engine cluster is utilized to improve the response speed and provide high availability.

[0039] Based on this, when distributing device data to the corresponding rule engine nodes, instead of adopting the message bus topic distribution-subscription mode, a load balancing module is set up.

[0040] Specifically, through the message bus, the device data is sent to the pre-constructed load balancing module. Then, in the load balancing module, through the random load balancing strategy, the device data of each device is distributed to the corresponding rule engine node.

[0041] Among them, when distributing the device data of each device to the corresponding rule engine node through the random load balancing strategy, in the load balancing module, according to the random function, a specified rule engine node is randomly selected from the list of rule engine nodes. Then, in the list of rule engine nodes, starting from the specified rule engine node, the device data of each device is distributed to each rule engine node in turn according to the order.

[0042] Thus, through the load balancing module, it is ensured that the amount of data processed by each node is in a balanced state, improving the overall response speed and availability of the system.

[0043] S103: Retrieve multiple scenario linkage rules corresponding to the device in the rule engine node; among them, each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action.

[0044] In some embodiments of the present application, the scenario linkage rules of each device are set in the rule engine node in advance. Among them, the scenario linkage rules of devices of the same manufacturer and the same category can be the same. For example, for cutting devices in the same computer room, the temperature of the cutting devices is detected by temperature sensors to prevent the temperature from being too high, and usually multiple cutting devices are working. Then the temperature scenario linkage rules corresponding to the multiple cutting devices are the same. Or, the vibration amplitude of the cutting devices is detected by vibration sensors to prevent parts from loosening, then the vibration scenario linkage rules corresponding to the multiple cutting devices are the same.

[0045] It should be noted that in the case of the load balancing mode, in the rule engine node group, each rule engine node needs to deploy the scenario linkage rules of all devices, while in the topic publish-subscribe mode, each rule engine node only needs to deploy the scenario linkage rules of the bound devices.

[0046] Among them, the scenario linkage rule trigger condition is used to determine the scenario linkage rule that the current device data needs to trigger. For example, when the temperature data of the cutting device uploaded by the temperature sensor, the scenario linkage rule trigger condition corresponding to the temperature data is to judge whether it is temperature data. Thus, the scenario linkage rule of the temperature data is found.

[0047] The scenario linkage condition is used to measure the degree to which device data meets the trigger condition for linkage actions. For example, if the scenario linkage condition is that the temperature data is greater than 50 degrees, then when the temperature data is greater than 50 degrees, the scenario linkage action of the cutting device is triggered.

[0048] The scenario linkage action is the next action to be taken in response to the generation of device data when the device data meets the scenario linkage condition.

[0049] Through the rule engine node, the separation of business decisions from application code is achieved. Users can write scenario linkage rules using predefined rule semantic modules, thereby changing the processing logic of device data without having to rewrite the application code.

[0050] S104: In the pre-constructed scenario mapping table, determine the specified scenario linkage rule trigger condition corresponding to the device data.

[0051] It should be noted that each device corresponds to a scenario mapping table, which includes the correspondence between device data and the specified scenario linkage rule trigger condition corresponding to the device data.

[0052] For example, the temperature data of the cutting device corresponds to the trigger condition that the temperature data is greater than 50 degrees.

[0053] S105: According to the specified scenario linkage rule trigger condition, determine the specified scenario linkage rule corresponding to the device data.

[0054] That is to say, find the scenario linkage rule corresponding to the device data attribute. For example, find the scenario linkage rule corresponding to the temperature data of the cutting device.

[0055] S106: Determine whether the device data matches the scenario linkage condition in the specified scenario linkage rule.

[0056] If not, discard the device data.

[0057] S107: If so, determine the action information to be executed by the device or the scenario-associated device according to the scenario linkage action in the specified scenario linkage rule.

[0058] For example, when the temperature data is greater than 50 degrees, the scenario linkage action is to turn off the cutting device or turn on the fan associated with the cutting device to cool the cutting device through the fan.

[0059] S108: Send the action information to the IoT platform through the message bus so that the device or the scenario-associated device can perform an action response according to the action information.

[0060] In some embodiments of the present application, when sending action information to the Internet of Things platform via the message bus, if the message bus is in the topic publish-subscribe mode, the Internet of Things platform is determined as the message publisher, the rule engine node cluster is determined as the topic publisher, and the Internet of Things platform subscribes to the action information of each rule engine node.

[0061] Based on this, the action information is sent to the message bus. In the message bus, the action information is published to the action information topic, and through the message bus, the action information is sent to the Internet of Things platform. The Internet of Things platform parses the action information and calls the device or the scene-associated device for action response.

[0062] In some embodiments of the present application, the rule engine cluster supports dynamic horizontal expansion, and the load can be dispersed by dynamically adding application nodes, thereby ensuring the high performance and high availability of the cluster.

[0063] Based on this, the data processing volume of each rule engine node is obtained, and the difference between the data processing volume and the maximum load volume of the rule engine node is calculated.

[0064] It is judged whether the difference exceeds a preset threshold. If not, no processing is performed. If so, an overload prompt of the rule engine node is sent to the Internet of Things platform.

[0065] Furthermore, based on the user's operation, the configuration information of the newly added rule engine node is obtained, and according to the configuration information, the newly added rule engine node is added to the rule engine node cluster.

[0066] In the newly added rule engine node, multiple scene linkage rules corresponding to the device are constructed to distribute the newly added device data of the device to the newly added rule engine node.

[0067] It should be noted that although the embodiments of the present application are introduced and described in sequence for steps S101 to S108 with reference to Figure 1 this does not mean that steps S101 to S108 must be executed in a strict order. The reason why the embodiments of the present application introduce and describe steps S101 to S108 in the order shown in Figure 1 is to facilitate those skilled in the art to understand the technical solution of the embodiments of the present application. In other words, in the embodiments of the present application, the order between steps S101 to S108 can be appropriately adjusted according to actual needs.

[0068] Through Figure 1The method distributes device data to corresponding rule engine nodes through a message bus. In the rule engine nodes, the scenario linkage rules corresponding to the device data are determined, and then the scenario linkage actions corresponding to the device data are automatically processed according to the scenario linkage rules, enabling the Internet of Things platform to automatically call devices or associated devices for action responses. This can achieve fast response of the Internet of Things platform to the scenario linkage of device data, especially having fast response capabilities and high availability when dealing with large-scale scenario linkages, improving the availability of the system.

[0069] More intuitively, the present application provides a schematic diagram of a device data transfer system based on an Internet of Things platform.

[0070] In Figure 2 , the device management module of the Internet of Things platform receives device data through a message bus and distributes it to the load balancing module. In the load balancing module, the device data of each device is distributed to the corresponding rule engine node through a random load balancing strategy. Among them, it includes Node 1, Node 2, and Node 3.

[0071] The rule configuration module pre-configures the scenario linkage rules corresponding to all devices in the rule engine nodes.

[0072] Node 1, Node 2, and Node 3 respectively perform scenario linkage rule processing on the distributed device data to obtain the action information that the device or scenario-associated device will execute. Finally, through the message bus, the action information is sent to the Internet of Things platform so that the device or scenario-associated device can perform action responses according to the action information.

[0073] Based on the same idea, some embodiments of the present application also provide a device and a non-volatile computer storage medium corresponding to the above method.

[0074] Figure 3 The following is a schematic structural diagram of a device data transfer device based on an Internet of Things platform provided by an embodiment of the present application. The device includes:

[0075] At least one processor; and,

[0076] A memory communicatively connected to the at least one processor; wherein,

[0077] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to:

[0078] Obtain device data uploaded by the Internet of Things platform;

[0079] Distribute the device data to the corresponding rule engine node through a message bus;

[0080] In the rule engine node, retrieve multiple scenario linkage rules corresponding to the device; wherein, each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action;

[0081] In the pre-constructed scenario mapping table, determine the specified scenario linkage rule trigger condition corresponding to the device data;

[0082] According to the specified scenario linkage rule trigger condition, determine the specified scenario linkage rule corresponding to the device data;

[0083] Judge whether the device data matches the scenario linkage condition in the specified scenario linkage rule;

[0084] If so, according to the scenario linkage action in the specified scenario linkage rule, determine the action information to be executed by the device or the scenario-associated device;

[0085] Through the message bus, send the action information to the IoT platform so that the device or the scenario-associated device can perform an action response according to the action information.

[0086] A non-volatile computer storage medium for device data transfer based on an IoT platform provided by some embodiments of the present application stores computer-executable instructions, and the computer-executable instructions are set as:

[0087] Obtain device data uploaded by the IoT platform;

[0088] Through the message bus, distribute the device data to the corresponding rule engine node;

[0089] In the rule engine node, retrieve multiple scenario linkage rules corresponding to the device; wherein, each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action;

[0090] In the pre-constructed scenario mapping table, determine the specified scenario linkage rule trigger condition corresponding to the device data;

[0091] According to the specified scenario linkage rule trigger condition, determine the specified scenario linkage rule corresponding to the device data;

[0092] Judge whether the device data matches the scenario linkage condition in the specified scenario linkage rule;

[0093] If so, according to the scenario linkage action in the specified scenario linkage rule, determine the action information to be executed by the device or the scenario-associated device;

[0094] Through the message bus, the action information is sent to the Internet of Things platform so that the device or the device associated with the scenario can perform an action response according to the action information.

[0095] Each embodiment in this application is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0096] The devices and media provided in the embodiments of this application correspond one by one to the methods. Therefore, the devices and media also have beneficial technical effects similar to those of their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be elaborated here.

[0097] Those skilled in the art should understand that the 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 complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented 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.

[0098] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0099] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.

[0101] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0102] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0103] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, 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, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0104] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the said element.

[0105] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and changes can be made to the present application. Any modifications, equivalent replacements, improvements, etc. made within the technical principles of the present application shall fall within the protection scope of the present application.

Claims

1. A method for device data transfer based on an Internet of Things platform, characterized in that, The method includes: Obtaining device data uploaded by the Internet of Things platform; Distributing the device data to the corresponding rule engine nodes through the message bus; In the rule engine nodes, retrieving multiple scenario linkage rules corresponding to the device; wherein each scenario linkage rule includes a scenario linkage rule trigger condition, a scenario linkage condition, and a scenario linkage action; In a pre-constructed scenario mapping table, determining the specified scenario linkage rule trigger condition corresponding to the device data; According to the specified scenario linkage rule trigger condition, determining the specified scenario linkage rule corresponding to the device data; Judging whether the device data matches the scenario linkage condition in the specified scenario linkage rule; If so, determining the action information to be executed by the device or the scenario-associated device according to the scenario linkage action in the specified scenario linkage rule; Sending the action information to the Internet of Things platform through the message bus so that the device or the scenario-associated device performs an action response according to the action information; Before distributing the device data to the corresponding rule engine nodes through the message bus, the method further includes: Constructing a rule engine node cluster, determining the Internet of Things platform as a topic publisher, and determining the rule engine node cluster as a message subscriber; constructing multiple scenario topics, and respectively subscribing each rule engine node in the rule engine node cluster to the corresponding scenario topic; The distributing the device data to the corresponding rule engine nodes through the message bus specifically includes: Sending the device data to the message bus through the Internet of Things platform; In the message bus, publishing the device data to the specified scenario topic; Retrieving the rule engine nodes subscribing to the specified scenario topic; Judging the rule engine nodes associated with the device corresponding to the device data; Distributing the device data to the associated rule engine nodes through the message bus; The publishing the device data to the specified scenario topic in the message bus specifically includes: Constructing the message bus according to the Redis node cluster; Storing the device data in the corresponding Redis node of the message bus; Publishing the device data to the specified scenario topic through the corresponding Redis node; Or, The device data is the device data of multiple devices, and the distributing the device data to the corresponding rule engine nodes through the message bus specifically includes: Sending the device data to a pre-constructed load balancing module through the message bus; In the load balancing module, distributing the device data of each device to the corresponding rule engine node through a random load balancing strategy; The distributing the device data of each device to the corresponding rule engine node through the random load balancing strategy specifically includes: In the load balancing module, randomly selecting a specified rule engine node from the rule engine node list according to a random function; In the rule engine node list, starting from the specified rule engine node, sequentially distributing the device data of each device to each rule engine node in turn.

2. The method according to claim 1, characterized in that Before sending the action information to the IoT platform through the message bus, the method further includes: Determining the IoT platform as the message publisher, determining the rule engine node cluster as the topic publisher, and subscribing the IoT platform to the action information of each rule engine node; Sending the action information to the IoT platform through the message bus specifically includes: Sending the action information to the message bus; In the message bus, publishing the action information to the action information topic; Sending the action information to the IoT platform through the message bus.

3. The method according to claim 1, characterized in that, After sending the action information to the IoT platform through the message bus, the method further includes: Obtaining the data processing volume of each rule engine node; Calculating the difference between the data processing volume and the maximum load capacity of the rule engine node; Judging whether the difference exceeds a preset threshold; If so, sending an overload prompt of the rule engine node to the IoT platform.

4. The method according to claim 3, wherein After sending the overload prompt of the rule engine node to the IoT platform if so, the method further includes: Based on the user's operation, obtaining the configuration information of the newly added rule engine node; According to the configuration information, adding the newly added rule engine node in the rule engine node cluster; In the newly added rule engine node, constructing multiple scenario linkage rules corresponding to the device to distribute the new device data of the device to the newly added rule engine node.

5. A device data transfer device based on an Internet of Things platform, characterized in that, Including: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute a method for device data flow based on an IoT platform according to any one of claims 1-4 above.

6. A non-volatile computer storage medium for device data transfer based on an Internet of Things platform, storing computer-executable instructions, characterized in that, The computer-executable instructions are set to: execute a method for device data flow based on an IoT platform according to any one of claims 1-4 above.

Citation Information

Patent Citations

  • Intelligent linkage system and method of Internet of Things equipment

    CN114328732A

  • Data processing method and Internet of Things platform system

    CN114567650A