Internet of Things equipment control method, Internet of Things equipment and product
Patent Information
- Application Number
- CN202380008534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-12-06
AI Technical Summary
The lack of a unified application layer interconnection protocol between IoT devices requires customized development and adaptation for interoperability between devices, which increases the difficulty of interaction between different categories, brands and models, and makes it difficult to achieve non-strictly standardized interface docking, thereby realizing inter-device interconnection. control and operation.
By sending capability query information to the controlled device, parsing the returned capability description information, obtaining control keywords, and generating control information based on the semantic matching model, natural language information interaction and control between devices is realized, and the intensity of interface constraints is reduced.
It improves the mutual understanding and control accuracy between IoT devices, reduces the difficulty of interaction under different ecology, and realizes mutual understanding, control and operation between devices under non-strict normative constraints.
Smart Images

Figure CN119096293A_ABST
Abstract
Description
Internet of Things device control method, Internet of Things device and product Technical Field
[0001] The embodiments of the present disclosure relate to the field of Internet of Things technology, and more specifically, to an Internet of Things device control method, Internet of Things device, and product. Background Art
[0002] With the development of the Internet of Things industry, the total number of IoT devices and the number of connections are increasing year by year. At the same time, the basic system software is scenario-oriented and natively supports distributed functional features, making the interconnection and collaboration between devices more convenient and capable of facing more complex scenarios.
[0003] However, due to the lack of a unified application-layer interconnection protocol for IoT devices, interoperability between devices requires customized development and adaptation. This makes interaction between devices of different categories, brands, and even models more difficult, resulting in independent interaction ecosystems. Therefore, how to achieve control and operation between IoT devices without strictly standardized interface docking has become a pressing issue for those skilled in the art.
[0004] Summary of the Invention
[0005] The embodiments of the present disclosure provide an IoT device control method, IoT device, and product, aiming to solve the problem of how to achieve control and operation between IoT devices under non-strictly standardized interface docking conditions.
[0006] A first aspect of the present disclosure provides an Internet of Things device control method, which is applied to control a device. The method includes:
[0007] Sending capability query information to a controlled device, where the controlled device is any device in the IoT system that is different from the control device;
[0008] In response to the capability description information returned by the controlled device, based on the control intent of the control device, semantically parse the capability description information to obtain control keywords;
[0009] Based on the control keyword, at least one control information is obtained, the control information including at least one of the following: an attribute, a behavior, and an interaction parameter, the capability description information and the capability query information being natural language information;
[0010] The control information is sent to the controlled device, so that the controlled device performs an operation according to the control information.
[0011] In an optional implementation, obtaining at least one control information based on the control keyword includes:
[0012] Inputting the control keyword into a semantic matching model to obtain a similarity between the capability description information and an initial command statement, wherein the initial command statement is a command statement preset in the semantic matching model;
[0013] taking at least one initial command sentence satisfying the similarity greater than a preset threshold as a target command sentence;
[0014] The target command statement is used as the control information.
[0015] In an optional implementation, using the target command statement as the control information includes:
[0016] Based on the target command statement, obtaining at least one candidate control information, wherein each candidate control information has the same attributes and behavior, and each candidate control information has different interaction parameters;
[0017] The candidate control information is used as the control information.
[0018] In an optional implementation, using the target command statement as the control information includes:
[0019] sorting the target command statements according to the similarity to obtain a control information set;
[0020] The first-ranked target command sentence in the control information set is used as the control information, where the first-ranked target command sentence is the target command sentence with the greatest similarity in the control information set.
[0021] In an optional implementation, after sending the control information to the controlled device, the method further includes:
[0022] In response to operation success information returned by the controlled device, storing the capability description information and the control information, so that the control device can send the control information to the controlled device again based on the control intention;
[0023] In response to the operation failure information returned by the controlled device, the target command statement with the next sequence in the control information set is sent to the controlled device as the control information.
[0024] In an optional implementation, after obtaining at least one control information, the method further includes:
[0025] The control information and the capability description information are sent to the controlled device so that the controlled device matches the capability description information, and the control information is identified in response to the capability description information that is successfully matched.
[0026] In an optional implementation, the controlled device includes a first controlled device and a second controlled device, and the method further includes:
[0027] Sending the capability query information to the first controlled device and the second controlled device;
[0028] In response to the first capability description information returned by the first controlled device, performing semantic parsing on the first capability description information to obtain at least one first control information;
[0029] sending the first control information to the first controlled device, so that the first controlled device performs an operation according to the first control information;
[0030] In response to second capability description information returned by the second controlled device and first parameter information returned by the first controlled device, semantically parse the second capability description information to obtain at least one second control information, where the first parameter information is parameter information obtained after the first controlled device performs an operation according to the first control information;
[0031] The second control information is sent to the second controlled device, so that the second controlled device performs an operation according to the second control information.
[0032] In an optional implementation, obtaining the similarity between the capability description information and the initial command statement includes:
[0033] Performing word embedding processing on the control keyword to obtain a keyword vector;
[0034] Calculating the similarity between the keyword vector and the word segmentation vector of the initial command sentence as the similarity between the capability description information and the initial command sentence;
[0035] The similarity between the keyword vector and the word segmentation vector of the initial command sentence is obtained according to the following formula:
[0036] Wherein, cosθ is the similarity between the keyword vector and the word vector of the initial command sentence; A i is the keyword vector corresponding to the i-th control keyword; B i is the word segmentation vector corresponding to the i-th word segmentation in the initial command statement; n is the number of the control keywords or the number of the word segmentations in the initial command statement.
[0037] A second aspect of the present disclosure provides an Internet of Things device control method, which is applied to a controlled device, wherein the controlled device is any device in an Internet of Things system that is different from the control device, and the method includes:
[0038] generating capability description information in response to the capability query information sent by the control device, wherein the capability description information and the capability query information are natural language information;
[0039] Sending the capability description information to the control device;
[0040] In response to the correctly identifiable control information sent by the control device, an operation is performed according to the correctly identifiable control information.
[0041] In an optional implementation, generating capability description information in response to the capability query information sent by the control device includes:
[0042] In response to the capability query information sent by the control device, obtaining security information of the control device, the security information including at least one of the following: current connection information and historical interaction information;
[0043] Based on the security information, obtaining a security level of the control device;
[0044] When the security level is the first level, all function information is obtained from the local capability description information as the capability description information.
[0045] In an optional implementation, after sending the capability description information to the control device, the method further includes:
[0046] In response to the control information and the capability description information sent by the control device, determining whether the control device is a trusted device;
[0047] When the capability description information successfully matches the local capability description information, determining that the control device is the trusted device and identifying the control information;
[0048] If the control information can be correctly identified, an operation is performed according to the control information.
[0049] In an optional implementation, after sending the capability description information to the control device, the method further includes:
[0050] Generate a security policy, wherein the security policy includes at least one of the following: a waiting time, a number of possible attempts, and a silent time;
[0051] In response to control information sent by the control device that cannot be correctly identified, after exceeding the waiting time and / or receiving control information again for the number of possible attempts, disconnecting from the control device within the silence time.
[0052] A third aspect of the present disclosure provides an Internet of Things device, which is any device in an Internet of Things system. The Internet of Things device includes:
[0053] A communication unit, configured to transmit data with other IoT devices in the IoT system based on a wireless connection form and / or a wired connection form;
[0054] a semantic understanding unit, configured to receive capability query information, perform semantic analysis on the capability query information, and generate control information;
[0055] a device description unit, configured to store local capability description information and generate capability description information based on the local capability description information;
[0056] A device control unit is used to control the IoT device to perform operations based on control instructions or control information sent by other IoT devices.
[0057] A fourth aspect of the present disclosure provides an Internet of Things device control system, the system comprising a control device and a controlled device, the control device being any device within the Internet of Things system, and the controlled device being any device within the Internet of Things system other than the control device;
[0058] The control device is configured to send capability query information to the controlled device; in response to capability description information returned by the controlled device, perform semantic parsing on the capability description information based on the control intent of the control device to obtain control keywords; obtain at least one control information based on the control keywords, the control information including at least one of the following: an attribute, a behavior, and an interaction parameter, the capability description information and the capability query information being natural language information; and send the control information to the controlled device so that the controlled device performs an operation according to the control information;
[0059] The controlled device is used to generate the capability description information in response to the capability query information sent by the control device; send the capability description information to the control device; and perform operations according to the correctly identifiable control information sent by the control device in response to the correctly identifiable control information.
[0060] A fifth aspect of the present disclosure provides an IoT device control apparatus, which is applied to control a device, including:
[0061] a query module, configured to send capability query information to a controlled device, wherein the controlled device is any device in the IoT system that is different from the control device;
[0062] a parsing module, configured to perform semantic parsing on the capability description information returned by the controlled device based on the control intent of the control device to obtain control keywords;
[0063] A control information acquisition module, configured to obtain at least one control information based on the control keyword, wherein the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, and the capability description information and the capability query information are natural language information;
[0064] The control module is configured to send the control information to the controlled device so that the controlled device performs an operation according to the control information.
[0065] In an optional implementation, the control information acquisition module includes:
[0066] a similarity acquisition submodule, configured to input the control keyword into a semantic matching model to acquire the similarity between the capability description information and an initial command statement, wherein the initial command statement is a command statement preset in the semantic matching model;
[0067] a target command statement acquisition submodule, configured to take at least one initial command statement satisfying the similarity greater than a preset threshold as a target command statement;
[0068] The control information acquisition submodule is used to use the target command statement as the control information.
[0069] In an optional implementation, the control information acquisition submodule further includes:
[0070] a candidate control information acquisition subunit, configured to acquire at least one candidate control information based on the target command statement, wherein each candidate control information has the same attributes and behavior and different interaction parameters;
[0071] The control information acquisition subunit is configured to use the candidate control information as the control information.
[0072] In an optional implementation, the control information acquisition submodule further includes:
[0073] a sorting subunit, configured to sort the target command statements according to the similarity to obtain a control information set;
[0074] The control information acquisition subunit is configured to use the first-ranked target command statement in the control information set as the control information, where the first-ranked target command statement is the target command statement with the greatest similarity in the control information set.
[0075] In an optional embodiment, the device further includes:
[0076] a storage module, configured to store the capability description information and the control information in response to an operation success message returned by the controlled device, so that the control device can send the control information to the controlled device again based on the control intention;
[0077] The repeat control module is configured to send the target command statement with the next highest priority in the control information set as the control information to the controlled device in response to the operation failure information returned by the controlled device.
[0078] In an optional embodiment, the device further includes:
[0079] The security control module is configured to send the control information and the capability description information to the controlled device so that the controlled device matches the capability description information, and identify the control information in response to the capability description information that is successfully matched.
[0080] In an optional embodiment, the device further includes:
[0081] A second query module, configured to send the capability query information to the first controlled device and the second controlled device;
[0082] a first parsing module, configured to perform semantic parsing on the first capability description information returned by the first controlled device to obtain at least one first control information;
[0083] a first control module, configured to send the first control information to the first controlled device, so that the first controlled device performs an operation according to the first control information;
[0084] a second parsing module, configured to, in response to second capability description information returned by the second controlled device and first parameter information returned by the first controlled device, perform semantic parsing on the second capability description information to obtain at least one second control information, where the first parameter information is parameter information obtained after the first controlled device performs an operation according to the first control information;
[0085] The second control module is configured to send the second control information to the second controlled device, so that the second controlled device performs an operation according to the second control information.
[0086] In an optional implementation, the similarity acquisition submodule includes:
[0087] A word embedding subunit, configured to perform word embedding processing on the control keyword to obtain a keyword vector;
[0088] a similarity acquisition subunit, configured to calculate the similarity between the keyword vector and the word segmentation vector of the initial command sentence as the similarity between the capability description information and the initial command sentence;
[0089] The similarity between the keyword vector and the word segmentation vector of the initial command sentence is obtained according to the following formula:
[0090] Wherein, cosθ is the similarity between the keyword vector and the word vector of the initial command sentence; A i is the keyword vector corresponding to the i-th control keyword; B i is the word segmentation vector corresponding to the i-th word segmentation in the initial command statement; n is the number of the control keywords or the number of the word segmentations in the initial command statement.
[0091] A sixth aspect of the present disclosure provides an IoT device control apparatus, which is applied to a controlled device. The controlled device is any device in an IoT system that is different from the control device, including:
[0092] a description module, configured to generate capability description information in response to the capability query information sent by the control device, wherein the capability description information and the capability query information are natural language information;
[0093] A sending module, configured to send the capability description information to the control device;
[0094] An execution module is used to respond to the correctly identifiable control information sent by the control device and execute an operation according to the correctly identifiable control information.
[0095] In an optional implementation, the description module includes:
[0096] a security information acquisition submodule, configured to acquire security information of the control device in response to the capability query information sent by the control device, the security information including at least one of the following: current connection information and historical interaction information;
[0097] A security level acquisition submodule, configured to acquire the security level of the control device based on the security information;
[0098] The description submodule is used to obtain all functional information from the local capability description information as the capability description information when the security level is the first level.
[0099] In an optional embodiment, the device further includes:
[0100] a credibility determination module, configured to determine whether the control device is a trusted device in response to the control information and the capability description information sent by the control device;
[0101] an identification module, configured to determine that the control device is the trusted device and identify the control information when the capability description information successfully matches the local capability description information;
[0102] The first execution module is configured to execute an operation according to the control information if the control information can be correctly identified.
[0103] In an optional embodiment, the device further includes:
[0104] A security policy generating module, configured to generate a security policy, wherein the security policy includes at least one of the following: a waiting time, a number of possible attempts, and a silent time;
[0105] A silence module is used to disconnect the control device within the silence duration in response to control information sent by the control device that cannot be correctly identified after exceeding the waiting time and / or receiving the control information again for the number of possible attempts.
[0106] A seventh aspect of the present disclosure provides a computing and processing device, including:
[0107] a memory having computer readable code stored therein; and
[0108] One or more processors, when the computer-readable code is executed by the one or more processors, the computing and processing device executes the Internet of Things device control method as described in any one of the first aspects, or the computing and processing device executes the Internet of Things device control method as described in any one of the second aspects.
[0109] An eighth aspect of an embodiment of the present disclosure provides a computer program, comprising a computer-readable code. When the computer-readable code is run on a computing processing device, the computing processing device is caused to execute the Internet of Things device control method according to any one of the first aspects, or the computing processing device is caused to execute the Internet of Things device control method according to any one of the second aspects.
[0110] A ninth aspect of the embodiments of the present disclosure provides a computer-readable medium, in which the computer program described in the eighth aspect is stored. Beneficial effects:
[0111] The embodiments of the present disclosure provide an Internet of Things device control method, an Internet of Things device, and a product, which are applied to a control device, wherein the control device is any device in an Internet of Things system, and the method comprises: sending capability query information to a controlled device, wherein the controlled device is any device in the Internet of Things system that is different from the control device; in response to capability description information returned by the controlled device, performing semantic parsing on the capability description information to obtain at least one control information, wherein the control information includes at least one of the following: attributes, behaviors, and interaction parameters, and the capability description information and the capability query information are natural language information; and sending the control information to the controlled device so that the controlled device performs an operation according to the control information.
[0112] The disclosed embodiments enable information exchange between IoT devices through capability description information in natural language. The control device improves the accuracy of its understanding of the capabilities of the controlled device based on semantic analysis, and generates control information that can be easily accurately recognized by the controlled device. This enables mutual understanding, control, and operation between IoT devices in scenarios without strict normative constraints, effectively reducing the difficulty of interaction between IoT devices in different ecosystems.
[0113] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0115] FIG1 schematically shows a flow chart of an IoT device control method on a control device side for executing a method according to the present disclosure;
[0116] FIG2 schematically illustrates a flow chart of an IoT device control method on a controlled device side for executing the method according to the present disclosure;
[0117] FIG3 schematically illustrates a timing flow of interaction between a control device and a controlled device for executing the method according to the present disclosure;
[0118] FIG4 schematically shows an Internet of Things device for executing the method according to the present disclosure;
[0119] FIG5 schematically shows an IoT device control apparatus for controlling a device for executing the method according to the present disclosure;
[0120] FIG6 schematically shows an Internet of Things device control apparatus applied to a controlled device for executing the method according to the present disclosure;
[0121] FIG7 schematically shows a computing processing device for executing the method according to the present disclosure. Specific embodiments
[0122] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0123] In related technologies, with the development of the Internet of Things industry, the total number of IoT devices and the number of connections have increased year by year. At the same time, the basic system software is scenario-oriented and natively supports distributed functional features, making the interconnection and collaboration between devices more convenient and able to face more complex scenarios. At the same time, due to the lack of a unified application layer interconnection protocol for device interconnection, the intercommunication between devices requires customized development and adaptation work, and the interaction between devices with more categories of devices, different brands of the same category, and even different models of the same brand becomes more difficult, so each has formed its own small ecosystem. Therefore, since the application programming interface of IoT devices in different interactive ecosystems is difficult to unify, the constraints and norms of their API (Application Programming Interface) docking during interaction are strong, making it difficult to achieve mutual understanding, control and operation of any IoT devices.
[0124] In view of this, an embodiment of the present disclosure provides a method for controlling an IoT device. FIG1 schematically shows a flow chart of the method for controlling an IoT device on a control device side for executing the method according to the present disclosure. As shown in FIG1 , the method is applied to a control device and includes:
[0125] S101: Send capability query information to a controlled device.
[0126] Send capability query information to a controlled device, where the controlled device is any device in the IoT system that is different from the control device.
[0127] S102 : In response to the capability description information returned by the controlled device, perform semantic analysis on the capability description information based on the control intent of the control device to obtain control keywords.
[0128] S103: Obtain at least one control information based on the control keyword.
[0129] Based on the control keyword, at least one control information is obtained, and the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter. The capability description information and the capability query information are natural language information.
[0130] S104: Send the control information to the controlled device, so that the controlled device performs an operation according to the control information.
[0131] In the embodiments of the present disclosure, the control device is any device in the Internet of Things system, and the controlled device is any device in the Internet of Things system that is different from the control device. Specifically, among the at least one Internet of Things device connected in the Internet of Things system, any one device can be used as a control device, and the control device is used to control the controlled device in the Internet of Things system to perform corresponding functions by interacting with the controlled device; any other device different from the control device can be a controlled device, and the controlled device is used to perform corresponding functions according to the control information sent by the control device. For example, the smart display device in the Internet of Things system serves as the control device, and the lighting device serves as the controlled device. Through the Internet of Things device control method provided in the present disclosure, the smart display device interacts with the lighting device to control the lighting device to realize the on / off operation of the lighting function. It should be noted that the above example is only a specific case proposed to enable those skilled in the art to better understand the solution of the embodiment of the present disclosure. The specific control device and the controlled device can be determined according to the actual situation, and the embodiment of the present disclosure is not limited here.
[0132] In the embodiments of the present disclosure, IoT devices (including control devices and controlled devices) within an IoT system establish connections and implement data transmission via wireless or wired connections. Wireless connections can be network-based connections, such as local area network (LAN) or wide area network (WAN) connections; wired connections can be based on Bluetooth, USB, serial ports, and the like. It should be noted that the method for establishing connections between IoT devices within an IoT system can be determined based on actual circumstances and is not limited in the embodiments of the present disclosure.
[0133] In the embodiment of the present disclosure, the capability query information is a natural language information instruction generated by the control device for obtaining the capability description information of the controlled device. The capability query information contains query keywords that can be recognized by all controlled devices in the Internet of Things system. The controlled device generates capability description information corresponding to the control device in response to the query keywords. The capability description information is natural language information generated based on the functions that can be executed by the controlled device. The capability description information is natural language information generated in a form that can be correctly recognized by the controlled device. Therefore, the form of the capability description information can be used as a formal standard when the control device generates control information corresponding to the controlled device. Among them, natural language information refers to information in the form of written or spoken communication between people. In the embodiment of the present disclosure, by setting the capability query information and the capability description information as natural language information, the interface constraint strength for interaction between different Internet of Things devices is effectively reduced.
[0134] In the embodiment of the present application, since the capability description information sent by the controlled device to the control device is natural language information, in order to improve the accuracy of understanding the executable functions of the controlled device, it is necessary to understand the capability description information in the form of semantic analysis and generate control information in the form closest to the capability description information, so that the control information can be correctly recognized by the controlled device and perform corresponding functional operations according to the control information. The control intent represents the control requirements of the control device. Since the capability description information of the controlled device contains descriptions of all executable functions of the controlled device, the control device needs to generate corresponding control keywords based on its own control requirements. The control keywords are word segments in the capability description information that match the control intent, and the control information is obtained based on the control keywords. The control information is natural language information that represents the control intention of the control device in the form of capability description information after semantic analysis. The control information includes at least one of the following: attributes, behaviors, and interaction parameters.
[0135] Among them, the attribute is used to represent the object that the controlled device needs to change or execute. The object can be a physical quantity. For example, when the controlled device is a constant temperature device, the attribute can be "temperature"; when the controlled device is a lighting device, the attribute can be "brightness"; the object can also be a specific device unit. For example, when the controlled device is a shading device, the attribute can be "curtain"; the behavior is used to represent the direction or state of the controlled device adjusting the attribute. For example, when the controlled device is a constant temperature device, the behavior can be "increase", "decrease", etc.; when the controlled device is a shading device, the behavior can be "open", "close", etc.; the interaction parameter represents the specific value of the attribute adjusted by the controlled device according to the behavior. When the controlled device does not have the ability to adjust the specific parameter value or does not need to be adjusted to a specific value, the interaction parameter can be set to a default value according to the capability description information of the controlled device. For example, when the controlled device is a photosensitive device, the attribute for the controlled device can be "ambient light brightness", the behavior can be "read", and the interaction parameter is "1".
[0136] In order to enable those skilled in the art to better understand the solution of the embodiment of the present disclosure, the following is a detailed description of an IoT device control method provided by the embodiment of the present disclosure:
[0137] Before the specific implementation step S101, the IoT device is connected to the IoT system based on a wireless connection method or a wired connection method. For example, when the IoT device is connected based on WiFi, each IoT device can discover IoT devices in the IoT system based on UDP (User Datagram Protocol) broadcast, and conduct directional connections and data transmission based on UDP and TCP (Transmission Control Protocol) with other IoT devices through the port fed back by the UDP broadcast. It should be noted that the above example is only an optional implementation method proposed to enable those skilled in the art to better understand the solution of the embodiment of the present disclosure. The specific IoT connection form can be determined according to the implementation situation, and the embodiment of the present disclosure is not limited here.
[0138] When specifically implementing step S101, the control device generates capability query information in the form of natural language, and the capability query information includes at least one query keyword in the form of natural language, such as "obtain", "query", etc. The query keyword can be successfully identified and responded by the controlled device, and capability description information corresponding to the controlled device is generated. Subsequently, the control device sends the capability query information to the controlled device in the Internet of Things system, wherein the controlled device can be an Internet of Things device that can meet the control intent determined based on the control intent of the control device, or can be all Internet of Things devices in the Internet of Things system. After receiving the capability query information, the controlled device correctly identifies the query keyword in the capability query information, and then generates capability description information in the form of natural language for the control device in response to the capability query information and sends it to the control device.
[0139] When specifically implementing step S102, after receiving the capability description information returned by the controlled device, since the capability description information is natural language information, it is necessary to perform semantic analysis on the capability description information. Specifically, the capability description information is first segmented to obtain capability description keywords, wherein the capability description information can be segmented using a word segmenter, for example, ansj word segmenter, jieba word segmenter, etc. can be used to segment the capability description information. It should be noted that the word segmenter can be selected according to actual conditions, and the embodiment of the present disclosure is not limited here.
[0140] Subsequently, since the capability description information of the controlled device may include multiple controllable modes for the controlled device, after obtaining the capability description keyword, the capability description keyword may also contain different types of attributes, behaviors or interaction parameters, and the control device only controls and executes one or several of the controllable modes. Therefore, it is necessary to filter the capability description keywords based on the control intent of the control device, filter out the capability description keywords with less correlation with the control intent, and obtain keywords with greater correlation with the control intent of the control device as control keywords. The control keywords are keywords in the capability description information of the controlled device that are consistent with the control intent of the control device. For example, when the controlled device is a lighting device, the capability description information it sends may include "1 for increasing brightness", "2 for decreasing brightness", and "3 for turning off the lighting device". The control intent of the control device is to increase the brightness of the ambient light. Therefore, based on the control intent, keywords such as "turn off", "reduce", and "lighting device" are filtered out, and keywords such as "increase", "brightness", and "1 for" are used as the control keywords. These control keywords can represent the control intent of the control device.
[0141] When step S103 is specifically implemented, at least one control information is obtained based on the control keyword. Specifically, the control keyword is first input into the semantic matching model, and the control keyword is word-embedded to obtain a keyword vector corresponding to the control keyword, so as to facilitate similarity calculation. The word embedding process can be implemented based on a word embedding unit, for example, the word embedding unit can be a word2vec model. Subsequently, the keyword vector is input into the similarity calculation unit in the semantic matching model, and the similarity between the capability description information and the initial command statement is characterized based on the vector distance between the initial command statement and the capability description information. The vector distance between the initial command statement and the capability description information can be a cosine distance, a Euclidean distance, a Mahalanobis distance, etc.
[0142] In an optional implementation, the cosine distance is used to characterize the similarity between the capability description information and the initial command statement, and is obtained according to the following formula:
[0143] Wherein, cosθ is the similarity between the keyword vector and the word vector of the initial command sentence; A i is the keyword vector corresponding to the i-th control keyword; B i is the word segmentation vector corresponding to the i-th word segmentation in the initial command statement; n is the number of the control keywords or the number of the word segmentations in the initial command statement.
[0144] Among them, the initial command statement is a plurality of different command statements preset in the semantic matching model, and the initial command statement is in the form of natural language. In the semantic matching model, initial command statements for various control intentions are preset in advance. For example, for the control intention of "detecting temperature", the initial command statement may include "temperature measurement", "temperature monitoring", "obtaining room temperature", "ambient temperature monitoring", etc. The forms of the multiple initial command statements for the control intention may be recognized by the controlled device or may not be recognized by the controlled device. Therefore, by calculating the similarity between the capability description information and the initial command statement, the initial command statement with a higher similarity to the capability description information can be obtained. Command statements. Since the capability description information is natural language information sent by the controlled device, the form of the capability description information can represent the correctly identifiable form of the controlled device. The initial command statement that is more similar to the capability description information can better reflect the correct semantics of the capability description information, and improve the accuracy of the control device's understanding of the information of the controlled device in the case of non-strictly standardized interface docking; on the other hand, sending the initial command statement that is more similar to the capability description information (i.e., the target command statement) as control information to the controlled device can increase the probability of the control information being correctly identified, that is, increase the possibility of mutual understanding, control and operation between the controlled device and the control device.
[0145] After determining the similarity between the initial command statements and the capability description information, at least one initial command statement with a similarity greater than a preset threshold is obtained and used as a target command statement. The target command statement is semantically closer to the capability description information, and each target command statement includes at least one of the following: an attribute, a behavior, and an interaction parameter. The target command statement is used as control information. This control information, due to its higher similarity to the corresponding target command statement, is considered more likely to be correctly recognized by the controlled device.
[0146] In an optional embodiment, the training process of the semantic matching model is as follows: a sample combination consisting of an initial command statement and a preset statement is used as a training data set, wherein the sample combination contains positive sample combinations that are semantically similar to the preset statement, and also contains negative sample combinations that are semantically different from the preset statement. The sample combination (including the positive sample combination and the negative sample combination) is input into the initial semantic matching model to obtain a similarity prediction value, and the matching loss is calculated based on the similarity prediction value and the label value corresponding to the sample combination, and the initial semantic training model is optimized based on the matching loss to obtain the semantic training model.
[0147] In an optional embodiment, since there is at least one initial command statement with a similarity greater than a preset threshold, multiple target command statements may be obtained. In this case, the target command statements are sorted according to their corresponding similarity to obtain a control information set. The first-ranked target command statement in the control information set is the target command statement with the highest similarity, and the similarities of subsequent target command statements decrease in sequence. Therefore, the target command statement with the highest probability of being correctly recognized by the controlled device is the most likely. The first-ranked target command statement in the control information set is used as the control information and is preferentially sent to the controlled device. By sequentially sending control information to the controlled device through the control information set generated in the order of similarity, the probability of the controlled device correctly recognizing the control information is effectively increased.
[0148] In an optional embodiment, after obtaining a target command statement, the target command statement includes at least one of the following: attributes, behaviors, and interaction parameters. Attributes and behaviors can be directly determined, while interaction parameters may have multiple conditions when being identified. To prevent the interaction parameters in the generated target command statement from being correctly identified by the controlled device, the target command statement needs to be further split according to the multiple conditions of the interaction parameters to obtain candidate control information corresponding to the multiple conditions. For each target command statement, the multiple candidate control information obtained by splitting the target command statement has the same attributes and behaviors, but different interaction parameters. The candidate control information is then sent to the controlled device as control information. For example, when the target command statement is "1 is to increase the temperature", it can be determined that the attribute of the target command statement is "temperature", the behavior is "increase", and the interaction parameter has three cases of "1", "1 is" or "is". At this time, three candidate control information are generated based on the target command statement, among which the attribute of the first candidate control information is "temperature", the behavior is "increase", and the interaction parameter is "1"; the attribute of the second candidate control information is "temperature", the behavior is "increase", and the interaction parameter is "1 is"; the attribute of the third candidate control information is "temperature", the behavior is "increase", and the interaction parameter is "is". The first candidate control information, the second candidate control information and the third candidate control information are all used as control information for sending to the controlled device until the controlled device can correctly identify them.
[0149] Specifically, during step S104, the control information is sent to the controlled device, causing the controlled device to perform operations according to the control information. Because the control information is highly similar to the capability description information, it is highly likely to be correctly recognized by the controlled device. When the controlled device correctly recognizes the control information, it controls the corresponding module in the controlled device to perform the corresponding operation according to the attributes, behaviors, and interaction parameters in the control information, completing a control interaction between the controlling device and the controlled device in the IoT system.
[0150] In an optional embodiment, after obtaining at least one piece of control information, the control information and the capability description information are sent to the controlled device so that the controlled device matches the capability description information and identifies the control information in response to the capability description information that successfully matches. The capability description information of the controlled device is used to enable the controlled device to enter a state of receiving control information in response to its own capability description information; and the control information is used to execute the corresponding function operation according to the control information after being correctly identified by the controlled device.
[0151] In an optional embodiment, after sending the control information to the controlled device, the control device will receive an operation result returned by the controlled device, and the operation result includes: operation success information and operation failure information. When the operation success information returned by the controlled device is received, it means that the control information sent this time is successfully recognized by the controlled device and the corresponding operation is performed. Therefore, in response to the operation success information returned by the controlled device, the capability description information and the control information are stored so that the control device can send the control information to the controlled device again based on the control intention. The next time a control interaction with the controlled device is performed with the same control intention, the controlled device can be directly controlled according to the capability description information and the control information stored this time.
[0152] In an optional embodiment, upon receiving an operation failure message from a controlled device, it indicates that the controlled device failed to successfully recognize the control information sent, or failed to successfully perform the corresponding operation according to the control information. In this case, in response to the operation failure message returned by the controlled device, the control device sends the next-highest-order target command statement in the control information set as the control information to the controlled device until it receives an operation success message from the controlled device or disconnects from the controlled device.
[0153] In an optional embodiment, when the control device controls the controlled device and needs to rely on parameter information returned by another IoT device in the IoT system, the two devices are respectively used as the first controlled device and the second controlled device to jointly implement the control interaction.
[0154] Specifically, the capability query information is first sent to the first controlled device and the second controlled device; then, the first controlled device and the second controlled device receive the capability query information and, in response to query keywords therein, generate first capability description information and second capability description information, respectively, and send them to the control device; in response to the first capability description information returned by the first controlled device, the control device semantically parses the first capability description information and, based on a first control intent for the first controlled device, obtains at least one first control information, the first control information including attributes, behaviors, and interaction parameters for the first controlled device, and sends the first control information to the first controlled device; after the first controlled device successfully identifies the first control information, the first controlled device performs a corresponding operation according to the first control information to obtain first parameter information, and returns the first parameter information to the control device so that the control device generates a second control intent for the second controlled device. The first parameter information is parameter information obtained after the first controlled device performs the operation according to the first control information. For example, when the first control information is to read the ambient temperature, the first controlled device returns "ambient temperature is 25° C." as the first parameter information to the control device, based on the ambient temperature monitored by the first control device being 25° C. The control device generates a second control intention based on the first parameter information returned by the first controlled device, performs semantic parsing on the second capability description information in response to the second controlled device, and obtains at least one second control information based on the second control intention, and finally sends the second control information to the second controlled device, and the second controlled device performs a corresponding operation according to the received second control information.
[0155] Exemplarily, the controlling device is a smart display device D0, the first controlled device is a controlled device D1 having an ambient light brightness sensor, and the second controlled device is a lighting device D2. When D0 needs to control D2, D1 needs to provide the current ambient light brightness. First, D0 sends the capability query information "online device query" to D1 and D2 respectively. In response to the capability query information, D1 generates the first capability description information "1 for reading ambient light brightness" and sends it to D0. In response to the capability query information, D2 generates the second capability description information "1 for increasing brightness", "2 for decreasing brightness", and "3 for reading brightness value" and sends it to D0. D0 performs semantic analysis on the first capability description information, generates the first control information based on the first control intention "reading current brightness", and sends it to D1. The attribute of the first control information is "ambient light brightness", the behavior is "read", and the parameter is "1". D1 correctly recognizes the first control information, obtains the current ambient light brightness as the first parameter information and returns it to D0. D0 generates the second control intention "reduce current brightness" based on the current ambient light brightness returned by D1, and performs semantic analysis on the second capability description information. Based on the second control intention, it generates the second control information. The attribute of the second control information is "brightness", the behavior is "reduce", and the parameter is "2", and sends the second control information to D2. D2 correctly recognizes the second control information and obtains the current brightness reduction.
[0156] Based on the same inventive concept, an embodiment of the present disclosure provides an IoT device control method. FIG2 schematically illustrates a flow chart of an IoT device control method on a controlled device side for executing the method according to the present disclosure. As shown in FIG2 , the method is applied to a controlled device and includes:
[0157] S201 : In response to capability query information sent by the control device, generate capability description information based on the security level of the control device.
[0158] In response to the capability query information sent by the control device, capability description information is generated, where the capability description information and the capability query information are natural language information.
[0159] S202: Send the capability description information to the control device.
[0160] S203: In response to the correctly identifiable control information sent by the control device, perform an operation according to the correctly identifiable control information.
[0161] When specifically implementing step S201, the control device sends capability query information to the controlled device, the controlled device receives the capability query information, and in response to the query keywords in the capability query information, obtains the security information of the control device, wherein the security information includes at least one of the following: current connection information and historical interaction information. Specifically, based on the source of the capability query information, the current connection information is obtained, and the current connection information can be the way in which the control device and the controlled device establish a connection, such as a wireless connection or a wired connection, a local connection or a remote connection, etc.; the historical interaction information between the control device and the controlled device is obtained, for example, whether the control device and the controlled device are interacting for the first time or there are multiple interaction records, etc. Based on the security information, the security level of the control device is obtained, and the security level is used to determine the information density of the capability description information sent to the control device. For example, when the security level of the control device is high, all functional information is sent to the control device as capability description information; when the security level of the control device is low, part of the functional information is sent to the control device as capability description information. In an optional implementation, when the security level is the first level, it is considered that the security level of the control device is high. At this time, all functional information is obtained based on the local capability description information and sent to the control device as the capability description information.
[0162] The controlled device can generate capability description information based on the security level of the local capability description information stored in the controlled device, or send the capability description address as the capability description information to the control device, and the capability description address can download the capability description information corresponding to the security level of the control device. It should be noted that the form of the capability description information can be determined according to actual circumstances and is not limited in this embodiment of the present disclosure.
[0163] Specifically, when step S202 is implemented, capability description information generated based on the security level of the control device is sent to the control device. The control device responds to the capability description information, performs semantic analysis on the capability description information, generates control information, and sends it to the controlled device.
[0164] Specifically, during step S203, the control device sends control information to the controlled device. Upon receiving the control information, the control device first identifies the control information. If the control information is correctly identified, the control device is deemed trustworthy. The control device then controls the corresponding local module to perform the corresponding operation based on the attributes, behavior, and interaction parameters of the control information. Finally, the control device returns parameter information and an operation success message to the control device, completing a control interaction with the control device.
[0165] In an optional embodiment, the control device sends control information and capability description information to the controlled device, and determines whether the control device is a trusted device in response to the control information and capability description information sent by the control device. Specifically, the capability description information is matched with the local capability description information. When it is determined that the capability description information is the capability description information previously sent to the control device, it is considered a match. At this time, the control device is determined to be the trusted device, and the control information is identified. If the control information can be correctly identified, the local corresponding module is controlled to perform the corresponding operation according to the attributes, behaviors and interaction parameters of the control information. Finally, the parameter information and operation success information are returned to the control device, completing a control interaction with the control device.
[0166] In an optional embodiment, the control device sends control information to the controlled device, and after receiving the control information sent by the control device, generates a security policy to prevent sniffing input control by untrusted devices. Specifically, in response to the control information, a waiting time, a number of possible attempts, and a silent period are generated, wherein the waiting time is used to limit the time between the current reception of the control information from the control device and the next reception of the control information from the control device, the number of possible attempts is used to limit the number of times the control information sent by the control device can be received again after the current reception of the control information from the control device, and the silent period is used to limit the duration of disconnection from the control device when the control device violates the above-mentioned waiting time and / or number of possible attempts.
[0167] When it is determined that the control information is unrecognizable based on the control information currently sent by the control device, in response to the control information sent by the control device that cannot be correctly identified, new control information sent by the control device is received within the waiting period, and at least one new control information sent by the control device is received within the number of attempts; after exceeding the waiting period and / or receiving the control information for the number of attempts again, the control device is determined to be an untrusted device, and the connection with the control device is disconnected within the silence period.
[0168] In order to enable those skilled in the art to understand the present application more clearly, a method for controlling an Internet of Things device described in an embodiment of the present disclosure is now described in detail through the following embodiments.
[0169] FIG3 schematically illustrates a timing flow of interaction between a control device and a controlled device for executing the method according to the present disclosure. As shown in FIG3 , the control device and the controlled device perform control interaction in the following manner:
[0170] The IoT system uses Wi-Fi as the connection method. The control device and the controlled device establish a directional connection over UDP and TCP via the UDP broadcast feedback port and implement data transmission. The control device first generates a capability query message ("Online Device Capability Query") in natural language format and sends it to the controlled devices in the IoT system.
[0171] After the controlled device receives the capability query information, it correctly identifies the query keyword "query" in the capability query information, responds to the capability query information, and based on the source of the capability query information, obtains the current connection information as wireless connection and local connection, and the historical interaction information between the control device and the controlled device is that there are multiple interaction records. The security level of the control device is determined to be the first level, and based on the local capability description information, generates all functional information in natural language form "1 is to read the ambient temperature", which is sent to the control device as the capability description information for the control device.
[0172] After receiving the capability description information returned by the controlled device, the capability description information "1 for reading the ambient temperature" is first segmented using the ansj tokenizer to obtain capability description keywords. Based on the control intent of the control device, "reading the current indoor temperature," the capability description keywords are filtered to obtain the control keywords "read," "ambient temperature," and "1." The control keywords are word-embedded based on the word2vec model to obtain the keyword vector corresponding to the control keyword. The keyword vector is input into the similarity calculation unit in the semantic matching model to calculate the vector cosine distance between the initial command statement and the capability description information as the similarity between the capability description information and the initial command statement.
[0173] Subsequently, multiple initial command statements with a similarity greater than a preset threshold of 60% are obtained, and these initial command statements are used as target command statements. The target command statements are sorted according to the similarity corresponding to each target command statement to obtain a control information set, and the first-ranked target command statement "1 Get ambient temperature" in the control information set is used as the control information, and the control information and capability description information are sent to the controlled device.
[0174] After the controlled device receives the control information and capability description information, it will match the capability description information with the local capability description information, determine that the capability description information is the capability description information previously sent to the control device, and determine the control device as the trusted device; identify the control information; after the control information can be correctly identified, control the temperature acquisition unit related to the controlled device to obtain the current ambient temperature value, and send the current ambient temperature value and operation success information to the control device, completing a control interaction with the control device.
[0175] An embodiment of the present disclosure provides an Internet of Things device control method, which is applied to a control device, wherein the control device is any device within an Internet of Things system, and the method comprises: sending capability query information to a controlled device, wherein the controlled device is any device within the Internet of Things system that is different from the control device; in response to capability description information returned by the controlled device, performing semantic parsing on the capability description information based on the control intent of the control device to obtain control keywords; obtaining at least one control information based on the control keywords, wherein the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, and the capability description information and the capability query information are natural language information; and sending the control information to the controlled device so that the controlled device performs an operation according to the control information.
[0176] The disclosed embodiments enable information exchange between IoT devices through capability description information in natural language. The control device improves the accuracy of its understanding of the capabilities of the controlled device based on semantic analysis, and generates control information that can be easily accurately recognized by the controlled device. This enables mutual understanding, control, and operation between IoT devices in scenarios without strict normative constraints, effectively reducing the difficulty of interaction between IoT devices in different ecosystems.
[0177] Based on the same inventive concept, embodiments of the present disclosure provide an IoT device. The IoT device is any device within an IoT system, and can be either a controlled device or a controlling device. FIG4 schematically illustrates an IoT device for executing the method according to the present disclosure. As shown in FIG4 , the IoT device includes a communication unit, a semantic understanding unit, a device description unit, and a device control unit.
[0178] The communication unit is used to transmit data with other IoT devices in the IoT system based on wireless connection and / or wired connection. The communication unit includes software and hardware modules for completing data exchange between IoT devices.
[0179] The semantic understanding unit is used to receive capability query information, perform semantic analysis on the capability query information, and generate control information. The semantic understanding unit includes a word segmenter, a word embedding subunit, a similarity matching model, and a storage subunit.
[0180] The device description unit is used to store local capability description information and generate capability description information based on the local description information, wherein the local description information includes all capability description information, sub-capability description information, and capability description address.
[0181] The device control unit is used to control the IoT device's hardware and software to perform corresponding operations based on control instructions or control information sent by other IoT devices. Control instructions refer to control functions triggered by remote apps, remote controls, physical buttons, scheduled tasks, etc. in non-autonomous interaction situations.
[0182] In an optional embodiment, the IoT device further includes a security management unit and an environmental perception unit. Specifically, the security management unit is configured to generate and execute security policies, obtain security information about control devices, and obtain the security level of the control devices based on the security information. The environmental perception unit is configured to sense environmental variables based on sensors configured on the IoT device and obtain parameter information. For example, the environmental perception unit may be a plurality of sensing units, such as an ambient light brightness sensing unit, a temperature sensing unit, a humidity sensing unit, a sound sensing unit, a smoke sensing unit, or an infrared sensing unit.
[0183] It should be noted that the above-mentioned units coexist in an IoT device. Each unit on an IoT device can be multiple modules on a system of the device, or modules between different systems on the IoT device. Different units on the same IoT device can access and call each other, and exchange data with other IoT devices through the communication unit to achieve control interaction.
[0184] Based on the same inventive concept, an embodiment of the present disclosure provides an Internet of Things device control system, the system comprising a control device and a controlled device, the control device being any device within the Internet of Things system, and the controlled device being any device within the Internet of Things system other than the control device;
[0185] The control device is configured to send capability query information to the controlled device; in response to capability description information returned by the controlled device, perform semantic parsing on the capability description information based on the control intent of the control device to obtain control keywords; obtain at least one control information based on the control keywords, the control information including at least one of the following: an attribute, a behavior, and an interaction parameter, the capability description information and the capability query information being natural language information; and send the control information to the controlled device so that the controlled device performs an operation according to the control information;
[0186] The controlled device is used to generate the capability description information in response to the capability query information sent by the control device; send the capability description information to the control device; and perform operations according to the correctly identifiable control information sent by the control device in response to the correctly identifiable control information.
[0187] Based on the same inventive concept, an embodiment of the present disclosure provides an IoT device control apparatus, which is applied to a control device. The control device is any device within an IoT system. FIG5 schematically illustrates an IoT device control apparatus applied to a control device for executing a method according to the present disclosure. As shown in FIG5 , the apparatus includes:
[0188] a query module, configured to send capability query information to a controlled device, wherein the controlled device is any device in the IoT system that is different from the control device;
[0189] a parsing module, configured to perform semantic parsing on the capability description information returned by the controlled device based on the control intent of the control device to obtain control keywords;
[0190] A control information acquisition module, configured to obtain at least one control information based on the control keyword, wherein the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, and the capability description information and the capability query information are natural language information;
[0191] The control module is configured to send the control information to the controlled device so that the controlled device performs an operation according to the control information.
[0192] In an optional implementation, the control information acquisition module includes:
[0193] a similarity acquisition submodule, configured to input the control keyword into a semantic matching model to acquire the similarity between the capability description information and an initial command statement, wherein the initial command statement is a command statement preset in the semantic matching model;
[0194] a target command statement acquisition submodule, configured to take at least one initial command statement satisfying the similarity greater than a preset threshold as a target command statement;
[0195] The control information acquisition submodule is used to use the target command statement as the control information.
[0196] In an optional implementation, the control information acquisition submodule further includes:
[0197] a candidate control information acquisition subunit, configured to acquire at least one candidate control information based on the target command statement, wherein each candidate control information has the same attributes and behavior and different interaction parameters;
[0198] The control information acquisition subunit is configured to use the candidate control information as the control information.
[0199] In an optional implementation, the control information acquisition submodule further includes:
[0200] a sorting subunit, configured to sort the target command statements according to the similarity to obtain a control information set;
[0201] The control information acquisition subunit is configured to use the first-ranked target command statement in the control information set as the control information, where the first-ranked target command statement is the target command statement with the greatest similarity in the control information set.
[0202] In an optional embodiment, the device further includes:
[0203] a storage module, configured to store the capability description information and the control information in response to an operation success message returned by the controlled device, so that the control device can send the control information to the controlled device again based on the control intention;
[0204] The repeat control module is configured to send the target command statement with the next highest priority in the control information set as the control information to the controlled device in response to the operation failure information returned by the controlled device.
[0205] In an optional embodiment, the device further includes:
[0206] The security control module is configured to send the control information and the capability description information to the controlled device so that the controlled device matches the capability description information, and identify the control information in response to the capability description information that is successfully matched.
[0207] In an optional embodiment, the device further includes:
[0208] A second query module, configured to send the capability query information to the first controlled device and the second controlled device;
[0209] a first parsing module, configured to perform semantic parsing on the first capability description information returned by the first controlled device to obtain at least one first control information;
[0210] a first control module, configured to send the first control information to the first controlled device, so that the first controlled device performs an operation according to the first control information;
[0211] a second parsing module, configured to, in response to second capability description information returned by the second controlled device and first parameter information returned by the first controlled device, perform semantic parsing on the second capability description information to obtain at least one second control information, where the first parameter information is parameter information obtained after the first controlled device performs an operation according to the first control information;
[0212] The second control module is configured to send the second control information to the second controlled device, so that the second controlled device performs an operation according to the second control information.
[0213] In an optional implementation, the similarity acquisition submodule includes:
[0214] A word embedding subunit, configured to perform word embedding processing on the control keyword to obtain a keyword vector;
[0215] a similarity acquisition subunit, configured to calculate the similarity between the keyword vector and the word segmentation vector of the initial command sentence as the similarity between the capability description information and the initial command sentence;
[0216] The similarity between the keyword vector and the word segmentation vector of the initial command sentence is obtained according to the following formula:
[0217] Wherein, cosθ is the similarity between the keyword vector and the word vector of the initial command sentence; A i is the keyword vector corresponding to the i-th control keyword; B i is the word segmentation vector corresponding to the i-th word segmentation in the initial command statement; n is the number of the control keywords or the number of the word segmentations in the initial command statement.
[0218] Based on the same inventive concept, an embodiment of the present disclosure provides an IoT device control apparatus, which is applied to a controlled device. The controlled device is any device in an IoT system that is different from the control device. FIG6 schematically illustrates an IoT device control apparatus applied to a controlled device for executing the method according to the present disclosure. As shown in FIG6 , the apparatus includes:
[0219] a description module, configured to generate capability description information in response to the capability query information sent by the control device, wherein the capability description information and the capability query information are natural language information;
[0220] A sending module, configured to send the capability description information to the control device;
[0221] An execution module is used to respond to the correctly identifiable control information sent by the control device and execute an operation according to the correctly identifiable control information.
[0222] In an optional implementation, the description module includes:
[0223] A security information acquisition submodule, configured to acquire security information of the control device, wherein the security information includes at least one of the following: current connection information and historical interaction information;
[0224] A security level acquisition submodule, configured to acquire the security level of the control device based on the security information;
[0225] The description submodule is used to obtain all functional information from the local capability description information as the capability description information when the security level is the first level.
[0226] In an optional embodiment, the device further includes:
[0227] a credibility determination module, configured to determine whether the control device is a trusted device in response to the control information and the capability description information sent by the control device;
[0228] an identification module, configured to determine that the control device is the trusted device and identify the control information when the capability description information successfully matches the local capability description information;
[0229] The first execution module is configured to execute an operation according to the control information if the control information can be correctly identified.
[0230] In an optional embodiment, the device further includes:
[0231] A security policy generating module, configured to generate a security policy, wherein the security policy includes at least one of the following: a waiting time, a number of possible attempts, and a silent time;
[0232] A silence module is used to disconnect the control device within the silence duration in response to control information sent by the control device that cannot be correctly identified after exceeding the waiting time and / or receiving the control information again for the number of possible attempts.
[0233] 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, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0234] The various component embodiments of the present disclosure can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the computing processing equipment according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0235] For example, FIG7 illustrates a computing and processing device that can implement the methods of the present disclosure. The computing and processing device 100 conventionally includes a processor 120 and a computer program product or computer-readable medium in the form of a memory 110. The memory 110 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, a hard disk, or ROM. The memory 110 has storage space for program code for executing any of the method steps described above. For example, the storage space for program code can include individual program codes for implementing various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units. The storage unit can have storage segments, storage space, etc. arranged similarly to the memory 110 in the computing and processing device of FIG7 . The program code can, for example, be compressed in a suitable form. Typically, the storage unit includes computer-readable codes, ie, codes that can be read by a processor such as 120 , which, when executed by a computing processing device, cause the computing processing device to perform the steps of the method described above.
[0236] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0237] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0238] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0239] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.
Claims
1. A method for controlling an Internet of Things device, characterized in that: Applied to a control device, the method comprises: Sending capability query information to a controlled device, where the controlled device is any device in the Internet of Things system that is different from the control device; In response to the capability description information returned by the controlled device, based on the control intent of the control device, semantically parse the capability description information to obtain control keywords; Based on the control keyword, at least one control information is obtained, the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, the capability description information and the capability query information are natural language information; The control information is sent to the controlled device so that the controlled device performs an operation according to the control information.
2. The method for controlling an Internet of Things device according to claim 1, characterized in that: Based on the control keyword, at least one control information is obtained, including: Inputting the control keyword into a semantic matching model to obtain a similarity between the capability description information and an initial command statement, wherein the initial command statement is a command statement preset in the semantic matching model; Taking at least one initial command sentence satisfying the similarity greater than a preset threshold as a target command sentence; The target command statement is used as the control information.
3. The method for controlling an Internet of Things device according to claim 2, characterized in that: The target command statement is used as the control information, including: Based on the target command statement, obtaining at least one candidate control information, wherein each candidate control information has the same attribute and behavior, and each candidate control information has different interaction parameters; The candidate control information is used as the control information.
4. The method for controlling an Internet of Things device according to claim 2, characterized in that: The target command statement is used as the control information, including: Sorting the target command statements according to the similarity to obtain a control information set; The first-ranked target command statement in the control information set is used as the control information, wherein the first-ranked target command statement is the target command statement with the greatest similarity in the control information set.
5. The method for controlling an Internet of Things device according to claim 4, characterized in that: After sending the control information to the controlled device, the method further includes: In response to the operation success information returned by the controlled device, the capability description information and the control information are stored, so that the control device can send the control information to the controlled device again based on the control intention; In response to the operation failure information returned by the controlled device, the target command statement with the next sequence in the control information set is sent to the controlled device as the control information.
6. The method for controlling an Internet of Things device according to claim 1, characterized in that: After obtaining at least one control information, the method further includes: The control information and the capability description information are sent to the controlled device so that the controlled device matches the capability description information, and the control information is identified in response to the capability description information that matches successfully.
7. The method for controlling an Internet of Things device according to claim 1, characterized in that: The controlled device includes a first controlled device and a second controlled device, and the method further includes: Sending the capability query information to the first controlled device and the second controlled device; In response to the first capability description information returned by the first controlled device, semantically parse the first capability description information to obtain at least one first control information; sending the first control information to the first controlled device, so that the first controlled device performs an operation according to the first control information; In response to the second capability description information returned by the second controlled device and the first parameter information returned by the first controlled device, semantically parse the second capability description information to obtain at least one second control information, where the first parameter information is parameter information obtained after the first controlled device performs an operation according to the first control information; The second control information is sent to the second controlled device, so that the second controlled device performs an operation according to the second control information.
8. The method for controlling an Internet of Things device according to claim 2, characterized in that: Obtaining the similarity between the capability description information and the initial command statement includes: Performing word embedding processing on the control keyword to obtain a keyword vector; Calculating the similarity between the keyword vector and the word segmentation vector of the initial command sentence as the similarity between the capability description information and the initial command sentence; The similarity between the keyword vector and the word segmentation vector of the initial command sentence is obtained according to the following formula: Wherein, cosθ is the similarity between the keyword vector and the word vector of the initial command sentence; A i is the keyword vector corresponding to the i-th control keyword; B i is the word segmentation vector corresponding to the ith word segmentation in the initial command statement; n is the number of the control keywords or the number of the word segments in the initial command statement.
9. A method for controlling an Internet of Things device, characterized in that: Applied to a controlled device, the controlled device is any device in an Internet of Things system that is different from a control device, the method comprises: In response to the capability query information sent by the control device, generating capability description information, wherein the capability description information and the capability query information are natural language information; Sending the capability description information to the control device; In response to the correctly identifiable control information sent by the control device, an operation is performed according to the correctly identifiable control information.
10. The method for controlling an Internet of Things device according to claim 9, characterized in that: In response to the capability query information sent by the control device, capability description information is generated, including: In response to the capability query information sent by the control device, obtaining security information of the control device, the security information including at least one of the following: current connection information and historical interaction information; Based on the security information, obtaining a security level of the control device; When the security level is the first level, all function information is obtained from the local capability description information as the capability description information.
11. The method for controlling an Internet of Things device according to claim 9, characterized in that: After sending the capability description information to the control device, the method further includes: In response to the control information and the capability description information sent by the control device, determining whether the control device is a trusted device; When the capability description information matches the local capability description information successfully, determining that the control device is the trusted device, and identifying the control information; When the control information can be correctly identified, an operation is performed according to the control information.
12. The method for controlling an Internet of Things device according to claim 9, characterized in that: After sending the capability description information to the control device, the method further includes: Generate a security policy, wherein the security policy includes at least one of the following: a waiting time, a number of possible attempts, and a silent time; In response to control information sent by the control device that cannot be correctly identified, after exceeding the waiting time and / or receiving control information again for the number of possible attempts, disconnecting from the control device within the silence time.
13. An Internet of Things device, the Internet of Things device being any device in an Internet of Things system, the Internet of Things device comprising: A communication unit, used for transmitting data with other IoT devices in the IoT system based on a wireless connection form and / or a wired connection form; A semantic understanding unit, configured to receive capability query information, perform semantic analysis on the capability query information, and generate control information; A device description unit, configured to store local capability description information and generate capability description information based on the local capability description information; The device control unit is used to control the IoT device to perform operations based on control instructions or other control information sent by the IoT device.
14. An Internet of Things device control system, characterized in that: The system includes a control device and a controlled device, wherein the control device is any device in the Internet of Things system, and the controlled device is any device in the Internet of Things system that is different from the control device; The control device is used to send capability query information to the controlled device; In response to the capability description information returned by the controlled device, based on the control intent of the control device, semantically parse the capability description information to obtain control keywords; Based on the control keyword, at least one control information is obtained, the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, the capability description information and the capability query information are natural language information; Sending the control information to the controlled device so that the controlled device performs an operation according to the control information; The controlled device is configured to generate the capability description information in response to the capability query information sent by the control device; The capability description information is sent to the control device; and in response to the correctly identifiable control information sent by the control device, an operation is performed according to the correctly identifiable control information.
15. An Internet of Things device control device, characterized in that: Applied to control equipment, including: A query module, used to send capability query information to a controlled device, wherein the controlled device is any device in the Internet of Things system that is different from the control device; A parsing module, configured to respond to the capability description information returned by the controlled device and, based on the control intent of the control device, perform semantic parsing on the capability description information to obtain control keywords; A control information acquisition module, configured to obtain at least one control information based on the control keyword, wherein the control information includes at least one of the following: an attribute, a behavior, and an interaction parameter, and the capability description information and the capability query information are natural language information; The control module is used to send the control information to the controlled device so that the controlled device performs an operation according to the control information.
16. An Internet of Things device control device, characterized in that: Applicable to controlled devices, where the controlled device is any device in the IoT system that is different from the control device, including: A description module is used to generate capability description information in response to the capability query information sent by the control device based on the security level of the control device, the capability description information and the capability query information The information is natural language information; A sending module, used for sending the capability description information to the control device; An execution module is used to respond to the correctly identifiable control information sent by the control device and execute an operation according to the correctly identifiable control information.
17. A computing device, characterized in that: include: a memory having computer readable code stored therein; as well as One or more processors, when the computer readable code is executed by the one or more processors, the computing and processing device executes the Internet of Things device control method as described in any one of claims 1-8, or the computing and processing device executes the Internet of Things device control method as described in any one of claims 9-12.
18. A computer program, characterized in that The method comprises a computer-readable code, which, when executed on a computing and processing device, causes the computing and processing device to execute the method for controlling an Internet of Things device according to any one of claims 1 to 8, or causes the computing and processing device to execute the method for controlling an Internet of Things device according to any one of claims 9 to 12.
19. A computer readable medium, characterized in that A computer program as claimed in claim 18 is stored therein.
Citation Information
Cited By
Communication method and system between devices and electronic device
CN119484605A
