Device linkage method and device in Internet of Things network, storage medium and electronic device
In the IoT linkage service, the shortest linkage path is determined based on the network topology information of the IoT network and the linkage information is generated and sent for the device, the linkage effectiveness and timeliness problems caused by the complex networking between devices are solved, and efficient , accurate equipment linkage.
Patent Information
- Application Number
- CN202111321777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-11-09
AI Technical Summary
In the IoT linkage business, due to the complex networking between devices, the effectiveness and timeliness of device linkage are poor.
By determining the shortest path corresponding to the target linkage event based on the network topology information of the target Internet of Things, generating linkage information for the devices on the path, and sending this information to each device to control it to execute the corresponding linkage event when the linkage event is triggered. Linked operation.
It realizes accurate and fast transmission of device linkage, avoids network flooding caused by broadcast or multicast methods, improves the effectiveness and timeliness of device linkage, and optimizes network performance.
Smart Images

Figure CN114070873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and device for linking devices in an Internet of Things network, a storage medium, and an electronic device. Background Art
[0002] In the IoT linkage business, in order to ensure the efficiency of linkage control, the linkage information can be pre-configured on the device side, and the direct linkage of devices can be realized through point-to-point communication between devices. During the device linkage process, the linkage triggering device can broadcast or multicast the linkage notification in the network, and the relay point forwards the linkage notification after receiving the broadcast or multicast linkage notification.
[0003] In small-scale application scenarios, the networking between devices is simple, and point-to-point communication between devices can be achieved. However, in complex application scenarios, the networking between devices is complex, and even the networks between devices are heterogeneous. Broadcasting or multicasting linkage notifications can easily cause network flooding, and the effectiveness and timeliness of device linkage cannot be guaranteed. Complex linkage configuration information planning is required to achieve linkage between devices.
[0004] That is to say, the device linkage method in the Internet of Things network in the related art has the problem of poor effectiveness and timeliness of device linkage due to the complex networking between devices. Summary of the invention
[0005] The embodiments of the present invention provide a method and apparatus for device linkage in an Internet of Things network, a storage medium, and an electronic device, so as to at least solve the problem that the device linkage method in an Internet of Things network in the related art has poor effectiveness and timeliness of device linkage due to the complex networking between devices.
[0006] According to one aspect of an embodiment of the present application, a device linkage method in an Internet of Things network is provided, comprising: determining a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; generating linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when the target linkage event is triggered, and the plurality of first devices include the first target device and the second target device; and sending the linkage information of each first device to each first device to control each first device to perform a corresponding linkage operation when the target linkage event is triggered.
[0007] According to another aspect of an embodiment of the present application, a device linkage apparatus in an Internet of Things network is also provided, including: a first determination unit, used to determine a first linkage path corresponding to a target linkage event according to network topology information of the target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; a first generation unit, used to generate linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when the target linkage event is triggered, and the plurality of first devices include the first target device and the second target device; a first sending unit, used to send the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when the target linkage event is triggered.
[0008] In an exemplary embodiment, the first determination unit includes: a first determination module, which is used to determine, based on the network topology information, a path with the shortest transmission time from the first target device to the second target device as the first linkage path; or a second determination module, which is used to determine, based on the network topology information, a path with the least number of devices from the first target device to the second target device as the first linkage path; or a third determination module, which is used to determine, based on the network topology information, a path with no device with a load exceeding a load threshold from the first target device to the second target device and with the shortest transmission time as the first linkage path; or a fourth determination module, which is used to determine, based on the network topology information, a path with no device with a load exceeding a load threshold from the first target device to the second target device and with the least number of devices as the first linkage path.
[0009] In an exemplary embodiment, the first determination unit includes: a fifth determination module, which is used for determining, when the target Internet of Things network is a heterogeneous network and the first target device and the second target device are in different networks, a fusion point device of a first network where the first target device is located and a fusion point device of a second network where the second target device is located according to the network topology information, wherein the fusion point device belongs to both the first network and the second network; a sixth determination module, which is used for determining a first shortest path from the first target device to the fusion point device in the first network and a second shortest path from the fusion point device to the second target device in the second network; and a splicing unit, which is used for splicing the first shortest path and the second shortest path to obtain the first linkage path.
[0010] In an exemplary embodiment, the first generation unit includes: a first generation module, used to generate first linkage information for the first target device, wherein the first linkage information is used to indicate the triggering condition of the target linkage event, and is used to indicate the next device that the first target device needs to be linked to when the target linkage event is triggered; a second generation module, used to generate second linkage information for the second target device, wherein the second linkage information is used to indicate the target device operation that the second target device needs to perform when the target linkage event is triggered; a third generation module, used to generate third linkage information for a transit device on the first linkage path, wherein the transit device is other device among the multiple first devices except the first target device and the second target device, and the third linkage information is used to indicate the next device that the transit device needs to be linked to when the target linkage event is triggered.
[0011] In an exemplary embodiment, the apparatus further includes: a second generating unit, located on the first target device, for generating a first linkage instruction after sending the linkage information of each first device to each first device, when the first target device determines that the target linkage event is triggered according to the first linkage information, and sending the first linkage instruction to the next device of the first target device, wherein the first linkage instruction is used to instruct the next device of the first target device to perform linkage based on the target linkage event; a third generating unit, located on the target transfer device, for generating a second linkage instruction according to the third linkage information when the target transfer device receives the first linkage instruction or a linkage instruction sent by other transfer devices other than the target transfer device, and sending the second linkage instruction to the next device of the target transfer device, wherein the second linkage instruction is used to instruct the next device of the target transfer device to perform linkage based on the target linkage event; an execution unit, located on the second target device, for executing the target device operation according to the second linkage information when the second target device receives the second linkage instruction sent by the previous device of the second target device.
[0012] In an exemplary embodiment, the device also includes: a second determination unit, which is used to, after sending the linkage information of each first device to each first device, redetermine the second linkage path corresponding to the target linkage event according to the changed network topology information when a change in the network topology information is detected, wherein the second linkage path is the shortest path from the first target device to the second target device; a fourth generation unit, which is used to generate linkage information for each second device among a plurality of second devices on the second linkage path, wherein the linkage information of each second device is used to indicate the linkage operation performed by each second device when the target linkage event is triggered, and the plurality of second devices include the first target device and the second target device; a second sending unit, which is used to send the linkage information of each second device to each second device to control each second device to perform the corresponding linkage operation when the target linkage event is triggered.
[0013] In an exemplary embodiment, the device also includes: a receiving unit, used to periodically receive device status information reported by each first device before re-determining the second linkage path corresponding to the target linkage event based on the changed network topology information, wherein the device status information is used to indicate the connection status with each first device; and a third determination unit, used to determine that the network topology information has changed when the number of times the device status information reported by the target device among the multiple first devices is not received reaches a target number threshold.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned device linkage method in the Internet of Things network when running.
[0015] According to another aspect of the embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the device linkage method in the Internet of Things network through the computer program.
[0016] In an embodiment of the present application, a method is adopted in which the shortest path from a trigger device to an action device is determined according to network topology information of an Internet of Things network, and linkage information is sent to each device on the shortest path. A first linkage path corresponding to a target linkage event is determined according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; linkage information is generated for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when the target linkage event is triggered, and the plurality of first devices include a first target device and a second target device; the linkage information of each first device is sent to each first device The invention provides a device for controlling each first device to perform a corresponding linkage operation when a target linkage event is triggered. Since the shortest path corresponding to the triggering device (i.e., the first target device) and the action device (i.e., the second target device) of the linkage event is determined according to the network topology structure of the Internet of Things network, linkage information is generated for the linkage devices on the shortest action path and sent to the linkage devices, so that when the linkage event is triggered, the linkage devices can be linked according to the linkage information stored in advance, and the purpose of accurate and fast transmission of linkage notifications can be achieved, and the network flooding of linkage notifications through broadcasting and multicasting can be avoided, thereby achieving the technical effect of improving the effectiveness and timeliness of device linkage and optimizing network performance, thereby solving the problem of poor effectiveness and timeliness of device linkage due to complex networking between devices in the device linkage method in the Internet of Things network in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a schematic diagram of a hardware environment of an optional device linkage method in an Internet of Things network according to an embodiment of the present application;
[0020] Figure 2 It is a flow chart of an optional method for linking devices in an Internet of Things network according to an embodiment of the present application;
[0021] Figure 3is a schematic diagram of an optional shortest linkage path according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an optional heterogeneous network linkage according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of optional linkage rule information according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of linkage information of an optional triggering device according to an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of an optional execution device linkage information according to an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of linkage information of an optional transfer device according to an embodiment of the present application;
[0027] Fig. 9 is a flow chart of an optional linkage rule configuration according to an embodiment of the present application;
[0028] Fig.10 is a schematic diagram of an optional process of triggering device linkage according to an embodiment of the present application;
[0029] Fig.11 It is a schematic diagram of an optional process of linking a transfer device and an operating device according to an embodiment of the present application;
[0030] Fig.12 It is a schematic diagram of a process of adapting to dynamic changes in network topology according to an embodiment of the present application;
[0031] Fig.13 is a schematic diagram of a network topology dynamic change adaptation according to an embodiment of the present application;
[0032] Fig.14 It is a structural block diagram of an optional device linkage apparatus in an Internet of Things network according to an embodiment of the present application;
[0033] Fig.15 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] According to one aspect of an embodiment of the present application, a method for linking devices in an Internet of Things network is provided. Optionally, in this embodiment, the method for linking devices in an Internet of Things network can be applied to: Figure 1 In the hardware environment composed of the Internet of Things device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the IoT device 102 via a network, and can be used to provide services (such as application services, etc.) for the IoT device or a client installed on the IoT device. A database can be set on the server or independently of the server to provide data storage services for the server 104.
[0037] The above network may include but is not limited to at least one of the following: wired network, wireless network. The above wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The IoT device 102 may be, but is not limited to, a smart home device, such as a smart TV, a smart refrigerator, a smart water heater, etc.
[0038] Optionally, the server 104 may also be provided with one or more gateways ( Figure 1The device linkage method in the Internet of Things network of the present application embodiment may be executed by the server 104, the Internet of Things device 102, or the gateway alone, or may be executed by at least two of the server 104, the Internet of Things device 102, and the gateway together. The Internet of Things device 102 may execute the device linkage method in the Internet of Things network of the present application embodiment by the client installed thereon.
[0039] Taking the device linkage method in the Internet of Things network in this embodiment executed by the gateway as an example, Figure 2 is a flow chart of an optional method for linking devices in an Internet of Things network according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0040] Step S202: Determine a first linkage path corresponding to a target linkage event based on network topology information of the target IoT network. The target linkage event is a linkage event between a first target device and a second target device in the target IoT network. The first linkage path is the shortest path from the first target device to the second target device.
[0041] The device linkage method in the IoT network in this embodiment can be applied to the scenario of device linkage (i.e., IoT linkage service) between different IoT devices in the IoT network. The IoT devices mentioned above can be smart home devices located in the user's home, and can be electronic devices equipped with smart chips such as sensors (e.g., infrared sensors), smart TVs, smart refrigerators, and smart water heaters. Compared with traditional home appliances, smart home appliances have added computing modules, network interfaces, input and output devices, etc., so that the smart home appliances in this embodiment have the functions of intelligent analysis and intelligent services.
[0042] It should be noted that the user family can be created by the target object (for example, the owner of the family) through the target application running on its terminal device. The target object or other objects can be bound to devices belonging to the family through the target application, such as smart home devices. In addition, in addition to the target object, the associated objects of the family (for example, family members) can also be bound through the target application. The above-mentioned associated objects can be long-term residents in the family or guests who do not visit the home often. The above-mentioned terminal devices can be smart phones (for example, Android phones, iOS phones, etc.), tablet computers, PDAs, and mobile Internet devices (Mobile Internet Devices, MID), PADs and other terminal devices. In this embodiment, the device type of the terminal device is not limited.
[0043] For the linkage business of the Internet of Things, a centralized linkage control method can be adopted. For example, linkage information can be configured on the cloud platform and used as a hub to realize linkage between devices. Linkage information can also be configured on gateway devices and used as a hub to realize linkage between devices. However, the linkage efficiency of the device linkage control method performed by the centralized control device is poor.
[0044] In this embodiment, a decentralized IoT linkage control solution is provided, which can be applied to IoT linkage control. Before the devices are linked, the gateway plans the shortest linkage path based on characteristic information such as network topology, generates linkage information for each device on the shortest linkage path and sends it to the corresponding device, so that when a linkage event is triggered, the devices can be directly linked based on the stored linkage information, thereby improving the linkage efficiency.
[0045] For the target linkage event, the target gateway can obtain the linkage rule configuration of the target linkage event (which defines how the target linkage event performs device linkage), determine the target linkage event, and first obtain the network topology information of the target IoT network. Here, the target linkage event refers to the linkage event between the first target device and the second target device in the target IoT network. The first target device is the trigger device of the target linkage event, and the second target device is the action device of the target linkage event; the network topology information is used to indicate the topological relationship between multiple devices in the target IoT network. Each of the multiple devices can be a node in the target IoT network, or a node device.
[0046] For example, a human body sensor can be installed at the door of the user's home. When it is detected that someone (it can be a specific person, such as the head of the family) enters the home, the smart home devices in the home can be controlled to work together: turn on the lights, open the curtains, turn on the TV, etc.
[0047] The linkage rule configuration can be the default configuration of the device linkage system in the target IoT network, or it can be manually configured by the user. For example, after the user sets the linkage rules of the target linkage event through the terminal device or directly on the IoT device (which can be manually configured or selected from the recommended linkage events), the terminal device or IoT device can send the linkage rule configuration of the target linkage event to the target gateway (for example, a home gateway). The target gateway can obtain the linkage rule configuration of the target linkage event. The network topology information can be pre-stored in the target gateway, and the network topology information can be updated based on the interaction status between the target gateway and the IoT devices in the target IoT network, the device status information reported by the IoT devices, etc.
[0048] After obtaining the linkage rule configuration and network topology information, the target gateway can determine the first linkage path corresponding to the target linkage event according to the network topology information of the target IoT network. Here, the first linkage path is the shortest path from the first target device to the second target device. The first linkage path may include multiple first devices, which include at least the first target device and the second target device, and may also include other devices, such as at least one transfer device, which is not limited in this embodiment.
[0049] It should be noted that the above process of determining the first linkage path corresponding to the target linkage event can also be performed on the first target device or server (server in the Internet of Things platform). For the scenario executed by the first target device, the first target device can directly obtain or receive the above linkage rule configuration forwarded by the server, and adopt a method similar to the above to obtain network topology information and determine the first linkage path corresponding to the target linkage event. For the scenario executed by the server, the server can adopt a method similar to the above to obtain the linkage rule configuration and network topology information, and adopt a method similar to the above to determine the first linkage path corresponding to the target linkage event. I will not go into details here.
[0050] For example, in complex networking scenarios, the shortest linkage path can be planned based on device networking topology and other feature information. Figure 3 As shown, when device A (an example of the first target device) needs to be linked with device E (an example of the second target device), there may be two network transmission paths, ABE and ACDE. Figure 3 The network topology characteristic information (which may include network topology information) shown, the Internet of Things gateway (an example of a target gateway) calculates that the shortest network transmission path (an example of a first linkage path) for device A to link with device E is ABE.
[0051] Step S204, generating linkage information for each first device among the multiple first devices on the first linkage path, wherein the linkage information of each first device is used to indicate the linkage operation performed by each first device when the target linkage event is triggered, and the multiple first devices include a first target device and a second target device.
[0052] After determining the first linkage path, the target gateway may generate linkage information for each first device among the multiple first devices, and the above linkage information is used for the linkage operation that each first device needs to perform when the target linkage event is triggered. The linkage information may include but is not limited to at least one of the following information: linkage event, condition information, linkage device information, action information. The linkage information corresponding to different devices among the multiple first devices may be the same or different. When the linkage information is the same, each first device can determine the linkage operation it needs to perform by matching the event identifier of the target linkage event, the device identifier of each first device, and the linkage operation to be performed.
[0053] For example, Figure 3 As shown, after calculating that the shortest network transmission path for device A to link device E is ABE, the IoT gateway can generate linkage information for device A, device B, and device E.
[0054] Step S206: Send the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when the target linkage event is triggered.
[0055] The target gateway can send the linkage information of each first device to each first device. For each first device, after receiving the linkage information of the device, it can be saved locally. After determining that the target linkage event is triggered, the corresponding linkage operation is performed according to the saved linkage information, thereby realizing efficient linkage between the first target device and the second target device.
[0056] For example, Figure 3 As shown, the IoT gateway can send linkage information to device A, device B, and device E (each device can only contain its own linkage information). When device A triggers linkage, A can link B, and B can forward the linkage to E, thereby achieving the shortest linkage control path.
[0057] Through the above steps S202 to S206, according to the network topology information of the target Internet of Things network, a first linkage path corresponding to the target linkage event is determined, wherein the target linkage event is a linkage event between the first target device and the second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; linkage information is generated for each first device among the multiple first devices on the first linkage path, wherein the linkage information of each first device is used to indicate the linkage operation performed by each first device when the target linkage event is triggered, and the multiple first devices include the first target device and the second target device; the linkage information of each first device is sent to each first device to control each first device to perform the corresponding linkage operation when the target linkage event is triggered, thereby solving the problem of poor effectiveness and timeliness of device linkage due to the complex networking between devices in the device linkage method in the Internet of Things network in the related art, improving the effectiveness and timeliness of device linkage, and optimizing network performance.
[0058] In an exemplary embodiment, determining a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network includes:
[0059] S11, according to the network topology information, determining the path with the shortest transmission time from the first target device to the second target device as the first linkage path; or
[0060] S12, according to the network topology information, determining the path from the first target device to the second target device that includes the least number of devices as the first linkage path; or
[0061] S13, according to the network topology information, determining a path from the first target device to the second target device where no device has a load exceeding a load threshold and the transmission time is shortest as a first linkage path; or
[0062] S14, according to the network topology information, determine a path from the first target device to the second target device, which has no device with a load exceeding a load threshold and includes the least number of devices, as a first linkage path.
[0063] The target gateway can plan the shortest point-to-point network topology based on the network topology feature information to achieve linkage between devices. The above-mentioned network topology feature information may include network topology information, and may also include other feature information, which may include but is not limited to at least one of the following: the network status of the device, the load status of the device, and the transmission time between devices. When planning the shortest linkage path, based on the network topology feature information, the first target device can be used as the starting point, and the preset path search rules can be used to find the shortest path to the second target node. Based on different user requirements, corresponding path search rules can be used to determine the first linkage path to meet different user needs.
[0064] The above-mentioned path search operation can be performed for a specific device. For example, for a target linkage event, based on the network topology feature information, the first target device can be used as the starting point to find the shortest path to the second target node using a preset path search rule. It can also be performed for all devices. For example, based on the network topology feature information, the preset path search rule can be used to find the shortest path from each device in the target IoT network to other devices in the target IoT network except the device. This is not limited in this embodiment.
[0065] As an optional implementation, in order to ensure the timeliness of the linkage notification transmission, the path with the shortest transmission time from the first target device to the second target device can be determined as the first linkage path based on the network topology information, so as to save the time overhead required for the linkage notification to be transmitted between the first target device and the second target device.
[0066] Here, the transmission time between different devices can be predetermined. For example, the target gateway determines the transmission time of the message between different devices through the timestamp carried in the received message. The above message can be sent to calculate the shortest linkage path, or it can be recorded by the target device during daily message processing. This is not limited in this embodiment.
[0067] As another optional implementation, during the linkage process, the probability of an error is associated with the number of linkage devices on the linkage path. In order to reduce the probability of errors in device linkage, the path from the first target device to the second target device containing the least number of devices can be determined as the first linkage path to improve the success rate of linkage between the first target device and the second target device.
[0068] As another optional implementation, when the device load is too large, the linkage notification may stagnate for a long time at the device with the large load, resulting in unstable efficiency of the device processing linkage, and may even cause linkage failure. In order to improve the stability of device linkage and reduce the probability of device linkage sending errors, the path from the first target device to the second target device where there is no device with a load exceeding the load threshold and the transmission time is the shortest (or the path containing the least number of devices) can be determined as the first linkage path.
[0069] Optionally, before determining the shortest linkage path, devices with loads exceeding a load threshold in the network topology of the target IoT network can be removed first to obtain updated network topology information, and based on the network topology information, the path with the shortest transmission time from the first target device to the second target device or the path with the least number of devices can be determined as the first linkage path.
[0070] Through this embodiment, different path search rules are used to determine the shortest linkage path, which can improve the flexibility and applicability of determining the shortest linkage path.
[0071] In an exemplary embodiment, the target IoT network is a heterogeneous network, and the first target device and the second target device are in different networks, wherein the first target device may be in the first network, and the second target device may be in the second network. Figure 4 As shown, device A is in network 1, and device E is in network 2. Device A and device E are in different networks, and linkage information cannot be directly sent to device A and device E to establish a point-to-point linkage from device A to device E.
[0072] In this embodiment, for a heterogeneous network, determining a first linkage path corresponding to a target linkage event according to network topology information of a target IoT network includes:
[0073] S21, determining, according to the network topology information, a fusion point device of a first network where the first target device is located and a second network where the second target device is located, wherein the fusion point device belongs to both the first network and the second network;
[0074] S22, determining a first shortest path from the first target device to the fusion point device in the first network, and a second shortest path from the fusion point device to the second target device in the second network;
[0075] S23, concatenating the first shortest path and the second shortest path to obtain a first linkage path.
[0076] Since it is impossible to directly determine the shortest linkage path between different devices in a heterogeneous network, the fusion point device of the two networks where the first target device and the second target device are located can be found according to the networking situation. The fusion point device can be used to realize the linkage between the first target device and the second target device. In a heterogeneous network environment, when users configure linkage rules, they do not need to worry about device network factors, and the system will automatically match and complete it, thereby optimizing the linkage configuration method.
[0077] The target gateway can determine the fusion point device of the first network where the first target device is located and the second network where the second target device is located according to the network topology information. The fusion point device here belongs to both the first network and the second network, that is, the intersection device of the first network and the second network.
[0078] After determining the fusion point device, the target gateway can respectively determine the first shortest path from the first target device to the fusion point device in the first network and the second shortest path from the fusion point device to the second target device in the second network. The method of calculating the first shortest path and the second shortest path is similar to the above, and will not be repeated in this embodiment.
[0079] After determining the first shortest path and the second shortest path, the target gateway can splice the first shortest path and the second shortest path to obtain the first linkage path. The above splicing process can be based on the merging operation of the first shortest path and the second shortest path performed by the fusion point device, or it can be other splicing methods. This is not limited in this embodiment.
[0080] There may be one or more fusion point devices for the first network and the second network. When there are multiple fusion point devices, the shortest linkage paths through each fusion point device may be determined respectively to obtain multiple shortest linkage paths, and then the first linkage path may be selected from the multiple shortest linkage paths. It is also possible to combine different fusion point devices to obtain multiple device combinations, each device combination including at least one connected device among the multiple fusion point devices, determine the shortest linkage paths through each device combination respectively to obtain multiple shortest linkage paths, and then select the first linkage path from the multiple shortest linkage paths.
[0081] For example, Figure 4 As shown, according to the networking situation, the fusion point device of the two networks where device A and device E are located is found, and the linkage information is sent to the device to realize the point-to-point linkage from device A to device E. In other words, when configuring the linkage from device A to device E, the device C can be automatically identified and added to the linkage path according to the network topology information, the network path of ACE can be found, and the linkage rules can be converted into the device linkage information of devices A, C, and E and sent to devices A, C, and E, thereby realizing the decentralized linkage from device A to device E in the heterogeneous network.
[0082] Through this embodiment, in a heterogeneous network scenario, linkage between devices in different networks is achieved through a fusion point device, which can improve the success rate of device linkage and further improve the user experience.
[0083] In an exemplary embodiment, generating linkage information for each first device among a plurality of first devices on a first linkage path includes:
[0084] S31, generating first linkage information for a first target device, wherein the first linkage information is used to indicate a triggering condition of a target linkage event and to indicate a next device that the first target device needs to be linked with when the target linkage event is triggered;
[0085] S32, generating second linkage information for the second target device, wherein the second linkage information is used to indicate a target device operation that the second target device needs to perform when the target linkage event is triggered;
[0086] S33, generating third linkage information for the transit device on the first linkage path, wherein the transit device is other device among the multiple first devices except the first target device and the second target device, and the third linkage information is used to indicate the next device that the transit device needs to be linked with when the target linkage event is triggered.
[0087] The linkage rule configuration may be linkage rule information, which is used to describe the relevant information of the device that triggers the linkage action of the device, such as Figure 5 As shown, the linkage rule information may include at least one of the following information:
[0088] (1) linkage trigger information, which may include a device attribute of a certain device (trigger device) and the attribute value of the device attribute, and is used to describe that when the device attribute of the device is the attribute value, linkage control is triggered;
[0089] (2) linkage trigger condition information, which is used to describe the linkage trigger condition. The linkage trigger is considered valid only when the linkage trigger condition is met. It can be time or a certain attribute value of the device;
[0090] (3) The linkage control information may include device information of the action device to be operated and action information of the linkage action to be performed by the action device.
[0091] In order to reduce the storage consumption on the device side, the device side can only store the linkage information related to the device. The target gateway can generate corresponding linkage information for each device according to the role of the device in the linkage process. The corresponding linkage information content can be divided into three types of structured data: trigger device, transfer device, and action device.
[0092] For the first target device, the first target device, as the trigger device of the target linkage event, can be used to check whether the target linkage event is triggered, and when it is determined that the target linkage event is triggered, control the next device to be linked. Based on this, the target gateway can generate first linkage information for the first target device, and the first linkage information can be used to indicate the triggering condition of the target linkage event, and to indicate the next device that the first target device needs to be linked when the target linkage event is triggered. Optionally, the first linkage information can also be used to indicate the linkage triggering condition.
[0093] The first linkage information may include: linkage trigger information used to indicate the triggering condition of the target linkage event, a linkage event identifier used to identify the target linkage event, linkage device information used to indicate the next device that the first target device needs to be linked with when the target linkage event is triggered, and may also include linkage trigger condition information used to indicate the linkage trigger condition.
[0094] For example, the linkage information of the trigger device is Figure 6As shown, it may include: a trigger attribute value that triggers a linkage event, indicating a time or attribute condition combination when the trigger is effective, an output event ID (Identifier), an operating device of the triggering device and an operating value, where the operating device may be the next device of the triggering device, and the operating value may be used to identify the operation that the next device needs to perform.
[0095] The second target device, as the action device of the target linkage event, only needs to perform the corresponding linkage operation without being linked with the next device. Based on this, the target gateway can generate second linkage information for the second target device, and the second linkage information can be used to indicate the target device operation that the second target device needs to perform when the target linkage event is triggered.
[0096] The second linkage information may include: a linkage event identifier for identifying a target linkage event, and device operation information for indicating a target device operation to be performed by the second target device when the target linkage event is triggered. Figure 7 As shown, it may include: event ID, operation value is used to identify the device operation that needs to be performed by this device.
[0097] In addition to the first target device and the second target device, the multiple first nodes may also include at least one transfer device. Since the transfer device is located in the middle of the first linkage path, its main function is to forward the linkage notification and transmit the linkage notification to the second target device. Based on this, the target gateway can generate third linkage information for the transfer device on the first linkage path, and the third linkage information can be used to indicate the next device that the transfer device needs to be linked to when the target linkage event is triggered.
[0098] The third linkage information may include: a linkage event identifier for identifying the target linkage event, and linkage device information for indicating the next device that the transfer device needs to be linked to when the target linkage event is triggered. Figure 8 As shown, it may include: event ID, the target device is the next device of the transfer device, which may be a transfer device or an action device.
[0099] Through this embodiment, different linkage information is configured according to the role of the device in the linkage, which can optimize the device-side linkage configuration storage, reduce device storage consumption, and achieve minimized storage of device-side linkage information.
[0100] In an exemplary embodiment, after sending the linkage information of each first device to each first device, the method further includes:
[0101] S41, when the first target device determines that the target linkage event is triggered according to the first linkage information, the first target device generates a first linkage instruction, and sends the first linkage instruction to a next device of the first target device, wherein the first linkage instruction is used to instruct the next device of the first target device to perform linkage based on the target linkage event;
[0102] S42, when the target transfer device receives the first linkage instruction, or the linkage instruction sent by other transfer devices except the target transfer device, the target transfer device generates a second linkage instruction according to the third linkage information, and sends the second linkage instruction to the next device of the target transfer device, wherein the second linkage instruction is used to instruct the next device of the target transfer device to perform linkage based on the target linkage event;
[0103] S43: When the second target device receives the second linkage instruction sent by the previous device of the second target device, the second target device performs the target device operation according to the second linkage information.
[0104] Based on the received linkage information, devices with different roles on the first linkage path can perform different operations, that is, the trigger device, the transfer device and the action device can perform different linkage operations according to the linkage information they receive to achieve the linkage between the first target device and the second target device.
[0105] For the first target device, it can determine whether it is necessary to trigger linkage, that is, whether it is necessary to trigger the target linkage event, based on the first linkage information. When it is determined that the target linkage event is triggered based on the first linkage information, the first target device can generate a first linkage instruction (that is, linkage notification) and send the first linkage instruction to the next device of the first target device. The first linkage instruction is used to instruct the next device of the first target device to perform linkage based on the target linkage event.
[0106] For example, for Figure 3 When it is determined according to the linkage information that the linkage event is triggered, device A can generate linkage notification 1, and send linkage notification 1 to device B to instruct device B to perform linkage based on the linkage event.
[0107] For the target transfer device (if the first linkage path includes a transfer device, it can be any transfer device), the previous device of the target transfer device on the first linkage path can be the first target device or another transfer device. The target transfer device can receive the linkage instruction sent by its previous device, and determine that the corresponding linkage event is the target linkage event based on the linkage instruction, thereby matching the linkage information corresponding to the target linkage event, that is, the third linkage information.
[0108] The target transfer device can generate a second linkage instruction according to the third linkage information, and send the second linkage instruction to the next device of the target transfer device to instruct the next device of the target transfer device to perform linkage based on the target linkage event. For example, when device B receives linkage instruction 1 sent by device A, it can generate linkage instruction 2 according to the linkage information stored in advance, and send the linkage instruction 2 to device E.
[0109] The second target device, the previous device of the second target device on the first linkage path can be the first target device or a transit device. The second target device can receive the linkage instruction sent by the previous device, and determine that the corresponding linkage event is the target linkage event based on the linkage instruction, thereby matching the linkage information corresponding to the target linkage event, that is, the second linkage information.
[0110] The second target device can perform the target device operation according to the second linkage information, thereby realizing linkage with the first target device. For example, when device E receives linkage instruction 2 sent by device B, it can perform the device operation corresponding to the linkage information stored in advance.
[0111] Through this embodiment, each linkage device on the linkage path performs a corresponding linkage operation based on the linkage information, thereby realizing decentralized device linkage control and improving the stability of device linkage.
[0112] The following is an explanation of the device linkage method in the Internet of Things network in the embodiment of the present application in conjunction with an optional example. In this optional example, the device linkage method in the Internet of Things network may include: a linkage rule configuration process, a trigger device linkage process, a transfer device and an operation device linkage process.
[0113] like Fig. 9 As shown, the linkage rule configuration process may include the following steps:
[0114] Step S902, obtaining and parsing linkage rule configuration;
[0115] Step S904, obtaining the network topology feature information of the linkage-related devices, that is, obtaining the feature information of all devices described in the linkage rule, such as the network topology, etc.;
[0116] Step S906, calculating the shortest network topology path between the linked devices based on the network topology feature information, and recording the information of each node on the path;
[0117] Step S908: Generate linkage information of each node on the path according to the linkage rule, and send the generated linkage information to each node device on the shortest path.
[0118] According to the linkage rules and network topology feature information, the shortest path for device linkage is calculated, the device linkage information is generated and sent to the devices, thus realizing efficient decentralized linkage between devices.
[0119] like Fig.10 As shown, the process of triggering device linkage may include the following steps:
[0120] Step S1002, determine whether to send a linkage trigger, if yes, execute step S1004;
[0121] Step S1004, determine whether the linkage triggering condition is met, if yes, execute step S1006;
[0122] Step S1006, forming corresponding linkage event information;
[0123] Step S1008: sending the event to the operating device.
[0124] The triggering device can determine whether the linkage needs to be triggered based on the linkage information stored locally. If it is determined to be triggered, it will form a corresponding linkage event and send the event to the device end that needs to be operated.
[0125] like Fig.11 As shown, the linkage process between the transfer device and the operating device may include the following steps:
[0126] Step S1102, determine whether it is the device operation, if yes, execute step S1104, if no, execute step S1106;
[0127] Step S1104, executing the linkage operation of the device;
[0128] Step S1106: forward the time to the operating device.
[0129] After receiving the linkage event, the transfer device and the operating device match the local linkage information. If transfer is required, the linkage event is transferred to the corresponding device; if it is an operation, the linkage operation of this device is executed.
[0130] Through this optional example, for complex networking environments, reasonable linkage planning can be carried out according to the overall IoT device composition, network topology, etc., to obtain the shortest linkage control path and improve linkage efficiency;
[0131] In an exemplary embodiment, after sending the linkage information of each first device to each first device, the method further includes:
[0132] S51, when a change in network topology information is detected, re-determine a second linkage path corresponding to the target linkage event according to the changed network topology information, wherein the second linkage path is the shortest path from the first target device to the second target device;
[0133] S52, generating linkage information for each second device among a plurality of second devices on a second linkage path, wherein the linkage information of each second device is used to indicate a linkage operation performed by each second device when a target linkage event is triggered, and the plurality of second devices include a first target device and a second target device;
[0134] S53: Send the linkage information of each second device to each second device, so as to control each second device to perform a corresponding linkage operation when the target linkage event is triggered.
[0135] The network topology of the target IoT network may change due to equipment failure, new equipment, and other reasons. Changes in the network topology may cause the linkage devices on the first linkage path to fail to link normally, or the first linkage path is no longer the shortest path from the first target device to the second target device. In this regard, the target gateway can monitor the network topology of the target IoT network in real time, listen to changes in the network topology, and re-plan the shortest linkage path after changes, update the device linkage configuration, and achieve dynamic recovery of linkage.
[0136] When a change in network topology information is detected, the target gateway can obtain the changed network topology information, and recalculate the shortest path from the first target device to the second target device based on the changed network topology information, that is, the second linkage path, and generate linkage information for each second device on the second linkage path and send the generated linkage information to perform device linkage. The above process can refer to the above embodiment and will not be repeated here.
[0137] It should be noted that when the first target device or the second target device fails and causes the network topology information to change, the second linkage path will no longer be regenerated. Optionally, an error message can be sent directly to the user's terminal device, which is used to prompt that the linkage between the first target device and the second target device cannot be performed.
[0138] As an example, Fig.12 As shown, the process of adapting to dynamic changes in network topology may include the following steps:
[0139] Step S1202, detecting whether the network topology has changed, if so, executing step S1204;
[0140] Step S1204, recalculating the shortest linkage path according to the new network topology feature information;
[0141] Step S1206, converting the original linkage rule into linkage information of each node device on the path, and sending it to the corresponding device, that is, generating linkage information of each node on the path according to the linkage rule, and sending the generated linkage information to each node device on the shortest path.
[0142] For example, when the network topology of the IoT network where the device is located changes, the IoT gateway can identify the change event, recalculate the shortest linkage path based on the change, update the linkage information on the device, and realize dynamic recovery of linkage. Fig.13 As shown in the figure, when device B in the original shortest linkage path (ABE) is disconnected from the network, the original linkage cannot be performed normally. When the IoT gateway detects this situation, it can recalculate the shortest path AFE (i.e., the second linkage path) from device A to device E, and then send and update the linkage information of device A, device F and device E to restore the linkage between device A and device E.
[0143] Through this embodiment, as the network topology changes, the device linkage information is dynamically updated, which can improve the linkage stability and further improve the linkage experience.
[0144] In an exemplary embodiment, before re-determining the second linkage path corresponding to the target linkage event according to the changed network topology information, the method further includes:
[0145] S61, periodically receiving device status information reported by each first device, wherein the device status information is used to indicate a connection status with each first device;
[0146] S62: When the number of times that the device status information reported by the target device among the multiple first devices is not received reaches the target number threshold, determine that the network topology information has changed.
[0147] In order to facilitate the target gateway to perceive the changes in the network topology in a timely manner, in this embodiment, each first device under the first linkage path can periodically report device status information (e.g., heartbeat packet) to the target gateway to indicate the connection status between the target gateway and each first device. The target gateway can periodically receive the above-mentioned device status information reported by each first device.
[0148] For each first device, the result of each reception may be received or not received. If not received once, the target gateway may directly determine that the first device is offline. In order to avoid the device status information not being received in time due to network delays and other reasons, the target gateway may determine that the device is offline only after not receiving the reported device status information for multiple times.
[0149] For example, if the number of times that the device status information reported by the target device among the multiple first devices is not received reaches the target number threshold (for example, 3 times), it can be determined that the target device is offline, and then the network topology information is changed. Alternatively, if the time for which the device status information reported by the target device is not received exceeds the target time threshold, it can be determined that the target device is offline, and then the network topology information is changed.
[0150] Through this embodiment, the linkage device periodically reports the device status information, and determines whether the network topology has changed based on the reception of the device status information, which can improve the detection speed of the network topology change and improve the timeliness of the linkage path adjustment.
[0151] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0153] According to another aspect of an embodiment of the present application, a device linkage apparatus in an Internet of Things network for implementing the above-mentioned device linkage method in an Internet of Things network is also provided. Fig.14 is a structural block diagram of an optional device linkage device in an Internet of Things network according to an embodiment of the present application, such as Fig.14 As shown, the device may include:
[0154] A first determining unit 1402 is used to determine a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is a shortest path from the first target device to the second target device;
[0155] A first generating unit 1404, connected to the first determining unit 1402, is used to generate linkage information for each first device among the multiple first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when a target linkage event is triggered, and the multiple first devices include a first target device and a second target device;
[0156] The first sending unit 1406 is connected to the first generating unit 1404, and is used to send the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when a target linkage event is triggered.
[0157] It should be noted that the first determining unit 1402 in this embodiment can be used to execute the above step S202, the first generating unit 1404 in this embodiment can be used to execute the above step S204, and the first sending unit 1406 in this embodiment can be used to execute the above step S206.
[0158] Through the above-mentioned module, according to the network topology information of the target Internet of Things network, the first linkage path corresponding to the target linkage event is determined, wherein the target linkage event is a linkage event between the first target device and the second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; linkage information is generated for each first device among the multiple first devices on the first linkage path, wherein the linkage information of each first device is used to indicate the linkage operation performed by each first device when the target linkage event is triggered, and the multiple first devices include the first target device and the second target device; the linkage information of each first device is sent to each first device to control each first device to perform the corresponding linkage operation when the target linkage event is triggered, thereby solving the problem of poor effectiveness and timeliness of device linkage due to the complex networking between devices in the device linkage method in the Internet of Things network in the related technology, improving the effectiveness and timeliness of device linkage, and optimizing network performance.
[0159] In an exemplary embodiment, the first determining unit includes:
[0160] A first determining module is used to determine, according to the network topology information, a path with the shortest transmission time from the first target device to the second target device as a first linkage path; or
[0161] A second determining module is used to determine, according to the network topology information, a path from the first target device to the second target device that includes the least number of devices as a first linkage path; or
[0162] A third determination module is used to determine, according to the network topology information, a path from the first target device to the second target device where no device with a load exceeding a load threshold exists and the transmission time is the shortest, as the first linkage path; or
[0163] The fourth determination module is used to determine, according to the network topology information, a path from the first target device to the second target device, which has no device with a load exceeding a load threshold and includes the least number of devices, as the first linkage path.
[0164] In an exemplary embodiment, the first determining unit includes:
[0165] A fifth determination module is used for determining, when the target IoT network is a heterogeneous network and the first target device and the second target device are in different networks, a fusion point device of a first network where the first target device is located and a second network where the second target device is located according to network topology information, wherein the fusion point device belongs to both the first network and the second network;
[0166] a sixth determination module, configured to determine a first shortest path from a first target device to a fusion point device in the first network, and a second shortest path from a fusion point device to a second target device in the second network;
[0167] The concatenation unit is used to concatenate the first shortest path and the second shortest path to obtain a first linkage path.
[0168] In an exemplary embodiment, the first generating unit includes:
[0169] A first generating module, configured to generate first linkage information for a first target device, wherein the first linkage information is used to indicate a triggering condition of a target linkage event, and is used to indicate a next device that the first target device needs to be linked with when the target linkage event is triggered;
[0170] A second generating module, used to generate second linkage information for a second target device, wherein the second linkage information is used to indicate a target device operation that the second target device needs to perform when a target linkage event is triggered;
[0171] The third generation module is used to generate third linkage information for the transit device on the first linkage path, wherein the transit device is other device among the multiple first devices except the first target device and the second target device, and the third linkage information is used to indicate the next device that the transit device needs to link with when the target linkage event is triggered.
[0172] In an exemplary embodiment, the apparatus further comprises:
[0173] A second generating unit is located on the first target device, and is used for, after the linkage information of each first device is sent to each first device, when the first target device determines that the target linkage event is triggered according to the first linkage information, the first target device generates a first linkage instruction, and sends the first linkage instruction to the next device of the first target device, wherein the first linkage instruction is used to instruct the next device of the first target device to perform linkage based on the target linkage event;
[0174] A third generating unit is located on the target transfer device, and is used to generate a second linkage instruction according to the third linkage information when receiving the first linkage instruction or the linkage instruction sent by other transfer devices except the target transfer device, and send the second linkage instruction to the next device of the target transfer device, wherein the second linkage instruction is used to instruct the next device of the target transfer device to perform linkage based on the target linkage event;
[0175] The execution unit is located on the second target device and is used to execute the target device operation according to the second linkage information when the second target device receives the second linkage instruction sent by the previous device of the second target device.
[0176] In an exemplary embodiment, the above device further comprises:
[0177] A second determination unit is used to, after sending the linkage information of each first device to each first device, re-determine a second linkage path corresponding to the target linkage event according to the changed network topology information when a change in the network topology information is detected, wherein the second linkage path is the shortest path from the first target device to the second target device;
[0178] a fourth generating unit, configured to generate linkage information for each second device among a plurality of second devices on a second linkage path, wherein the linkage information of each second device is used to indicate a linkage operation performed by each second device when a target linkage event is triggered, and the plurality of second devices include a first target device and a second target device;
[0179] The second sending unit is used to send the linkage information of each second device to each second device, so as to control each second device to perform a corresponding linkage operation when a target linkage event is triggered.
[0180] In an exemplary embodiment, the apparatus further comprises:
[0181] A receiving unit, configured to periodically receive device status information reported by each first device before re-determining the second linkage path corresponding to the target linkage event according to the changed network topology information, wherein the device status information is used to indicate a connection status with each first device;
[0182] The third determining unit is configured to determine that the network topology information has changed when the number of times that the device status information reported by the target device among the multiple first devices is not received reaches a target number threshold.
[0183] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0184] According to another aspect of the embodiments of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above-mentioned device linkage methods in the Internet of Things network in the embodiments of the present application.
[0185] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0186] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0187] S1, determining a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is a shortest path from the first target device to the second target device;
[0188] S2, generating linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when a target linkage event is triggered, and the plurality of first devices include a first target device and a second target device;
[0189] S3, sending the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when a target linkage event is triggered.
[0190] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0191] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0192] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned device linkage method in the Internet of Things network is also provided. The electronic device can be a server, a terminal, or a combination thereof.
[0193] Fig.15 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Fig.15 As shown, it includes a processor 1502, a communication interface 1504, a memory 1506 and a communication bus 1508, wherein the processor 1502, the communication interface 1504 and the memory 1506 communicate with each other through the communication bus 1508, wherein,
[0194] Memory 1506, used for storing computer programs;
[0195] The processor 1502 is used to execute the computer program stored in the memory 1506 to implement the following steps:
[0196] S1, determining a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is a shortest path from the first target device to the second target device;
[0197] S2, generating linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when a target linkage event is triggered, and the plurality of first devices include a first target device and a second target device;
[0198] S3, sending the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when a target linkage event is triggered.
[0199] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.15The communication interface is used for communication between the electronic device and other devices.
[0200] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0201] As an example, the memory 1506 may include, but is not limited to, the first determining unit 1402, the first generating unit 1404, and the first sending unit 1406 in the device linkage apparatus in the Internet of Things network. In addition, other module units in the device linkage apparatus in the Internet of Things network may also be included but are not limited to, which will not be repeated in this example.
[0202] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0203] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0204] It can be understood by those skilled in the art that Fig.15 The structure shown is for illustration only. The device for implementing the above-mentioned device linkage method in the Internet of Things network may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.15 The structure of the electronic device is not limited. Fig.15 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.15 Different configurations shown.
[0205] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0206] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0207] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0208] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0209] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0210] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0211] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0212] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A device linkage method in an Internet of Things network, characterized in that: include: Determine, according to the network topology information of the target Internet of Things network, a first linkage path corresponding to the target linkage event, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is the shortest path from the first target device to the second target device; generating linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when the target linkage event is triggered, and the plurality of first devices include the first target device and the second target device; Sending the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when the target linkage event is triggered; Among them, the generating linkage information for each first device among the multiple first devices on the first linkage path includes: generating first linkage information for the first target device, wherein the first linkage information is used to indicate the triggering condition of the target linkage event, and is used to indicate the next device that the first target device needs to be linked to when the target linkage event is triggered; generating second linkage information for the second target device, wherein the second linkage information is used to indicate the target device operation that the second target device needs to perform when the target linkage event is triggered; generating third linkage information for the transit device on the first linkage path, wherein the transit device is other device among the multiple first devices except the first target device and the second target device, and the third linkage information is used to indicate the next device that the transit device needs to be linked to when the target linkage event is triggered.
2. The method according to claim 1, characterized in that The determining, according to the network topology information of the target Internet of Things network, a first linkage path corresponding to the target linkage event includes: According to the network topology information, determining the path with the shortest transmission time from the first target device to the second target device as the first linkage path; or According to the network topology information, determining a path from the first target device to the second target device that includes the least number of devices as the first linkage path; or According to the network topology information, determining a path from the first target device to the second target device where no device with a load exceeding a load threshold exists and the transmission time is shortest as the first linkage path; or According to the network topology information, a path from the first target device to the second target device, which has no device with a load exceeding a load threshold and includes the least number of devices, is determined as the first linkage path.
3. The method according to claim 1, characterized in that The target Internet of Things network is a heterogeneous network, and the first target device and the second target device are in different networks; The determining, according to the network topology information of the target Internet of Things network, a first linkage path corresponding to the target linkage event includes: Determine, according to the network topology information, a fusion point device of a first network where the first target device is located and a second network where the second target device is located, wherein the fusion point device belongs to both the first network and the second network; Determine a first shortest path from the first target device to the fusion point device in the first network, and a second shortest path from the fusion point device to the second target device in the second network; and concatenate the first shortest path and the second shortest path to obtain the first linkage path.
4. The method according to claim 1, characterized in that: After sending the linkage information of each first device to each first device, the method further includes: When the first target device determines that the target linkage event is triggered according to the first linkage information, the first target device generates a first linkage instruction, and sends the first linkage instruction to a device next to the first target device, wherein the first linkage instruction is used to instruct the device next to the first target device to perform linkage based on the target linkage event; When the target transfer device receives the first linkage instruction, or a linkage instruction sent by the transfer device other than the target transfer device, the target transfer device generates a second linkage instruction according to the third linkage information, and sends the second linkage instruction to the next device of the target transfer device, wherein the second linkage instruction is used to instruct the next device of the target transfer device to perform linkage based on the target linkage event; When the second target device receives the second linkage instruction sent by a previous device of the second target device, the second target device performs the target device operation according to the second linkage information.
5. The method according to any one of claims 1 to 4, characterized in that After sending the linkage information of each first device to each first device, the method further includes: In the case where a change in the network topology information is detected, re-determining a second linkage path corresponding to the target linkage event according to the changed network topology information, wherein the second linkage path is the shortest path from the first target device to the second target device; generating linkage information for each second device among a plurality of second devices on the second linkage path, wherein the linkage information of each second device is used to indicate a linkage operation performed by each second device when the target linkage event is triggered, and the plurality of second devices include the first target device and the second target device; The linkage information of each second device is sent to each second device, so as to control each second device to perform a corresponding linkage operation when the target linkage event is triggered.
6. The method according to claim 5, characterized in that Before re-determining the second linkage path corresponding to the target linkage event according to the changed network topology information, the method further includes: Periodically receiving device status information reported by each of the first devices, wherein the device status information is used to indicate a connection status with each of the first devices; When the number of times that the device status information reported by the target device among the multiple first devices is not received reaches a target number threshold, it is determined that the network topology information has changed.
7. A device linkage device in an Internet of Things network, characterized in that: include: A first determining unit is used to determine a first linkage path corresponding to a target linkage event according to network topology information of a target Internet of Things network, wherein the target linkage event is a linkage event between a first target device and a second target device in the target Internet of Things network, and the first linkage path is a shortest path from the first target device to the second target device; a first generating unit, configured to generate linkage information for each first device among a plurality of first devices on the first linkage path, wherein the linkage information of each first device is used to indicate a linkage operation performed by each first device when the target linkage event is triggered, and the plurality of first devices include the first target device and the second target device; A first sending unit, configured to send the linkage information of each first device to each first device, so as to control each first device to perform a corresponding linkage operation when the target linkage event is triggered; Among them, the first generating unit includes: a first generating module, used to generate first linkage information for the first target device, wherein the first linkage information is used to indicate the triggering condition of the target linkage event, and is used to indicate the next device that the first target device needs to be linked to when the target linkage event is triggered; a second generating module, used to generate second linkage information for the second target device, wherein the second linkage information is used to indicate the target device operation that the second target device needs to perform when the target linkage event is triggered; a third generating module, used to generate third linkage information for a transit device on the first linkage path, wherein the transit device is other devices among the multiple first devices except the first target device and the second target device, and the third linkage information is used to indicate the next device that the transit device needs to be linked to when the target linkage event is triggered.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Internet-of-things-based terminal networking method and apparatus, and terminal
CN105636146A
Control method and first central control device
CN105807618A
Equipment linkage control method and device and storage medium
CN112511393A