Method and apparatus for controlling internet-of-things device, and related device

HK40138110APending Publication Date: 2026-09-25HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
HK62026126415
Authority / Receiving Office
HK · HK
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2026-07-21
Publication Date
2026-09-25
Estimated Expiration
2044-03-29

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for controlling an internet of things device, and a related device. Specifically, a control device can receive a first data identifier and first detection data corresponding to the first data identifier that are sent by a first internet of things device, and the control device can determine, based on the first data identifier, that the first internet of things device supports a first function. The control device determines whether the first detection data meets a trigger condition of a target object model rule corresponding to the first function, and sends a control instruction to a second internet of things device if the first detection data meets the trigger condition. The second internet of things device supports a second function corresponding to an execution action of the target object model rule. In this way, the control device can control an internet of things device from a function dimension according to the target object model rule, so that applicability of a wide range of devices or products can be implemented, and scalability of the internet of things can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

(12) International application published under the Patent Cooperation Treaty (19) International Bureau of the World Intellectual Property Organization (43) International Publication Date: 3 October 2024 (03.10.2024) WIPO I PCT (51) International Patent Classification: H04L 67 / 125 (2022.01) (21) International Application Number: PCT / CN2024 / 085088 (22) International Application Date: 30 March 2024 (30.03.2024) (25) Application Language: Chinese (26) Publication Language: Chinese (30) Priority: 202310340354.X 31 March 2023 (31.03.2023) CN (71) Applicant: Huawei Cloud Computing Technologies Co., Ltd. [CN / CN]; Huawei Cloud Data Center, intersection of Qianzhong Avenue and Xinggong Road, Guian New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 (72) Inventor: Nie Yanling (NIE, Yanling); Huawei Cloud Data Center, intersection of Qianzhong Avenue and Xinggong Road, Guian New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 Zhang Xiangyong (ZHANG, Xiangyong); Huawei Cloud Data Center, intersection of Qianzhong Avenue and Xinggong Road, Guian New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 Guo Bin (GUO, Bin); Huawei Cloud Data Center, intersection of Qianzhong Avenue and Xinggong Road, Guian New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 (74) Agent: Shenzhen Shenjia Intellectual Property Agency (General Partnership); 18c2, 18D, 18E, 18E2, Block B, Lushan Building, Chunfeng Road, Nanhu Street, Luohu District, Shenzhen, Guangdong 518001 (CN)0 (81) Designated Country (unless otherwise specified, each requiring available national protection): AE, AG, AL, AM, AO, AT, AU, AZ, BA, BB, BG, BH, BN, BR, BW, BY, BZ, CA, CH, CL, CN, CO, CR, CU, CV, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ES, FI, GB, GD, GE, GH, GM, GT,HN, HR, HU, ID, IL, IN, IQ, (54) Title: METHOD AND APPARATUS FOR CONTROLLING INTERNET-OF-THINGS DEVICE, AND RELATED DEVICE (54) Invention Title: A method, apparatus and related equipment for controlling an Internet of Things (IoT) device S201 Receive a first data identifier and first detection data corresponding to the first data identifier, which first data identifier and first detection data are sent by a first Internet of Things device, wherein the first data identifier is used for indicating that the first Internet of Things device supports a first function S202 In response to it being determined that the first detection data satisfies a trigger condition for a target object model rule, send a control instruction to a second Internet of Things device [Figure 2] S201 Receive a first data identifier and first detection data corresponding to the first data identifier, which first data identifier and first detection data are sent by a first Internet-of-things device, wherein the first data identifier is used for indicating that the first Internet-of-things device supports a first function S202 In response to it being determined that the first detection data satisfies a trigger condition for a target object model rule, send a control instruction to a second Internet-of-things device IV 8 0 s 6 6 1 / Wei 0 7 OM (57) Abstract: Disclosed in the present application are a method and apparatus for controlling an Internet-of-things device, and a related device. Specifically,a control device can receive a first data identifier and first detection data corresponding to the first data identifier, which first data identifier and first detection data are sent by a first Internet-of-things device; the control device can determine, on the basis of the first data identifier, that the first Internet-of-things device supports a first function; and the control device determines whether the first detection data satisfies a trigger condition for a target object model rule corresponding to the first function, and if so, the control device sends a control instruction to a second Internet-of-things device, wherein the second Internet-of-things device supports a second function corresponding to an execution action for the target object model rule. In this way, a control device can use a target object model rule to control an Internet-of-things device from the dimension of functions, such that the application to a wider range of devices or products can be realized, therebyimproving the expandability of the Internet of things. [See continued page] WO 2024 / 199508 Al IIIIIIIIIIIIIIIIIIIIIIIIIIIIM IR, IS, IT, JM, JO, JP, KE, KG, KH, KN, KP, KR, KW, KZ, LA, LC, LK, LR, LS, LU, LY, MA, MD, MG, MK, MN, MU, MW, MX, MY, MZ, NA, NG, NI, NO, NZ, OM, PA, PE, PG, PH, PL, PT, QA, RO, RS, RU, RW, SA, SC, SD, SE, SG, SK, SL, ST, SV, SY, TH, TJ, TM, TN, TR, TT, TZ, UA, UG, US, UZ, VC, VN, WS, ZA, ZM, ZWO (84) Designated countries (unless otherwise specified, each requiring available regional protection): ARIPO (BW, CV, GH, GM, KE, LR, LS, MW, MZ, NA, RW, SC, SD, SL, ST, SZ, TZ, UG, ZM, ZW), Eurasia (AM, AZ, BY, KG, KZ, RU, TJ, TM), Europe (AL, AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, HR, HU, IE, IS, IT, LT, LU, LV, MC, ME, MK, MT, NL, NO, PL, PT, RO, RS, SE, SI, SK, SM, TR), OAPI (BF, BJ, CF, CG, CI, CM, GA, GN, GQ, GW, KM, ML, MR, NE, SN, TD, TG)O This international publication includes: an international search report (Article 21(3) of the Treaty). (57) Abstract: This application discloses a control method, apparatus and related equipment for an Internet of Things (IoT) device. Specifically, the control device can receive a first data identifier and first detection data corresponding to the first data identifier sent by a first IoT device. Based on the first data identifier, the control device can determine that the first IoT device supports a first function; the control device determines whether the first detection data meets the target corresponding to the first function.If the triggering condition of the object model rule is met, the control device sends a control command to the second IoT device. The second IoT device supports a second function corresponding to the execution action of the target object model rule. In this way, the control device can use the target object model rule to control the IoT device from the functional dimension, which can realize the applicability of a wider range of devices or products and improve the scalability of the Internet of Things. 1 WO 2024 / 199508 PCT / CN2024 / 085088 A control method, device and related equipment for an IoT device

[0001] This application claims priority to Chinese Patent Application No. 202 310340354.X, filed on March 31, 2023, with the State Intellectual Property Office of China, entitled "A control method, device and related equipment for an IoT device", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of IoT technology, and in particular to a control method, device and related equipment for an IoT device. Background Art

[0003] With the rapid development of IoT technology, more and more IoT devices are being applied to people's lives. To control IoT devices, automated rules for controlling IoT devices are usually set on the control device. The control device controls the IoT device based on the pre-set automated rules.

[0004] Currently, the pre-set automated rules in the control device are for specific IoT devices or for specific types of IoT devices. When a new device is connected to the network and control of the new device is required, staff need to readjust or add automated rules, resulting in low scalability of the IoT.

[0005] Summary of the Invention

[0006] This application provides a method, apparatus, and related equipment for controlling IoT devices, which can utilize object model rules to control IoT devices based on their functions, thereby improving the scalability of the IoT.

[0007] In a first aspect, this application provides a method for controlling IoT devices. In a specific implementation, the method receives operating information sent by a first IoT device. The operating information includes a first data identifier and first detection data corresponding to the first data identifier. The first data identifier is used to indicate a first function supported by the first IoT device. The triggering condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function. Based on the operating information, the first function supported by the first IoT device can be determined, and the first detection data can be determined to satisfy the triggering condition of the target object model rule. In response to the determination that the first detection data meets the triggering condition of the target object model rule, a control command is sent to the IoT device supporting the second function, namely the second IoT device. The control command is used to instruct the second IoT device to execute the target object model rule.The execution action. This method utilizes target object model rules to achieve functional-level control of IoT devices, which is not limited by the specific model and type of IoT devices and can be widely applied to IoT devices, improving the control efficiency of IoT devices.

[0008] In one possible implementation, the first data identifier is the first device identifier of the first IoT device. The method further includes obtaining the first device identifier and the first function identifier sent by the first IoT device. The first function identifier is used to identify the first function. Based on the first device identifier and the first function identifier, it can be determined that the first IoT device supports the first function. A correspondence between the first device identifier and the first function is established. Thus, upon receiving the first device identifier subsequently, based on the correspondence between the first device identifier and the first function, it can be determined that the first IoT device supports the first function.

[0009] In one possible implementation, the first data identifier is the function name of the first function. Based on the function name of the first function, it can be determined that the first IoT device sending the operation information supports the first function.

[0010] In one possible implementation, the second IoT device supporting the second function is determined based on the second data identifier sent by the second IoT device. The second data identifier is obtained in advance. The method further includes obtaining the second data identifier sent by the second IoT device. The second data identifier is used to indicate that the second IoT device supports the second function. After obtaining the second data identifier, it is determined that the second IoT device supports the second function based on the second data identifier.

[0011] In one possible implementation, the second data identifier is the second device identifier of the second IoT device. The method also includes receiving a second function identifier sent by the second IoT device. The second function identifier is used to identify the second function. Based on the second device identifier and the second function identifier sent by the second IoT device, it can be determined that the second IoT device supports the second function, and a correspondence between the second device identifier and the second function can be established, so that the second IoT device that sent the second device identifier can be determined to support the second function based on the received second device identifier.

[0012] In one possible implementation, the second data identifier is the function name of the second function.

[0013] In one possible implementation, the target object model rule also includes a location condition. Before sending a control command to the second IoT device corresponding to the second data identifier, the location information of the first IoT device is obtained first, and it is confirmed that the location information of the first IoT device meets the location condition. Then, a control command is sent to a second IoT device whose location information meets the conditions specified in bit 3 WO 2024 / 199508 PCT / CN2024 / 085088. This enables control of IoT devices at specific locations.

[0014] In a second aspect, this application provides a control device for IoT devices, the device comprising:

[0015] A receiving unit is configured to receive operating information sent by a first IoT device, the operating information including a first data identifier and first detection data corresponding to the first data identifier, the first data identifier being used to indicate that the first IoT device supports a first function;

[0016] A sending unit is configured to send a control command to a second IoT device in response to determining that the first detection data satisfies the triggering condition of the target object model rule, the second IoT device supporting a second function, the control command being used to instruct the second IoT device to execute the execution action of the target object model rule, the triggering condition of the target object model rule corresponding to the first function, and the execution action corresponding to the second function.

[0017] In one possible implementation, the first data identifier is a first device identifier of the first IoT device, the receiving unit is further configured to receive the first device identifier and a first function identifier sent by the first IoT device, the first function identifier being used to identify the first function;

[0018] The device further includes:

[0019] An establishing unit is configured to establish a correspondence between the first device identifier and the first function.

[0020] In one possible implementation, the first data identifier is the function name of the first function.

[0021] In one possible implementation, the receiving unit is further configured to acquire a second data identifier sent by the second IoT device, the second data identifier being used to indicate that the second IoT device supports the second function;

[0022] The apparatus further includes:

[0023] a determining unit, configured to determine, based on the second data identifier, that the second IoT device supports the second function.

[0024] In one possible implementation, the second data identifier is a second device identifier of the second IoT device, and the receiving unit is further configured to receive a second function identifier sent by the second IoT device, the second function identifier being used to identify the second function;

[0025] The establishing unit is further configured to establish a correspondence between the second device identifier and the second function.

[0026] In one possible implementation, the second data identifier is the function name of the second function. 4 WO 2024 / 199508 PCT / CN2024 / 085088

[0027] In one possible implementation, the target object model rule further includes a location condition, and the receiving unit is further configured to obtain the location information of the first IoT device before sending the control command to the second IoT device corresponding to the second data identifier;

[0028] The device further includes:

[0029] a confirmation unit, configured to confirm that the location information of the first IoT device satisfies the location condition;

[0030] the sending unit is configured to send the control command to the second IoT device, including:

[0031] The sending unit is used to send a control command to a second IoT device whose location information satisfies the location condition.

[0032] In a third aspect, this application provides a device, the device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the device to perform the control method of the IoT device in the first aspect or any possible implementation of the first aspect.

[0033] In a fourth aspect, this application provides a computing device cluster, the computing device cluster including at least one computing device, the at least one computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device cluster to perform the control method of the IoT device in the first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0034] In a fifth aspect, this application provides a computer-readable storage medium storing instructions that, when executed on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0035] In a sixth aspect, this application provides a computer program product containing instructions that, when executed on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0036] Based on the implementations provided in the above aspects, this application can further combine them to provide more implementations. 5 WO 2024 / 199508 PCT / CN2024 / 085088 Brief Description of the Drawings

[0037] Figure 1 is a schematic diagram of the structure of an Internet of Things (IoT) provided in an embodiment of this application;

[0038] Figure 2 is a flowchart of a control method for an IoT device provided in an embodiment of this application;

[0039] Figure 3 is a schematic diagram of the structure of a control device for an IoT device also provided in an embodiment of this application;

[0040] Figure 4 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0041] Figure 5 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of this application. Detailed Description of the Embodiments

[0042] The solutions in the embodiments provided in this application will be described below with reference to the accompanying drawings.

[0043] The terms "first," "second," etc., in the specification, claims, and the above-mentioned drawings of this application are used...The terms are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate, and this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0044] In some scenarios of actual application of IoT devices, the control device needs to acquire data collected by the IoT device and, based on the acquired data and pre-configured automation rules, control the linkage between the IoT device and other IoT devices or control the IoT device to perform specific actions. The pre-configured automation rules in the control device are basically implemented using triggers and action mechanisms. When the conditions of the trigger are met, the trigger triggers the execution of a specific action. Currently, automation rules can be set based on a single IoT device or based on IoT devices of a specific product type. For automation rules set for a single IoT device, the specific device that needs to be processed based on the device identifier can be determined. For example, in the IoT scenario of a smart home, automation rules are pre-set to control lighting devices for a specific device identifier. The trigger condition is the detection of a door opening action, and the action mechanism is to turn on the lighting device. During application, when the control device detects an open door through other IoT devices, the trigger condition is met, and based on automation rules, the lighting device with the specific device identifier is controlled to perform the opening action. For automation rules set for IoT devices of specific product types, it is possible to determine the specific device that needs to be processed based on the automation rules for a specific product model. For example, in the IoT scenario of a park, automation rules for controlling fire extinguishers of a specific product model are pre-set. The trigger condition is the detection of smoke (6 WO 2024 / 199508 PCT / CN2024 / 085088), and the action mechanism is to turn on the fire extinguisher. During application, when the control device detects smoke through other IoT devices, the trigger condition is met, and based on automation rules, the fire extinguisher of the specific product model is controlled to perform the opening action.

[0045] Automation rules set for a single IoT device are only applicable to a small-scale IoT configuration. When there are many IoT devices connected, or when the number of IoT device updates is high, it is necessary to manually adjust or add automation rules to adapt to each IoT device, which is inconvenient to control IoT devices and makes it difficult to expand the IoT. Automation rules set for specific IoT device models can only be configured for existing IoT devices. When new IoT devices of a new product type are added, the automation rules also need to be reconfigured. Furthermore, different product types of IoT devices with the same or similar functions require separate automation rules.This requires staff to configure a large number of automation rules and is inconvenient for expanding the Internet of Things (IoT).

[0046] Based on this, this application provides a control method, device, and related equipment for IoT devices. The method can be executed by a control device in the IoT. The control device in the IoT is connected to other IoT devices to process the data sent by the IoT devices and to control the IoT devices. This application does not limit the specific type of control device. For example, the control device can be a gateway, router, server, operation and maintenance platform, or mobile terminal, etc., which can be connected to IoT devices and control the IoT devices.

[0047] The control device pre-configures object model rules. Object model rules include trigger conditions and execution actions. The trigger conditions correspond to the first function, and the execution actions correspond to the second function. Based on the object model rules, the control device can control the IoT device with the second function to execute the execution action of the object model rules when the detection data provided by the IoT device with the first function meets the trigger conditions. Specifically, as an example, see Figure 1, which is a schematic diagram of the structure of an IoT provided by this application. The IoT includes a control device 101, an IoT device 102, an IoT device 103, and an IoT device 104. Control device 101 is connected to IoT devices 102, 103, and 104 respectively. Control device 101 acquires the operating data reported by IoT devices 102, 103, and 104, and controls the IoT devices based on the acquired operating data and object model rules.

[0048] The following uses the IoT structure shown in Figure 1 as an example to introduce three application scenarios.

[0049] First: Smart living application scenario. 7 WO 2024 / 199508 PCT / CN2024 / 085088

[0050] Control device 101 is a home router. Control device 101 pre-configures target object model rules. Target object model rules include trigger conditions and execution actions. Among them, the trigger condition is that the light intensity is less than 5 lux and an object movement is detected. The execution action is to control the lighting device to turn on. The trigger conditions correspond to the first function, i.e., light intensity detection and the second function, i.e., motion detection function. The execution action corresponds to the second function, i.e., lighting function. IoT device 102 is a light intensity detector 102, IoT device 103 is a motion sensor 103, and IoT device 104 is a lighting device 104. The first data identifier for the light intensity detector 102 is `sun.brightness` (light intensity). `sun.brightness` indicates that the light intensity detector 102 has a light intensity detection function, which is its first function. The first data identifier for the motion sensor 103 is...motion.detection (motion.detection). motion.detection indicates that the non-motion sensor 103 has motion detection function, which is the first function. The second data identifier of the lighting device 104 is lightswitch (lighting.switch). lightswitch indicates that the lighting device 104 has lighting function, which is the second function.

[0051] The control device 101 receives the first data identifier sent by the light intensity detector 102, namely sun.bnghtness, and the first detection data corresponding to the first data identifier, which is the light intensity detection data. The control device 101 receives the first data identifier sent by the motion sensor 103, namely motion.detection, and the first detection data corresponding to the first data identifier, which is the motion detection data. The triggering conditions of the target object model rule correspond to the light intensity detection function supported by the light intensity detector 102 and the motion detection function supported by the motion sensor 103. When the light intensity detection data is less than 5 lux and the motion detection data indicates that an object is detected to be moving, the control device 101 determines that the triggering conditions of the target object model rule are met. The control device 101 sends a control command to the lighting device 104 with lighting function to turn on the indicator light. This enables the light to turn on when the light intensity is less than 5 lux and when an object movement is detected. The target object model rule can be applied to control scenarios including IoT devices with light intensity detection function, IoT devices with motion detection function, and IoT devices with lighting function. When IoT devices need to be added or adjusted in the future, it is not limited to the specific product type of IoT device, and it can match IoT devices with light intensity detection function, motion detection function, and lighting function, thereby improving the scalability of IoT.

[0052] Second type: Smart park application scenario.

[0053] The control device 101 is a park operation and maintenance platform. The control device 101 pre-configures the target object model rule. The target object model rule includes the trigger condition and the execution action. Among them, the trigger condition is the detection of a fire alarm. The execution action is to close the elevator and open the fire door. The triggering conditions correspond to the first function, namely the fire alarm detection function. The executed actions correspond to the second functions, namely the elevator control function and the fire door control function, respectively. IoT device 102 is the fire alarm detector 102, IoT device 103 is the elevator 103, and IoT device 104 is the fire door 104. The first data identifier of the fire alarm detector 102 is fireAlarm.Detection (fire...The fire alarm detector 102 has a fire alarm detection function, which is the first function. The second data identifier of the elevator 103 is elevator.switch (elevator.open / close). elevator.switch indicates that the elevator 103 has an elevator control function, which is the second function. The second data identifier of the fire door 104 is Fire Door.switch (fire door.open / close). FireDoor.switch indicates that the fire door 104 has a fire door control function, which is the second function.

[0054] The control device 101 receives the first data identifier, fireAlarm.Detection, and the first detection data corresponding to fireAlarm.Detection, which is the fire alarm detection data, sent by the fire alarm detector 102. When a fire alarm is detected, the control device 101 determines that the triggering conditions of the target object model rule are met. The control device 101 sends a control command to the elevator 103 with elevator control function to control the elevator to close, and sends a control command to the fire door 104 with fire door control function to control the fire door to close. This enables the control of elevators and fire doors to close upon detection of a fire alarm. This also allows for compatibility with IoT devices that possess fire alarm detection, elevator control, and fire door control functions, improving the scalability of the IoT.

[0055] Third type: Smart tunnel application scenario.

[0056] Control device 101 is an edge gateway. Control device 101 is pre-configured with target object model rules. Target object model rules include trigger conditions and execution actions. The trigger condition is detecting a carbon monoxide concentration exceeding a threshold. The execution action is setting the traffic lights to full red and turning on the lighting equipment. The trigger condition corresponds to the first function, namely the carbon monoxide detection function. The execution actions correspond to the second functions, namely the traffic light control function and the lighting function, respectively. IoT device 102 is a carbon monoxide concentration detector 102, IoT device 103 is a traffic light 103, and IoT device 104 is a lighting equipment 104. The first data identifier of the carbon monoxide concentration detector 102 is CO.concentrationValue (carbon monoxide concentration value). CO.concentrationValue indicates that the carbon monoxide concentration detector 102 has a carbon monoxide detection function, which is its first function. The second data identifier for the traffic light 103 is trafficlight.mnStatus (traffic light.operating status). trafficlight.mnStatus indicates that the traffic light 103 has traffic light control functionality. (9 WO 2024 / 199508 PCT / CN2024 / 085088)The second data identifier of the lighting device 104 is lightswitch (lighting.switch). lightswitch indicates that the lighting device 104 has a lighting function, which is the second function.

[0057] The control device 101 receives the first data identifier CO.c oncentrationValue sent by the carbon monoxide concentration detector 102, and the first detection data corresponding to the first data identifier, which is the carbon monoxide concentration detection data. When the carbon monoxide concentration exceeds the threshold, the control device 101 determines that the triggering condition of the target object model rule is met. The control device 101 sends a control command to the traffic indicator 103 with traffic indicator control function to control the traffic indicator to display red, and sends a control command to the lighting device 104 with lighting function to control the lighting device to turn on. In this way, when carbon monoxide is detected, the traffic indicator is controlled to display red and the lighting device is turned on. In this way, the matching of IoT devices with the first carbon monoxide concentration detection function, traffic indicator control function and lighting function can be realized, improving the scalability of IoT.

[0058] The above three scenarios are only examples. The control method of IoT devices provided in this application embodiment can be used in other IoT device control scenarios.

[0059] Next, various non-limiting specific embodiments of the control method for an IoT device provided in the embodiments of this application will be described in detail.

[0060] Referring to FIG2, this figure is a flowchart illustrating a control method for an IoT device provided in the embodiments of this application. The control method for the IoT device can be applied to control devices in the Internet of Things. The control device is connected to the IoT device to realize the control of the IoT device. The method includes the following steps:

[0061] S201: Receive a first data identifier sent by a first IoT device and first detection data corresponding to the first data identifier, wherein the first data identifier is used to indicate that the first IoT device supports a first function. The first IoT device is an IoT device in the Internet of Things that has a first function and sends the first data identifier and the first detection data to the control device. The first function is a function possessed by the first IoT device and corresponds to the triggering condition of the target object model rule. As an example, the first function is an attribute of the first IoT device, or for example, an event that the first IoT device can process, or for example, a method that the first IoT device can provide. Among them, the attribute can also be called a function point. The event can also be called an alarm. The method can also be called a service, command, or interface.

[0062] It should be noted that the number of the first IoT devices can be one or more. As an example,The number of first IoT devices is multiple. Taking the smart living application scenario shown in Figure 1 above as an example, the light intensity detector 102 and the motion sensor 103 are both first IoT devices. As another example, the number of first IoT devices is one. Taking the smart tunnel application scenario shown in Figure 1 above as an example, the carbon monoxide concentration detector is the first IoT device. The carbon monoxide concentration detection function of the carbon monoxide concentration detector is the first function.

[0063] In addition, the first functions of different first IoT devices can be the same or different. And the same first IoT device can have one or more first functions.

[0064] For example, as an example, the triggering condition of the target object model rule is that the environmental data is lower than the threshold, and the execution action is to turn on the environmental purification device. The first IoT device can be an environmental detection device. The environmental detection device has an environmental detection function, which is the first function. Multiple environmental detection devices set within a certain range send the environmental data detected based on the environmental detection function to the control device for processing. As another example, taking the smart living application scenario shown in Figure 1 as an example, the light intensity detection function of the light intensity detector 102 and the motion detection function of the motion sensor 103 are different first functions. The above two examples are examples of a first IoT device having a first function. As yet another example, the triggering condition of the target object model rule is that the light intensity is less than 5 lux and an object movement is detected. The execution action of the target object model rule is to control the light to turn on. The first IoT device is a multi-functional sensor that includes light intensity detection function and motion detection function. The multi-functional sensor supports two first functions, namely light intensity detection function and motion detection function.

[0065] The embodiments of this application do not limit the way of receiving the first data identifier and the first detection data sent by the first IoT device. In one possible implementation, the first IoT device sends the first data identifier and the first detection data respectively. The control device receives the first data identifier and the first detection data sent by the first IoT device respectively. In another possible implementation, the first IoT device sends the first data identifier and the first detection data simultaneously. As an example, the first IoT device sends running information to the control device. The operational information includes a first data identifier of the first IoT device and first detection data corresponding to the first data identifier. The control device obtains the first data identifier and the first detection data from the acquired operational information. The first data identifier indicates that the first IoT device supports a first function. The first detection data is collected by the first IoT device based on the first function. This application does not limit the specific type of the first data identifier. 11 WO 2024 / 199508PCT / CN2024 / 085088

[0066] In one possible implementation, the first data identifier is a first device identifier of the first IoT device. The first device identifier of the first IoT device is used to identify the first IoT device. The first device identifier of the first IoT device can reflect that the first IoT device supports a first function. For example, the first device identifier can be the device code of the first IoT device or the product code of the first IoT device. The device code or product code of the first IoT device can reflect the function supported by the first IoT device.

[0067] The first device identifier needs to establish a correspondence with the first function supported by the first IoT device in advance. In this way, the first device identifier can indicate that the first IoT device supports the first function. In one possible implementation, after the first IoT device establishes a connection with the control device, the first IoT device sends the first device identifier and the first function identifier to the control device. The control device obtains the first device identifier and the first function identifier of the first IoT device. The first function identifier is used to identify the first function. As an example, the first function identifier is the function name of the first function. The control device establishes a correspondence between the first device identifier and the first function. Thus, after the subsequent control device receives the first device identifier, which is the first data identifier, it can match the target object model rules based on the first function corresponding to the first device identifier, or determine whether the first detection data meets the triggering conditions of the target object model rules.

[0068] In another possible implementation, the first data identifier is the function name of the first function. The function name of the first function can directly indicate that the first IoT device supports the first function. As an example, the function name of the first function can be the field name corresponding to the first detection data. In this way, the first detection data transmitted by the first IoT device can be processed quickly and effectively without the need to pre-configure the first IoT device, realizing the plug-and-play functionality of the first IoT device and improving the usage speed of the first IoT device.

[0069] The first detection data is the data obtained by the first IoT device based on the first function. The embodiments of this application do not limit the specific type of the first detection data, and the specific type of the first detection data is determined based on the first function. The first detection data can be a specific numerical value or a detected state value.

[0070] S202: In response to determining that the first detection data meets the triggering conditions of the target object model rules, a control command is sent to the second IoT device.

[0071] The control device can determine whether the first detection data meets the triggering conditions of the target object model rule. The target object model rule is a pre-determined triggering condition and an object model rule corresponding to the first function. Embodiment 12 of this application WO 2024 / 199508 PCT / CN2024 / 085088The implementation method for determining the target object model rule is not limited. In one possible implementation, after the control device acquires the first data identifier each time, it queries the target object model rule corresponding to the first function based on the first function indicated by the first data identifier. In another possible implementation, the control device determines the target object model rule to be used based on the first data identifier transmitted by the first IoT device for the first time. And after receiving the first detection data corresponding to the first data identifier transmitted by the first IoT device, the control device directly determines whether the first detection data meets the triggering condition of the target object model rule.

[0072] The embodiments of this application do not limit the source of the target object model rule. In one possible implementation, the control device queries the target object model rule corresponding to the first function based on the triggering condition in the object model rule stored locally. In another possible implementation, the control device can send a query request to the device storing the object model rule. The device storing the object model rule is, for example, a server connected to the control device. The query request includes the function information of the first function. The function information of the first function is, for example, the function name of the first function, or the function identifier of the first function. The device storing the object model rule queries the target object model rule corresponding to the first function based on the function information of the first function included in the query request. The device storing object model rules feeds back the target object model rules to the control device. The control device can store the target object model rules received from the device storing object model rules locally.

[0073] In one possible implementation, the target object model rules have an adjustable activation state. When the user needs to apply the target object model rules, the user can adjust the target object model rules to the activated state. When the user does not need to apply the target object model rules, the user can adjust the target object model rules to the deactivated state. In this way, flexible control over the application of object model rules is achieved.

[0074] The control device determines whether the first detection data meets the triggering conditions of the target object model rules. It should be noted that in some possible implementations, the control device can obtain the first detection data corresponding to different first functions. Correspondingly, the triggering conditions of the target object model rules include sub-conditions corresponding to different first functions. When the first detection data meets the sub-conditions corresponding to the corresponding first function, and the sub-conditions of different first functions are all met, it is determined that the first detection data meets the triggering conditions of the target object model rules. As an example, taking the smart living application scenario shown in Figure 1, the control device acquires the light intensity detection data corresponding to "sun.brightness" sent by the light intensity detector 102. The control device also acquires the motion detection data corresponding to "mind" sent by the motion sensor 103. The trigger condition for the target object model rule is that the light intensity is less than 5 lux and an object 13 WO is detected.2024 / 199508 PCT / CN2024 / 085088 Body movement. Among them, light intensity less than 5 lux is the sub-condition corresponding to the light intensity detection function. Detecting object movement is the sub-condition corresponding to the motion detection function. When the control device determines that the light intensity detection data collected using the light intensity detection function meets the sub-condition of light intensity less than 5 lux, and the motion detection data collected using the motion detection function meets the sub-condition of detecting object movement, it determines that the acquired first detection data meets the trigger condition of the target object model rule.

[0075] If the control device determines that the first detection data meets the trigger condition of the target object model rule, it controls the second IoT device to execute the execution action of the target object model rule. The second IoT device is an IoT device that supports the second function. The execution action of the target object model rule corresponds to the second function. The execution action of the target object model rule can be executed by an IoT device with the second function. It should be noted that the second IoT device can be the same IoT device as the first IoT device, or a different IoT device from the first IoT device. Furthermore, the number of second IoT devices can be one or more. As an example, taking the smart park application scenario shown in Figure 1 as an example, the second IoT devices are elevator 103 and fire door 104. Different second IoT devices may have the same or different second functions. Furthermore, the same second IoT device may have one or more second functions.

[0076] In addition, the embodiments of this application do not limit the IoT devices that support the second function, that is, the specific implementation of the second IoT device. As an example, the control device determines that the second IoT device supports the second function based on the second data identifier obtained by the second IoT device. The second data identifier is used to indicate that the second IoT device supports the second function.

[0077] The embodiments of this application do not limit the specific type of the second data identifier.

[0078] In one possible implementation, the second data identifier is the second device identifier of the second IoT device. The second device identifier is used to identify the second IoT device. The second device identifier may be an identifier that reflects the second function supported by the second IoT device. For example, the device identifier of the second IoT device may be the device code of the second IoT device or the product code of the second IoT device. The device code or product code of the second IoT device may reflect the function supported by the second IoT device.

[0079] The second device identifier of the second IoT device needs to be pre-established with a corresponding relationship to the second function supported by the second IoT device. In one possible implementation, after the second IoT device establishes a connection with the control device, the second IoT device sends the second device identifier and the second function identifier to the control device.The second function identifier is used to identify the second function. As an example, the second function identifier is the function name of the second function. The control device establishes a correspondence between the second device identifier and the second function. In this way, when the control device needs to control the IoT device with the second function based on the target object model rules, it can determine that the second IoT device has the second function based on the correspondence between the second device identifier and the second function, and then control the second IoT device.

[0080] In another possible implementation, the second data identifier is the function name of the second function. The function name of the second function can directly indicate the second function supported by the second IoT device. As an example, the function name of the second function can be the field name corresponding to the second detection data sent by the second IoT device to the control device. After receiving the second detection data sent by the second IoT device, the control device controls the second IoT device based on the function name of the second function, realizing plug-and-play of the second IoT device and improving the usage speed of the IoT device.

[0081] The embodiments of this application do not limit the way of determining the second IoT device to send control commands. In one possible implementation, if the triggering condition of the target object model rule is determined to be met, the control device queries the connected IoT devices for IoT devices that support the second function, i.e., the second IoT device. In another possible implementation, if the triggering condition of the target object model rule is determined to be met, the control device determines the second IoT device for which a control command needs to be sent based on historical data of controlling IoT devices using the target object model rule.

[0082] The control device generates a control command based on the execution action of the target object model rule and sends the control command to the second IoT device. The second IoT device can execute the execution action of the target object model rule based on the acquired control command.

[0083] Based on the relevant content of S201-S202 above, it can be seen that by using the target object model rules corresponding to the first function and the second function respectively, IoT devices can be controlled from the functional dimension. The target object model rule is not targeted at a specific device or product type, and can achieve a wide range of device or product applicability, improving the scalability of IoT. Furthermore, in scenarios with a large number of IoT devices, using the object model rule to achieve automatic control of IoT devices can improve operational efficiency, reduce manual operation of configuring rules for each IoT device, and reduce the probability of problems.

[0084] In one possible implementation, when controlling IoT devices using target object model rules, the range of the IoT devices also needs to be considered. This range can be location or the organization to which the IoT devices belong; this application does not limit this. For example, in smart home applications, 15WO is required.2024 / 199508 PCT / CN2024 / 085088 It is necessary to control IoT devices belonging to a household. For example, in the application scenario of a smart park, it is necessary to control IoT devices belonging to the same park, or IoT devices within a building in the park. This application embodiment also provides a method for controlling IoT devices. The target object model rule also includes range conditions. The range conditions are used to determine the range conditions that the first IoT device and the second IoT device need to meet. The range conditions can reflect the applicable range of the target object model rule. This application embodiment does not limit the type of range conditions. For example, the range condition is a tag. Or, for example, the range condition is a range parameter.

[0085] Before sending a control command to the second IoT device in response to determining that the first detection data meets the triggering condition of the target object model rule in the above S202, the method further includes the following steps:

[0086] A1: Obtain the range information of the first IoT device.

[0087] The range information of the first IoT device is used to indicate the range to which the first IoT device belongs. As an example, the range condition is specifically a location condition. The range of the first IoT device can be the geographical location of the entity where the first IoT device is located. For example, the range information is a location tag. The location tag can be set in advance according to the geographical location of the first IoT device. For example, IoT devices belonging to the same building can be set with the same location tag. Another example is that the range information is the location data of the geographical location of the first IoT device. The range information can be generated by the positioning function of the first IoT device. As another example, the location of the first IoT device can be the network location of the first IoT device. The range information can be the network address of the first IoT device.

[0088] The embodiments of this application do not limit the way in which the control device obtains the range information of the first IoT device. In one possible implementation, after the first IoT device establishes a connection with the control device, it sends the range information of the first IoT device to the control device. In another possible implementation, the first IoT device sends one or more of the first data identifier and the first detection data, as well as the range information, to the control device at the same time. Based on the range information of the first IoT device, the control device determines whether the location of the first IoT device meets the range conditions of the target object model rule.

[0089] A2: Confirm that the range information of the first IoT device meets the range conditions.

[0090] The control device determines whether the range information of the first IoT device meets the range conditions. After confirming that the range information of the first IoT device meets the range conditions, a control command is sent to the second IoT device. This application embodiment does not limit the specific method by which the control device determines whether the range information of the first IoT device meets the range conditions. (16 WO 2024 / 199508)PCT / CN2024 / 085088 Implementation method. Whether the range information satisfies the range condition can be determined based on the specific type of the range information. As an example, both the range information and the range condition are represented by labels. The control device determines whether the range information and the range condition are the same. If the range information and the range condition are the same, it means that the range information satisfies the range condition. As another example, the range information is the network address of the first IoT device. The range condition is the network number of the network. The control device determines whether the range information belongs to the range condition. If the range information belongs to the range condition, it means that the range information satisfies the range condition.

[0091] In this case, the execution action of the target object model rule needs to be executed by the second IoT device that satisfies the range condition. This application embodiment provides a specific implementation method for sending control instructions to the second IoT device, including:

[0092] Sending control instructions to the second IoT device whose range information satisfies the range condition.

[0093] The range information of the second IoT device is used to indicate the range of the second IoT device. The representation of the range of the second IoT device is the same as that of the first IoT device.

[0094] This application embodiment does not limit the method by which the control device obtains the range information of the second IoT device. In one possible implementation, after the second IoT device establishes a connection with the control device, it sends the range information to the control device. In another possible implementation, the second IoT device sends other data to the control device, such as a second data identifier, and simultaneously sends the range information of the second IoT device. The control device can determine whether the range of the second IoT device meets the range conditions of the target object model rule based on the obtained range information of the second IoT device.

[0095] The control device sends a control command to the second IoT device whose range information meets the range conditions to realize the control of the second IoT device that meets the range conditions.

[0096] Thus, based on the range conditions included in the target object model rule, the IoT device that meets the range conditions can be controlled, and a more accurate control of the IoT device can be achieved. Furthermore, by adjusting the range conditions, the object model rule can be quickly promoted for use in different scenarios.

[0097] Based on the IoT device control method provided in this application embodiment, referring to FIG3, this application embodiment also provides a structural schematic diagram of an IoT device control device 300. The control device 300 of the Internet of Things (IoT) device can implement the control method of the IoT device shown in Figure 2. This figure is a schematic diagram of the structure of a control device for an IoT device provided in an embodiment of this application. The control device 300 includes a receiving unit 301 and a transmitting unit 302. The functions of each module in the control device 300 are detailed in [17 WO 2024 / 199508 PCT / CN2024 / 085088].See the description of the relevant parts of the embodiment shown in FIG2. The receiving unit 301 is used to implement S201 of the embodiment shown in FIG2; the sending unit 302 is used to implement S202 of the embodiment shown in FIG2.

[0098] Specifically, the receiving unit 301 is used to receive the operation information sent by the first IoT device. The operation information includes a first data identifier and first detection data corresponding to the first data identifier. The first data identifier is used to indicate that the first IoT device supports a first function.

[0099] The sending unit 302 is used to send a control command to the second IoT device in response to determining that the first detection data meets the triggering condition of the target object model rule. The second IoT device supports a second function. The control command is used to instruct the second IoT device to perform the execution action of the target object model rule. The triggering condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function.

[0100] In one possible implementation, the first data identifier is a first device identifier of the first IoT device, and the receiving unit 301 is further configured to receive the first device identifier and a first function identifier sent by the first IoT device, wherein the first function identifier is used to identify a first function;

[0101] The device further includes:

[0102] an establishment unit, configured to establish a correspondence between the first device identifier and the first function.

[0103] In one possible implementation, the first data identifier is the function name of the first function.

[0104] In one possible implementation, the receiving unit 301 is further configured to obtain a second data identifier sent by the second IoT device, wherein the second data identifier is used to indicate that the second IoT device supports the second function;

[0105] The device further includes:

[0106] a determination unit, configured to determine that the second IoT device supports the second function based on the second data identifier.

[0107] In one possible implementation, the second data identifier is a second device identifier of the second IoT device, and the receiving unit 301 is further configured to receive a second function identifier sent by the second IoT device, the second function identifier being used to identify a second function;

[0108] The establishing unit is further configured to establish a correspondence between the second device identifier and the second function.

[0109] In one possible implementation, the second data identifier is a function name of the second function. 18 WO 2024 / 199508 PCT / CN2024 / 085088 [0n0] In one possible implementation, the target object model rule further includes location conditions, and the receiving unit 301 is further configured to obtain the location information of the first IoT device before sending the control command to the second IoT device corresponding to the second data identifier;

[0111] The device further includes:

[0112] a confirmation unit, configured to confirm that the location information of the first IoT device meets the location conditions;

[0113] the sending unit 302, configured to send control commands to the second IoT device, including:

[0114] the sending unit 302, configured to send control commands to the second IoT device whose location information meets the location conditions.

[0115] Figure 4 shows a schematic diagram of the structure of a computing device. The control device 300 of the above-mentioned IoT device can be deployed on the computing device. The computing device can be a computing device in a cloud environment (such as a server), or a computing device in an edge environment, or a terminal device, etc., which can be used to implement the functions of the receiving module 301 and the sending module 302 in the embodiment shown in Figure 3.

[0116] As shown in Figure 4, the computing device 400 includes a processor 410, a memory 420, a communication interface 430, and a bus 440. The processor 410, the memory 420, and the communication interface 430 communicate with each other through the bus 440. Bus 440 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in Figure 4, but this does not imply that there is only one bus or one type of bus. Communication interface 430 is used for communication with external systems, such as receiving operational information sent by the first IoT device.

[0117] The processor 410 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits. The processor 410 can also be an integrated circuit chip with signal processing capabilities. In implementation, the functions of each module in the control device of the IoT device can be accomplished through the integrated logic circuits in the hardware of the processor 410 or through software instructions. Processor 4 10 can also be a general-purpose processor, a digital signal processor (DSP), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the functions described in the embodiments of this application.The method, steps, and logic block diagram are described. The general-purpose processor can be a microprocessor or any conventional processor, as specified in 19 WO 2024 / 199508 PCT / CN2024 / 085088. The method disclosed in this application can be directly implemented as hardware decoding processor execution, or as a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the field. This storage medium is located in memory 420. Processor 410 reads information from memory 420 and, in conjunction with its hardware, completes some or all of the functions in the control device of the IoT device.

[0118] Memory 420 may include volatile memory, such as random access memory (RAM). Memory 420 may also include non-volatile memory, such as read-only memory (ROM), flash memory, HDD, or SSD.

[0119] Executable code is stored in the memory 420, and the processor 410 executes the executable code to execute the method performed by the control device of the aforementioned Internet of Things (IoT) device.

[0120] Specifically, in the case of implementing the embodiment shown in FIG3, and where the receiving module 301 and the sending module 302 described in the embodiment shown in FIG3 are implemented by software, the software or program code required to perform the functions of the receiving module 301 and the sending module 302 in FIG3 is stored in the memory 420. The interaction between the receiving module 301 and other devices is achieved through the communication interface 430. The processor is used to execute the instructions in the memory 420 to implement the method performed by the control device of the IoT device.

[0121] FIG5 shows a schematic diagram of the structure of a computing device cluster. The computing device cluster 50 shown in FIG5 includes multiple computing devices, and the control device applied to the IoT device can be distributed and deployed on multiple computing devices in the computing device cluster 50. As shown in Figure 5, the computing device cluster 50 includes multiple computing devices 500. Each computing device 500 includes a memory 520, a processor 510, a communication interface 530, and a bus 540. The memory 520, processor 510, and communication interface 530 are interconnected via the bus 540.

[0122] The processor 510 can be a CPU, GPU, ASIC, or one or more integrated circuits. The processor 510 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, the Internet of Things (IoT) device...Some functions of the control device can be implemented through integrated logic circuits in the hardware of the processor 510 or through software instructions. The processor 510 can also be a DSP, FPGA, general-purpose processor, other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing some of the methods, steps, and logic block diagrams disclosed in the embodiments of this application (2000 WO 2024 / 199508 PCT / CN2024 / 085088). The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 520. In each computing device 500, the processor 510 reads information from memory 520 and, in conjunction with its hardware, can complete some functions of the control device of the IoT device.

[0123] The memory 520 may include ROM, RAM, static storage device, dynamic storage device, hard disk (e.g., SSD, HDD), etc. The memory 520 may store program code, for example, part or all of the program code for implementing the receiving module 301, part or all of the program code for implementing the sending module 302, etc. For each computing device 500, when the program code stored in the memory 520 is executed by the processor 510, the processor 510 executes part of the method executed by the control device of the Internet of Things device based on the communication interface 530. For example, one part of the computing device 500 may be used to execute the method executed by the receiving module 301, and another part of the computing device 500 may be used to execute the method executed by the sending module 302. The memory 520 may also store data, for example, intermediate data or result data generated by the processor 510 during execution.

[0124] The communication interface 503 in each computing device 500 is used for communication with the outside, for example, to interact with other computing devices 500, etc.

[0125] The bus 540 may be a peripheral component interconnection standard bus or an extended industry standard structure bus, etc. For ease of illustration, the bus 540 in each computing device 500 in FIG. 5 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0126] The above-mentioned multiple computing devices 500 establish a communication path through a communication network to realize the function of the control device of the Internet of Things device. Any computing device may be a computing device in a cloud environment (e.g., a server), or a computing device in an edge environment, or a terminal device.

[0127] In addition, the embodiments of this application also provide a computer-readable storage medium, which is a computer-readable storage mediumThe device stores instructions that, when executed on one or more computing devices, cause those computing devices to perform any of the control methods for the IoT device described in the above embodiments. 21 WO 2024 / 199508 PCT / CN2024 / 085088

[0128] In addition, this application embodiment also provides a computer program product, which, when executed by one or more computing devices, causes those computing devices to perform any of the aforementioned control methods for the IoT device. The computer program product can be a software installation package, which can be downloaded and executed on a computer when any of the aforementioned control methods for the IoT device are required.

[0129] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between the units indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special hardware including special integrated circuits, special CPUs, special memory, special components, etc. Generally, any function completed by a computer program can be easily implemented by the corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0131] In the above embodiments, it can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented entirely or partially in the form of a computer program product.

[0132] The computer program product includes one or more computer instructions. The instructions are loaded and executed on a computer.When computer program instructions are given, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0133] Those skilled in the art should recognize that, in one or more of the above examples, the functions described in this application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0134] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application.

[0135] The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. 23 WO 2024 / 199508 PCT / CN2024 / 085088 Claims [Claim 1] A control method for an Internet of Things (IoT) device, characterized in that the method is applied to a control device, the method comprising: receiving a first data identifier sent by a first IoT device and a pair of the first data identifiers.The method according to claim 1, wherein the first data identifier is used to indicate that the first IoT device supports a first function; in response to determining that the first detection data satisfies the triggering condition of the target object model rule, a control command is sent to the second IoT device, the second IoT device supports a second function, the control command is used to instruct the second IoT device to perform the execution action of the target object model rule, the triggering condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function. [Claim 2] The method according to claim 1, wherein the first data identifier is a first device identifier of the first IoT device, the method further comprising: receiving a first device identifier and a first function identifier sent by the first IoT device, the first function identifier being used to identify the first function; establishing a correspondence between the first device identifier and the first function. [Claim 3] The method according to claim 1, wherein the first data identifier is the function name of the first function. [Claim 4] The method according to any one of claims 1-3, wherein the method further comprises: obtaining a second data identifier sent by the second IoT device, the second data identifier being used to indicate that the second IoT device supports the second function; determining that the second IoT device supports the second function based on the second data identifier. [Claim 5] According to claim 4, the method is characterized in that the second data identifier is a second device identifier of the second IoT device, and the method further includes: receiving a second function identifier sent by the second IoT device, the second function identifier being used to identify a second function; and establishing a correspondence between the second device identifier and the second function. [Claim 6] According to claim 4, the method is characterized in that the second data identifier is a function name of the second function. [Claim 7] According to any one of claims 1-6, the method is characterized in that the target object model rule further includes a range condition, and before sending a control command to the second IoT device corresponding to the second data identifier, the method further includes: obtaining range information of the first IoT device; confirming that the range information of the first IoT device satisfies the range condition; and sending a control command to the second IoT device includes: sending a control command to the second IoT device whose range information satisfies the range condition. [Claim 8] A control device for an IoT device, characterized in that the device includes: a receiving unit, used to receive operating information sent by a first IoT device, the operating information including a first data identifier and first detection data corresponding to the first data identifier.The first data identifier is used to indicate that the first IoT device supports a first function; the sending unit is used to send a control command to the second IoT device in response to determining that the first detection data meets the triggering condition of the target object model rule, the second IoT device supports a second function, the control command is used to instruct the second IoT device to perform the execution action of the target object model rule, the triggering condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function. [Claim 9] The apparatus according to claim 8, wherein the first data identifier is a first device identifier of the first IoT device, the receiving unit is further used to receive the first device identifier and the first function identifier sent by the first IoT device, the first function identifier is used to identify the first function; the apparatus further includes: an establishing unit, used to establish a correspondence between the first device identifier and the first function [Claim 10] The apparatus according to claim 8, wherein the first data identifier is the function name of the first function. 25 WO 2024 / 199508 PCT / CN2024 / 085088 [Claim 11] [Claim 12] [Claim 13] [Claim 14] [Claim 15] The apparatus according to any one of claims 8-10, wherein the receiving unit is further configured to acquire a second data identifier sent by the second IoT device, the second data identifier being used to indicate that the second IoT device supports the second function; the apparatus further comprises: a determining unit, configured to determine, based on the second data identifier, that the second IoT device supports the second function. The apparatus according to claim 11, wherein the second data identifier is a second device identifier of the second IoT device, the receiving unit is further configured to receive a second function identifier sent by the second IoT device, the second function identifier being used to identify the second function; the establishing unit is further configured to establish a correspondence between the second device identifier and the second function. The apparatus according to claim 11, wherein the second data identifier is the function name of the second function. The apparatus according to any one of claims 8-13, characterized in that the target object model rule further includes a location condition, and the receiving unit is further configured to obtain the location information of the first IoT device before sending the control command to the second IoT device corresponding to the second data identifier; the apparatus further includes: a confirmation unit, configured to confirm that the location information of the first IoT device satisfies the location condition; the sending unit is configured to send the control command to the second IoT device, including: the sending unit is configured to send the control command to the second IoT device whose location information satisfies the location condition.An apparatus, characterized in that the apparatus comprises a processor and a memory; the processor is configured to execute instructions stored in the memory, so as to cause the apparatus to perform the method of any one of claims 1 to 7. 26 WO 2024 / 199508 PCT / CN2024 / 085088 [Claim 16] [Claim 17] A computing device cluster, characterized in that it comprises at least one computing device, and each computing device comprises a processor and a memory; the processor is configured to execute instructions stored in the memory, so as to cause the computing device cluster to perform the method of any one of claims 1 to 7. A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one computing device, they cause the at least one computing device to perform the method of any one of claims 1 to 7. Rule 91, 22.05.2024 1 / 2 WO 2024 / 199508 PCT / CN2024 / 085088 [Fig. 1] [Fig. 2] Drawing 2 / 2 WO 2024 / 199508 PCT / CN2024 / 085088 [Fig. 5] Calculation or included. 500 ' i ; Very black device: : Tui Ren Fei m i ΐ ; 510 ; : 530 卜 ;i.. .■■■■ ΪΞΙΞΞν :on -■ : bag 540 : \ ■ ; ... ... ..■ '< : ·: 八 ; J: J f computing device 500) / 1 : :ww cold! : condensation connected to seven f i ; | 510 ; : 53 force : ; ϊ ·~~!-----h·~!........ : …:」 :…………*…………: :: ;:^<540 ;1·repair举我通 ~: : j ; ;1…宓堂—J ; ; ; ; 志设器豆)T g ………--…50 ί 计再逊备5破 ] o i 厂惹高「奏蓝第、1 5 / 510 : ; 530' : ; 二厂………I………: 、……i、……[k] 1 / ......1..... , 二:」; : / ' 总亲546 :.■' .....、...、 , : F' ; χ·; .<■:: ■; ; / : 淬展器520 ; ; 八..................==」............... 」 '、-,if、、.'■' ,Λ ; Ο ^ \. 、- ' :飞 computing device 500 : ; 飞遗存枝口 ; 「仁理禽ί : : : 510 ; ; 530 ; : X··二二一亡「1 - ί 1 : 忌发5州 1 : ί ΐDing τ° ; ; INTERNATIONAL SEARCH REPORT International application No. PCT / CN2024 / 085088 A. CLASSIFICATION OF SUBJECT MATTER H04L67 / 125(2022.01)i According to International Patent Classification (IPC) or to both national classification and IPC B. FIELDS SEARCHED Minimum documentation searched (classification system followed by classification symbols) IPC: H04L Documentation searched other than minimum documentation to the extent that such documents are included in the fields searched Electronic data base consulted during the international search (name of data base and, where practicable, search terms used) CNABS; CNTXT; VEN; WOTXT; EPTXT; USTXT; CNKI: Internet of Things, data identification, detection, thing model, trigger condition, execution action, control, function, range, IOT, data ID, test+, detect+, measur+, object model, triggering condition, action, control, function, range, scope C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document, with indication, where appropriate, of the relevant passages Relevant to claim No. Y CN 111818132 A (SHENZHEN QUI WISDOMNETWORK CO., LTD.) 23 October 2020 (2020-10-23) description, paragraphs

[0053] -

[0101] 1-17 Y CN 115454520 A (CHINA MOBILE IOT CO., LTD. et al.) 09 December 2022 (2022-12-09) description, paragraphs

[0023] -

[0135] 1-17 A CN 111948952 A (SHENZHEN SUNDRAY TECHNOLOGIES CO., LTD.) 17 November 2020 (2020-11-17) entire document 1-17 A CN 113986349 A (SHENZHEN TCL NEW TECHNOLOGY CO., LTD.) 28 January 2022 (2022-01-28) entire document 1-17 A CN 114896751 A (GUANGZHOU METRO GROUP CO., LTD. et al.) 12 August 2022 (2022-08-12) entire document 1-17 | | Further documents are listed in the continuation of Box C. | / 1 See patent family annex. * Special categories of cited documents: “T" later document published after the international filing date or priority “A" document defining the general state of the art which is not considered date and not in conflict with the application but cited to understand the to be of paiticulai' relevance principle or theory underlying the invention "D” document cited bythe applicant in the international application “χ” document of particular relevance; the claimed invention cannot be “E” eailier application or patent but published on or after the international considered novel or cannot be considered to involve an inventive step filing date when the document is taken alone “L" document which may thi'ow doubts on priority claim(s) or which is “Y" document of paiticulai' relevance; the claimed invention cannot be cited to establish the publication date of another citation or other considered to involve an inventive step when the document is special reason (as specified) combined with one or more other such documents, such combination "O” document refen'ing to an oral disclosure, use, exhibition or other being obvious to a person skilled in the art means document member of the same patent family "P” document published prior to the international filing date but later than the priority date claimed Date of the actual completion of the international search19 June 2024 Date of mailing of the international search report 24 June 2024 Name and mailing address of the ISA / CN China National Intellectual Property Administration (ISA / CN) China No. 6, Xitucheng Road, Jimenqiao, Haidian District, Beijing 100088 Authorized officer Telephone No. Form PCT / ISA / 210 (second sheet) (July 2022) INTERNATIONAL SEARCH REPORT International application No. PCT / CN2024 / 085088 C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document, with indication, where appropriate, of the relevant passages Relevant to claim No. A CN 115460051 A (INSPUR SOFTWARE TECHNOLOGY CO., LTD.) 09 December 2022 (2022-12-09) entire document 1-17 Form PCT / ISA / 210 (second sheet) (July 2022) INTERNATIONAL SEARCH REPORT Information on patent family members International application No. PCT / CN2024 / 085088 Patent document cited in search report Publication date (day / month / year) Patent family member(s) Publication date (day / month / year) CN 111818132 A 23 October 2020 None CN115454520 A 09 December 2022 None CN 111948952 A 17 November 2020 None CN 113986349 A 28 January 2022 None CN 114896751 A 12 August 2022 None CN 115460051 A 09 December 2022 None Form PCT / ISA / 210 (patent family annex) (July 2022) International Application Number PCT / CN2024 / 085088 International Search Report A. Subject Classification H04L67 / 125 (2022.01)i According to the International Patent Classification (IPC) or both national classification and IPC classification B. Search Field Minimum Documents Searched (Indicate classification system and classification number) IPC: H04L Electronic databases consulted during international searches, excluding the minimum required literature, included in the search field (database name and search terms used, if applicable): CNABS;CNTXT;VEN;WOTXT;EPTXT;USTXT;CNKI: Internet of Things, data ID, detection, object model, triggering condition, action, control, function, scope. C. Related document types* Referenced documents, specifying relevant paragraphs where necessary. Related claims: CN 111818132 A (Shenzhen Miracle Smart Network Co., Ltd.) October 23, 2020 (2020-10-23) Specification, paragraphs

[0053] -

[0101] 1-17. CN 115454520 A (China Mobile IoT Co., Ltd., etc.) December 9, 2022 (2022-12-09). Sections

[0023] -

[0135] of the specification: 1-17 A CN 111948952 A (Shenzhen Xinrui Network Technology Co., Ltd.) November 17, 2020 (2020-11-17) Full text 1-17 A CN 113986349 A (Shenzhen TCL New Technology Co., Ltd.) January 28, 2022 (2022-01-28) Full text 1-17 A CN 114896751 A (Guangzhou Metro Group Co., Ltd., etc.) August 12, 2022 (2022-08-12)Full text 1-17 A CN 115460051 A (Inspur Software Technology Co., Ltd.) December 9, 2022 (2022-12-09) Full text 1-17 □The remaining documents are listed on the continuation page in column C. *Specific types of cited documents: “A” Documents that are considered not particularly relevant and represent the general state of the prior art. “D” Documents cited by the applicant in an international application. “E” Earlier applications or patents published on or after the international filing date. “L” Documents that may raise doubt about the priority claim, or documents cited to determine the publication date of another cited document, or documents cited for other specific reasons (as specifically stated). Documents involving □head disclosure, use, exhibition, or other disclosure. “P” Documents whose publication date is earlier than the international filing date but later than the claimed priority date. See the patent family appendix. "A document published after the application date or priority date, which does not conflict with the application, but is particularly different from the subsequent document for understanding the inventive theory or principle, is considered alone, and the claimed invention is deemed not novel or lacking inventiveness. A document particularly related to "Y" is also considered, and when the document is not combined with any of the other documents of the same class and such combination is obviously excessive to those skilled in the art, the claimed invention lacks inventiveness. International search of patent family documents: Date of actual completion: June 19, 2024. Name and mailing address of ISA / CN: China National Intellectual Property Administration, No. 6, Tucheng Road, Xijimenqiao, Haidian District, Beijing 100088, China. International search report mailing date: June 24, 2024. Authorized officer: Wu Beijun. Telephone number: (+86) 0512-88995985. PCT / ISA / 210 Form (Page 2) (July 2022). International Application Number: PCT / CN2024 / 085088 International Search Report Information Search Report on Patent Family Publication Dates (Year / Month / Day) Patent Family Publication Dates (Year / Month / Day) CN 111818132 A October 23, 2020 None CN 115454520 A December 9, 2022 None CN 111948952 A November 17, 2020 None CN 113986349 A January 28, 2022 None CN 114896751 A August 12, 2022 None CN 115460051 A December 9, 2022 None PCT / ISA / 210 Form (Appendix to Patent Family) (July 2022) (19) *EP004683304A1* (11) EP 4 683 304 A1 (12) EUROPEAN PATENT APPLICATION published in accordance withArt. 153(4) EPC (43) Date of publication: 21.01.2026 Bulletin 2026 / 04 (21) Application number: 24778293.1 (22) Date of filing: 30.03.2024 (51) International Patent Classification (IPC): H04L 67 / 125 (2022.01) (52) Cooperative Patent Classification (CPC): H04L 67 / 125; H04L 67 / 52 (86) International application number: PCT / CN2024 / 085088 (87) International publication number: WO 2024 / 199508 (03.10.2024 Gazette 2024 / 40) (84) Designated Contracting States: AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR Designated Extension States: BA Designated Validation States: GE KH MA MD TN (30) Priority: 31.03.2023 CN 202310340354 (71) Applicant: Huawei Cloud Computing Technologies Co., Ltd. Guiyang, Guizhou 550025 (CN) (72) Inventors: • NIE, Yanling Guiyang, Guizhou 550025 (CN) • ZHANG, Xiangyong Guiyang, Guizhou 550025 (CN) • GUO, Bin Guiyang, Guizhou 550025 (CN) (74) Representative: Gill Jennings & Every LLP The Broadgate Tower 20Primrose Street London EC2A 2ES (GB) (54) METHOD AND APPARATUS FOR CONTROLLING INTERNET‑OF‑THINGS DEVICE, AND RELATED DEVICE (57) This application discloses a method and appa- ratus for controlling an internet of things device, and a related device. Specifically, acontrol device can receive a first data identifier and first detection data corresponding to the first data identifier that are sent by a first internet of things device, and the control device can determine, based on the first data identifier, that the first internet of things device supports a first function. The control device determines whether the first detection data meets a trigger condition of a target object model rule corre- sponding to the first function, and sends a control instruc- tion to a second internet of things device if the first detection data meets the trigger condition. The second internet of things device supports a second function corresponding to an execution action of the target object model rule.In this way, the control device can control an internet of things device from a function dimension ac- cording to the target object model rule, so that applic- ability of a wide range of devices or products can be implemented, and scalability of the internet of things can be improved. EP 4 68 3 30 4 A 1 Processed by Luminess, 75001 PARIS (FR) 2 1 EP 4 683 304 A1 2 Description

[0001] This application claims priority to Chinese Pa- tent Application No. 202310340354.X, filed with the Chi- na National Intellectual Property Administration on March 31, 2023 and entitled "METHOD AND APPARATUS FOR CONTROLLING INTERNET OF THINGS DEVICE, AND RELATED DEVICE", which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] This application relates to the field of internet of things technologies, and in particular, to a method and apparatus for controlling an internet of things device, and a related device. BACKGROUND

[0003] With rapid development of internet of thingstechnologies, increasingly more internet of things de- vices are used in people’s life. To control an internet of things device, an automation rule for controlling the inter- net of things device is usually set on a control device. The control device controls the internet of things device ac- cording to the preset automation rule.

[0004] Currently, the automation rule preset on the control device is for a specific internet of things device or a specific type of internet of things device. When a new device is connected to a network and the new device needs to be controlled, an operator needs to adjust or add an automation rule, resulting in limited scalability of the internet of things. SUMMARY

[0005] Embodiments of this application provide a method and apparatus for controlling an internet of things device, and a related device, so that an internet of things device can be controlled based on a function of the internet of things device according to an object model rule, to improvescalability of the internet of things.

[0006] According to a first aspect, this application pro- vides a method for controlling an internet of things device. During specific implementation, the method includes: receiving running information sent by a first internet of things device, where the running information includes a first data identifier and first detection data corresponding to the first data identifier, the first data identifier indicates that the first internet of things device supports a first function, a trigger condition of a target object model rule corresponds to the first function, an execution action corresponds to a second function, and based on the running information, the first function supported by the first internet of things device may be determined, and that the first detection data meets the trigger condition of the target object model rule may be determined; and sending a control instruction to an internet of things device sup- porting the second function,that is, a second internet of things device, in response to that it is determined that the first detection data meets the trigger condition of the target object model rule, where the control instruction instructs that the second internet of things device to perform the execution action of the target object model rule. In this way, the target object model rule is used to control the internet of things device at a function granu- larity, and is not limited to a specific model and a type of the internet of things device. Therefore, the target object model rule can be widely applied to the internet of things device, and control efficiency of the internet of things device is improved.

[0007] In a possible implementation, the first data iden- tifier is a first device identifier of the first internet of things device. The method further includes: obtaining the first device identifier and a first function identifier that are sent by the first internet of things device, where the first func-tion identifier identifies the first function, and it can be determined, based on the first device identifier and the first function identifier, that the first internet of things device supports the first function; and establishing a correspondence between the first device identifier and the first function. In this way, when the first device identi- fier is subsequently received, it can be determined, based on the correspondence between the first device identifier and the first function, that the first internet of things device supports the first function.

[0008] In a possible implementation, the first data iden- tifier is a function name of the first function. Based on the function name of the first function, it can be determined that the first internet of things device that sends the running information supports the first function.

[0009] In a possible implementation, that the second internet of things device supports the second function is determined based on a second dataidentifier sent by the second internet of things device. The second data iden- tifier is obtained in advance. The method further includes: obtaining the second data identifier sent by the second internet of things device, where the second data identifier indicates that the second internet of things device sup- ports the second function; and after obtaining the second data identifier, determining, based on the second data identifier, that the second internet of things device sup- ports the second function.

[0010] In a possible implementation, the second data identifier is a second device identifier of the second internet of things device. The method further includes: receiving a second function identifier sent by the second internet of things device, where the second function identifier identifies the second function; and determining, based on the second device identifier and the second function identifier that are sent by the second internet of things device, that the second internetof things device supports the second function, and establishing a corre- spondence between the second device identifier and the second function. Subsequently, based on the received second device identifier, it is determined that the second 5 10 15 20 25 30 35 40 45 50 55 3 3 EP 4 683 304 A1 4 internet of things device that sends the second device identifier supports the second function.

[0011] In a possible implementation, the second data identifier is a function name of the second function.

[0012] In a possible implementation, the target object model rule further includes a location condition. Before the control instruction is sent to the second internet of things device corresponding to the second data identifier, location information of the first internet of things device is first obtained, and it is determined that the location in- formation of the first internet of things device meets the location condition. Then, the control instruction is sent to a second internet of thingsdevice whose location infor- mation meets the location condition. In this way, the internet of things device at a specific location can be controlled.

[0013] According to a second aspect, this application provides an apparatus for controlling an internet of things device, where the apparatus includes:

[0014] a receiving unit, configured to receive running information sent by a first internet of things device, where the running information includes a first data identifier and first detection data corresponding to the first data identi- fier, and the first data identifier indicates that the first internet of things device supports a first function; and

[0015] a sending unit, configured to send a control instruction to a second internet of things device in re- sponse to that it is determined that the first detection data meets a trigger condition of a target object model rule, where the second internet of things device supports a second function, the control instruction instructs the sec-ond internet of things device to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function.

[0016] In a possible implementation, the first data iden- tifier is a first device identifier of the first internet of things device, and the receiving unit is further configured to receive the first device identifier and a first function identifier that are sent by the first internet of things device, where the first function identifier identifies the first func- tion.

[0017] The apparatus further includes: an establishment unit, configured to establish a corre- spondence between the first device identifier and the first function.

[0018] In a possible implementation, the first data iden- tifier is a function name of the first function.

[0019] In a possible implementation, the receiving unit is further configured to obtain a second dataidentifier sent by the second internet of things device, where the second data identifier indicates that the second internet of things device supports the second function.

[0020] The apparatus further includes: a determining unit, configured to determine, based on the second data identifier, that the second internet of things device supports the second function.

[0021] In a possible implementation, the second data identifier is a second device identifier of the second internet of things device, and the receiving unit is further configured to receive a second function identifier sent by the second internet of things device, where the second function identifier identifies the second function.

[0022] The establishment unit is further configured to establish a correspondence between the second device identifier and the second function.

[0023] In a possible implementation, the second data identifier is a function name of the second function.

[0024] In a possible implementation, the targetobject model rule further includes a location condition, and before the control instruction is sent to the second inter- net of things device corresponding to the second data identifier, the receiving unit is further configured to obtain location information of the first internet of things device.

[0025] The apparatus further includes: a determining unit, configured to determine that the loca- tion information of the first internet of things device meets the location condition.

[0026] That the sending unit is configured to send the control instruction to the second internet of things device includes: the sending unit is configured to send the control instruc- tion to a second internet of things device whose location information meets the location condition.

[0027] According to a third aspect, this application provides a device, where the device includes at least one processor and at least one memory. The at least one memory is configured to store instructions, and the at least oneprocessor executes the instructions stored in the at least one memory, so that the device performs the method for controlling an internet of things device accord- ing to any one of the first aspect or the possible imple- mentations of the first aspect.

[0028] According to a fourth aspect, this application provides a computing device cluster, where the comput- ing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory. The at least one memory is configured to store instructions, and the at least one processor executes the instructions stored in the at least one memory, so that the computing device cluster performs the method for controlling an internet of things device according to any one of the first aspect or the possible implementations of the first aspect. It should be noted that the memory may be integrated into the processor, or may be independent of the processor. The at least onecomputing device may further include a bus. The processor is connected to the memory through the bus. The memory may include a readable memory and a random access memory.

[0029] According to a fifth aspect, this application pro- vides a computer-readable storage medium. The com- puter-readable storage medium stores instructions. When the instructions are run on at least one computing device, the at least one computing device is enabled to 5 10 15 20 25 30 35 40 45 50 55 4 5 EP 4 683 304 A1 6 perform the method according to any one of the first aspect or the implementations of the first aspect.

[0030] According to a sixth aspect, this application provides a computer program product including instruc- tions. When the computer program product runs on at least one computing device, the at least one computing device is enabled to perform the method according to any one of the first aspect or the implementations of the first aspect.

[0031] In this application, based on the implementa- tionsaccording to the foregoing aspects, the implemen- tations may be further combined to provide more imple- mentations. BRIEF DESCRIPTION OF DRAWINGS

[0032] FIG. 1 is a diagram of a structure of an internet of things according to an embodiment of this applica- tion; FIG. 2 is a schematic flowchart of a method for controlling an internet of things device according to an embodiment of this application; FIG. 3 is a diagram of a structure of an apparatus for controlling an internet of things device according to an embodiment of this application; FIG. 4 is a diagram of a structure of a computing device according to an embodiment of this applica- tion; and FIG. 5 is a diagram of a structure of a computing device cluster according to an embodiment of this application. DESCRIPTION OF EMBODIMENTS

[0033] The following describes solutions in embodi- ments of this application with reference to accompanying drawings in this application.

[0034] In the specification, claims, and accompanying drawings ofthis application, the terms "first", "second", and so on are intended to distinguish between similar objects but do not necessarily indicate a specific order or sequence. It should be understood that the terms used in such a way are interchangeable in proper circumstances, which is merely a discrimination manner that is used when objects having a same attribute are described in embodiments of this application.

[0035] In some scenarios of actual application of an internet of things device, a control device needs to obtain data collected by the internet of things device, and con- trol, based on the obtained data and a preconfigured automation rule, linkage between the internet of things device and another internet of things device or control the internet of things device to perform a specific action. The automation rule preconfigured in the control device is basically implemented based on a trigger and an action mechanism. When a condition of the trigger is met, the trigger triggers aspecific action. Currently, an automation rule may be set based on a single internet of things device or an internet of things device of a specific product type. For an automation rule set for a single internet of things device, a specific device that needs to be processed based on the automation rule may be determined based on a device identifier. For example, in an internet of things scenario of a smart home, an automation rule used to control a lighting device with a specific device identifier is preset. A trigger condition of a trigger is that an action of opening a door is detected, and an action mechanism is to turn on the lighting device. In an application process, when the control device detects, by using another inter- net of things device, that the door is opened, the trigger condition of the trigger is met, and the control device controls, according to the automation rule, the lighting device with the specific device identifier to perform a turn- on action. For an automationrule set for an internet of things device of a specific product type, a specific device that needs to be processed according to the automation rule can be determined for a specific product model. For another example, in an internet of things scenario of a campus, an automation rule used to control a fire extin- guisher of a specific product model is preset. A trigger condition of a trigger is that smoke is detected, and an action mechanism is to start the fire extinguisher. In an application process, when the control device detects smoke by using another internet of things device, the trigger condition of the trigger is met, and the control device controls, according to the automation rule, the fire extinguisher of the specific product model to perform a starting action.

[0036] An automation rule configured for a single inter- net of things device is only applied to a small scale of internet of things configurations. When there are a large quantity of devices that access the internetof things, or there are a large quantity of times of updating the internet of things devices, an automation rule that adapts to each internet of things device needs to be manually adjusted or added. This is inconvenient to control the internet of things device and difficult to implement extension of the internet of things. An automation rule set for an internet of things device of a specific product model can be set only for an existing internet of things device. After an internet of things device of a new product type goes online, an automation rule needs to be reconfi- gured. In addition, corresponding automation rules also need to be configured for internet of things devices of different product types that have a same or similar func- tion. In this case, a large number of automation rules need to be configured, and it is difficult to implement extension of the internet of things.

[0037] In view of this, embodiments of this application provide a method and apparatus for controllingan inter- net of things device, and a related device. The method can be performed by a control device in the internet of things. The control device in the internet of things is connected to another internet of things device, and is 5 10 15 20 25 30 35 40 45 50 55 5 7 EP 4 683 304 A1 8 configured to process data sent by the internet of things device and control the internet of things device. A specific type of the control device is not limited in embodiments of this application. For example, the control device is a device that can be connected to the internet of things device and control the internet of things device, such as a gateway, a router, a server, an operation and mainte- nance platform, or a mobile terminal.

[0038] The control device pre-configures an object model rule. The object model rule includes a trigger condition and an execution action. The trigger condition corresponds to a first function, the execution action cor- responds to a second function. The control device maycontrol, based on the object model rule, an internet of things device having the second function to execute the execution action of the object model rule when detection data provided by an internet of things device having the first function meets the trigger condition. Specifically, as an example, FIG. 1 is a diagram of a structure of an internet of things according to an embodiment of this application. The internet of things includes a control device 101, an internet of things device 102, an internet of things device 103, and an internet of things device 104. The control device 101 is separately connected to the internet of things device 102, the internet of things device 103, and the internet of things device 104. The control device 101 obtains running data reported by the internet of things device 102, the internet of things device 103, and the internet of things device 104, and controls the internet of things devices based on the obtained running data and an object model rule.

[0039] The following separately describes three appli- cation scenarios by using the structure of the internet of things shown in FIG. 1 as an example.

[0040] A first application scenario is a smart life appli- cation scenario.

[0041] The control device 101 is a home router.A target object model rule is preconfigured on the control device 101. The target object model rule includes a trigger condition and an execution action. The trigger condition is that light intensity is less than 5 lux, and a motion of an object is detected. The execution action is to control a lighting device to turn on. The trigger condition separately corresponds to a first function, that is, a light intensity detection function, and another first function, that is, a motion detection function. The execution action corre- sponds to a second function, that is, a lighting function. The internet of things device 102 is a light intensity detector 102, the internet of things device 103 is a motion sensor 103, and theinternet of things device 104 is a lighting device 104. A first data identifier of the light intensity detector 102 is sun.brightness (sun.brightness). The sun.brightness indicates that the light intensity de- tector 102 has the light intensity detection function, that is, the first function. A first data identifier of the motion sensor 103 is motion.detection (motion.detection). The motion.detection indicates that the motion sensor 103 has the motion detection function, that is, the first func- tion. A second data identifier of the lighting device 104 is light.switch (light.switch). The light.switch indicates that the lighting device 104 has the lighting function, that is, the second function.

[0042] The control device 101 receives the first data identifier, that is, sun.brightness, sent by the light inten- sity detector 102, and first detection data, that is, light intensity detection data, corresponding to the first data identifier. The control device 101 receives the first dataidentifier, that is, motion.detection, sent by the motion sensor 103, and first detection data, that is, motion de- tection data, corresponding to the first data identifier. The trigger condition of the target object model rule corre- sponds to the light intensity detection function supported by the light intensity detector 102 and the motion detec- tion function supported by the motion sensor 103. When the light intensity detection data is less than 5 lux, and the motion detection data indicates that a motion of an object is detected, the control device 101 determines that the trigger condition of the target object model rule is met. The control device 101 sends, to the lighting device 104 having the lighting function, a control instruction instructs to turn on a light. In this way, when the light intensity is less than 5 lux and a motion of an object is detected, the light can be controlled to turn on. The target object model rule can be applied to a control scenario including aninternet of things device having a light intensity detection function, an internet of things device having a motion detection function, and an internet of things device having a lighting function. When an internet of things device needs to be added or adjusted subsequently, a specific product type of the internet of things device and a specific internet of things device are not limited, and matching of internet of things devices having the light intensity detection func- tion, the motion detection function, and the lighting func- tion can be implemented, so that scalability of the internet of things is improved.

[0043] A second application scenario is a smart cam- pus application scenario.

[0044] The control device 101 is a campus operation and maintenance platform. A target object model rule is preconfigured on the control device 101. The target object model rule includes a trigger condition and an execution action. The trigger condition is detection of a fire alarm. The executionaction is to shut down an elevator and open a fire door. The trigger condition cor- responds to a first function, that is, a fire alarm detection function. The execution action separately corresponds to a second function, that is, an elevator control function, and another second function, that is, a fire door control function. The internet of things device 102 is a fire alarm detector 102, the internet of things device 103 is an elevator 103, and the internet of things device 104 is a fire door 104. A first data identifier of the fire alarm detector 102 is fireAlarm. Detection (fireAlarm. Detec- tion). The fireAlarm. Detection indicates that the fire alarm detector 102 has the fire alarm detection function, that is, the first function. A second data identifier of the 5 10 15 20 25 30 35 40 45 50 55 6 9 EP 4 683 304 A1 10 elevator 103 is elevator.switch (elevator.switch). The elevator.switch indicates that the elevator 103 has the elevator control function, that is, the second function.A second data identifier of the fire door 104 is FireDoor.s- witch (FireDoor.switch). The FireDoor.switch indicates that the fire door 104 has the fire door control function, that is, the second function.

[0045] The control device 101 receives the first data identifier that is, fireAlarm. Detection, sent by the fire alarm detector 102, and first detection data correspond- ing to fireAlarm. Detection, that is, fire alarm detection data. When a fire alarm is detected, the control device 101 determines that the trigger condition of the target object model rule is met. The control device 101 sends, to the elevator 103 having the elevator control function, a control instruction used to control the elevator to be shut down, and sends, to the fire door 104 having the fire door control function, a control instruction used to control the fire door to be closed. In this way, when the fire alarm is detected, the elevator and the fire control door can be controlled to shut down and to be closed.In this way, matching of internet of things devices having the fire alarm detection function, the elevator control function, and the fire door control function can be implemented, so that scalability of the internet of things is improved.

[0046] A third application scenario is a smart tunnel application scenario.

[0047] The control device 101 is an edge gateway. A target object model rule is preconfigured on the control device 101. The target object model rule includes a trigger condition and an execution action. The trigger condition is detecting that a carbon monoxide concentra- tion exceeds a threshold. The execution action is to set a traffic light to red and turn on a lighting device. The trigger condition corresponds to a first function, that is, a carbon monoxide detection function. The execution action se- parately corresponds to a second function, that is, a traffic light control function, and another second function, that is, a lighting function. The internet of things device102 is a carbon monoxide concentration detector 102, the inter- net of things device 103 is a traffic light 103, and the internet of things device 104 is a lighting device 104. A first data identifier of the carbon monoxide concentration detector 102 is CO. concentrationValue (CO. concentra- tionValue). The CO. concentrationValue indicates that the carbon monoxide concentration detector 102 has the carbon monoxide detection function, that is, the first function. A second data identifier of the traffic light 103 is trafficlight. runStatus (trafficlight. runStatus). The traf- ficlight.runStatus indicates that the traffic light 103 has the traffic light control function, that is, the second func- tion. A second data identifier of the lighting device 104 is light.switch (light.switch). The light.switch indicates that the lighting device 104 has the lighting function, that is, the second function.

[0048] The control device 101 receives the first data identifier, that is, the CO.concentrationValue, sent by the carbon monoxide concentration detector 102, and first detection data, that is, carbon monoxide concentration detection data, corresponding to the first data identifier. When it is detected that the carbon monoxide concentra- tion exceeds the threshold, the control device 101 de- termines that the trigger condition of the target object model rule is met. The control device 101 sends, to the traffic light 103 having the traffic light control function, a control instruction used to control the traffic light to dis- play red, and sends, to the lighting device 104 having the lighting function, a control instruction used to control the lighting device to be turned on. In this way, when it is detected that carbon monoxide appears, the traffic light can be controlled to display red and the lighting device can be turned on. In this way, matching of internet of things devices having the first carbon monoxide concen- tration detection function, the traffic lightcontrol function, and the lighting function can be implemented, so that scalability of the internet of things is improved.

[0049] The foregoing three scenarios are merely used as examples. The method for controlling an internet of things device provided in embodiments of this application can be used in another internet of things device control scenario.

[0050] The following describes in detail various non- limiting specific implementations of the method for con- trolling an internet of things device provided in embodi- ments of this application.

[0051] FIG. 2 is a schematic flowchart of a method for controlling an internet of things device according to an embodiment of this application. The method for control- ling an internet of things device can be applied to a control device in the internet of things. The control device is connected to the internet of things device, and is config- ured to control an internet of things device. The method includes the following steps.

[0052] S201:Receive a first data identifier and first detection data corresponding to the first data identifier that are sent by a first internet of things device, where the first data identifier indicates that the first internet of things device supports a first function. The first internet of things device is an internet of things device that has the first function in the internet of things and that sends the first data identifier and the first detection data to the control device. The first function is a function of the first internet of things device, and corresponds to a trigger condition of a target object model rule. In an example, the first function is an attribute (attribute) of the first internet of things device, for example, an event (event) that can be pro- cessed by the first internet of things device, or a method that can be provided by the first internet of things device. The attribute may also be referred to as a function point. The event may also be referred to as an alarm. Themethod may also be referred to a service, a command, or an interface.

[0053] It should be noted that there may be one or more first internet of things devices. In an example, there are a plurality of first internet of things devices. The smart life application scenario shown in FIG. 1 is used as an ex- 5 10 15 20 25 30 35 40 45 50 55 7 11 EP 4 683 304 A1 12 ample. Both the light intensity detector 102 and the mo- tion sensor 103 are first internet of things devices. In another example, there is one first internet of things device. The smart tunnel application scenario shown in FIG. 1 is used as an example. The carbon monoxide concentration detector is a first internet of things device. The carbon monoxide concentration detection function of the carbon monoxide concentration detector is the first function.

[0054] In addition, different first internet of things de- vices may have a same first function, or may have dif- ferent first functions. In addition, a same first internet of thingsdevice can have one or more first functions.

[0055] For example, in an example, the trigger condi- tion of the target object model rule is that environment data is lower than a threshold, and an execution action is to enable an environment purification device. The first internet of things device may be an environment detec- tion device. The environment detection device has an environment detection function, that is, a first function. A plurality of environment detection devices that are dis- posed within a specific range separately send, to the control device for processing, environment data detected based on environment detection functions of the plurality of environment detection devices. In another example, the smart life application scenario shown in FIG. 1 is used as an example. The light intensity detection function of the light intensity detector 102 and the motion detection function of the motion sensor 103 are different first func- tions. The foregoing two examples areexamples in which one first internet of things device has one first function. In still another example, a trigger condition of a target object model rule is that light intensity is less than 5 lux, and a motion of an object is detected. An execution action of the target object model rule is to control a light to turn on. The first internet of things device is a multi-functional sensor that has a light intensity detection function and a motion detection function. The multi-functional sensor supports two first functions: the light intensity detection function and the motion detection function.

[0056] A manner of receiving the first data identifier and the first detection data that are sent by the first internet of things device is not limited in embodiments of this appli- cation. In a possible implementation, the first internet of things device separately sends the first data identifier and the first detection data. The control device separately receives the first data identifier and thefirst detection data that are sent by the first internet of things device. In another possible implementation, the first internet of things device sends the first data identifier and the first detection data simultaneously. In an example, the first internet of things device sends running information to the control device. The running information includes the first data identifier of the first internet of things device and the first detection data corresponding to the first data identi- fier. The control device obtains the first data identifier and the first detection data from the obtained running infor- mation. The first data identifier indicates that the first internet of things device supports the first function. The first detection data is obtained by the first internet of things device through collection based on the first func- tion. A specific type of the first data identifier is not limited in embodiments of this application.

[0057] In a possible implementation, the first dataiden- tifier is a first device identifier of the first internet of things device. The first device identifier of the first internet of things device identifies the first internet of things device. The first device identifier of the first internet of things device may reflect that the first internet of things device supports the first function. For example, the first device identifier may be device code of the first internet of things device, or product code of the first internet of things device. The device code or the product code of the first internet of things device may reflect a function supported by the first internet of things device.

[0058] A correspondence between the first device identifier and the first function supported by the first internet of things device needs to be established in advance. In this way, the first device identifier may in- dicate that the first internet of things device supports the first function. In a possible implementation, after the first internetof things device establishes the connection to the control device, the first internet of things device sends the first device identifier and a first function identifier to the control device. The control device obtains the first device identifier and the first function identifier that are of the first internet of things device. The first function identifier identifies the first function. In an example, the first func- tion identifier is a function name of the first function. The control device establishes the correspondence between the first device identifier and the first function. In this way, after subsequently receiving the first device identifier, that is, the first data identifier, the control device may implement matching on the target object model rule based on the first function corresponding to the first device identifier, or may determine whether the first de- tection data meets the trigger condition of the target object model rule.

[0059] In another possible implementation,the first data identifier is a function name of the first function. The function name of the first function may directly in- dicate that the first internet of things device supports the first function. In an example, the function name of the first function may be a field name corresponding to the first detection data. In this way, the first detection data trans- mitted by the first internet of things device can be quickly and effectively processed, and the first internet of things device does not need to be configured in advance, so that plug-and-play of the first internet of things device can be implemented, and a use speed of the first internet of things device can be improved.

[0060] The first detection data is data obtained by the first internet of things device based on the first function. A specific type of the first detection data is not limited in embodiments of this application, and the specific type of the first detection data is determined based on the first 5 10 15 20 25 3035 40 45 50 55 8 13 EP 4 683 304 A1 14 function. The first detection data may be a specific value or a state value obtained through detection.

[0061] S202: Send a control instruction to a second internet of things device in response to that it is deter- mined that the first detection data meets the trigger condition of the target object model rule.

[0062] The control device may determine whether the first detection data meets the trigger condition of the target object model rule. The target object model rule is an object model rule whose predetermined trigger condition corresponds to the first function. An implemen- tation of determining the target object model rule is not limited in embodiments of this application. In a possible implementation, each time after obtaining the first data identifier, the control device queries, based on the first function indicated by the first data identifier, the target object model rule whose trigger condition corresponds to the first function. Inanother possible implementation, the control device determines the to-be-used target object model rule based on the first data identifier transmitted by the first internet of things device for a first time. After subsequently receiving the first detection data that cor- responds to the first data identifier and that is transmitted by the first internet of things device, the control device directly determines whether the first detection data meets the trigger condition of the target object model rule.

[0063] A source of the target object model rule is not limited in embodiments of this application. In a possible implementation, the control device queries, from locally stored object model rules, the target object model rule whose trigger condition corresponds to the first function. In another possible implementation, the control device may send a query request to a device storing an object model rule. The device storing the object model rule is, for example, a server connected to thecontrol device. The query request includes function information of the first function. The function information of the first function is, for example, a function name of the first function or a function identifier of the first function. The device storing the object model rule queries, based on the function information that is of the first function and that is included in the query request, the target object model rule corre- sponding to the first function. The device storing the object model rule feeds back the target object model rule to the control device. The control device may locally store the target object model rule received from the device storing the object model rule.

[0064] In a possible implementation, the target object model rule has an active state that can be adjusted. When the target object model rule needs to be applied, a user adjusts the target object model rule to an active state. When the target object model rule does not need to be applied, the user may adjustthe target object model rule to an inactive state. In this way, flexible control of applica- tion of the object model rule is implemented.

[0065] The control device determines whether the first detection data meets the trigger condition of the target object model rule. It should be noted that, in some pos- sible implementations, the control device may obtain first detection data respectively corresponding to different first functions. Correspondingly, the trigger condition of the target object model rule includes sub-conditions re- spectively corresponding to different first functions. When the first detection data meets a sub-condition corresponding to a corresponding first function, and sub-conditions of different first functions can be met, it is determined that the first detection data meets the trigger condition of the target object model rule. In an example, the smart life application scenario shown in FIG. 1 is used as an example. The control device obtains light intensitydetection data that corresponds to sun.brightness and that is sent by the light intensity detector 102. The control device obtains motion detec- tion data that corresponds to motion.detection and that is sent by the motion sensor 103. The trigger condition of the target object model rule is that light intensity is less than 5 lux and a motion of an object is detected. That the light intensity is less than 5 lux is a sub-condition corre- sponding to the light intensity detection function. That a motion of an object is detected is a sub-condition corre- sponding to the motion detection function. When deter- mining that the light intensity detection data collected by using the light intensity detection function meets the sub- condition that the light intensity is less than 5 lux, and the motion detection data collected by using the motion detection function meets the sub-condition that a motion of an object is detected, the control device determines that the obtained first detection datameets the trigger condition of the target object model rule.

[0066] If the control device determines that the first detection data meets the trigger condition of the target object model rule, the control device controls the second internet of things device to perform the execution action of the target object model rule. The second internet of things device is an internet of things device that supports a second function. The execution action of the target object model rule corresponds to the second function. The execution action of the target object model rule may be executed by an internet of things device having the second function. It should be noted that the second internet of things device may be an internet of things device that is the same as the first internet of things device, or an internet of things device that is different from the first internet of things device. In addition, there may be one or more second internet of things devices. In an example, the smart campusapplication scenario shown in FIG. 1 is used as an example. The second internet of things device is the elevator 103 and the fire door 104. Different second internet of things devices may have a same second function, or may have different second functions. In addition, a same second internet of things device can have one or more second functions.

[0067] In addition, a specific implementation of deter- mining the internet of things device supporting the sec- ond function, that is, the second internet of things device, is not limited in embodiments of this application. In an 5 10 15 20 25 30 35 40 45 50 55 9 15 EP 4 683 304 A1 16 example, the control device determines, based on an obtained second data identifier sent by the second inter- net of things device, that the second internet of things device supports the second function. The second data identifier indicates that the second internet of things device supports the second function.

[0068] A specific type of the second dataidentifier is not limited in embodiments of this application.

[0069] In a possible implementation, the second data identifier is a second device identifier of the second internet of things device. The second device identifier identifies the second internet of things device. The sec- ond device identifier may be an identifier that reflects the second function supported by the second internet of things device. For example, the device identifier of the second internet of things device may be device code of the second internet of things device or product code of the second internet of things device. The device code or the product code of the second internet of things device may reflect a function supported by the second internet of things device.

[0070] A correspondence between the second device identifier of the second internet of things device and the second function supported by the second internet of things device needs to established in advance. In a possible implementation, after thesecond internet of things device establishes the connection to the control device, the second internet of things device sends the second device identifier and a second function identifier to the control device. The second function identifier identifies the second function. In an example, the second function identifier is a function name of the second func- tion. The control device establishes the correspondence between the second device identifier and the second function. In this way, when the control device subse- quently needs to control, according to the target object model rule, the internet of things device having the sec- ond function, the control device can determine, based on the correspondence between the second device identi- fier and the second function, that the second internet of things device has the second function, to control the second internet of things device.

[0071] In another possible implementation, the second data identifier is a function name of the secondfunction. The function name of the second function may directly indicate that the second internet of things device sup- ports the second function. In an example, the function name of the second function may be a field name corre- sponding to second detection data sent by the second internet of things device to the control device. After receiving the second detection data sent by the second internet of things device, the control device controls the second internet of things device based on the function name of the second function, so that plug-and-play of the second internet of things device can be implemented, and a use speed of the second internet of things device can be improved.

[0072] A manner of determining the second internet of things device to which the control instruction is to be sent is not limited in embodiments of this application. In a possible implementation, if it is determined that the trig- ger condition of the target object model rule is met, the control devicequeries connected internet of things de- vices for the internet of things device that supports the second function, that is, the second internet of things device. In another possible implementation, if it is deter- mined that the trigger condition of the target object model rule is met, the control device determines, based on historical data of controlling the internet of things device according to the target object model rule, the second internet of things device to which the control instruction needs to be sent.

[0073] The control device generates the control in- struction based on the execution action of the target object model rule, and sends the control instruction to the second internet of things device. The second internet of things device may perform the execution action of the target object model rule based on the obtained control instruction.

[0074] It can be learned from related content in S201 and S202 that the internet of things device can be con- trolled from a functiondimension by using the target object model rules that respectively correspond to the first function and the second function. The target object model rule is not specific to a specific device or product type, and can be applied to a wide range of devices or products, so that scalability of the internet of things can be improved. In addition, in a scenario with a large quantity of internet of things devices, automatic control on the internet of things devices is implemented according to an object model rule, so that operation efficiency can be improved, an operation of manually configuring a rule for each internet of things device can be reduced, and a problem occurrence probability can be reduced.

[0075] In a possible implementation, when the internet of things device is controlled according to the target object model rule, a range in which the internet of things device is located further needs to be considered. The range may be a location or an organization to which the internet ofthings device belongs. This is not limited in this application. For example, in the smart home application scenario, internet of things devices belonging to a same family needs to be controlled. For another example, in the smart campus application scenario, internet of things devices belonging to a same campus needs to be con- trolled, or internet of things devices in a same building in the campus needs to be controlled. An embodiment of this application further provides a method for controlling an internet of things device. The target object model rule further includes a range condition. The range condition is used to determine a condition in terms of a range that the first internet of things device and the second internet of things device need to meet. The range condition may reflect an applicable scope of the target object model rule. A type of the range condition is not limited in embodi- ments of this application. For example, the range condi- 5 10 15 20 25 30 35 40 45 50 55 10 17EP 4 683 304 A1 18 tion is a tag. For another example, the range condition is a range parameter.

[0076] Before the control instruction is sent to the second internet of things device in response to that it is determined that the first detection data meets the trigger condition of the target object model rule in S202, the method further includes the following steps.

[0077] A1: Obtain range information of the first internet of things device.

[0078] The range information of the first internet of things device indicates a range to which the first internet of things device belongs. In an example, the range con- dition is specifically a location condition. The range of the first internet of things device may be a geographical location at which an entity of the first internet of things device is located. For example, the range information is a location tag. The location tag may be preset based on the geographical location of the first internet of things device. For example, a same locationtag is set for internet of things devices belonging to a same building. For another example, the range information is positioning data of the geographical location of the first internet of things device. The range information may be generated by using a positioning function of the first internet of things device. In another example, the location of the first internet of things device may be a network location of the first internet of things device. The range information may be a network address of the first internet of things device.

[0079] A manner in which the control device obtains the range information of the first internet of things device is not limited in embodiments of this application. In a pos- sible implementation, after establishing the connection to the control device, the first internet of things device sends the range information of the first internet of things device to the control device. In another possible implementation, the first internet of things devicesimultaneously sends the range information and one or more of the first data identifier and the first detection data to the control device. The control device determines, based on the range in- formation of the first internet of things device, whether the location of the first internet of things device meets the range condition of the target object model rule.

[0080] A2: Determine that the range information of the first internet of things device meets the range condition.

[0081] The control device determines whether the range information of the first internet of things device meets the range condition. The control device sends the control instruction to the second internet of things device after determining that the range information of the first internet of things device meets the range condition. A specific implementation in which the control device de- termines whether the range information of the first inter- net of things device meets the range condition is not limited inembodiments of this application. Whether the range information meets the range condition can be determined based on a specific type of the range infor- mation. In an example, both the range information and the range condition are represented by using tags. The control device determines whether the range information is the same as the range condition. If the range informa- tion is the same as the range condition, it indicates that the range information meets the range condition. In still another example, the range information is the network address of the first internet of things device. The range condition is network number of a network. The control device determines whether the range information be- longs to the range condition. If the range information belongs to the range condition, it indicates that the range information meets the range condition.

[0082] In this case, the execution action of the target object model rule needs to be performed by the second internet of things devicethat meets the range condition. A specific implementation of sending the control instruction to the second internet of things device provided in em- bodiments of this application includes: sending the control instruction to a second internet of things device whose range information meets the range condition.

[0083] The range information of the second internet of things device indicates a range of the second internet of things device. A representation manner of the range of the second internet of things device is the same as a representation manner of the range of the first internet of things device.

[0084] A manner in which the control device obtains the range information of the second internet of things device is not limited in embodiments of this application. In a possible implementation, after establishing the connec- tion to the control device, the second internet of things device sends the range information to the control device. In another possible implementation, when sendingother data, for example, the second data identifier, to the con- trol device, the second internet of things device further sends the range information of the second internet of things device. The control device may determine, based on the obtained range information of the second internet of things device, whether the range of the second internet of things device meets the range condition of the target object model rule.

[0085] The control device sends the control instruction to the second internet of things device whose range information meets the range condition, to control the second internet of things device whose range information meets the range condition.

[0086] In this way, based on the range condition in- cluded in the target object model rule, an internet of things device that meets the range condition can be controlled. This implements precise control on the internet of things device. In addition, the range condition can be adjusted to quickly promote use of the object modelrule in different scenarios.

[0087] Based on the method for controlling an internet of things device provided in embodiments of this applica- tion, FIG. 3 is a diagram of a structure of an apparatus 300 for controlling an internet of things device according to an embodiment of this application. The apparatus 300 for 5 10 15 20 25 30 35 40 45 50 55 11 19 EP 4 683 304 A1 20 controlling an internet of things device may implement the method for controlling an internet of things device shown in FIG. 2. This figure is a diagram of a structure of an apparatus for controlling an internet of things device according to an embodiment of this application. The apparatus 300 for controlling an internet of things device includes a receiving unit 301 and a sending unit 302. For specific functions of modules in the apparatus 300 for controlling an internet of things device, refer to related descriptions in the embodiment shown in FIG. 2. The receiving unit 301 is configured to implement S201 in theembodiment shown in FIG. 2. The sending unit 302 is configured to implement S202 in the embodiment shown in FIG. 2.

[0088] Specifically, the receiving unit 301 is configured to receive running information sent by a first internet of things device, where the running information includes a first data identifier and first detection data corresponding to the first data identifier, and the first data identifier indicates that the first internet of things device supports a first function.

[0089] The sending unit 302 is configured to send a control instruction to a second internet of things device in response to that it is determined that the first detection data meets a trigger condition of a target object model rule, where the second internet of things device supports a second function, the control instruction instructs the second internet of things device to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to thefirst function, and the execution action corresponds to the second function.

[0090] In a possible implementation, the first data iden- tifier is a first device identifier of the first internet of things device, and the receiving unit 301 is further configured to receive the first device identifier and a first function identifier that are sent by the first internet of things device, where the first function identifier identifies the first func- tion.

[0091] The apparatus further includes: an establishment unit, configured to establish a corre- spondence between the first device identifier and the first function.

[0092] In a possible implementation, the first data iden- tifier is a function name of the first function.

[0093] In a possible implementation, the receiving unit 301 is further configured to obtain a second data identifier sent by the second internet of things device, where the second data identifier indicates that the second internet of things device supports the secondfunction.

[0094] The apparatus further includes: a determining unit, configured to determine, based on the second data identifier, that the second internet of things device supports the second function.

[0095] In a possible implementation, the second data identifier is a second device identifier of the second internet of things device, and the receiving unit 301 is further configured to receive a second function identifier sent by the second internet of things device, where the second function identifier identifies the second function.

[0096] The establishment unit is further configured to establish a correspondence between the second device identifier and the second function.

[0097] In a possible implementation, the second data identifier is a function name of the second function.

[0098] In a possible implementation, the target object model rule further includes a location condition, and before the control instruction is sent to the second inter- net of things device corresponding tothe second data identifier, the receiving unit 301 is further configured to obtain location information of the first internet of things device.

[0099] The apparatus further includes: a determining unit, configured to determine that the loca- tion information of the first internet of things device meets the location condition.

[0100] That the sending unit 302 is configured to send the control instruction to the second internet of things device includes: the sending unit 302 is configured to send the control instruction to a second internet of things device whose location information meets the location condition.

[0101] FIG. 4 is a diagram of a structure of a computing device. The foregoing apparatus 300 for controlling an internet of things device may be deployed on the com- puting device. The computing device may be a comput- ing device (for example, a server) in a cloud environment, a computing device in an edge environment, a terminal device, or the like that may be specificallyconfigured to implement functions of the receiving module 301 and the sending module 302 in the embodiment shown in FIG. 3.

[0102] As shown in FIG. 4, the computing device 400 includes a processor 410, a memory 420, a communica- tion interface 430, and a bus 440. The processor 410, the memory 420, and the communication interface 430 com- municate with each other through the bus 440. The bus 440 may be a peripheral component interconnect (per- ipheral component interconnect, PCI) bus, an extended industry standard architecture (extended industry stan- dard architecture, EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, or the like. For ease of representation, only one thick line is used to represent the bus in FIG. 4, but this does not mean that there is only one bus or only one type of bus. The communication interface 430 is configured to com- municate with the outside, for example, receive running information sent by the first internetof things device.

[0103] The processor 410 may be a central processing unit (central processing unit, CPU), an application-spe- cific integrated circuit (application-specific integrated cir- cuit, ASIC), a graphics processing unit (graphics proces- sing unit, GPU), or one or more integrated circuits. The processor 410 may be an integrated circuit chip and has a signal processing capability. In an implementation pro- cess, functions of modules in the apparatus for control- ling an internet of things device may be completed by 5 10 15 20 25 30 35 40 45 50 55 12 21 EP 4 683 304 A1 22 using an integrated logic circuit of hardware in the pro- cessor 410 or by using instructions in a form of software. The processor 410 may alternatively be a general-pur- pose processor, a data signal processor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA) or another program- mable logic device, a discrete gate or transistor logic device, or a discretehardware component, the processor may implement or perform the methods, steps, and lo- gical block diagrams disclosed in embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conven- tional processor, or the like. The method disclosed with reference to embodiments of this application may be directly performed and completed by a hardware decod- ing processor, or may be performed and completed by using a combination of hardware in the decoding proces- sor and a software module. The software module may be located in a mature storage medium in the art, for ex- ample, a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 420. The processor 410 reads information in the memory 420, and completes some or all functions of the appara- tus for controlling an internet of things device incombina- tion with hardware of the processor 410.

[0104] The memory 420 may include a volatile memory (volatile memory), for example, a random access mem- ory (random access memory, RAM). The memory 420 may further include a non-volatile memory (non-volatile memory), for example, a read-only memory (read-only memory, ROM), a flash memory, an HDD, or an SSD.

[0105] The memory 420 stores executable code, and the processor 410 executes the executable code to per- form the method performed by the apparatus for control- ling an internet of things device.

[0106] Specifically, when the embodiment shown in FIG. 3 is implemented, and the receiving module 301 and the sending module 302 described in the embodi- ment shown in FIG. 3 are implemented by using software, software or program code required for performing func- tions of the receiving module 301 and the sending module 302 in FIG. 3 is stored in the memory 420. Interaction between the receiving module 301 and another device is implementedthrough the communication interface 430. The processor is configured to execute instructions in the memory 420, to implement the method performed by the apparatus for controlling an internet of things device.

[0107] FIG. 5 is a diagram of a structure of a computing device cluster. The computing device cluster 50 shown in FIG. 5 includes a plurality of computing devices, and the foregoing apparatus for controlling an internet of things device may be deployed on the plurality of computing devices in the computing device cluster 50 in a distributed manner. As shown in FIG. 5, the computing device cluster 50 includes the plurality of computing devices 500. Each computing device 500 includes a memory 520, a proces- sor 510, a communication interface 530, and a bus 540. The memory 520, the processor 510, and the commu- nication interface 530 implement mutual communication connections through the bus 540.

[0108] The processor 510 may use a CPU, a GPU, an ASIC, or one or more integratedcircuits. The processor 510 may be an integrated circuit chip and has a signal processing capability. In an implementation process, some functions of the apparatus for controlling an inter- net of things device may be completed by using an integrated logic circuit of hardware in the processor 510 or by using instructions in a form of software. The processor 510 may alternatively be a DSP, an FPGA, a general-purpose processor, another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or perform a part of methods, steps, and logical block dia- grams disclosed in embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. Steps of the method disclosed with reference to embodiments of this application may be directly per- formed and completed by a hardware decoding proces- sor, or may be performed and completed by using acombination of hardware in the decoding processor and a software module. The software module may be located in a mature storage medium in the art, for ex- ample, a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 520. In each computing device 500, the processor 510 reads information in the memory 520, and may complete some functions of the apparatus for controlling an inter- net of things device in combination with hardware of the processor 510.

[0109] The memory 520 may include a ROM, a RAM, a static storage device, a dynamic storage device, a hard disk (for example, an SSD or an HDD), and the like. The memory 520 may store program code, for example, some or all program code used to implement the receiving module 301, or some or all program code used to imple- ment the sending module 302. For each computing de- vice 500, when the programcode stored in the memory 520 is executed by the processor 510, the processor 510 performs, based on the communication interface 530, some methods performed by the apparatus for control- ling an internet of things device. For example, some computing devices 500 may be configured to perform the methods performed by the receiving module 301, and the other computing devices 500 are configured to per- form the methods performed by the sending module 302. The memory 520 may further store data, for example, intermediate data or result data generated by the pro- cessor 510 in an execution process.

[0110] The communication interface 503 in each com- puting device 500 is configured to communicate with the outside, for example, interact with another computing 5 10 15 20 25 30 35 40 45 50 55 13 23 EP 4 683 304 A1 24 device 500.

[0111] The bus 540 may be a peripheral component interconnect bus, an extended industry standard archi- tecture bus, or the like. For ease of representation, the bus 540in each computing device 500 in FIG. 5 is represented by using only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0112] A communication path is established between the plurality of computing devices 500 through a com- munications network, to implement a function of the apparatus for controlling an internet of things device. Any one of the computing devices may be a computing device (for example, a server) in a cloud environment, a computing device in an edge environment, or a terminal device.

[0113] In addition, an embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores instruc- tions. When the instructions are run on one or more computing devices, so that the one or more computing devices perform any one of the methods for controlling an internet of things device in the foregoing embodiments.

[0114] In addition, an embodiment of this application further provides acomputer program product. When the computer program product is executed by one or more computing devices, the one or more computing devices perform any one of the foregoing methods for controlling an internet of things device. The computer program product may be a software installation package. When any one of the foregoing methods for controlling an internet of things device needs to be used, the computer program product may be downloaded and executed on a computer.

[0115] In addition, it should be noted that the described apparatus embodiment is merely an example. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of embodi- ments. In addition, in the accompanying drawings of the apparatusembodiments provided in this application, connection relationships between units indicate that the units have communication connections with each other, which may be specifically implemented as one or more communication buses or signal cables.

[0116] Based on the description of the foregoing im- plementations, a person skilled in the art may clearly understand that this application may be implemented by software in addition to necessary universal hardware, or by dedicated hardware, including a dedicated inte- grated circuit, a dedicated CPU, a dedicated memory, a dedicated component, and the like. Generally, any func- tions that can be performed by a computer program can be easily implemented by using corresponding hard- ware. Moreover, a specific hardware structure used to achieve a same function may be in various forms, for example, in a form of an analog circuit, a digital circuit, or a dedicated circuit. However, as for this application, soft- ware program implementation is abetter implementation in most cases. Based on such an understanding, the technical solutions of this application essentially or the part contributing to the conventional technology may be implemented in a form of a software product. The com- puter software product is stored in a readable storage medium, for example, a floppy disk, a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disc of a computer, and includes several in- structions for instructing a computer device (which may be a personal computer, a training device, a network device, or the like) to perform the methods in embodi- ments of this application.

[0117] All or some of the foregoing embodiments may be implemented through software, hardware, firmware, or any combination thereof. When software is used to implement the foregoing embodiments, all or some of the foregoing embodiments may be implemented in a form of a computer program product.

[0118] The computer program product includes oneor more computer instructions. When the computer pro- gram instructions are loaded and executed on the com- puter, the procedure or functions according to embodi- ments of this application are all or partially generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other pro- grammable apparatuses. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be trans- mitted from a website, a computer, a training device, or a data center to another website, computer, training de- vice, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium that can be stored by a computer, or a data storagedevice, such as a training device or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid-state disk (Solid State Disk, SSD)), or the like.

[0119] A personskilled in theart should be aware that in the foregoing one or more examples, functions described in this application may be implemented by hardware, software, firmware, or any combination thereof. When the functions are implemented by software, the foregoing functions may be stored in a computer-readable medium or transmitted as one or more instructions or code in a computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium. The communication medium 5 10 15 20 25 30 35 40 45 50 55 14 25 EP 4 683 304 A1 26 includes any medium that enables a computer program to be transmitted from one placeto another place. The storage medium may be any available medium accessi- ble to a general-purpose or a dedicated computer.

[0120] The objectives, technical solutions, and bene- ficial effects of this application are further described in detail in the foregoing specific implementations. It should be understood that the foregoing descriptions are merely specific implementations of this application.

[0121] In conclusion, the foregoing embodiments are merely intended for describing the technical solutions of this application, but not for limiting this application. Although this application is described in detail with re- ference to the foregoing embodiments, a person of or- dinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent repla- cements to some technical features thereof, without de- parting from the scope of the technical solutions of em- bodiments of this application.Claims 1. A method for controlling an internet of things device, wherein the method is applied to a control device, and the method comprises: receiving a first data identifier and first detection data corresponding to the first data identifier that are sent by a first internet of things device, wherein the first data identifier indicates that the first internet of things device supports a first function; and sending a control instruction to a second internet of things device in response to that it is deter- mined that the first detection data meets a trig- ger condition of a target object model rule, wherein the second internet of things device supports a second function, the control instruc- tion instructs the second internet of things de- vice to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function. 2. The method according toclaim 1, wherein the first data identifier is a first device identifier of the first internet of things device, and the method further comprises: receiving the first device identifier and a first function identifier that are sent by the first inter- net of things device, wherein the first function identifier identifies the first function; and establishing a correspondence between the first device identifier and the first function. 3. The method according to claim 1, wherein the first data identifier is a function name of the first function. 4. The method according to any one of claims 1 to 3, wherein the method further comprises: obtaining a second data identifier sent by the second internet of things device, wherein the second data identifier indicates that the second internet of things device supports the second function; and determining, based on the second data identi- fier, that the second internet of things device supports the second function. 5. The method according to claim 4,wherein the sec- ond data identifier is a second device identifier of the second internet of things device, and the method further comprises: receiving a second function identifier sent by the second internet of things device, wherein the second function identifier identifies the second function; and establishing a correspondence between the second device identifier and the second func- tion. 6. The method according to claim 4, wherein the sec- ond data identifier is a function name of the second function. 7. The method according to any one of claims 1 to 6, wherein the target object model rule further com- prises a range condition, and before the sending the control instruction to the second internet of things device corresponding to the second data identifier, the method further comprises: obtaining range information of the first internet of things device; and determining that the range information of the first internet of things device meets the range con- dition; and the sendingthe control instruction to the second internet of things device comprises: sending the control instruction to a second inter- net of things device whose range information meets the range condition. 8. An apparatus for controlling an internet of things device, wherein the apparatus comprises: a receiving unit, configured to receive running information sent by a first internet of things de- vice, wherein the running information comprises a first data identifier and first detection data corresponding to the first data identifier, and 5 10 15 20 25 30 35 40 45 50 55 15 27 EP 4 683 304 A1 28 the first data identifier indicates that the first internet of things device supports a first function; and a sending unit, configured to send a control instruction to a second internet of things device in response to that it is determined that the first detection data meets a trigger condition of a target object model rule, wherein the second internet of things device supports a second function, thecontrol instruction instructs the second internet of things device to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function. 9. The apparatus according to claim 8, wherein the first data identifier is a first device identifier of the first internet of things device, and the receiving unit is further configured to receive the first device identifier and a first function identifier that are sent by the first internet of things device, wherein the first function identifier identifies the first function; and the apparatus further comprises: an establishment unit, configured to establish a cor- respondence between the first device identifier and the first function. 10. The apparatus according to claim 8, wherein the first data identifier is a function name of the first function. 11. The apparatus according to any one of claims 8 to 10,wherein the receiving unit is further configured to obtain a second data identifier sent by the second internet of things device, wherein the second data identifier indicates that the second internet of things device supports the second function; and the apparatus further comprises: a determining unit, configured to determine, based on the second data identifier, that the second internet of things device supports the second function. 12. The apparatus according to claim 11, wherein the second data identifier is a second device identifier of the second internet of things device; and the receiv- ing unit is further configured to receive a second function identifier sent by the second internet of things device, wherein the second function identifier identifies the second function; and the establishment unit is further configured to estab- lish a correspondence between the second device identifier and the second function. 13. The apparatus according to claim 11, wherein the second dataidentifier is a function name of the second function. 14. The apparatus according to any one of claims 8 to 13, wherein the target object model rule further com- prises a location condition, and before the control instruction is sent to the second internet of things device corresponding to the second data identifier, the receiving unit is further configured to obtain location information of the first internet of things device; and the apparatus further comprises: a determining unit, configured to determine that the location information of the first internet of things device meets the location condition; and that the sending unit is configured to send the control instruction to the second internet of things device comprises: the sending unit is configured to send the control instruction to a second internet of things device whose location information meets the location condition. 15. A device, wherein the device comprises a processor and a memory, wherein the processor is configured toexecute instructions stored in the memory, to enable the device to perform the method according to any one of claims 1 to 7. 16. A computing device cluster, comprising at least one computing device, wherein each computing device comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, to enable the computing de- vice cluster to perform the method according to any one of claims 1 to 7. 17. A computer-readable storage medium, wherein the computer-readable storage medium stores instruc- tions, and when the instructions are run on at least one computing device, the at least one computing device is enabled to perform the method according to any one of claims 1 to 7. 5 10 15 20 25 30 35 40 45 50 55 16 EP 4 683 304 A1 17 EP 4 683 304 A1 18 EP 4 683 304 A1 19 EP 4 683 304 A1 5 10 15 20 25 30 35 40 45 50 55 20 EP 4 683 304 A1 5 10 15 20 25 30 35 40 45 50 55 21 EP 4 683 304 A1 5 10 15 20 25 30 35 40 45 50 55 22 EP 4 683 304 A1REFERENCES CITED IN THE DESCRIPTION This list of references cited by the applicant is for the reader’s convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard. Patent documents cited in the description • CN 202310340354X

[0001]

Claims

1. A method for controlling an internet of things device, wherein the method is applied to a control device, and the method comprises: receiving a first data identifier and first detection data corresponding to the first data identifier that are sent by a first internet of things device, wherein the first data identifier indicates that the first internet of things device supports a first function; and sending a control instruction to a second internet of things device in response to that it is determined that the first detection data meets a trigger condition of a target object model rule, wherein the second internet of things device supports a second function, the control instruction instructs the second internet of things device to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function.

2. The method according to claim 1, wherein the first data identifier is a first device identifier of the first internet of things device, and the method further comprises: receiving the first device identifier and a first function identifier that are sent by the first internet of things device, wherein the first function identifier identifies the first function; and establishing a correspondence between the first device identifier and the first function.

3. The method according to claim 1, wherein the first data identifier is a function name of the first function.

4. The method according to any one of claims 1 to 3, wherein the method further comprises: obtaining a second data identifier sent by the second internet of things device, wherein the second data identifier indicates that the second internet of things device supports the second function; and determining, based on the second data identifier, that the second internet of things device supports the second function.

5. The method according to claim 4, wherein the second data identifier is a second device identifier of the second internet of things device, and the method further comprises: receiving a second function identifier sent by the second internet of things device, wherein the second function identifier identifies the second function; and establishing a correspondence between the second device identifier and the second function.

6. The method according to claim 4, wherein the second data identifier is a function name of the second function.

7. The method according to any one of claims 1 to 6, wherein the target object model rule further comprises a range condition, and before the sending the control instruction to the second internet of things device corresponding to the second data identifier, the method further comprises: obtaining range information of the first internet of things device; and determining that the range information of the first internet of things device meets the range condition; and the sending the control instruction to the second internet of things device comprises: sending the control instruction to a second internet of things device whose range information meets the range condition.

8. An apparatus for controlling an internet of things device, wherein the apparatus comprises: a receiving unit, configured to receive running information sent by a first internet of things device, wherein the running information comprises a first data identifier and first detection data corresponding to the first data identifier, and the first data identifier indicates that the first internet of things device supports a first function; and a sending unit, configured to send a control instruction to a second internet of things device in response to that it is determined that the first detection data meets a trigger condition of a target object model rule, wherein the second internet of things device supports a second function, the control instruction instructs the second internet of things device to perform an execution action of the target object model rule, the trigger condition of the target object model rule corresponds to the first function, and the execution action corresponds to the second function.

9. The apparatus according to claim 8, wherein the first data identifier is a first device identifier of the first internet of things device, and the receiving unit is further configured to receive the first device identifier and a first function identifier that are sent by the first internet of things device, wherein the first function identifier identifies the first function; and the apparatus further comprises: an establishment unit, configured to establish a correspondence between the first device identifier and the first function.

10. The apparatus according to claim 8, wherein the first data identifier is a function name of the first function.

11. The apparatus according to any one of claims 8 to 10, wherein the receiving unit is further configured to obtain a second data identifier sent by the second internet of things device, wherein the second data identifier indicates that the second internet of things device supports the second function; and the apparatus further comprises: a determining unit, configured to determine, based on the second data identifier, that the second internet of things device supports the second function.

12. The apparatus according to claim 11, wherein the second data identifier is a second device identifier of the second internet of things device; and the receiving unit is further configured to receive a second function identifier sent by the second internet of things device, wherein the second function identifier identifies the second function; and the establishment unit is further configured to establish a correspondence between the second device identifier and the second function.

13. The apparatus according to claim 11, wherein the second data identifier is a function name of the second function.

14. The apparatus according to any one of claims 8 to 13, wherein the target object model rule further comprises a location condition, and before the control instruction is sent to the second internet of things device corresponding to the second data identifier, the receiving unit is further configured to obtain location information of the first internet of things device; and the apparatus further comprises: a determining unit, configured to determine that the location information of the first internet of things device meets the location condition; and that the sending unit is configured to send the control instruction to the second internet of things device comprises: the sending unit is configured to send the control instruction to a second internet of things device whose location information meets the location condition.

15. A device, wherein the device comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, to enable the device to perform the method according to any one of claims 1 to 7.

16. A computing device cluster, comprising at least one computing device, wherein each computing device comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, to enable the computing device cluster to perform the method according to any one of claims 1 to 7.

17. A computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are run on at least one computing device, the at least one computing device is enabled to perform the method according to any one of claims 1 to 7.