WO2024087995A1 - 物联网设备联动方法、系统、电子设备及可读存储介质 - Google Patents

物联网设备联动方法、系统、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2024087995A1
WO2024087995A1 PCT/CN2023/121558 CN2023121558W WO2024087995A1 WO 2024087995 A1 WO2024087995 A1 WO 2024087995A1 CN 2023121558 W CN2023121558 W CN 2023121558W WO 2024087995 A1 WO2024087995 A1 WO 2024087995A1
Authority
WO
WIPO (PCT)
Prior art keywords
linkage
target
service system
status data
real
Prior art date
Application number
PCT/CN2023/121558
Other languages
English (en)
French (fr)
Inventor
纪高
杜洪军
王怀亮
郑海涛
于洪达
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2024087995A1 publication Critical patent/WO2024087995A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the embodiments of the present invention relate to the technical field of Internet of Things, and in particular to an Internet of Things device linkage method, system, electronic device and readable storage medium.
  • the embodiments of the present invention relate to the technical field of Internet of Things, and in particular to an Internet of Things device linkage method, system, electronic device and readable storage medium.
  • the embodiments of the present invention provide an Internet of Things device linkage method, system, electronic device and readable storage medium, which are used to solve the problem of poor scalability of the existing Internet of Things device linkage method.
  • an embodiment of the present invention provides an Internet of Things device linkage method, comprising:
  • the controlled device is controlled to adjust the value of the target device attribute to the target value.
  • the collecting of the real-time value of the status data provided by the at least one first service system further includes:
  • the real-time value of the status data provided by the at least one first service system is converted into a predetermined format.
  • the predetermined format is a json format.
  • the collecting of the real-time value of the status data provided by the at least one first service system further includes at least one of the following:
  • Configuring a first access interface of the first service system wherein the first access interface is used to collect status data provided by the first service system and real-time values of the status data;
  • the collecting of the real-time value of the status data provided by the at least one first service system further includes:
  • the step of selecting a linkage rule matching the state data from the stored linkage rules as the target linkage rule is not entered;
  • the step of selecting a linkage rule that matches the status data from the stored linkage rules as the target linkage rule is entered, and the real-time value is used to update the value of the cached previously collected status data.
  • the selecting a linkage rule matching the state data from the stored linkage rules as the target linkage rule also includes:
  • configuring the linkage rule includes:
  • the linkage conditions including: state data, a linkage threshold of the state data, and an operation mode of a real-time value of the state data and the linkage threshold;
  • the linkage rule is generated according to the state data, the linkage threshold, the operation mode, and the target value of the target device attribute of the controlled device.
  • controlling the controlled device to adjust the value of the target device attribute to the target value includes:
  • a control instruction is sent to the second service system to which the controlled device belongs, so as to control the second service system to which the controlled device belongs to adjust the target device attribute of the controlled device to the target value.
  • selecting a linkage rule matching the state data from the stored linkage rules as a target linkage rule, and judging whether the real-time value of the state data satisfies a linkage condition in the target linkage rule includes:
  • the linkage condition includes: status data, a linkage threshold of the status data, and an operation mode of a real-time value of the status data and the linkage threshold;
  • linkage condition of the target linkage rule also includes other status data, collecting the real-time value of the other status data from the first service system corresponding to the other status data;
  • an embodiment of the present invention provides an Internet of Things device linkage system, including:
  • a data collection module is used to collect real-time status data provided by at least one first service system.
  • a numerical value wherein the status data includes service data and/or device attributes of a control device under the first service system;
  • a linkage rule engine module configured to select a linkage rule matching the state data from the stored linkage rules as a target linkage rule, and determine whether the real-time value of the state data satisfies a linkage condition in the target linkage rule, wherein the target linkage rule includes the linkage condition and a target value of a target device attribute of a controlled device, wherein the controlled device is a device under the second service system;
  • the control module is used to control the controlled device to adjust the value of the target device attribute to the target value when the real-time value of the status data meets the linkage condition of the target linkage rule.
  • an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method for linking Internet of Things devices as described in the first aspect above are implemented.
  • an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored.
  • the computer program is executed by a processor, the steps of the Internet of Things device linkage method as described in the first aspect above are implemented.
  • real-time values of status data dispersed in at least one first service system can be collected, and a linkage rule matching the status data can be selected from the stored linkage rules as a target linkage rule.
  • the controlled device under the second service system is controlled to adjust the value of the target device attribute to the target value, thereby realizing linkage between cross-system devices or between business services and devices, improving the scalability and diversity of the linkage of Internet of Things devices, avoiding additional development work, and reducing costs.
  • FIG1 is a schematic diagram of a flow chart of a method for linking IoT devices according to an embodiment of the present invention
  • FIG2 is a second flow chart of the method for linking IoT devices according to an embodiment of the present invention.
  • FIG3 is a schematic diagram of a process for configuring linkage rules according to an embodiment of the present invention.
  • FIG4 is a schematic diagram of the structure of an Internet of Things device linkage system according to an embodiment of the present invention.
  • FIG5 is a schematic diagram of a deployment implementation of an embodiment of the present invention.
  • FIG6 is a schematic diagram of another deployment implementation of an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • an embodiment of the present invention provides an IoT device linkage method, including:
  • Step 11 Collecting real-time values of status data provided by at least one first service system, wherein the status data includes service data and/or device attributes of a control device under the first service system;
  • the first service system may be an IoT device service system or a business service system, wherein each IoT device service system is connected to a plurality of IoT devices and is used to provide services for the connected plurality of IoT devices.
  • the above-mentioned operation of collecting the real-time numerical value of the status data provided by at least one first service system can be implemented by a data collection module in the Internet of Things device linkage system.
  • the device attributes of a device may include multiple data items.
  • the device attributes of a smart screen device may include attribute data items such as volume, screen brightness, and display content name.
  • attribute data items such as volume, screen brightness, and display content name.
  • Step 12 selecting a linkage rule matching the state data from the stored linkage rules as a target linkage rule, and judging whether the real-time value of the state data satisfies a linkage condition in the target linkage rule, wherein the target linkage rule includes the linkage condition and a target value of a target device attribute of a controlled device, and the controlled device is a device under the second service system;
  • the one or more controlled devices may belong to the same second service system or to different second service systems.
  • Rules are the laws followed by the operating rules.
  • the rules in the embodiments of the present invention mainly refer to the laws of connection between IoT devices. They can usually be expressed as "if certain linkage conditions are met, then execute "If the door is open, then turn on the light.”
  • Step 13 When the real-time value of the status data meets the linkage condition of the target linkage rule, the controlled device is controlled to adjust the value of the target device attribute to the target value.
  • real-time values of status data dispersed in at least one first service system can be collected, and a linkage rule matching the status data can be selected from the stored linkage rules as a target linkage rule.
  • the controlled device under the second service system is controlled to adjust the value of the target device attribute to the target value, thereby realizing linkage between cross-system devices or between business services and devices, improving the scalability and diversity of the linkage of Internet of Things devices, avoiding additional development work, and reducing costs.
  • the first service system and/or the second service system includes at least one of the following: an MQTT service system, an HTTP/HTTPS service system, a Kafka service system, and a Redis service system.
  • MQTT is the device access service of most IoT device systems. You only need to develop a simple MQTT client program (i.e., MQTT service system) to complete the device's cloud migration.
  • MQTT service system i.e., MQTT service system
  • BOE's smart painting screen is connected to the MQTT service system.
  • the real-time values of the device attributes of the smart painting screen can be collected through the data collection module.
  • http/https is generally the external interface protocol of the business service system.
  • a business service system that can provide air quality data can, in the embodiment of the present invention, pull daily air quality data through the data collection module and use it to link home smart devices.
  • Kafka is a message queue service that can decouple the dependencies between multiple systems and support tens of millions of concurrent consumers.
  • the typical application scenario is that the business service system produces relevant business data and sends it to the Kafka service, and then the downstream business system consumes the business data from the Kafka service.
  • the camera recognition system collects information about the surrounding environment and identifies it. If a fire is detected, the recognition result is put into Kafka, and then the alarm linkage system consumes the recognition result in Kafka to complete the alarm.
  • Redis is an in-memory database cache service that can cache data in various forms. Its application scenario is that the business service system caches device data in Redis, and other business service systems can obtain device data from Redis.
  • status data can be obtained from various types of service systems. Wide range.
  • the collecting of the real-time value of the status data provided by the at least one first service system further includes: converting the real-time value of the status data provided by the at least one first service system into a predetermined format.
  • the predetermined format is a json format.
  • the identifier of the collected status data can be used as the key in a key-value pair in a json file, and the real-time value of the status data can be used as the value in the key-value pair, thereby forming a key-value pair.
  • the predetermined format may also be a text format or the like.
  • data of multiple first service systems can be parsed and converted into data in a unified format, thereby facilitating processing.
  • the collecting of the real-time value of the status data provided by the at least one first service system further includes at least one of the following:
  • the identifier can be defined as HK-DS-2TD62XX-AAA001, where HK is the manufacturer code, DS-2TD62XX is the camera product model and category, and AAA001 is the device number. This identifier can be used to uniquely identify the device.
  • the real-time value of the device attribute is requested from the first service system once every 10 seconds.
  • the frequency setting can be determined according to the data reporting interval of the device, or according to the actual business situation. For example, the data reporting interval of the temperature sensor under the first service system is 10 seconds, but in the actual application scenario, such frequent data is not needed, so the reporting interval can be set longer, such as 1 minute.
  • real-time data of status data provided by at least one first service system is collected.
  • the value includes: collecting status data and real-time value of the status data provided by at least one first service system according to the access interface, the identifier of the control device and the frequency of collecting the status data.
  • the real-time value of the status data of the first service system can be collected through http/https requests, or the SDK (software development kit) provided by the first service system or the message queue of a third-party system can be used to collect the real-time value of the status data of the first service system.
  • the real-time values of the collected state data can be uniformly converted into a json format. For example, after the conversion, a key-value pair is "angle":30, and a key-value pair is "state":"open".
  • the collected data may also include: an identifier of the control device, such as HK-DS-2TD62XX-AAA001.
  • the collected data may also include: timestamp information.
  • the collecting of the real-time value of the status data provided by at least one first service system further includes:
  • Step 21 Compare the real-time value with the cached value of previously collected status data
  • Step 22 if the comparison result indicates that the real-time value is the same as the value of the cached previously collected state data, the step of selecting a linkage rule matching the state data from the stored linkage rules as the target linkage rule is not performed;
  • Step 23 If the comparison result indicates that the real-time value is different from the value of the cached previously collected status data, enter the step of selecting a linkage rule that matches the status data from the stored linkage rules as the target linkage rule, and use the real-time value to update the value of the cached previously collected status data.
  • the real-time value of the currently collected state data is compared with the value of the previously collected state data in the cache. If the real-time value is the same as the value of the previously collected state data in the cache, the step of selecting a linkage rule that matches the state data from the stored linkage rules as the target linkage rule is not triggered, thereby saving the computing resources of the system.
  • the state data is the temperature information collected by the temperature sensor, and the linkage condition of the linkage rule is to turn on the air conditioner when it exceeds 28 degrees Celsius.
  • the step of selecting a target linkage rule containing the temperature information from the stored linkage rules can be not triggered.
  • the step of selecting a target linkage rule containing the temperature information from the stored linkage rules is triggered.
  • the selecting a linkage rule matching the state data from the stored linkage rules as the target linkage rule also includes: configuring the linkage rule; wherein, referring to FIG. 3 , configuring the linkage rule includes:
  • Step 31 Collect device attributes of devices in the first service system and/or the second service system
  • a device configuration table may be formed, and the format may be as follows:
  • the format of the setting data may be defined according to the interface of the service system, and the setting parameters are the account or authorization related information of the setting interface.
  • Step 32 Selecting a first device under the first service system as the control device, and selecting a target device attribute of the control device as the status data; or selecting target service data that can be provided by the first service system as the status data;
  • Step 33 determining linkage conditions, the linkage conditions including: state data, a linkage threshold of the state data, and an operation mode of the real-time value of the state data and the linkage threshold;
  • Step 34 Selecting a second device under the second service system as the controlled device
  • Step 35 Select a target device attribute of the controlled device, and set a target value of the target device attribute of the controlled device;
  • Step 36 Based on the state data, the linkage threshold, the operation mode and the controlled The target value of the target device attribute of the device generates the linkage rule.
  • the linkage rule includes, for example, "rule name” and "rule description".
  • the rule description can be, for example: ⁇ when the door lock (lock001) of system 1 is open; then the light (light01) of system 2 is turned on ⁇ .
  • the linkage rule means that after receiving the status data of the door lock (lock001) of system 1, the light of system 2 will be turned on.
  • the air quality data comes from a first service system.
  • the data on whether someone is at home can come from the camera, for example, obtained from a camera system (another first service system).
  • the obtained data may include: the device identification of the control device (such as HK-DS-2TD62XX-AAA002), the real-time value of whether there is someone at home (for example, true, indicating that there is someone at home, which is the real-time value of the status data), and timestamp information (i.e., the collection time of the real-time value of whether there is someone at home).
  • the following linkage rule script may include: rule name, rule description, the rule description includes linkage conditions, the linkage conditions include status data, and the linkage threshold corresponding to the status data, the identification of the controlled device, the target device attribute of the controlled device, and the target value of the target device attribute of the controlled device.
  • the above-mentioned linkage rule script can be processed according to the collected real-time values, wherein post is a function that can request the http/https interface, and the control of the system-level device is achieved by calling the function.
  • controlling the controlled device to adjust the value of the target device attribute to the target value includes: adjusting the target device attribute of the controlled device to the target value by calling a service interface of a second service system to which the controlled device belongs; or A control instruction is sent to the second service system to which the controlled device belongs, so as to control the second service system to which the controlled device belongs to adjust the target device attribute of the controlled device to the target value.
  • selecting a linkage rule matching the state data from the stored linkage rules as a target linkage rule, and judging whether the real-time value of the state data satisfies the linkage condition in the target linkage rule includes:
  • the linkage condition includes: status data, a linkage threshold of the status data, and an operation mode of a real-time value of the status data and the linkage threshold;
  • linkage condition of the target linkage rule also includes other status data, collecting the real-time value of the other status data from the first service system corresponding to the other status data;
  • an embodiment of the present invention further provides an Internet of Things device linkage system 40, including:
  • a data collection module 41 configured to collect real-time values of status data provided by at least one first service system, wherein the status data includes service data and/or device attributes of a control device under the first service system;
  • a linkage rule engine module 42 configured to select a linkage rule matching the state data from the stored linkage rules as a target linkage rule, and determine whether the real-time value of the state data satisfies a linkage condition in the target linkage rule, wherein the target linkage rule includes the linkage condition and a target value of a target device attribute of a controlled device, wherein the controlled device is a device under the second service system;
  • the control module 43 is used to control the controlled device to adjust the value of the target device attribute to the target value when the real-time value of the status data meets the linkage condition of the target linkage rule.
  • the first service system and/or the second service system includes at least one of the following: an MQTT service system, an HTTP/HTTPS service system, a Kafka service system, and a Redis service system.
  • the Internet of Things device linkage system 40 further includes: a format conversion module, used to convert the real-time numerical value of the status data provided by the at least one first service system into a predetermined format.
  • a format conversion module used to convert the real-time numerical value of the status data provided by the at least one first service system into a predetermined format.
  • the predetermined format is a json format.
  • the IoT device linkage system 40 further includes at least one of the following:
  • a first configuration module used to configure a first access interface of the first service system, wherein the first access interface is used to collect status data provided by the first service system and real-time values of the status data;
  • a second configuration module used to configure a second access interface of the second service system, where the second access interface is used to collect device attributes of devices under the second service system;
  • a third configuration module used to configure an identifier of a device in the first service system and/or the second service system, wherein the identifier is used to uniquely identify a corresponding device;
  • the fourth configuration module is used to configure the frequency of collecting the real-time value of the status data.
  • the Internet of Things device linkage system 40 further includes:
  • a comparison module for comparing the real-time value with the value of cached previously collected status data
  • a trigger module is used for not entering the step of selecting a linkage rule that matches the status data from the stored linkage rules as a target linkage rule if the comparison result indicates that the real-time value is the same as the value of the cached previously collected status data; if the comparison result indicates that the real-time value is different from the value of the cached previously collected status data, entering the step of selecting a linkage rule that matches the status data from the stored linkage rules as a target linkage rule, and using the real-time value to update the value of the cached previously collected status data.
  • the Internet of Things device linkage system 40 further includes:
  • a fifth configuration module used to configure the linkage rules
  • configuring the linkage rule includes:
  • the linkage conditions including: state data, a linkage threshold of the state data, and an operation mode of a real-time value of the state data and the linkage threshold;
  • the linkage rule is generated according to the state data, the linkage threshold, the operation mode, and the target value of the target device attribute of the controlled device.
  • control module 43 is used to adjust the target device property of the controlled device to the target value by calling the service interface of the second service system to which the controlled device belongs; or to send a control instruction to the second service system to which the controlled device belongs, so as to control the second service system to which the controlled device belongs to adjust the target device property of the controlled device to the target value.
  • the linkage rule engine module 42 is used to select a linkage rule that matches the status data provided by a first service system currently collected from the stored linkage rules as the target linkage rule; determine whether the linkage conditions of the target linkage rule include other status data in addition to the status data; the linkage conditions include: status data, a linkage threshold of the status data, and an operation method of the real-time value of the status data and the linkage threshold; if the linkage conditions of the target linkage rule also include other status data, collect the real-time value of the other status data from the first service system corresponding to the other status data; when all status data in the linkage conditions of the target linkage rule meet the corresponding linkage threshold, determine that the linkage conditions of the target linkage rule are met.
  • the application service is the Internet of Things device linkage system in the embodiment of the present invention
  • the system is connected to two device service systems, namely device service system 1 (first service system) and device service system 2 (second service system), in which device service system 1 is connected to a mobile phone and a screen device, and device service system 2 is connected to a camera device.
  • the linkage scenario between the mobile phone, the screen device and the camera is: first, the user sends a display data request to the device service system 1 through the mobile phone, and the device service system 1 pushes the data to be displayed to the screen device for display. At this time, the user cannot see the data actually displayed by the screen device.
  • the data displayed by the screen device is the data sent by the user and to avoid the inconvenience of the user monitoring the display content of the screen device in real time in front of the screen device, it can be achieved through the camera connected to the device service system 2, and the screen device is placed within the range that the camera can capture the picture, so that the camera can capture the picture displayed by the screen device in real time. It is set that as long as the picture captured by the camera does not match the content expected to be displayed by the user (the display provided by the device service system 2 and the device service system 1 connected to the camera), the screen device is displayed.
  • Data is used to determine whether the content of the picture captured by the current camera matches), an alarm message is pushed to the user's mobile phone, thereby realizing the linkage between cross-system mobile phones and cameras, or when the camera captures a specific picture, it can be sent to the mobile phone for display.
  • this is another deployment embodiment of the present invention, wherein the application service is the Internet of Things device linkage system in the embodiment of the present invention, and the system is connected to three device service systems, namely device service system 1 (first service system), device service system 2 (first service system) and device service system 3 (second service system), wherein device service system 1 is connected to an air quality sensor, device service system 2 is connected to a camera, and device service system 3 is connected to an air purifier.
  • the linkage scenario between the air quality sensor, the camera and the air purifier is: the switch of the air purifier in the device service system 3 is controlled through the air quality data from the device service system 1 and the camera data from the device service system 2, thereby realizing the linkage between cross-system services and devices.
  • device linkage can be performed based on the real-time values of the business data received from the first service system. That is, the collected data does not come from the data directly collected by the IoT device, but is business data provided by the first service system.
  • a weather business system can provide air pollution index data.
  • the data is first collected through a large number of air quality sensors, such as PM2.5, PM10, TVOC and other values, and then reported to the device service system 1.
  • the device service system 1 then calculates the air quality index (AQI) data.
  • the data collection module in the application service system can obtain the air quality index data, and use this data and the camera data from the device service system 2 to control the switch of the air purifier in the device service system 3.
  • An embodiment of the present invention further provides an electronic device 70, including a processor 71, a memory 72, and a computer program stored in the memory 72 and executable on the processor 71.
  • the computer program is executed by the processor 71, each process of the above-mentioned Internet of Things device linkage method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
  • the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored.
  • a computer program is stored.
  • the computer program is executed by a processor, each process of the above-mentioned IoT device linkage method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here.
  • the computer-readable storage medium such as a read-only memory (Read-Only Memory, ROM), Random Access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the technical solution of the present invention can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
  • a storage medium such as ROM/RAM, a magnetic disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

本发明提供一种物联网设备联动方法、系统、电子设备及可读存储介质,该物联网设备联动方法包括:收集至少一个第一服务系统提供的状态数据的实时数值,状态数据包括业务数据和/或第一服务系统下的控制设备的设备属性;从存储的联动规则中选择与状态数据匹配的目标联动规则,并判断状态数据的实时数值是否满足目标联动规则中的联动条件,目标联动规则中包括:联动条件和受控设备的目标设备属性的目标值,受控设备为第二服务系统下的设备;当状态数据的实时数值满足目标联动规则的联动条件,控制受控设备将目标设备属性的值调整至所述目标值。本发明可以实现跨系统设备间或业务服务和设备之间的联动。

Description

物联网设备联动方法、系统、电子设备及可读存储介质
相关申请的交叉引用
本申请主张在2022年10月26日在中国提交的中国专利申请号No.202211319160.3的优先权,其全部内容通过引用包含于此。
技术领域
本发明实施例涉及物联网技术领域,尤其涉及一种物联网设备联动方法、系统、电子设备及可读存储介质。
背景技术
本发明实施例涉及物联网技术领域,尤其涉及一种物联网设备联动方法、系统、电子设备及可读存储介质。
发明内容
本发明实施例提供一种物联网设备联动方法、系统、电子设备及可读存储介质,用于解决现有的物联网设备联动方法扩展性差的问题。
为了解决上述技术问题,本发明是这样实现的:
第一方面,本发明实施例提供了一种物联网设备联动方法,包括:
收集至少一个第一服务系统提供的状态数据的实时数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
可选的,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:
将所述至少一个第一服务系统提供的状态数据的实时数值转换为预定格式。
可选的,所述预定格式为json格式。
可选的,所述收集至少一个第一服务系统提供的状态数据的实时数值,之前还包括以下至少一项:
配置所述第一服务系统的第一访问接口,所述第一访问接口用于收集所述第一服务系统提供的状态数据和所述状态数据的实时数值;
配置所述第二服务系统的第二访问接口,所述第二访问接口用于收集所述第二服务系统下的设备的设备属性;
配置所述第一服务系统和/或第二服务系统中的设备的标识,所述标识用于唯一确定对应的设备;
配置收集所述状态数据的实时数值的频率。
可选的,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:
将所述实时数值与缓存的之前收集的状态数据的数值进行比对;
若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值相同,不进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤;
若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值不同,进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤,并采用所述实时数值更新缓存的之前收集的状态数据的数值。
可选的,所述从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,之前还包括:
配置所述联动规则;
其中,配置所述联动规则包括:
收集所述第一服务系统和/或第二服务系统下的设备的设备属性;
选择所述第一服务系统下的第一设备作为所述控制设备,并选择所述控制设备的目标设备属性作为所述状态数据;或者,选择所述第一服务系统所能提供的目标业务数据作为所述状态数据;
确定联动条件,所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
选择所述第二服务系统下的第二设备作为所述受控设备;
选择所述受控设备的目标设备属性,并设置所述受控设备的目标设备属性的目标值;
根据所述状态数据、所述联动阈值、所述操作方式和所述受控设备的目标设备属性的目标值,生成所述联动规则。
可选的,所述控制所述受控设备将目标设备属性的值调整至所述目标值,包括:
通过调用所述受控设备所属的第二服务系统的服务接口的方式,将所述受控设备的目标设备属性的调整至所述目标值;
或者
向所述受控设备所属的第二服务系统发送控制指令,用于控制所述受控设备所属的第二服务系统将所述受控设备的目标设备属性的调整至所述目标值。
可选的,从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件包括:
从存储的联动规则中选择与当前收集到的一个第一服务系统提供的所述状态数据匹配的联动规则作为所述目标联动规则;
判断所述目标联动规则的联动条件中除所述状态数据之外,是否还包括其他状态数据;所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
若所述目标联动规则的联动条件中还包括其他状态数据,从所述其他状态数据对应的第一服务系统收集所述其他状态数据的实时数值;
当所述目标联动规则的联动条件中的所有状态数据均满足对应的联动阈值时,判定满足所述目标联动规则的联动条件。
第二方面,本发明实施例提供了一种物联网设备联动系统,包括:
数据收集模块,用于收集至少一个第一服务系统提供的状态数据的实时 数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
联动规则引擎模块,用于从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
控制模块,用于当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
第三方面,本发明实施例提供了一种电子设备,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如上述第一方面所述的物联网设备联动方法的步骤。
第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的物联网设备联动方法的步骤。
在本发明实施例中,可以收集分散在至少一个第一服务系统的状态数据的实时数值,从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,当所述状态数据的实时数值满足目标联动规则的联动条件,控制第二服务系统下的受控设备将目标设备属性的值调整至所述目标值,从而实现跨系统设备间或业务服务和设备之间的联动,提高了物联网设备联动的扩展性和多样性,避免额外的开发工作,降低了成本。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为本发明实施例的物联网设备联动方法的流程示意图之一;
图2为本发明实施例的物联网设备联动方法的流程示意图之二;
图3为本发明实施例的配置联动规则的流程示意图;
图4为本发明实施例的物联网设备联动系统的结构示意图;
图5为本发明实施例的一个部署实施的示意图;
图6为本发明实施例的另一个部署实施的示意图;
图7为本发明实施例的电子设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参考图1,本发明实施例提供一种物联网设备联动方法,包括:
步骤11:收集至少一个第一服务系统提供的状态数据的实时数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
本发明实施例中,所述第一服务系统可以为物联网设备服务系统,也可以为业务服务系统。其中,每个所述物联网设备服务系统与多个物联网设备连接,用于为接入的多个物联网设备提供服务。
本发明实施例中,上述收集至少一个第一服务系统提供的状态数据的实时数值的操作可由物联网设备联动系统中的数据收集模块实现。
本发明实施例中,一个设备的设备属性可以包括多个数据项,例如一款智能画屏设备的设备属性可包括:音量、屏幕亮度、显示内容名称等属性数据项。而收集状态数据的实时数值时,可以根据需要仅收集其中一个或多个设备属性。
步骤12:从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
本发明实施例中,受控设备可以为一个或多个。一个或多个受控设备可以属于相同的第二服务系统,也可以属于不同的第二服务系统。
规则是运作规律所遵循的法则。本发明实施例中的规则主要是指物联网设备之间联系的法则。通常可以表示为“如果满足某些联动条件,那么就执 行某些动作”,比如:如果门开,那么就开灯。
步骤13:当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
在本发明实施例中,可以收集分散在至少一个第一服务系统的状态数据的实时数值,从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,当所述状态数据的实时数值满足目标联动规则的联动条件,控制第二服务系统下的受控设备将目标设备属性的值调整至所述目标值,从而实现跨系统设备间或业务服务和设备之间的联动,提高了物联网设备联动的扩展性和多样性,避免额外的开发工作,降低了成本。
本发明实施例中,可选的,所述第一服务系统和/或第二服务系统包括以下至少一项:mqtt服务系统、http/https服务系统、kafka服务系统和redis服务系统。
其中,mqtt是大部分物联网设备系统的设备接入服务,只需开发一个简单的mqtt客户端程序(即mqtt服务系统)即可完成设备的上云,比如京东方的智能画屏,该款产品接入mqtt服务系统,本发明实施例中,可以通过数据收集模块收集到智能画屏的设备属性的实时数值。
http/https一般是业务服务系统对外的接口协议,比如可以提供空气质量数据的业务服务系统,本发明实施例中,可以通过数据收集模块拉取到每天的空气质量数据,可用于联动家居智能设备。
kafka是一种消息队列服务,可解耦多系统之间的依赖,同时支持千万级的并发消费,典型应用场景是由业务服务系统来生产相关业务数据,并发送至kafka服务中,再由下游的业务系统从kafka服务中消费业务数据,比如在消防应用中,由摄像头识别系统采集周围环境的信息并加以识别,如果识别出有火情,则将识别结果投入到kafka中,再由告警联动系统消费kafka中的识别结果,完成告警。
redis是一款内存数据库缓存服务,可以缓存多种形式的数据,其应用场景是由业务服务系统将设备数据缓存至redis中,其他业务服务系统可以从redis中获取到设备数据。
本发明实施例中,可以从多种类型的服务系统中获取到状态数据,应用 范围广泛。
本发明实施例中,可选的,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:将所述至少一个第一服务系统提供的状态数据的实时数值转换为预定格式。
可选的,所述预定格式为json格式。举例来说,可以将收集到的状态数据的标识作为json文件中的键值对中的键,而状态数据的实时数值作为键值对中的值,从而形成键值对。
当然,在本发明的其他一些实施例中,所述预定格式也可以为文本格式等。
本发明实施例中,可以对多种第一服务系统的数据进行解析,并转换为统一格式的数据,从而便于处理。
本发明实施例中,可选的,所述收集至少一个第一服务系统提供的状态数据的实时数值,之前还包括以下至少一项:
1)配置所述第一服务系统的第一访问接口,所述第一访问接口用于收集所述第一服务系统提供的状态数据和所述状态数据的实时数值;
2)配置所述第二服务系统的第二访问接口,所述第二访问接口用于收集所述第二服务系统下的设备的设备属性;
3)配置所述第一服务系统和/或第二服务系统中的设备的标识,所述标识用于唯一确定对应的设备;
例如:如果收集的是摄像头的设备属性的实时数值,则可以将标识定义为HK-DS-2TD62XX-AAA001,其中HK是生产商编码,DS-2TD62XX是摄像头产品型号和类别,AAA001是设备编号,通过该标识可以唯一确定该设备。
4)配置收集所述状态数据的实时数值的频率。
比如每10秒向第一服务系统请求一次设备属性的实时数值,频率的设定可依据设备的数据上报间隔来定,也可以根据实际业务情况来确定,比如第一服务系统下的温度传感器的数据上报间隔是10秒,但在实际应用场景中,不需要如此频繁的数据,则可以将上报间隔设置的长一些,比如1分钟。
本发明实施例中,收集至少一个第一服务系统提供的状态数据的实时数 值,包括:根据上述访问接口、所述控制设备的标识和收集所述状态数据的频率,收集至少一个第一服务系统提供的状态数据和状态数据的实时数值。
本发明实施例中,可以通过http/https请求收集第一服务系统的状态数据的实时数值,也可以采用第一服务系统提供的SDK(软件开发工具包)或订阅第三方系统的消息队列的方式收集第一服务系统的状态数据的实时数值。
本发明实施例中,收集的状态数据的实时数值可以统一转换为json格式,例如,转换后一个键值对为"angle":30,一个键值对为"state":"open"。收集的数据中还可以包括:控制设备的标识,如HK-DS-2TD62XX-AAA001。收集的数据中还可以包括:时间戳(timestamp)信息。
本发明实施例中,可选的,请参考图2,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:
步骤21:将所述实时数值与缓存的之前收集的状态数据的数值进行比对;
步骤22:若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值相同,不进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤;
步骤23:若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值不同,进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤,并采用所述实时数值更新缓存的之前收集的状态数据的数值。
本发明实施例中,比较当前收集到的状态数据的实时数值与缓存的之前收集的状态数据的数值,若所述实时数值与缓存的之前收集的状态数据的数值相同,则不触发从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤,从而可以节省系统的运算资源。举例来说,状态数据为温度传感器采集的温度信息,联动规则的联动条件为超过28摄氏度则开启空调,当当前收集的温度信息为26摄氏度,缓存的之前收集的温度信息也是26摄氏度,则说明不需要改变受控设备的设备属性,从而可以不触发从存储的联动规则中选择包含所述温度信息的目标联动规则的步骤。当当前收集的温度信息为27摄氏度,缓存的之前收集的温度信息是26摄氏度,此时触发从存储的联动规则中选择包含所述温度信息的目标联动规则的步骤。
本发明实施例中,可选的,所述从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,之前还包括:配置所述联动规则;其中,请参考图3,配置所述联动规则包括:
步骤31:收集所述第一服务系统和/或第二服务系统下的设备的设备属性;
本发明实施例中,收集设备的设备属性之后,可以形成设备配置表,格式可以如下:
表1设备配置表
设置数据的格式可以根据服务系统的接口来定义,设置参数为设置接口的账户或授权相关信息。
步骤32:选择所述第一服务系统下的第一设备作为所述控制设备,并选择所述控制设备的目标设备属性作为所述状态数据;或者,选择所述第一服务系统所能提供的目标业务数据作为所述状态数据;
步骤33:确定联动条件,所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
所述操作方式可以包括>、==(关系运算符,用来判断两个值大小是否相同)、<、<=、>=和!=(不等于)等比较操作方式,除此之外,也可以包括其他操作方式,只要是可判定真假的运算方式均受到支持,比如包含的操作方式等。
步骤34:选择所述第二服务系统下的第二设备作为所述受控设备;
步骤35:选择所述受控设备的目标设备属性,并设置所述受控设备的目标设备属性的目标值;
步骤36:根据所述状态数据、所述联动阈值、所述操作方式和所述受控 设备的目标设备属性的目标值,生成所述联动规则。
联动规则例如包括:“规则名称”和“规则描述”,规则描述例如可以为:{when系统1的门锁(lock001)开;then系统2的灯(light01)开},该联动规则表示将在收到系统1的门锁(lock001)的状态数据后,控制系统2的灯开启。
举例来说,例如这样一个场景,当空气质量比较差,且家中有人时,则开启空气净化器,空气质量数据来源于一个第一服务系统,获取到的空气质量数据可以包括:控制设备的设备标识(如CW-AQI-2022072000001),空气质量数据的实时数值(如aqi=500,aqi表示空气质量指数,用来衡量空气质量的数据,其值越大,表示空气质量越差),还可以包括时间戳信息(即空气质量数据的实时数值的收集时间)。
家中有人的数据则可以来源于摄像头,比如从某摄像头系统(另一第一服务系统)获取,获取到的数据可以包括:控制设备的设备标识(如HK-DS-2TD62XX-AAA002),家中是否有人的实时数值(例如为true,表示家里有人,此为状态数据的实时数值),还可以包括时间戳信息(即家中是否有人的实时数值的收集时间)。
选择受控设备和受控设备的目标设备属性,根据设备配置表,可以确定需要使用的设置接口和设置数据,其中可以将设置数据中的$1替换为受控设备的设备标识,$2将替换为设置的目标设备属性的目标值。
根据上述联动规则的数据,形成如下的联动规则脚本可以包括:规则名称、规则描述,规则描述中包括联动条件,联动条件包括状态数据,以及状态数据对应的联动阈值,受控设备的标识,受控设备的目标设备属性,受控设备的目标设备属性的目标值。
在收集到第一服务系统的状态数据的实时数值时,可以根据收集的实时数值处理上述联动规则脚本,其中post为可以请求http/https接口的函数,通过调用该函数,实现对系统级设备的控制。
本发明实施例中,可选的,所述控制所述受控设备将目标设备属性的值调整至所述目标值,包括:通过调用所述受控设备所属的第二服务系统的服务接口的方式,将所述受控设备的目标设备属性的调整至所述目标值;或者, 向所述受控设备所属的第二服务系统发送控制指令,用于控制所述受控设备所属的第二服务系统将所述受控设备的目标设备属性的调整至所述目标值。
本发明实施例中,可选的,从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件包括:
从存储的联动规则中选择与当前收集到的一个第一服务系统提供的所述状态数据匹配的联动规则作为所述目标联动规则;
判断所述目标联动规则的联动条件中除所述状态数据之外,是否还包括其他状态数据;所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
若所述目标联动规则的联动条件中还包括其他状态数据,从所述其他状态数据对应的第一服务系统收集所述其他状态数据的实时数值;
当所述目标联动规则的联动条件中的所有状态数据均满足对应的联动阈值时,判定满足所述目标联动规则的联动条件。
请参考图4,本发明实施例还提供一种物联网设备联动系统40,包括:
数据收集模块41,用于收集至少一个第一服务系统提供的状态数据的实时数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
联动规则引擎模块42,用于从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
控制模块43,用于当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
可选的,所述第一服务系统和/或第二服务系统包括以下至少一项:mqtt服务系统、http/https服务系统、kafka服务系统和redis服务系统。
可选的,所述物联网设备联动系统40还包括:格式转换模块,用于将所述至少一个第一服务系统提供的状态数据的实时数值转换为预定格式。
可选的,所述预定格式为json格式。
可选的,所述物联网设备联动系统40还包括以下至少一项:
第一配置模块,用于配置所述第一服务系统的第一访问接口,所述第一访问接口用于收集所述第一服务系统提供的状态数据和所述状态数据的实时数值;
第二配置模块,用于配置所述第二服务系统的第二访问接口,所述第二访问接口用于收集所述第二服务系统下的设备的设备属性;
第三配置模块,用于配置所述第一服务系统和/或第二服务系统中的设备的标识,所述标识用于唯一确定对应的设备;
第四配置模块,用于配置收集所述状态数据的实时数值的频率。
可选的,所述物联网设备联动系统40还包括:
比对模块,用于将所述实时数值与缓存的之前收集的状态数据的数值进行比对;
触发模块,用于若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值相同,不进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤;若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值不同,进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤,并采用所述实时数值更新缓存的之前收集的状态数据的数值。
可选的,所述物联网设备联动系统40还包括:
第五配置模块,用于配置所述联动规则;
其中,配置所述联动规则包括:
收集所述第一服务系统和/或第二服务系统下的设备的设备属性;
选择所述第一服务系统下的第一设备作为所述控制设备,并选择所述控制设备的目标设备属性作为所述状态数据;或者,选择所述第一服务系统所能提供的目标业务数据作为所述状态数据;
确定联动条件,所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
选择所述第二服务系统下的第二设备作为所述受控设备;
选择所述受控设备的目标设备属性,并设置所述受控设备的目标设备属 性的目标值;
根据所述状态数据、所述联动阈值、所述操作方式和所述受控设备的目标设备属性的目标值,生成所述联动规则。
可选的,控制模块43,用于通过调用所述受控设备所属的第二服务系统的服务接口的方式,将所述受控设备的目标设备属性的调整至所述目标值;或者,向所述受控设备所属的第二服务系统发送控制指令,用于控制所述受控设备所属的第二服务系统将所述受控设备的目标设备属性的调整至所述目标值。
本发明实施例中,可选的,所述联动规则引擎模块42,用于从存储的联动规则中选择与当前收集到的一个第一服务系统提供的所述状态数据匹配的联动规则作为所述目标联动规则;判断所述目标联动规则的联动条件中除所述状态数据之外,是否还包括其他状态数据;所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;若所述目标联动规则的联动条件中还包括其他状态数据,从所述其他状态数据对应的第一服务系统收集所述其他状态数据的实时数值;当所述目标联动规则的联动条件中的所有状态数据均满足对应的联动阈值时,判定满足所述目标联动规则的联动条件。
如图5所示是本发明的一个部署实施例,其中应用服务是本发明实施例中的物联网设备联动系统,该系统接入了两个设备服务系统,分别是设备服务系统1(第一服务系统)和设备服务系统2(第二服务系统),其中设备服务系统1连接了一个手机和一个画屏设备,设备服务系统2连接了一个摄像头设备,手机、画屏设备和摄像头之间的联动场景是:首先用户通过手机给设备服务系统1发送展示数据请求,设备服务系统1将需要展示的数据推送给画屏设备用于展示,此时用户看不到画屏设备实际展示的数据,为了确保画屏设备展示的数据是由用户发送的数据,同时避免用户在画屏设备前实时监视画屏设备显示内容的不方便,可以通过设备服务系统2连接的摄像头实现,将画屏设备置于摄像头可以捕捉画面的范围内,这样摄像头就可以实时捕捉到画屏设备显示的画面,设定只要摄像头捕捉的画面与用户期望显示的内容不符(由与摄像头连接的设备服务系统2和设备服务系统1提供的展示 数据来判定当前摄像头捕捉的画面内容是否相符),则向用户手机推送一条告警消息,从而实现跨系统手机和摄像头之间的联动,或者,当摄像头捕捉到某个特定画面后,可以发送给手机来显示。
如图6所示是本发明的另一个部署实施例,其中应用服务是本发明实施例中的物联网设备联动系统,该系统接入了三个设备服务系统,分别是设备服务系统1(第一服务系统)、设备服务系统2(第一服务系统)和设备服务系统3(第二服务系统),其中设备服务系统1连接了一个空气质量传感器,设备服务系统2连接了一个摄像头,设备服务系统3连接了一个空气净化器,空气质量传感器、摄像头和空气净化器之间的联动场景是:通过来源于设备服务系统1的空气质量数据和来源于设备服务系统2中的摄像头数据一起来联动控制设备服务系统3中的空气净化器的开关,从而实现跨系统业务和设备之间的联动。
在有些场景下,可以基于接收到的第一服务系统的业务数据的实时数值来做设备联动,就是收集的数据并非来源于物联网设备直接采集的数据,而是第一服务系统所提供的业务数据,比如一个天气业务系统可以提供空气污染指数数据,该数据首先通过大量的空气质量传感器采集空气质量,比如PM2.5、PM10、TVOC等数值,然后上报至设备服务系统1中,再由设备服务系统1计算出空气质量指数(AQI)数据,这样应用服务系统中的数据收集模块就可以获取到这个空气质量指数数据,并通过这个数据和来源于设备服务系统2中的摄像头数据一起来联动控制设备服务系统3中的空气净化器的开关。
请参考图7,本发明实施例还提供一种电子设备70,包括处理器71,存储器72,存储在存储器72上并可在所述处理器71上运行的计算机程序,该计算机程序被处理器71执行时实现上述物联网设备联动方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现上述物联网设备联动方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only  Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。

Claims (11)

  1. 一种物联网设备联动方法,其特征在于,包括:
    收集至少一个第一服务系统提供的状态数据的实时数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
    从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
    当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
  2. 根据权利要求1所述的方法,其特征在于,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:
    将所述至少一个第一服务系统提供的状态数据的实时数值转换为预定格式。
  3. 根据权利要求2所述的方法,其特征在于,所述预定格式为json格式。
  4. 根据权利要求1所述的方法,其特征在于,所述收集至少一个第一服务系统提供的状态数据的实时数值,之前还包括以下至少一项:
    配置所述第一服务系统的第一访问接口,所述第一访问接口用于收集所述第一服务系统提供的状态数据和所述状态数据的实时数值;
    配置所述第二服务系统的第二访问接口,所述第二访问接口用于收集所述第二服务系统下的设备的设备属性;
    配置所述第一服务系统和/或第二服务系统中的设备的标识,所述标识用于唯一确定对应的设备;
    配置收集所述状态数据的实时数值的频率。
  5. 根据权利要求1所述的方法,其特征在于,所述收集至少一个第一服务系统提供的状态数据的实时数值,之后还包括:
    将所述实时数值与缓存的之前收集的状态数据的数值进行比对;
    若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值相同, 不进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤;
    若比对结果指示所述实时数值与缓存的之前收集的状态数据的数值不同,进入从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则的步骤,并采用所述实时数值更新缓存的之前收集的状态数据的数值。
  6. 根据权利要求1所述的方法,其特征在于,所述从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,之前还包括:
    配置所述联动规则;
    其中,配置所述联动规则包括:
    收集所述第一服务系统和/或第二服务系统下的设备的设备属性;
    选择所述第一服务系统下的第一设备作为所述控制设备,并选择所述控制设备的目标设备属性作为所述状态数据;或者,选择所述第一服务系统所能提供的目标业务数据作为所述状态数据;
    确定联动条件,所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
    选择所述第二服务系统下的第二设备作为所述受控设备;
    选择所述受控设备的目标设备属性,并设置所述受控设备的目标设备属性的目标值;
    根据所述状态数据、所述联动阈值、所述操作方式和所述受控设备的目标设备属性的目标值,生成所述联动规则。
  7. 根据权利要求1所述的方法,其特征在于,所述控制所述受控设备将目标设备属性的值调整至所述目标值,包括:
    通过调用所述受控设备所属的第二服务系统的服务接口的方式,将所述受控设备的目标设备属性的调整至所述目标值;
    或者
    向所述受控设备所属的第二服务系统发送控制指令,用于控制所述受控设备所属的第二服务系统将所述受控设备的目标设备属性的调整至所述目标值。
  8. 根据权利要求1所述的方法,其特征在于,从存储的联动规则中选择 与所述状态数据匹配的联动规则作为目标联动规则,判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件包括:
    从存储的联动规则中选择与当前收集到的一个第一服务系统提供的所述状态数据匹配的联动规则作为所述目标联动规则;
    判断所述目标联动规则的联动条件中除所述状态数据之外,是否还包括其他状态数据;所述联动条件包括:状态数据,所述状态数据的联动阈值,以及所述状态数据的实时数值与所述联动阈值的操作方式;
    若所述目标联动规则的联动条件中还包括其他状态数据,从所述其他状态数据对应的第一服务系统收集所述其他状态数据的实时数值;
    当所述目标联动规则的联动条件中的所有状态数据均满足对应的联动阈值时,判定满足所述目标联动规则的联动条件。
  9. 一种物联网设备联动系统,其特征在于,包括:
    数据收集模块,用于收集至少一个第一服务系统提供的状态数据的实时数值,所述状态数据包括业务数据和/或所述第一服务系统下的控制设备的设备属性;
    联动规则引擎模块,用于从存储的联动规则中选择与所述状态数据匹配的联动规则作为目标联动规则,并判断所述状态数据的实时数值是否满足所述目标联动规则中的联动条件,所述目标联动规则中包括所述联动条件和受控设备的目标设备属性的目标值,所述受控设备为第二服务系统下的设备;
    控制模块,用于当所述状态数据的实时数值满足所述目标联动规则的联动条件,控制所述受控设备将目标设备属性的值调整至所述目标值。
  10. 一种电子设备,其特征在于,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求1至8中任一项所述的物联网设备联动方法的步骤。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述的物联网设备联动方法的步骤。
PCT/CN2023/121558 2022-10-26 2023-09-26 物联网设备联动方法、系统、电子设备及可读存储介质 WO2024087995A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211319160.3 2022-10-26
CN202211319160.3A CN115695483A (zh) 2022-10-26 2022-10-26 物联网设备联动方法、系统、电子设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2024087995A1 true WO2024087995A1 (zh) 2024-05-02

Family

ID=85100059

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/121558 WO2024087995A1 (zh) 2022-10-26 2023-09-26 物联网设备联动方法、系统、电子设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN115695483A (zh)
WO (1) WO2024087995A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154972A (zh) * 2017-04-27 2017-09-12 上海斐讯数据通信技术有限公司 一种基于设备快照的物联网智能设备状态同步方法及系统
CN108234408A (zh) * 2016-12-15 2018-06-29 中兴通讯股份有限公司 一种物联网网关联动控制方法及物联网网关
CN111208748A (zh) * 2019-12-31 2020-05-29 深圳奇迹智慧网络有限公司 基于物联网的联动控制方法、系统和计算机设备
CN112153088A (zh) * 2019-06-27 2020-12-29 北京微云智联科技有限公司 一种用于物联网设备的控制系统
CN112153090A (zh) * 2019-06-27 2020-12-29 北京微云智联科技有限公司 物联网设备的控制方法、装置、网关及可读存储介质
CN112448989A (zh) * 2019-09-05 2021-03-05 中兴通讯股份有限公司 物联网设备控制方法、系统、配置终端、设备及存储介质
CN113347068A (zh) * 2020-02-18 2021-09-03 深圳绿米联创科技有限公司 一种规则处理方法、装置、服务器及存储介质
WO2021218442A1 (zh) * 2020-04-30 2021-11-04 华为技术有限公司 通信方法、控制物联网设备的方法、电子设备

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234408A (zh) * 2016-12-15 2018-06-29 中兴通讯股份有限公司 一种物联网网关联动控制方法及物联网网关
CN107154972A (zh) * 2017-04-27 2017-09-12 上海斐讯数据通信技术有限公司 一种基于设备快照的物联网智能设备状态同步方法及系统
CN112153088A (zh) * 2019-06-27 2020-12-29 北京微云智联科技有限公司 一种用于物联网设备的控制系统
CN112153090A (zh) * 2019-06-27 2020-12-29 北京微云智联科技有限公司 物联网设备的控制方法、装置、网关及可读存储介质
CN112448989A (zh) * 2019-09-05 2021-03-05 中兴通讯股份有限公司 物联网设备控制方法、系统、配置终端、设备及存储介质
CN111208748A (zh) * 2019-12-31 2020-05-29 深圳奇迹智慧网络有限公司 基于物联网的联动控制方法、系统和计算机设备
CN113347068A (zh) * 2020-02-18 2021-09-03 深圳绿米联创科技有限公司 一种规则处理方法、装置、服务器及存储介质
WO2021218442A1 (zh) * 2020-04-30 2021-11-04 华为技术有限公司 通信方法、控制物联网设备的方法、电子设备

Also Published As

Publication number Publication date
CN115695483A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
CN108881339B (zh) 推送方法、用户标签的生成方法、装置及设备
US10454837B2 (en) Data-flow control device and data-flow control method
CN108400946B (zh) 一种用于减少网络通信量的方法、装置、系统及介质
US11374847B1 (en) Systems and methods for switch stack emulation, monitoring, and control
CN111124819B (zh) 全链路监控的方法和装置
US20150120914A1 (en) Service monitoring system and service monitoring method
US11146599B1 (en) Data stream processing to facilitate conferencing based on protocols
CN108156265A (zh) 一种应用程序控制方法及移动设备
WO2012142797A1 (zh) 一种视频监控系统及方法
CN108134692A (zh) 一种基于标识图形的故障处理方法以及系统
CN103678372B (zh) 一种用于获取页面的应用性能的方法和设备
CN103546343A (zh) 网络流量分析系统的网络流量展示方法和系统
CN114448830B (zh) 一种设备检测系统及方法
Lohokare et al. An IoT ecosystem for the implementation of scalable wireless home automation systems at smart city level
CN111475705A (zh) 基于sql查询的网络业务监控方法、装置、设备及存储介质
CN115277198A (zh) 一种工控系统网络的漏洞检测方法、装置及存储介质
CN114328482A (zh) 数据处理方法、设备、存储介质及程序产品
CN115941716A (zh) 设备控制方法、电子设备以及计算机可读存储介质
CN113568717A (zh) 一种设备控制方法、装置、服务器以及介质
CN108365982A (zh) 设备异常调试方法、装置、设备和存储介质
US20200174855A1 (en) Event notification method, server device, event notification apparatus, and medium
WO2024087995A1 (zh) 物联网设备联动方法、系统、电子设备及可读存储介质
CN109634649B (zh) 页面流程实验方法、系统、设备及可读存储介质
CN111131178A (zh) 终端设备识别方法、装置、设备和计算机存储介质
CN115398861A (zh) 异常文件检测方法及相关产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23881574

Country of ref document: EP

Kind code of ref document: A1