CN116016584A - Equipment data transfer method, equipment and medium based on Internet of things platform - Google Patents
Equipment data transfer method, equipment and medium based on Internet of things platform Download PDFInfo
- Publication number
- CN116016584A CN116016584A CN202211549027.7A CN202211549027A CN116016584A CN 116016584 A CN116016584 A CN 116016584A CN 202211549027 A CN202211549027 A CN 202211549027A CN 116016584 A CN116016584 A CN 116016584A
- Authority
- CN
- China
- Prior art keywords
- equipment
- scene
- rule engine
- rule
- scene linkage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012546 transfer Methods 0.000 title claims description 6
- 230000009471 action Effects 0.000 claims abstract description 93
- 238000013507 mapping Methods 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims description 14
- 238000003860 storage Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 7
- 230000006855 networking Effects 0.000 claims 1
- 230000004044 response Effects 0.000 abstract description 9
- 230000008569 process Effects 0.000 abstract description 8
- 230000010485 coping Effects 0.000 abstract description 5
- 238000005520 cutting process Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000011144 upstream manufacturing Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a device data circulation method, device and medium based on an internet of things platform, wherein the method comprises the following steps: acquiring equipment data uploaded by an Internet of things platform; distributing the device data to the corresponding rule engine nodes through the message bus; in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance; determining a specified scene linkage rule of the equipment data according to the triggering condition of the specified scene linkage rule; judging whether the equipment data is matched with scene linkage conditions in the specified scene linkage rule; if so, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules; and sending the action information to the Internet of things platform through the message bus. In the equipment data circulation process, the Internet of things platform has a quick response capability when coping with large-scale scene linkage.
Description
Technical Field
The application relates to the technical field of computers, in particular to a device data transfer method, device and medium based on an internet of things platform.
Background
Scene linkage in the field of the Internet of things has become one of core applications in the field of the Internet of things, and particularly has important application value in the fields of industrial Internet of things and intelligent home, equipment is connected and interacted, and the field of the Internet of things is promoted to continuously develop forward.
At present, more and more devices are connected with the internet of things platform, application scenes are more and more complex, and application scenes requiring device processing or interaction between devices are more and more, however, in the device data circulation process, the response capability of the internet of things platform is slow when coping with large-scale scene linkage.
Disclosure of Invention
The embodiment of the application provides a device data transfer method, device and medium based on an internet of things platform, which are used for solving the problem that the response capability is slow when the internet of things platform is used for coping with large-scale scene linkage in the device data transfer process.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a device data circulation method based on an internet of things platform, where the method includes: acquiring equipment data uploaded by an Internet of things platform; distributing the device data to corresponding rule engine nodes through a message bus; in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action; determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance; determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition; judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule; if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules; and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
In one example, before distributing the device data to the corresponding rule engine node via the message bus, the method further comprises: 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 a plurality of scene topics, and subscribing each rule engine node in the rule engine node cluster to a corresponding scene topic respectively; the distributing the device data to the corresponding rule engine node through the message bus specifically comprises: the equipment data is sent to a message bus through the Internet of things platform; in the message bus, publishing the device data to a specified scene topic; retrieving a rule engine node corresponding to the appointed scene theme; judging a rule engine node associated with the equipment corresponding to the equipment data; distributing the device data to the associated rule engine node via the message bus.
In one example, the storing the device data to a specified topic in the message bus specifically includes: constructing the message bus according to the Redis node cluster; storing the device data to a corresponding Redis node of the message bus; and publishing the equipment data to a specified theme through the corresponding Redis node.
In one example, before the action information is sent to the internet of things platform through the message bus, the method further includes: determining the internet of things platform as a message publisher, determining the rule engine node cluster as a topic publisher, and subscribing the internet of things platform to action information of each rule engine node; the sending the action information to the internet of things platform through the message bus specifically includes: sending the action information to the message bus; issuing the action information to an action information theme in the message bus; and sending the action information to the Internet of things platform through the message bus.
In one example, after the action information is sent to the internet of things platform through the message bus, the method further includes: acquiring the data processing capacity of each rule engine node; calculating a difference between the data processing amount and a maximum load amount of the rule engine node; judging whether the difference exceeds a preset threshold value or not; if yes, sending an overload prompt of the rule engine node to the internet of things platform.
In one example, after the if, sending the overload prompt of the rule engine node to the internet of things platform, the method further includes: based on the operation of a user, acquiring configuration information of a newly added rule engine node; adding the newly added rule engine node into a rule engine node cluster according to the configuration information; and constructing a plurality of scene linkage rules corresponding to the equipment in the newly-added rule engine node so as to distribute newly-added equipment data of the equipment to the newly-added rule engine node.
In one example, the device data is device data of a plurality of devices, and the distributing the device data to the corresponding rule engine node through the message bus specifically includes: transmitting the device data to a pre-constructed load balancing module through a 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.
In one example, the distributing the device data of each device to the corresponding rule engine node through the random load balancing policy specifically includes: in the load balancing module, according to a random function, randomly selecting a designated rule engine node from a rule engine node list; and in the rule engine node list, starting with the designated rule engine node, distributing the device data of each device to each rule engine node in turn according to the sequence.
On the other hand, the embodiment of the application provides equipment data circulation equipment based on an internet of things platform, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to: acquiring equipment data uploaded by an Internet of things platform; distributing the device data to corresponding rule engine nodes through a message bus; in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action; determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance; determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition; judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule; if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules; and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
In another aspect, an embodiment of the present application provides a device data flow nonvolatile computer storage medium based on an internet of things platform, storing computer executable instructions, where the computer executable instructions are configured to: acquiring equipment data uploaded by an Internet of things platform; distributing the device data to corresponding rule engine nodes through a message bus; in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action; determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance; determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition; judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule; if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules; and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
The above-mentioned at least one technical scheme that this application embodiment adopted can reach following beneficial effect:
the device data is distributed to the corresponding rule engine nodes through the message buses, and scene linkage rules corresponding to the device data are determined in the rule engine nodes, so that scene linkage actions corresponding to the device data are automatically processed according to the scene linkage rules, the device or associated devices are automatically called by the Internet of things platform to conduct action response, the scene linkage of the Internet of things platform for rapidly responding to the device data can be achieved, and the system has rapid response capability and high availability especially when large-scale scene linkage is dealt with, and the availability of the system is improved.
Drawings
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 accompanying drawings, in which:
fig. 1 is a flow chart of a device data circulation method based on an internet of things platform according to an embodiment of the present application;
fig. 2 is a schematic diagram of an equipment data circulation system based on an internet of things platform according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an equipment data circulation device based on an internet of things platform according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a device data circulation method based on an internet of things platform according to an embodiment of the present application. The method can be applied to different business fields, such as the internet financial business field, the electric business field, the instant messaging business field, the game business field, the public business field and the like. Some of the input parameters or intermediate results in the flow allow for manual intervention adjustments to help improve accuracy.
The implementation of the analysis method according to the embodiment of the present application may be a terminal device or a server, which is not particularly limited in this application. For ease of understanding and description, the following embodiments will take a server as an example, for example, a data streaming server.
It should be noted that the server may be a single device, or may be a system formed by a plurality of devices, that is, a distributed server, which is not specifically limited in this application.
The flow in fig. 1 may include the steps of:
s101: and acquiring the equipment data uploaded by the Internet of things platform.
The internet of things device sends the device data to the data bus, so that the device data is sent to the internet of things platform through the data bus, and the currently acquired device data can be the device data of one device or can comprise the device data corresponding to a plurality of devices respectively.
S102: and distributing the device data to the corresponding rule engine nodes through the message buses.
In some embodiments of the present application, a rule engine node cluster is pre-built, that is, includes a plurality of rule engine nodes, and the rule engine can be deployed in a cluster form, so that the capability of coping with a high concurrency application scenario can be improved, and high availability can be provided, and the failure of any node in the cluster does not cause the unavailability of the whole system.
In addition, the message bus enables cross-node communication for communicating messages between upstream and downstream application nodes using a topic-based publish-subscribe mode implementation. The upstream node acts as an event publisher to publish the message to the appointed theme, and the downstream node acts as a message subscriber to receive all messages of the subscribed theme. The message bus realizes the logical decoupling and physical decoupling among the nodes, and the upstream node for sending the message only needs to rely on the message bus and does not need to rely on other services.
In addition, the message bus is realized based on the Redis node cluster, the Redis node cluster realizes the horizontal capacity expansion of the Redis, namely, a plurality of Redis nodes are started, and the whole data are distributed and stored in the nodes, so that the pressure of the Redis nodes is dispersed, and the capability of the message bus for coping with mass data is realized.
Based on the information, the internet of things platform is determined to be a topic publisher, and the rule engine node cluster is determined to be a message subscriber. Then, constructing a plurality of scene topics, and subscribing each rule engine node in the rule engine node cluster to the corresponding scene topic respectively. For example, scene topics include device temperature control, video data alarm control, and the like. It should be noted that each rule engine node may correspond to one or more scene topics.
When distributing the device data to the corresponding rule engine nodes, the device data is firstly sent to the message bus through the Internet of things platform, then the device data is published to the appointed scene theme in the message bus, then the rule engine nodes corresponding to the appointed scene theme are searched and subscribed, finally the rule engine nodes associated with the device corresponding to the device data are judged, and the device data are distributed to the associated rule engine nodes. That is, each rule engine node corresponds to a respective device to which it is typically bound, i.e., the device data of that device is processed by that rule engine node. Typically, one rule engine node binds multiple devices of the same manufacturer and model.
Thus, similar equipment is divided into the same rule engine node, and the processing speed of each rule engine node can be improved.
When the device data is stored to the appointed theme, the message bus stores the device data out of the corresponding Redis node, and the device data is published to the appointed theme through the corresponding Redis node.
In some embodiments of the present application, the ability of a rule engine cluster is utilized to increase response speed and provide high availability due to the functionality that a load balancing component can distribute data to different rule engine nodes.
Based on this, when distributing device data to the corresponding rule engine node, the message bus topic distribution-subscription mode is no longer employed, but a load balancing module is set.
Specifically, the device data is sent to a pre-built load balancing module through a message bus, and then, in the load balancing module, the device data of each device is distributed to a corresponding rule engine node through a random load balancing strategy.
When the device data of each device is distributed to the corresponding rule engine node through a random load balancing strategy, in a load balancing module, according to a random function, the designated rule engine node is randomly selected from a rule engine node list, and then in the rule engine node list, the device data of each device is distributed to each rule engine node in turn in sequence with the designated rule engine node as the beginning.
Therefore, the data quantity processed by each node is guaranteed to be in a balanced state through the load balancing module, and the overall response speed and usability of the system are improved.
S103: in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action.
In some embodiments of the present application, the scene linkage rules for each device are set in advance in the rules engine node. The scene linkage rules of the devices of the same class of the same manufacturer can be the same. For example, the temperature sensor detects the temperature of the cutting equipment in the same machine room, so that the cutting equipment is prevented from being excessively high in temperature, and a plurality of cutting equipment usually work. Then the temperature scene linkage rules corresponding to the plurality of cutting devices are the same. Or the vibration sensor detects the vibration amplitude of the cutting equipment to prevent the loosening of parts, so that the linkage rules of the vibration scenes corresponding to the plurality of cutting equipment are identical.
It should be noted that, if the load balancing mode is adopted, in the rule engine node group, each rule engine node needs to deploy scene linkage rules of all devices, and in the topic publish-subscribe mode, each rule engine node only needs to deploy scene linkage rules of binding devices.
The scene linkage rule triggering condition is used for determining a scene linkage rule to be triggered by current equipment data, for example, when the temperature sensor uploads the cutting equipment temperature data, the scene linkage rule triggering condition corresponding to the temperature data is used for judging whether the temperature data is the temperature data or not. Thereby finding scene linkage rules of the temperature data.
The scene linkage condition is used for measuring whether the equipment data meets the degree of triggering linkage action. For example, if the scene linkage condition is that the temperature data is greater than 50 degrees, the scene linkage action of the cutting equipment is triggered when the temperature data is greater than 50 degrees.
The scene linkage action is the next action which needs to be taken for the generation of the equipment data when the equipment data meets the scene linkage condition.
The role of separating business decisions from application code is realized by the rule engine nodes. The user may write scene linkage rules using predefined rule semantics modules to change the processing logic of the device data without having to re-write the code of the application.
S104: and determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance.
It should be noted that, each device corresponds to a scene mapping table, and the table includes a correspondence between device data and a specified scene linkage rule triggering condition corresponding to the device data.
For example, the temperature data of the cutting device corresponds to a trigger condition that the temperature data is greater than 50 degrees.
S105: and determining the specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition.
That is, a scene linkage rule corresponding to the device data attribute is found, for example, a scene linkage rule corresponding to the cutting device temperature data is found.
S106: and judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule.
If not, discarding the device data.
S107: if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules.
For example, when the temperature data is greater than 50 degrees, the scene linkage is used as a fan associated with the cutting equipment to be turned off or turned on, and the fan is used for cooling the cutting equipment.
S108: and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
In some embodiments of the present application, when the action information is sent to the internet of things platform through the message bus, if the message bus is in the topic publish-subscribe mode, the internet of things platform is determined to be a message publisher, the rule engine node cluster is determined to be a topic publisher, and the internet of things platform is subscribed to the action information of each rule engine node.
Based on the action information, the action information is sent to a message bus, the action information is issued to an action information subject in the message bus, the action information is sent to an internet of things platform through the message bus, the internet of things platform analyzes the action information, and the calling device or the scene association device responds to the action.
In some embodiments of the present application, the rule engine cluster supports dynamic level expansion, and load can be dispersed by dynamically adding application nodes, so as to ensure high performance and high availability of the cluster.
Based on this, the data processing amount of each rule engine node is acquired, and the difference between the data processing amount and the maximum load amount of the rule engine node is calculated.
Judging whether the difference exceeds a preset threshold value, if not, not processing. If yes, sending an overload prompt of the rule engine node to the Internet of things platform.
Further, based on the operation of the user, configuration information of the newly added rule engine node is obtained, and the newly added rule engine node is added in the rule engine node cluster according to the configuration information.
And constructing a plurality of scene linkage rules corresponding to the equipment in the newly-added rule engine node so as to distribute newly-added equipment data of the equipment to the newly-added rule engine node.
It should be noted that, although the embodiment of the present application is described with reference to fig. 1 to sequentially describe steps S101 to S108, this does not represent that steps S101 to S108 must be performed in strict order. The steps S101 to S108 are sequentially described according to the sequence shown in fig. 1 in the embodiment of the present application, so as to facilitate the understanding of the technical solution of the embodiment of the present application by those skilled in the art. In other words, in the embodiment of the present application, the sequence between step S101 to step S108 may be appropriately adjusted according to actual needs.
Through the method of fig. 1, the device data is distributed to the corresponding rule engine node through the message bus, and the scene linkage rule corresponding to the device data is determined in the rule engine node, so that the scene linkage action corresponding to the device data is automatically processed according to the scene linkage rule, the internet of things platform automatically calls the device or the associated device to perform action response, the scene linkage of the internet of things platform for rapidly responding to the device data can be realized, the rapid response capability and the high availability are realized particularly when the large-scale scene linkage is dealt with, and the availability of the system is improved.
More intuitively, the application provides a schematic diagram of a device data circulation system based on an internet of things platform.
In fig. 2, the device management module of the platform of the internet of things receives and distributes the device data to the load balancing module through the message bus, and 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. Including node 1, node 2, and node 3.
The rule configuration module configures scene linkage rules corresponding to all devices in the rule engine node in advance.
And the node 1, the node 2 and the node 3 respectively process scene linkage rules of the distributed equipment data to obtain action information to be executed by equipment or scene association equipment, and finally the action information is sent to an Internet of things platform through a message bus so that the equipment or the scene association equipment can respond to the action according to the action information.
Based on the same thought, some embodiments of the present application further provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 3 is a schematic structural diagram of an apparatus data circulation apparatus based on an internet of things platform, where the apparatus includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring equipment data uploaded by an Internet of things platform;
distributing the device data to corresponding rule engine nodes through a message bus;
in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action;
determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance;
determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition;
judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule;
if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules;
and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
Some embodiments of the present application provide a device data flow nonvolatile computer storage medium based on an internet of things platform, storing computer executable instructions, where the computer executable instructions are configured to:
acquiring equipment data uploaded by an Internet of things platform;
distributing the device data to corresponding rule engine nodes through a message bus;
in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action;
determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance;
determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition;
judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule;
if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules;
and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not described in detail herein.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the technical principles of the present application should fall within the protection scope of the present application.
Claims (10)
1. The device data transfer method based on the internet of things platform is characterized by comprising the following steps:
acquiring equipment data uploaded by an Internet of things platform;
distributing the device data to corresponding rule engine nodes through a message bus;
in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action;
determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance;
determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition;
judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule;
if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules;
and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
2. The method of claim 1, wherein prior to distributing the device data to the corresponding rule engine node via a message bus, the method further comprises:
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 a plurality of scene topics, and subscribing each rule engine node in the rule engine node cluster to a corresponding scene topic respectively;
the distributing the device data to the corresponding rule engine node through the message bus specifically comprises:
the equipment data is sent to a message bus through the Internet of things platform;
in the message bus, publishing the device data to a specified scene topic;
retrieving a rule engine node corresponding to the appointed scene theme;
judging a rule engine node associated with the equipment corresponding to the equipment data;
distributing the device data to the associated rule engine node via the message bus.
3. The method according to claim 2, wherein said storing said device data to a specified topic in said message bus, in particular comprises:
constructing the message bus according to the Redis node cluster;
storing the device data to a corresponding Redis node of the message bus;
and publishing the equipment data to a specified theme through the corresponding Redis node.
4. The method of claim 1, wherein before the act information is sent to the internet of things platform via the message bus, the method further comprises:
determining the internet of things platform as a message publisher, determining the rule engine node cluster as a topic publisher, and subscribing the internet of things platform to action information of each rule engine node;
the sending the action information to the internet of things platform through the message bus specifically includes:
sending the action information to the message bus;
issuing the action information to an action information theme in the message bus;
and sending the action information to the Internet of things platform through the message bus.
5. The method of claim 1, wherein after the sending the action information to the internet of things platform via the message bus, the method further comprises:
acquiring the data processing capacity of each rule engine node;
calculating a difference between the data processing amount and a maximum load amount of the rule engine node;
judging whether the difference exceeds a preset threshold value or not;
if yes, sending an overload prompt of the rule engine node to the internet of things platform.
6. The method of claim 5, wherein if so, after sending the overload prompt of the rule engine node to the internet of things platform, the method further comprises:
based on the operation of a user, acquiring configuration information of a newly added rule engine node;
adding the newly added rule engine node into a rule engine node cluster according to the configuration information;
and constructing a plurality of scene linkage rules corresponding to the equipment in the newly-added rule engine node so as to distribute newly-added equipment data of the equipment to the newly-added rule engine node.
7. The method according to claim 1, wherein the device data is device data of a plurality of devices, and the distributing the device data to the corresponding rule engine node via the message bus specifically comprises:
transmitting the device data to a pre-constructed load balancing module through a 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.
8. The method according to claim 1, wherein the distributing the device data of each device to the corresponding rule engine node by means of a random load balancing policy, in particular comprises:
in the load balancing module, according to a random function, randomly selecting a designated rule engine node from a rule engine node list;
and in the rule engine node list, starting with the designated rule engine node, distributing the device data of each device to each rule engine node in turn according to the sequence.
9. An equipment data circulation equipment based on thing networking platform, its characterized in that includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring equipment data uploaded by an Internet of things platform;
distributing the device data to corresponding rule engine nodes through a message bus;
in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action;
determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance;
determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition;
judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule;
if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules;
and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
10. An equipment data flow nonvolatile computer storage medium based on an internet of things platform, which stores computer executable instructions, wherein the computer executable instructions are configured to:
acquiring equipment data uploaded by an Internet of things platform;
distributing the device data to corresponding rule engine nodes through a message bus;
in the rule engine node, searching a plurality of scene linkage rules corresponding to the equipment; each scene linkage rule comprises a scene linkage rule triggering condition, a scene linkage condition and a scene linkage action;
determining a specified scene linkage rule triggering condition corresponding to the equipment data in a scene mapping table constructed in advance;
determining a specified scene linkage rule corresponding to the equipment data according to the specified scene linkage rule triggering condition;
judging whether the equipment data is matched with scene linkage conditions in the appointed scene linkage rule;
if yes, determining action information to be executed by the equipment or the scene association equipment according to scene linkage actions in the specified scene linkage rules;
and sending the action information to the Internet of things platform through the message bus so that the equipment or the scene association equipment responds to the action according to the action information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211549027.7A CN116016584A (en) | 2022-12-05 | 2022-12-05 | Equipment data transfer method, equipment and medium based on Internet of things platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211549027.7A CN116016584A (en) | 2022-12-05 | 2022-12-05 | Equipment data transfer method, equipment and medium based on Internet of things platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116016584A true CN116016584A (en) | 2023-04-25 |
Family
ID=86030815
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211549027.7A Pending CN116016584A (en) | 2022-12-05 | 2022-12-05 | Equipment data transfer method, equipment and medium based on Internet of things platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116016584A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117421336A (en) * | 2023-09-20 | 2024-01-19 | 广东赛博威信息科技有限公司 | Rule engine method, system, equipment and medium of Internet of things |
CN118227595A (en) * | 2024-05-24 | 2024-06-21 | 杭州宇泛智能科技股份有限公司 | Data classification and storage method and device based on edge enabling |
CN118282785A (en) * | 2024-06-04 | 2024-07-02 | 杭州宇泛智能科技股份有限公司 | High-reliability low-delay transmission and processing method for large-scale multi-source multi-mode data |
-
2022
- 2022-12-05 CN CN202211549027.7A patent/CN116016584A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117421336A (en) * | 2023-09-20 | 2024-01-19 | 广东赛博威信息科技有限公司 | Rule engine method, system, equipment and medium of Internet of things |
CN118227595A (en) * | 2024-05-24 | 2024-06-21 | 杭州宇泛智能科技股份有限公司 | Data classification and storage method and device based on edge enabling |
CN118282785A (en) * | 2024-06-04 | 2024-07-02 | 杭州宇泛智能科技股份有限公司 | High-reliability low-delay transmission and processing method for large-scale multi-source multi-mode data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116016584A (en) | Equipment data transfer method, equipment and medium based on Internet of things platform | |
CN110768912B (en) | API gateway current limiting method and device | |
JP6700266B2 (en) | Service addressing in distributed environment | |
JP6018182B2 (en) | Send category information | |
CA3048742A1 (en) | Blockchain-based consensus method and device | |
CN113037794B (en) | Method, device and system for computing resource allocation scheduling | |
CN109412875B (en) | zookeeper cluster automatic maintenance method and device | |
CN111935238A (en) | Cloud platform load balancing management system, method, equipment and medium | |
CN112217847A (en) | Micro service platform, implementation method thereof, electronic device and storage medium | |
CN115190078B (en) | Access flow control method, device, equipment and storage medium | |
CN116233164A (en) | Method, apparatus, storage medium and processor for collecting device data | |
CN108124021B (en) | Method, device and system for obtaining Internet Protocol (IP) address and accessing website | |
CN112559565A (en) | Abnormity detection method, system and device | |
CN116055401A (en) | Message processing method, device, equipment and storage medium | |
CN110620734A (en) | TCP link data processing method and device | |
CN110753006A (en) | Data processing method and device and electronic equipment | |
CN115914404A (en) | Cluster flow management method and device, computer equipment and storage medium | |
CN115934292A (en) | Calling method, device and equipment of microservice application | |
CN108718285B (en) | Flow control method and device of cloud computing cluster and server | |
CN112104566A (en) | Load balancing processing method and device | |
CN113300966A (en) | Flow control method, device and system and electronic equipment | |
US9960957B2 (en) | Methods for prioritizing failover of logical interfaces (LIFs) during a node outage and devices thereof | |
CN112954074B (en) | Block chain network connection method and device | |
CN114826919B (en) | SDN-based load balancing software nanotube method, device, equipment and medium | |
CN114979979B (en) | Message processing method and message processing system thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |