IoT device control method and system based on distributed soft bus
By discovering IoT devices in the LAN and using distributed soft bus to connect to network connection, real -time monitoring equipment status solves the problem of non -compatibility and low transmission efficiency between IoT devices, and realizes normal operation and efficient data between equipment and efficient data. transmission.
Patent Information
- Application Number
- CN202411279535.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, due to the different corresponding communication protocols between IoT devices, the device is incompatible and the transmission efficiency is low.
An IoT device control method based on a distributed soft bus is adopted. By discovering devices within a preset local area network and connecting devices through a distributed soft bus, device log information is obtained in real time to monitor device status and make real-time adjustments.
It effectively solves the problems of device incompatibility and low transmission efficiency between IoT devices, and achieves normal operation and efficient data transmission between devices.
Smart Images

Figure CN119363851A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of device control technology, and in particular to an IoT device control method, system, terminal and computer-readable storage medium based on a distributed soft bus. Background Art
[0002] IoT devices are physical objects that can connect to the Internet and communicate with other devices through the network. These devices can collect data and perform tasks, and can usually be managed through remote control. The application of IoT technology is very wide, from smart light bulbs, thermostats, and security cameras in smart homes to sensors and actuators in industrial automation, and even smart traffic signals and environmental monitoring systems in urban infrastructure.
[0003] Most of these devices and scenarios rely on connecting to the Internet via Wi-Fi, Bluetooth, cellular networks or other wireless technologies, with built-in sensors to collect data and send the data to the cloud or other devices for processing. However, in the prior art, due to the differences in the corresponding communication protocols between IoT devices, there is device incompatibility when IoT devices communicate data, and the transmission efficiency is low when IoT devices work together.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide an IoT device control method, system, terminal and computer-readable storage medium based on a distributed soft bus, aiming to solve the problem in the prior art that due to the differences in the corresponding communication protocols between IoT devices, there is device incompatibility when data is communicated between IoT devices, and the transmission efficiency is low when IoT devices work together.
[0006] To achieve the above object, the present invention provides an IoT device control method based on a distributed soft bus, and the IoT device control method based on a distributed soft bus comprises the following steps:
[0007] When receiving a device networking instruction, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction to determine multiple target discovery devices;
[0008] Acquire a distributed soft bus, and network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network;
[0009] The device log information of each networking device in the soft bus control network is obtained in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing of the soft bus control network is performed to achieve normal operation between IoT devices.
[0010] Optionally, the IoT device control method based on the distributed soft bus, wherein when receiving the device networking instruction, the source device is controlled to perform device discovery search in a preset local area network according to the device networking instruction to determine multiple target discovery devices, specifically including:
[0011] When receiving a device networking instruction issued by a user, the source device and the current device communication protocol corresponding to the source device are determined according to the device networking instruction, and a device discovery strategy is set, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period;
[0012] Determine a preset signal range of a preset local area network, control the source device to send a request message in a broadcast manner within the preset signal range according to the current device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time;
[0013] Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information;
[0014] Determine multiple target discovery devices corresponding to multiple target message response information, and determine that the multiple target discovery devices are networkable devices.
[0015] Optionally, the IoT device control method based on a distributed soft bus, wherein the step of obtaining a distributed soft bus and networking the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network, specifically includes:
[0016] Acquire device node information of the source device and the plurality of target discovery devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information;
[0017] A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target discovery devices according to the device node information to obtain a soft bus control network.
[0018] Optionally, the IoT device control method based on a distributed soft bus, wherein the distributed soft bus is obtained, and the source device is networked with the plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network, and then further comprises:
[0019] When a device update instruction is received, the distributed soft bus is used to determine a target upgrade device that needs to be updated among the plurality of target discovery devices according to the device update instruction;
[0020] The device type of the target upgrade device is obtained. If the device type is consistent with the preset device type, a device update file corresponding to the preset device type is obtained from the cloud, and the target upgrade device is updated according to the device update instruction and the device update file.
[0021] Optionally, the IoT device control method based on a distributed soft bus, wherein the distributed soft bus is obtained, and the source device is networked with the plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network, and then further comprises:
[0022] When a new device is added to the soft bus control network, a device discovery search is performed based on the new device to obtain a new connection relationship between the new device and the networking devices in the soft bus control network;
[0023] The soft bus control network is updated according to the newly added connection relationship to obtain an updated soft bus control network, and the updated soft bus control network is uploaded to a cloud server for storage.
[0024] Optionally, the IoT device control method based on a distributed soft bus, wherein the device log information of each networking device in the soft bus control network is obtained in real time, and if it is determined according to the device log information that a networking device is in an abnormal device state, the soft bus control network is subjected to device node adjustment processing to achieve normal operation between IoT devices, and the above also includes:
[0025] Obtaining device node information corresponding to each networking device in the soft bus control network, and constructing a device networking connection table according to each networking device and the corresponding device node information;
[0026] The port connection status between each of the networking devices is determined according to the device networking connection. If the port connection status is normal, a clock synchronization request is generated, and clock synchronization between each of the networking devices is established according to the clock synchronization request.
[0027] Optionally, the IoT device control method based on a distributed soft bus, wherein the real-time acquisition of device log information of each networking device in the soft bus control network, if it is determined according to the device log information that a networking device is in an abnormal device state, then the soft bus control network is subjected to device node adjustment processing to achieve normal operation between IoT devices, specifically includes:
[0028] Acquire device log information of each networking device in the soft bus control network in real time through the distributed soft bus, and perform device abnormality analysis based on the device log information;
[0029] If it is determined according to the device log information that a networking device is in an abnormal device state, the networking device in the abnormal device state is identified as an abnormal device, and communication configuration information corresponding to the abnormal device and a communication device node in the soft bus control network are obtained;
[0030] Determine a preset temporary communication device and a preset temporary node corresponding to the preset temporary communication device, transmit the communication configuration information to the preset temporary communication device, and switch the communication device node to the preset temporary node to achieve normal operation between IoT devices.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides an IoT device control system based on a distributed soft bus, wherein the IoT device control system based on a distributed soft bus includes:
[0032] A device discovery processing module is used to control the source device to perform device discovery search in a preset local area network according to the device networking instruction when receiving the device networking instruction, and determine multiple target discovery devices;
[0033] A device networking connection module, used to obtain a distributed soft bus, and to network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network;
[0034] The device node adjustment module is used to obtain the device log information of each networking device in the soft bus control network in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an IoT device control program based on a distributed soft bus stored in the memory and runnable on the processor, and when the IoT device control program based on the distributed soft bus is executed by the processor, the steps of the IoT device control method based on the distributed soft bus as described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an IoT device control program based on a distributed soft bus, and when the IoT device control program based on a distributed soft bus is executed by a processor, the steps of the IoT device control method based on a distributed soft bus as described above are implemented.
[0037] In the present invention, when a device networking instruction is received, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction, and multiple target discovery devices are determined; a distributed soft bus is obtained, and the source device is networked and connected with multiple target discovery devices according to the distributed soft bus to obtain a soft bus control network; the device log information of each networking device in the soft bus control network is obtained in real time, and if it is determined according to the device log information that there is a networking device in an abnormal device state, the soft bus control network is adjusted to achieve normal operation between IoT devices. The present invention performs device discovery in a preset local area network and performs networking connection between devices through a distributed soft bus; at the same time, real-time log collection of networked devices is performed to monitor the device status and make real-time adjustments, which can effectively ensure efficient data transmission and stable operation between devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of a preferred embodiment of the IoT device control method based on a distributed soft bus of the present invention;
[0039] Figure 2 It is a structural diagram of a preferred embodiment of the IoT device control system based on a distributed soft bus of the present invention;
[0040] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0042] IoT devices are physical objects that can connect to the Internet and communicate with other devices over the network. These devices can collect data and perform tasks, and can usually be managed through remote control. The application of IoT technology is very wide, from smart light bulbs, thermostats, and security cameras in smart homes to sensors and actuators in industrial automation, and even smart traffic signals and environmental monitoring systems in urban infrastructure. Most of these devices and scenarios rely on connecting to the Internet through Wi-Fi, Bluetooth, cellular networks or other wireless technologies, with built-in sensors to collect data and send this data to the cloud or other devices for processing.
[0043] The existing technology attempts to connect smart home devices through some services, but it cannot achieve the effect of native integration in terms of collaborative work between devices, especially the resource sharing experience across devices is not good enough, and there are still some security vulnerabilities due to the openness of the system. For IoT devices, due to the various types of devices and different security standards, this poses a challenge to a unified security strategy. In the existing technology, due to the different corresponding communication protocols between IoT devices, there is device incompatibility when IoT devices communicate data, and the transmission efficiency is low when IoT devices work together.
[0044] To solve the above problems, the present invention proposes an IoT device control method based on a distributed soft bus, including distributed architecture, multi-device collaboration, data synchronization between devices, security and privacy protection, openness and compatibility, software ecology, and lightweight and flexibility.
[0045] 1. Distributed architecture: The present invention adopts a distributed architecture design, which means that it can share resources and services between different devices. For example, in the constructed distributed architecture network, a smart watch can be seamlessly connected with a mobile phone or tablet to achieve functions such as file sharing and call transfer. This distributed capability enables a closer connection between different devices and provides a more coherent user experience.
[0046] 2. Multi-device collaboration: The present invention supports multi-device collaboration and can regard different types of devices as part of a super terminal. Users can easily switch between these devices without frequent disconnection or reconnection. This feature is especially important for IoT devices because it can simplify operations between multiple devices and improve transmission efficiency between devices.
[0047] 3. Data synchronization between devices: The present invention has a distributed data management function, which can synchronize data between different devices, such as user health data, notification information, etc. This data synchronization capability ensures that users can obtain the latest information no matter which device they are on.
[0048] 4. Security and privacy protection: The present invention takes security issues into consideration and provides multi-level security measures, including encrypted communications, device authentication, etc., to protect the security and privacy of user data, which is crucial for IoT devices because these devices often need to process sensitive information.
[0049] 5. Openness and compatibility: The distributed architecture set in the present invention is committed to compatibility with the existing ecosystem and supports multiple development languages and technology stacks, such as Java, JavaScript, C / C++, etc. In addition, the present invention also supports establishing connections with devices with different communication protocols, which means that even IoT devices running other operating systems can interact with the networking devices in the present invention to a certain extent.
[0050] 6. Software Ecosystem: The present invention is committed to building its own software ecosystem and encouraging developers to create applications and services suitable for the system. This is not limited to applications on mobile devices, but also includes applications and services designed specifically for IoT devices, thereby providing users with a richer and more diverse experience.
[0051] 7. Lightweight and flexibility: In order to adapt to different types of IoT devices, the present invention provides a lightweight version that can be flexibly configured according to the performance and needs of the device, which means that even very simple IoT devices can run specific components such as smart bulbs or temperature sensors.
[0052] The IoT device control method based on the distributed soft bus described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the IoT device control method based on the distributed soft bus includes the following steps:
[0053] Step S10: When a device networking instruction is received, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction to determine multiple target discovery devices.
[0054] Device discovery phase: In this phase, the target discovery device (such as a smart light bulb) needs to be identified by the source device (such as a running smartphone). This process involves the following steps: 1. Broadcast and scan: The source device sends a device discovery request by broadcasting, using wireless communication technologies such as Wi-Fi, Bluetooth, etc. 2. Response and record: The target discovery device responds to the broadcast request and sends its identification information (such as device ID). The source device records this information and prepares it for subsequent connection establishment.
[0055] Device pairing phase: This phase ensures that a trust relationship is established between the source device and the target discovery device. The steps include: 1. Identity verification: The source device authenticates the target discovery device through a pairing code, QR code, or key exchange. 2. Pairing confirmation: The source device and the target discovery device confirm that the pairing is successful, laying the foundation for the subsequent connection establishment.
[0056] Specifically, when a device networking instruction issued by a user is received, a source device and a current device communication protocol corresponding to the source device are determined according to the device networking instruction, and a device discovery strategy is set, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period; a preset signal range of a preset local area network is determined, and according to the current device communication protocol and the device discovery strategy, the source device is controlled to send a request message in a broadcast manner within the preset signal range, and multiple returned message response information is received in real time; multiple message response information are verified and processed, and multiple target message response information that pass the verification is obtained from the multiple message response information; multiple target discovery devices corresponding to the multiple target message response information are determined, and the multiple target discovery devices are determined to be networkable devices.
[0057] Internet of Things (IoT) devices can be divided into discovery end devices (i.e., source devices in the present invention) and discovered end devices (i.e., target discovery devices in the present invention), and are in the same local area network. When networking devices, the discovery end device first searches for the existence of the discovered end device in the local area network through its own communication protocol.
[0058] In the present invention, a super device is taken as an example. When a user issues a networking instruction to the super device, the super device parses the networking instruction to determine the source device that needs to be discovered. At the same time, a device discovery strategy is set to control the source device to perform device discovery. When the source device receives the networking instruction, it sends a broadcast signal to the discovered device in the preset local area network through its own communication protocol to search whether there is a discovered device in the preset local area network. When the discovered device receives the broadcast signal, it can send a feedback signal (i.e., the message response information in the present invention) to the discovered device to respond to the search action of the discovered device. The feedback signal includes the device information of the discovered device, wherein the device information includes the device name, device number, and device function; the source device verifies with the target discovered device through a pairing code, a QR code, or a secret key. When the verification is successful, the target discovered device is determined to be a networkable device.
[0059] Step S20: obtain a distributed soft bus, and network the source device with the plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network.
[0060] Distributed soft bus technology: allows users to achieve virtual connections between devices through software-defined methods, thus breaking the boundaries between traditional hardware devices. This technology allows services on different devices to be called directly, just as conveniently and efficiently as calling local services on the same device, greatly enhancing the possibility and flexibility of multi-device collaboration. Through the distributed soft bus, all-scenario devices can complete distributed services such as device virtualization, cross-device service calls, multi-screen collaboration, and file sharing based on the soft bus, achieving seamless collaboration and breaking device boundaries.
[0061] The core features of distributed soft bus technology include automatic discovery or plug-and-play, high bandwidth, low latency, high reliability, and openness or standards. These features make communication between devices more efficient and reliable, providing users with a better experience. In particular, its automatic discovery and plug-and-play features make the connection between devices simpler and faster without the need for complex configuration processes.
[0062] In addition, the distributed soft bus technology also supports heterogeneous networking, and can automatically build a logical fully connected network to solve the problem of interaction between different protocols between devices. After the device is online, it will register with the network layer. At the same time, the network layer will establish a channel connection with the device to detect the device changes in real time. This design makes data transmission between devices more efficient and provides a unified Session-based authentication and transmission function. The upper-level business system can send and receive data or obtain its related basic attributes through the Session Id to realize business messages, flows, control instructions and other operational interactions.
[0063] Connection establishment phase: In this phase, a communication channel is established between the source device and the target discovery device, which mainly includes the following steps: 1. Connection request: The source device initiates a connection request to the target discovery device, using the API provided by the distributed soft bus; 2. Connection confirmation: The target discovery device responds to the connection request, and both parties confirm that the connection has been established.
[0064] Specifically, the device node information of the source device and the multiple target discovery devices is obtained, wherein the device node information includes device scanning perception information, device status information and device attribute information; a distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the multiple target discovery devices according to the device node information to obtain a soft bus control network.
[0065] After determining the source device and multiple target discovery devices, the present invention first needs to obtain the device node information of each of these devices, and adopt the networking function of the distributed soft bus, using the device node information as the connection point to network the source device with the multiple target discovery devices, so as to build a soft bus control network.
[0066] After the connection is established, bidirectional data exchange can be carried out between the source device and the target discovery device. This stage includes: 1. Command issuance: the source device sends control commands or query requests to the target discovery device through the distributed soft bus; 2. Status feedback: the target discovery device performs corresponding operations according to the received commands and feeds back the operation results or status information to the source device.
[0067] The transmission rates of devices corresponding to different networking modes and transmission protocols are different and vary greatly, and the latency cannot be guaranteed. Distributed soft bus can provide a minimalist protocol that integrates the presentation layer, session layer, transport layer and network layer in the communication network into one layer to increase the payload and transmission bandwidth.
[0068] The present invention uses a distributed soft bus to network the source device and the target discovery device. The communication protocol layer is a key component of the distributed soft bus system. Its main task is to handle inter-process communication between different control domains, and is responsible for selecting, encapsulating and decapsulating communication protocols. Among them, the construction process of the distributed soft bus connecting different communication protocol devices is as follows: select the appropriate protocol according to the communication needs, encapsulate the data to meet the requirements of the communication protocol, and decapsulate the data at the receiving end to restore the original information. The role of the communication protocol layer is to ensure the correct transmission and reception of communication data, while shielding the detailed differences between different protocols, so that different components in the soft bus system can reliably exchange information through a common communication protocol. The communication protocol layer improves the flexibility and interoperability of the system and provides a consistent solution for communication between different control domains.
[0069] The distributed soft bus integrates and fuses a variety of different wireless communication protocols and network protocols (such as Bluetooth, WIFI, NFC, Internet, etc.), thereby shielding the technical details of the underlying protocols and providing a unified interface to the outside.
[0070] Furthermore, when a device update instruction is received, the distributed soft bus is used to determine the target upgrade device that needs to be updated among the multiple target discovery devices according to the device update instruction; the device type of the target upgrade device is obtained, and if the device type is consistent with the preset device type, the device update file corresponding to the preset device type is obtained from the cloud, and the target upgrade device is updated according to the device update instruction and the device update file.
[0071] When a device update instruction is received, it is first necessary to determine the device type of the target upgrade device, and judge whether the device type of the target upgrade device is the same as the preset device type. If the device type of the target upgrade device is the same as the preset device type, obtain the device update file corresponding to the preset device type from the cloud, and update the target upgrade device according to the device update instruction and the device update file, and send the device update file and the device update instruction to the target upgrade device through the distributed soft bus to instruct the target upgrade device to update the current configuration file to the device update file according to the device update instruction.
[0072] Furthermore, when a new device is added to the soft bus control network, a device discovery search is performed based on the new device to obtain a new connection relationship between the new device and the networking devices in the soft bus control network; the soft bus control network is updated based on the new connection relationship to obtain an updated soft bus control network, and the updated soft bus control network is uploaded to the cloud server for storage.
[0073] When a new device is added to the soft bus control network, the device will be discovered again as a new device, and the new device will be connected to the networked devices in the soft bus control network. This process is also achieved by relying on the distributed soft bus. At this time, due to the addition of the new device, the connection relationship between the networked devices in the soft bus control network will also change. Of course, this change in connection relationship is also determined based on the minimum channel loss.
[0074] Connection Termination Phase After completing the required data exchange, the connection can be terminated. The steps are as follows: 1. Disconnection request: The source device sends a disconnection request to the target discovery device. 2. Disconnection confirmation: The target discovery device confirms the disconnection and releases the communication resources.
[0075] Step S30, obtaining the device log information of each networking device in the soft bus control network in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices.
[0076] Specifically, the device node information corresponding to each networking device in the soft bus control network is obtained, and a device networking connection table is constructed according to each networking device and the corresponding device node information; the port connection status between each networking device is determined according to the device networking connection, and if the port connection status is normal, a clock synchronization request is generated, and clock synchronization between each networking device is established according to the clock synchronization request.
[0077] The present invention can use the source device as the networking center or networking node, and after receiving the feedback signal sent by the target discovery device, it can establish a device networking connection table of the target discovery device according to the device information included in the feedback signal, so as to facilitate the management of the self-organizing network. The device networking connection table can display the online status of each networking device in the list, and update the self-organizing network device list in real time by detecting the operating status of each networking device in real time, so as to monitor the operating status of the multi-device self-organizing network.
[0078] The device log information of each networking device in the soft bus control network is obtained in real time through the distributed soft bus, and the device abnormality analysis is performed based on the device log information; if it is determined according to the device log information that a networking device is in an abnormal device state, the networking device in the abnormal device state is identified as an abnormal device, and the communication configuration information corresponding to the abnormal device and the communication device node in the soft bus control network are obtained; a preset temporary communication device and a preset temporary node corresponding to the preset temporary communication device are determined, the communication configuration information is transmitted to the preset temporary communication device, and the communication device node is switched to the preset temporary node to achieve normal operation between IoT devices.
[0079] The present invention also provides a log recording function, which can obtain the device log information of each networking device in the soft bus control network in real time through the distributed soft bus. The device log information includes key information such as timestamp, thread ID, service ID, etc., so as to establish the time sequence of events and facilitate problem tracking. At the same time, it supports outputting device log information to multiple targets, such as super devices or remote log servers, so that administrators and developers can choose the viewing method. To ensure the performance of the soft bus system, the log recording function can also implement a log rolling strategy, regularly clean up old logs or cut them according to size to maintain a reasonable size of the log file. Through the log recording function, clear and detailed service operation information can be obtained to improve the maintainability and reliability of the soft bus system.
[0080] Obtain device node information corresponding to each networking device in the soft bus control network, and obtain the connection status of the networking device based on the device node information; further, determine whether the connection status is normal. If the connection status is normal, the devices send business messages and clock synchronization requests, and complete clock synchronization based on the clock synchronization request and business messages, which is beneficial to improving the stability of business message transmission between devices.
[0081] If it is determined according to the device log information that a networking device in the soft bus control network fails, the communication configuration information of the failed networking device is received by using a preset temporary communication device, and the preset temporary node corresponding to the preset temporary communication device is determined, and the cache information of the failed networking device is transferred to the preset temporary communication device, and the preset temporary communication device is instructed to send the target cache information called by the target discovery device to the target discovery device. The advantage of such a setting is that, by using the preset temporary communication device and the corresponding preset temporary node, when a networking device fails, the preset temporary node can be used to continue to provide services to the target discovery device, solving the single point failure problem of centralized service discovery.
[0082] For example, when the source device receives a user instruction and sends it to the target discovery device, and the target discovery device completes the execution of the user instruction, the source device sends a disconnect request, and after confirmation by the target discovery device, the connection is disconnected and resources are released. After the construction of the multi-device self-organizing network is completed, if there is a newly online device to be connected to the multi-device self-organizing network, the device can be registered with the network layer of the soft bus control network and added to the device networking connection table. The soft bus control network establishes a channel connection with the newly online device to obtain an updated soft bus control network, and updates the operating status or transformation status of the networking devices in the soft bus control network device in real time, and records, displays and updates the status through the self-organizing network device list.
[0083] The key technology of distributed soft bus connection and control of IoT devices can also make breakthroughs and developments in the following aspects in the future:
[0084] A more efficient device discovery mechanism, including: 1. Fast device discovery: Research faster device discovery algorithms to reduce device discovery delays. 2. Low-power discovery: Optimize power consumption during device discovery to extend the battery life of IoT devices. 3. Adaptive discovery: Automatically adjust discovery strategies based on network environment and device type to improve discovery success rate.
[0085] Strengthen the security of device pairing, including: 1. Multi-factor authentication: Combine multiple authentication methods such as biometrics to enhance the security of device pairing. 2. Dynamic key exchange: Adopt a dynamic key mechanism to improve the security of data transmission. 3. Smart pairing: Use AI technology to automatically identify trusted devices and simplify the pairing process.
[0086] Improve the stability and speed of connection establishment, including: 1. Fast connection: Research fast connection establishment algorithm to shorten the connection establishment time. 2. Adaptive connection: Automatically select the optimal connection method according to network conditions. 3. Redundant connection: Support multi-path connection to improve the stability and reliability of the connection.
[0087] Strengthen the security and efficiency of data transmission, including: 1. Advanced encryption: Use more advanced encryption algorithms to ensure the security of data transmission. 2. Efficient compression: Research efficient data compression algorithms to reduce transmission bandwidth requirements. 3. Intelligent routing: Use AI technology to optimize data transmission paths and improve transmission efficiency.
[0088] Improve the connection termination mechanism, including: 1. Smooth disconnection: Research how to smoothly disconnect and reduce data loss during the disconnection process. 2. Resource recovery: Optimize the resource recovery mechanism to ensure that resources are released in a timely manner. 3. Capable disconnection: Use machine learning to predict the best time to disconnect and improve system efficiency.
[0089] Furthermore, if Figure 2 As shown, based on the above-mentioned IoT device control method based on distributed soft bus, the present invention also provides an IoT device control system based on distributed soft bus, wherein the IoT device control system based on distributed soft bus includes:
[0090] The device discovery processing module 51 is used to control the source device to perform device discovery search in a preset local area network according to the device networking instruction when receiving the device networking instruction, and determine multiple target discovery devices;
[0091] The device networking connection module 52 is used to obtain a distributed soft bus, and to network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network;
[0092] The device node adjustment module 53 is used to obtain the device log information of each networking device in the soft bus control network in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices.
[0093] Furthermore, if Figure 3 As shown, based on the above-mentioned IoT device control method and system based on the distributed soft bus, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0094] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, an IoT device control program 40 based on a distributed soft bus is stored on the memory 20, and the IoT device control program 40 based on a distributed soft bus can be executed by the processor 10, thereby realizing the IoT device control method based on a distributed soft bus in the present application.
[0095] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the IoT device control method based on the distributed soft bus.
[0096] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0097] In one embodiment, when the processor 10 executes the IoT device control program 40 based on the distributed soft bus in the memory 20, the following steps are implemented:
[0098] When receiving a device networking instruction, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction to determine multiple target discovery devices;
[0099] Acquire a distributed soft bus, and network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network;
[0100] The device log information of each networking device in the soft bus control network is obtained in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing of the soft bus control network is performed to achieve normal operation between IoT devices.
[0101] When receiving the device networking instruction, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction to determine multiple target discovery devices, specifically including:
[0102] When receiving a device networking instruction issued by a user, the source device and the current device communication protocol corresponding to the source device are determined according to the device networking instruction, and a device discovery strategy is set, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period;
[0103] Determine a preset signal range of a preset local area network, control the source device to send a request message in a broadcast manner within the preset signal range according to the current device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time;
[0104] Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information;
[0105] Determine multiple target discovery devices corresponding to multiple target message response information, and determine that the multiple target discovery devices are networkable devices.
[0106] The step of obtaining a distributed soft bus and networking the source device with a plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network specifically includes:
[0107] Acquire device node information of the source device and the plurality of target discovery devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information;
[0108] A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target discovery devices according to the device node information to obtain a soft bus control network.
[0109] The method further comprises obtaining a distributed soft bus, and networking the source device with a plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network. The method further comprises:
[0110] When a device update instruction is received, the distributed soft bus is used to determine a target upgrade device that needs to be updated among the plurality of target discovery devices according to the device update instruction;
[0111] The device type of the target upgrade device is obtained. If the device type is consistent with the preset device type, a device update file corresponding to the preset device type is obtained from the cloud, and the target upgrade device is updated according to the device update instruction and the device update file.
[0112] The method further comprises obtaining a distributed soft bus, and networking the source device with a plurality of target discovery devices according to the distributed soft bus to obtain a soft bus control network. The method further comprises:
[0113] When a new device is added to the soft bus control network, a device discovery search is performed based on the new device to obtain a new connection relationship between the new device and the networking devices in the soft bus control network;
[0114] The soft bus control network is updated according to the newly added connection relationship to obtain an updated soft bus control network, and the updated soft bus control network is uploaded to a cloud server for storage.
[0115] Wherein, the device log information of each networking device in the soft bus control network is obtained in real time. If it is determined according to the device log information that a networking device is in an abnormal device state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices, and the above also includes:
[0116] Obtaining device node information corresponding to each networking device in the soft bus control network, and constructing a device networking connection table according to each networking device and the corresponding device node information;
[0117] The port connection status between each of the networking devices is determined according to the device networking connection. If the port connection status is normal, a clock synchronization request is generated, and clock synchronization between each of the networking devices is established according to the clock synchronization request.
[0118] The real-time acquisition of device log information of each networking device in the soft bus control network, if it is determined according to the device log information that a networking device is in an abnormal device state, then the soft bus control network is subjected to device node adjustment processing to achieve normal operation between IoT devices, specifically including:
[0119] Acquire device log information of each networking device in the soft bus control network in real time through the distributed soft bus, and perform device abnormality analysis based on the device log information;
[0120] If it is determined according to the device log information that a networking device is in an abnormal device state, the networking device in the abnormal device state is identified as an abnormal device, and communication configuration information corresponding to the abnormal device and a communication device node in the soft bus control network are obtained;
[0121] Determine a preset temporary communication device and a preset temporary node corresponding to the preset temporary communication device, transmit the communication configuration information to the preset temporary communication device, and switch the communication device node to the preset temporary node to achieve normal operation between IoT devices.
[0122] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an IoT device control program based on a distributed soft bus, and when the IoT device control program based on a distributed soft bus is executed by a processor, the steps of the IoT device control method based on a distributed soft bus as described above are implemented.
[0123] In summary, the present invention provides an IoT device control method, system, terminal and computer-readable storage medium based on a distributed soft bus, the method comprising: when receiving a device networking instruction, controlling the source device to perform device discovery and search in a preset local area network according to the device networking instruction, and determining multiple target discovery devices; obtaining a distributed soft bus, and networking the source device with multiple target discovery devices according to the distributed soft bus to obtain a soft bus control network; obtaining the device log information of each networking device in the soft bus control network in real time, if it is determined according to the device log information that there is a networking device in an abnormal device state, then adjusting the device node of the soft bus control network to achieve normal operation between IoT devices. The present invention performs device discovery in a preset local area network and performs networking connection between devices through a distributed soft bus; at the same time, by collecting real-time logs of networked devices to monitor device status and make real-time adjustments, it can effectively ensure efficient data transmission and stable operation between devices.
[0124] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0125] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0126] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A distributed soft bus-based IoT device control method, characterized in that: The IoT device control method based on the distributed soft bus includes: When receiving a device networking instruction, the source device is controlled to perform device discovery and search in a preset local area network according to the device networking instruction to determine multiple target discovery devices; Acquire a distributed soft bus, and network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network; The device log information of each networking device in the soft bus control network is obtained in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing of the soft bus control network is performed to achieve normal operation between IoT devices.
2. The IoT device control method based on a distributed soft bus according to claim 1, characterized in that: When receiving the device networking instruction, the source device is controlled to perform device discovery and search in the preset local area network according to the device networking instruction to determine multiple target discovery devices, specifically including: When receiving a device networking instruction issued by a user, the source device and the current device communication protocol corresponding to the source device are determined according to the device networking instruction, and a device discovery strategy is set, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period; Determine a preset signal range of a preset local area network, control the source device to send a request message in a broadcast manner within the preset signal range according to the current device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time; Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information; Determine multiple target discovery devices corresponding to multiple target message response information, and determine that the multiple target discovery devices are networkable devices.
3. The IoT device control method based on distributed soft bus according to claim 1 is characterized in that: The obtaining of a distributed soft bus, and networking the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network, specifically includes: Acquire device node information of the source device and the plurality of target discovery devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information; A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target discovery devices according to the device node information to obtain a soft bus control network.
4. The IoT device control method based on distributed soft bus according to claim 1 is characterized in that: The step of obtaining a distributed soft bus and networking the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network further includes: When a device update instruction is received, the distributed soft bus is used to determine a target upgrade device that needs to be updated among the plurality of target discovery devices according to the device update instruction; The device type of the target upgrade device is obtained. If the device type is consistent with the preset device type, a device update file corresponding to the preset device type is obtained from the cloud, and the target upgrade device is updated according to the device update instruction and the device update file.
5. The IoT device control method based on distributed soft bus according to claim 1 is characterized in that: The step of obtaining a distributed soft bus and networking the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network further includes: When a new device is added to the soft bus control network, a device discovery search is performed based on the new device to obtain a new connection relationship between the new device and the networking devices in the soft bus control network; The soft bus control network is updated according to the newly added connection relationship to obtain an updated soft bus control network, and the updated soft bus control network is uploaded to a cloud server for storage.
6. The IoT device control method based on distributed soft bus according to claim 1, characterized in that: The device log information of each networking device in the soft bus control network is obtained in real time. If it is determined according to the device log information that a networking device is in an abnormal device state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices, and the above also includes: Obtaining device node information corresponding to each networking device in the soft bus control network, and constructing a device networking connection table according to each networking device and the corresponding device node information; The port connection status between each of the networking devices is determined according to the device networking connection. If the port connection status is normal, a clock synchronization request is generated, and clock synchronization between each of the networking devices is established according to the clock synchronization request.
7. The IoT device control method based on distributed soft bus according to claim 1, characterized in that: The real-time acquisition of device log information of each networking device in the soft bus control network, if it is determined according to the device log information that a networking device is in an abnormal device state, then the soft bus control network is subjected to device node adjustment processing to achieve normal operation between IoT devices, specifically including: Acquire device log information of each networking device in the soft bus control network in real time through the distributed soft bus, and perform device abnormality analysis based on the device log information; If it is determined according to the device log information that a networking device is in an abnormal device state, the networking device in the abnormal device state is identified as an abnormal device, and communication configuration information corresponding to the abnormal device and a communication device node in the soft bus control network are obtained; Determine a preset temporary communication device and a preset temporary node corresponding to the preset temporary communication device, transmit the communication configuration information to the preset temporary communication device, and switch the communication device node to the preset temporary node to achieve normal operation between IoT devices.
8. An IoT device control system based on a distributed soft bus, characterized in that: The IoT device control system based on the distributed soft bus includes: A device discovery processing module is used to control the source device to perform device discovery search in a preset local area network according to the device networking instruction when receiving the device networking instruction, and determine multiple target discovery devices; A device networking connection module, used to obtain a distributed soft bus, and to network the source device with a plurality of the target discovery devices according to the distributed soft bus to obtain a soft bus control network; The device node adjustment module is used to obtain the device log information of each networking device in the soft bus control network in real time. If it is determined according to the device log information that a networking device is in an abnormal state, the device node adjustment processing is performed on the soft bus control network to achieve normal operation between IoT devices.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and an IoT device control program based on a distributed soft bus stored in the memory and executable on the processor. When the IoT device control program based on the distributed soft bus is executed by the processor, the steps of the IoT device control method based on a distributed soft bus as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an IoT device control program based on a distributed soft bus. When the IoT device control program based on a distributed soft bus is executed by a processor, the steps of the IoT device control method based on a distributed soft bus as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Equipment interconnection method and device based on distributed soft bus, equipment and medium
CN115767499A
Equipment networking method, device, system, equipment and medium
CN116600367A
Distributed soft bus, communication method and medium
CN118018349A
Cited By
Intelligent networking management method, device and equipment of energy storage cabinet and medium
CN120768878A