Internet of Things communication system and method
By using distributed soft bus technology, IoT devices can communicate with the cloud platform using other devices as proxy communication devices when communication is interrupted or offline, which solves the high cost problem caused by configuring two SIM cards and achieves cost reduction and improved resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-04
- Publication Date
- 2026-04-03
AI Technical Summary
To increase communication reliability, existing IoT devices are equipped with two SIM cards, which doubles the data traffic fees and increases costs.
By employing distributed soft bus technology, any IoT device can act as a proxy communication device. When local communication is unavailable, it can establish a session connection with other devices and use its communication capabilities to communicate with the cloud platform, thus avoiding the need to configure two SIM cards.
It enables communication with the cloud platform using the communication capabilities of other devices when communication is interrupted or devices are offline, avoiding doubling of traffic costs, reducing costs, and improving resource utilization.
Smart Images

Figure CN121792020A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) communication technology, and in particular to an IoT communication system and method. Background Technology
[0002] While wireless communication is widely used in IoT communication, it can lead to communication interruptions and device offline issues in scenarios with weak coverage, significant interference, and unpaid bills. In certain IoT applications (such as charging stations), device offline can cause business disruptions, thereby impacting operating revenue.
[0003] Wireless communication for IoT devices is achieved using a wireless communication module plus a SIM (Subscriber Identity Module) card. The SIM card is used to complete the authentication and authorization of the wireless communication module and access the network of the contracted operator.
[0004] To increase communication reliability, existing technologies employ wireless communication modules that support dual SIM cards, configuring two SIM cards from different operators. When the currently used SIM card becomes unavailable, the system automatically switches to the other SIM card, thereby increasing communication reliability.
[0005] While existing technologies have increased communication reliability, the need to configure two SIM cards doubles the data charges for SIM cards, thus increasing costs. Summary of the Invention
[0006] Therefore, it is necessary to provide an IoT communication system and method that can reduce costs in response to the above-mentioned technical problems.
[0007] An Internet of Things (IoT) communication system includes N IoT devices and a cloud platform; the IoT devices are connected via a distributed soft bus; the IoT devices communicate with the cloud platform; any IoT device can be configured as a proxy communication device relative to other IoT devices. When an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M agent communication devices through a distributed soft bus. IoT devices send operational data to proxy communication devices based on corresponding session connections; The proxy communication device uploads operational data to the cloud platform and receives response data from the cloud platform in response to the operational data transmission. The proxy communication device sends response data to the corresponding IoT device based on the corresponding session connection.
[0008] In one embodiment, N IoT devices respectively upload IoT device registration messages to the cloud platform; the IoT device registration messages include at least wireless signal quality information; Based on the IoT device registration messages, the cloud platform selects X IoT devices with the best wireless signal quality from N IoT devices and sends activation agent communication service messages to these X IoT devices. The X IoT devices respond to the activation proxy communication service message and are configured as proxy communication devices; Where X is less than or equal to N, and X is greater than or equal to M.
[0009] In one embodiment, the IoT device initializes the distributed soft bus and locates proxy communication devices before detecting whether local communication is available or whether a trigger command has been received.
[0010] In one embodiment, when an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The proxy communication device generates a session identifier corresponding to the session connection, establishes a corresponding communication channel with the cloud platform, and establishes the association between the session identifier and the communication channel; IoT devices send operational data to proxy communication devices based on corresponding session connections; The proxy communication device finds the corresponding communication channel based on the session identifier of the IoT device that sends the operation data, uploads the operation data to the cloud platform through the found communication channel, and receives the response data from the cloud platform in response to the operation data through the found communication channel. The proxy communication device finds the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and sends the response data to the corresponding IoT device based on the session connection.
[0011] In one embodiment, when an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The proxy communication device generates a session identifier corresponding to the session connection; IoT devices send operational data to proxy communication devices based on corresponding session connections; The proxy communication device responds to the operation data, packages the operation data and the session identifier corresponding to the IoT device that sent the operation data, and sends them to the cloud platform; The proxy communication device receives the cloud platform's response operation data and the response data generated and returned by the session identifier corresponding to the IoT device that sent the operation data; The proxy communication device finds the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and sends the response data to the corresponding IoT device based on the session connection.
[0012] An Internet of Things (IoT) communication method includes the following steps: When local communication is detected to be unavailable or a trigger command is received, a session connection is established with M proxy communication devices via a distributed soft bus; the proxy communication devices are IoT devices selected by the cloud platform and configured as proxy communication devices; Based on the corresponding session connection, the system sends operation data to the proxy communication device to instruct the proxy communication device to upload the operation data to the cloud platform. Based on the corresponding session connection, receive response data returned by the proxy communication device; the response data is the data generated by the cloud platform response operation data and transmitted to the proxy communication device.
[0013] In one embodiment, prior to the step of establishing a session connection with M proxy communication devices via a distributed soft bus upon detecting that local communication is unavailable or receiving a trigger command, the method further includes the step of: Initialize the distributed soft bus and locate the proxy communication device.
[0014] An Internet of Things (IoT) communication method includes the following steps: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through a distributed soft bus; Based on the corresponding session connection, receive operational data sent by IoT devices; Upload the runtime data to the cloud platform and receive the response data from the cloud platform in response to the runtime data transmission; Based on the corresponding session connection, the response data is sent to the corresponding IoT device.
[0015] In one embodiment, the steps include: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through a distributed soft bus; Generate a session identifier corresponding to the session connection, establish a corresponding communication channel with the cloud platform, and establish the association between the session identifier and the communication channel; Based on the corresponding session connection, receive operational data sent by IoT devices; The corresponding communication channel is located based on the session identifier of the IoT device that sends the operation data. The operation data is then uploaded to the cloud platform through the found communication channel, and the response data sent back by the cloud platform in response to the operation data is received through the found communication channel. The corresponding session connection is located based on the session identifier of the IoT device that sends the operation data, and the response data is sent to the corresponding IoT device based on the session connection.
[0016] In one embodiment, the steps include: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through a distributed soft bus; Generate a session identifier corresponding to the session connection; Based on the corresponding session connection, receive operational data sent by IoT devices; In response to operational data, the operational data and the session identifier corresponding to the IoT device that sent the operational data are packaged and sent to the cloud platform; Receive the cloud platform's response operation data and the response data generated and returned by the session identifier corresponding to the IoT device that sent the operation data; The corresponding session connection is located based on the session identifier of the IoT device that sends the operation data, and the response data is sent to the corresponding IoT device based on the session connection.
[0017] One of the above technical solutions has the following advantages and beneficial effects: This application's IoT communication system includes N IoT devices and a cloud platform. Any IoT device can be configured as a proxy communication device relative to other IoT devices. When an IoT device detects local communication unavailability or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. Based on the corresponding session connection, the IoT device sends operational data to the proxy communication devices. The proxy communication devices upload the operational data to the cloud platform and receive response data from the cloud platform in response to the operational data transmission. Based on the corresponding session connection, the proxy communication devices send response data to the corresponding IoT device. This application enables communication between an IoT device and the cloud platform using other IoT devices configured as proxy communication devices when the communication capability of one IoT device is unavailable due to communication interruption, device offline status, etc. This eliminates the need for two SIM cards to ensure communication, avoids doubling data charges, reduces costs, and also fully utilizes the idle communication capabilities of IoT devices, improving resource utilization. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the structure of the Internet of Things communication system in the embodiments of this application.
[0019] Figure 2 This is a flowchart illustrating the IoT communication method on the IoT device side in an embodiment of this application.
[0020] Figure 3 This is a flowchart illustrating the IoT communication method on the proxy communication device side in this application embodiment.
[0021] Figure 4 This is a flowchart illustrating one step of the data transmission process in an embodiment of this application.
[0022] Figure 5 This is another flowchart illustrating the data transmission steps in an embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0024] To address the issue that traditional IoT devices 10 require two SIM cards, resulting in doubled SIM card data charges and increased costs, in one embodiment, such as... Figure 1 As shown, an Internet of Things (IoT) communication system is provided, including N IoT devices 10 and a cloud platform 20. The IoT devices 10 are connected to each other via a distributed soft bus; the IoT devices 10 communicate with the cloud platform 20. The IoT devices 10 refer to intelligent terminals that are connected to the Internet of Things (IoT) and possess data sensing, transmission, and interaction capabilities. Their core feature is the ability to achieve connection and communication between things and between things and people without human intervention. The core of the IoT devices 10 includes a sensing layer, a communication layer, and a computing layer. The sensing layer includes sensors, cameras, thermometers, hygrometers, etc., responsible for collecting information from the physical world (such as temperature, humidity, location, and images). The communication layer consists of communication modules such as Wi-Fi, Bluetooth, 4G / 5G, LoRa (Long Range Radio), and NB-IoT (Narrow Band Internet of Things), responsible for transmitting the collected data to the cloud or other devices. The computing layer consists of embedded chips or microprocessors, responsible for simple data processing and instruction execution. In one example, the IoT device 10 can be a charging pile. Cloud Platform 20 is a virtualization platform based on cloud computing technology that provides users with resources and services such as computing, storage, networking, software, and data. Users can access these capabilities on demand via the internet without needing to build a local physical server. The value of N can be set according to actual needs; specifically, N is greater than or equal to 2.
[0025] A distributed soft bus is the core communication component of a distributed capability system. It is a unified communication framework across devices, capable of shielding the differences between underlying physical communication methods (such as Ethernet, WiFi, Bluetooth, etc.) and providing upper-layer applications with device-independent, protocol-agnostic, efficient, and reliable cross-device data transmission and service invocation capabilities. For example, a distributed soft bus can be a system kernel-level distributed soft bus, a microservice / enterprise-level message bus, an industrial IoT soft bus, a cross-platform distributed object bus, an edge computing soft bus, and so on.
[0026] To allow an IoT device to access the communication capabilities of another IoT device while its own communication is interrupted or it is offline, any IoT device can be configured as a proxy communication device relative to other IoT devices. For example, if N is 3, including the first, second, and third IoT devices, the second and third IoT devices can be configured as proxy communication devices relative to the first IoT device. Alternatively, only the second or third IoT device can be configured as a proxy communication device relative to the first IoT device, and so on. The same applies to the first and second IoT devices relative to the third IoT device, and vice versa.
[0027] IoT devices that provide communication capabilities to other IoT devices and act as intermediaries for these devices to communicate with the cloud platform are called proxy communication devices. Correspondingly, the communication provided to other IoT devices is called proxy communication, while the communication provided to the device itself is called direct communication.
[0028] The proxy communication device publishes its local communication capabilities as a service. Other IoT devices listen for and discover the proxy communication device. When local communication is unavailable or manually triggered, a distributed soft bus session is established with the proxy communication device for communication between the IoT device and the cloud platform.
[0029] To ensure the proper functioning of the IoT communication system described in this application, each IoT device must first register on the cloud platform, and then the cloud platform will configure proxy communication devices from the IoT devices.
[0030] Specifically, in one example, N IoT devices upload their registration messages to the cloud platform. In one approach, after powering on, each IoT device sends a registration message to the cloud platform. This message includes at least wireless signal quality information, and also needs to carry the device's identifier and authentication information. The cloud platform records the wireless signal quality information for selecting a proxy communication device. Optionally, in another approach, each IoT device first sends a message to the cloud platform carrying its identifier and authentication information to complete registration, and then sends wireless signal quality information to the cloud platform. The cloud platform records this information for selecting a proxy communication device.
[0031] The cloud platform configures a device group containing a list of device identifiers, and subsequently selects proxy communication devices from this list. Specifically, based on the IoT device registration messages, the cloud platform selects X IoT devices with the best wireless signal quality from N IoT devices and sends activation proxy communication service messages to these X IoT devices. The cloud platform sorts the wireless signal quality from high to low, and selects the top X IoT devices from the sequence in descending order of quality; for example, selecting 5 from 10 IoT devices. After selecting the corresponding IoT devices, the cloud platform sends the activation proxy communication service message. When it is necessary to deactivate a proxy communication device, the cloud platform sends a deactivation proxy communication service message to the proxy communication device. The activation and deactivation proxy communication service messages can be two different messages or the same message. When they are the same message, they simply carry an activation identifier or a deactivation identifier depending on whether the current activation or deactivation is required.
[0032] Upon receiving the "Activate Proxy Communication Service" message, X IoT devices respond and are configured as proxy communication devices. Here, X is less than or equal to N, and X is greater than or equal to M. It should be noted that when X equals N, M cannot equal X. The cloud platform can configure all or some of the IoT devices as proxy communication devices. When all are configured as proxy communication devices, it's equivalent to each IoT device becoming a backup communication capability for the others. When some are configured as proxy communication devices, it's equivalent to some IoT devices becoming backup communication capabilities for others. The specific values of X, N, and M are set according to actual needs.
[0033] The working principle of the IoT communication system in this application will be explained in detail below: When an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The IoT device monitors its own communication status in real time; if it detects a communication interruption or device offline status, it indicates that its communication is unavailable. Alternatively, the IoT device can be manually controlled to communicate with the cloud platform through proxy communication devices; that is, the IoT device receives a trigger command instructing it to communicate with the cloud platform through proxy communication devices. Specifically, the IoT device uses its own operating system's session opening function to establish a session with the proxy communication devices. This function specifies the proxy communication device identifier, service name (consistent with the service name used to create the proxy communication service), and callback functions for successful session establishment, data reception, and session closure. In one example, the specific steps for creating a proxy communication service include the proxy communication device calling the operating system's session server creation function to create the session service, specifying the service name, and callback functions for successful session establishment, data reception, and session closure.
[0034] Before IoT devices establish a session connection with proxy communication devices—that is, before IoT devices detect whether local communication is available or whether they have received a trigger command—the distributed soft bus is initialized, and the proxy communication device is located. In one example, the steps for initializing the distributed soft bus include environment and dependency checks, initializing the soft bus core services, registering device communication callbacks, verifying the initialization results, exception handling, and resource release. Of course, other feasible initialization schemes are not excluded.
[0035] Similarly, the proxy communication device also initializes the distributed soft bus and creates a proxy communication service after initialization. In one example, creating a proxy communication service means that the proxy communication device calls the operating system's session server creation function to create a session service, specifying the service name, callback functions for successful session establishment, data reception, session closure, etc.
[0036] After establishing a session connection, the IoT device sends operational data to the proxy communication device based on the corresponding session connection. Specifically, the operational data transmission is carried out via a distributed soft bus. For example, when the IoT device is a charging station, the operational data may include device status data, charging process data, energy consumption metering data, fault alarm information, etc.
[0037] After receiving operational data, the proxy communication device uploads the data to the cloud platform, thus functioning as a proxy communication agent. Upon receiving the operational data, the cloud platform processes it to generate response data, which the proxy communication device then receives. After receiving the response data, the proxy communication device, based on the corresponding session connection, sends the response data to the corresponding IoT device. Specifically, this is done via a distributed soft bus.
[0038] There are two ways to use proxy communication devices to transmit operational data: In one approach, when an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The proxy communication devices generate a session identifier corresponding to the session connection, establish a corresponding communication channel with the cloud platform, and establish an association between the session identifier and the communication channel. Based on the corresponding session connection, the IoT device sends operational data to the proxy communication devices. The proxy communication devices find the corresponding communication channel based on the session identifier of the IoT device sending the operational data, upload the operational data to the cloud platform through the found communication channel, and receive response data from the cloud platform in response to the operational data transmission through the found communication channel. Finally, the proxy communication devices find the corresponding session connection based on the session identifier of the IoT device sending the operational data, and send response data to the corresponding IoT device based on the session connection.
[0039] In this example, after establishing a session connection with an IoT device, the proxy communication device generates a session identifier corresponding to that session connection. For example, the session identifier is a unique and time-sensitive string or code used to identify and locate the corresponding session connection. The proxy communication device then establishes a corresponding communication channel with the cloud platform for this session connection. This communication channel corresponds one-to-one with the session connection and is dedicated to communication between the IoT device and the cloud platform. For example, the communication channel can be a TCP (Transmission Control Protocol) channel. To facilitate the one-to-one correspondence between the session channel and the communication channel, the session identifier is bound to the communication channel, forming a one-to-one relationship. Subsequently, all data transmission between the proxy communication device and the cloud platform is conducted through the communication channel. When the proxy communication device receives operational data sent by the IoT device, it looks up the corresponding communication channel based on the corresponding session identifier and sends the operational data to the cloud platform through that communication channel. When the proxy communication device receives response data from the cloud platform, it looks up the corresponding session connection based on the session identifier corresponding to the communication channel and sends the response data to the corresponding IoT device through that session connection.
[0040] In another approach, when an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The proxy communication devices generate session identifiers corresponding to the session connections. Based on the corresponding session connections, the IoT device sends operational data to the proxy communication devices. The proxy communication devices respond to the operational data by packaging the operational data and the session identifier corresponding to the IoT device that sent the operational data into a package and sending it to the cloud platform. The proxy communication devices receive the response data from the cloud platform, which generates and sends back response data based on the session identifier corresponding to the IoT device that sent the operational data. Finally, the proxy communication devices locate the corresponding session connection based on the session identifier corresponding to the IoT device that sent the operational data and send the response data to the corresponding IoT device based on the session connection.
[0041] To conserve communication channels on the cloud platform, the proxy communication device in this example does not create a new communication channel with the cloud platform. Instead, it sends the generated session identifier to the cloud platform while forwarding runtime data. When the cloud platform processes the runtime data and sends back the response data, it also sends back the session identifier synchronously. The session identifier is used to follow the entire data transmission process, ensuring that the data transmission has a unique identification. Subsequently, the proxy communication device uses the session identifier to find the corresponding session connection and transmits the response data to the corresponding IoT device.
[0042] This application's IoT communication system includes N IoT devices and a cloud platform. Any IoT device can be configured as a proxy communication device relative to other IoT devices. When an IoT device detects local communication unavailability or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. Based on the corresponding session connection, the IoT device sends operational data to the proxy communication devices. The proxy communication devices upload the operational data to the cloud platform and receive response data from the cloud platform in response to the operational data transmission. Based on the corresponding session connection, the proxy communication devices send response data to the corresponding IoT device. This application enables communication between an IoT device and the cloud platform using other IoT devices configured as proxy communication devices when the communication capability of one IoT device is unavailable due to communication interruption, device offline status, etc. This eliminates the need for two SIM cards to ensure communication, avoids doubling data charges, reduces costs, and also fully utilizes the idle communication capabilities of IoT devices, improving resource utilization.
[0043] From the IoT device side, provide an IoT communication method, such as... Figure 2 The steps shown are as follows: Step S210: Upon detecting local communication unavailability or receiving a trigger command, establish session connections with M proxy communication devices via a distributed soft bus. An IoT device that provides communication capabilities to other IoT devices and acts as a proxy for other IoT devices to communicate with the cloud platform is called a proxy communication device. Correspondingly, the communication provided to other IoT devices is called proxy communication, while the communication provided to this device is called direct communication. To allow an IoT device to access the communication capabilities of another IoT device even when its own communication is interrupted or the device is offline, a proxy communication device is an IoT device selected and configured as a proxy communication device by the cloud platform. For example, if N is 3, including the first, second, and third IoT devices, the second and third IoT devices can be configured as proxy communication devices relative to the first IoT device (equivalent to M equals 2). Alternatively, only the second or third IoT device can be configured as a proxy communication device relative to the first IoT device (equivalent to M equals 1), and so on. The same applies to the first and second IoT devices relative to the third IoT device, and vice versa.
[0044] The proxy communication device publishes its local communication capabilities as a service. Other IoT devices listen for and discover the proxy communication device. When local communication becomes unavailable or is manually triggered, a distributed soft bus session is established with the proxy communication device for communication between the IoT device and the cloud platform. IoT devices monitor their own communication status in real time. When they detect a communication interruption or device offline status, it indicates that their communication is unavailable. Alternatively, IoT devices can be manually controlled to communicate with the cloud platform through the proxy communication device; that is, the IoT device receives a trigger command instructing it to communicate with the cloud platform through the proxy communication device. Specifically, the IoT device uses its own operating system's session opening function to establish a session with the proxy communication device. This function specifies the proxy communication device identifier, service name (consistent with the service name used to create the proxy communication service), and callback functions for successful session establishment, data reception, and session closure. In one example, the specific steps for creating the proxy communication service include the proxy communication device calling the operating system's session server creation function to create the session service, specifying the service name, and callback functions for successful session establishment, data reception, and session closure.
[0045] To ensure the proper functioning of the IoT communication system described in this application, the IoT devices first need to register on the cloud platform, and then the cloud platform configures the proxy communication device from the IoT devices.
[0046] Specifically, in one example, N IoT devices upload their registration messages to the cloud platform. In one approach, after powering on, each IoT device sends a registration message to the cloud platform. This message includes at least wireless signal quality information, and also needs to carry the device's identifier and authentication information. The cloud platform records the wireless signal quality information for selecting a proxy communication device. Optionally, in another approach, each IoT device first sends a message to the cloud platform carrying its identifier and authentication information to complete registration, and then sends wireless signal quality information to the cloud platform. The cloud platform records this information for selecting a proxy communication device.
[0047] The cloud platform configures a device group containing a list of device identifiers, and subsequently selects proxy communication devices from this list. Specifically, based on the IoT device registration messages, the cloud platform selects X IoT devices with the best wireless signal quality from N IoT devices and sends activation proxy communication service messages to these X IoT devices. The cloud platform sorts the wireless signal quality from high to low, and selects the top X IoT devices from the sequence in descending order of quality; for example, selecting 5 from 10 IoT devices. After selecting the corresponding IoT devices, the cloud platform sends the activation proxy communication service message. When it is necessary to deactivate a proxy communication device, the cloud platform sends a deactivation proxy communication service message to the proxy communication device. The activation and deactivation proxy communication service messages can be two different messages or the same message. When they are the same message, they simply carry an activation identifier or a deactivation identifier depending on whether the current activation or deactivation is required.
[0048] Upon receiving the "Activate Proxy Communication Service" message, X IoT devices respond and are configured as proxy communication devices. Here, X is less than or equal to N, and X is greater than M. The cloud platform can configure all or some of the IoT devices as proxy communication devices. When all are configured as proxy communication devices, it's equivalent to each IoT device becoming a backup communication capability for the others. When some are configured as proxy communication devices, it's equivalent to some IoT devices becoming backup communication capabilities for others. The specific values of X, N, and M are set according to actual needs.
[0049] In one example, before establishing session connections with M proxy communication devices via the distributed soft bus upon detecting local communication unavailability or receiving a trigger command, the steps include: initializing the distributed soft bus and locating proxy communication devices. In one example, the steps for initializing the distributed soft bus include environment and dependency checks, initializing the soft bus core services, registering device communication callbacks, verifying initialization results, exception handling, and resource release. Other feasible initialization schemes are not excluded.
[0050] Step S220: Based on the corresponding session connection, operational data is sent to the proxy communication device to instruct the proxy communication device to upload the operational data to the cloud platform. Specifically, the operational data transmission is carried out via a distributed soft bus. For example, when the IoT device is a charging pile, the operational data may include device status data, charging process data, energy consumption metering data, fault alarm information, etc.
[0051] Step S230: Based on the corresponding session connection, receive response data returned by the proxy communication device; the response data is data generated by the cloud platform in response to the running data and transmitted to the proxy communication device. After receiving the running data, the proxy communication device uploads the running data to the cloud platform, thus performing the proxy communication function. After receiving the running data, the cloud platform processes the running data to generate response data, and the proxy communication device receives the response data returned by the cloud platform in response to the running data. After receiving the response data, the proxy communication device sends the response data to the corresponding IoT device based on the corresponding session connection. Specifically, the response data is also sent to the corresponding IoT device through a distributed soft bus.
[0052] This application's IoT communication method includes the following steps: upon detecting local communication unavailability or receiving a trigger command, establishing session connections with M proxy communication devices via a distributed soft bus; the proxy communication devices are IoT devices selected and configured as proxy communication devices by the cloud platform; based on the corresponding session connection, sending operational data to the proxy communication devices to instruct them to upload the operational data to the cloud platform; based on the corresponding session connection, receiving response data returned by the proxy communication devices; the response data is data generated by the cloud platform in response to the operational data and transmitted to the proxy communication devices. This application enables communication between an IoT device and the cloud platform using other IoT devices configured as proxy communication devices when the communication capability of an IoT device is unavailable due to communication interruption, device offline, etc. This eliminates the need for two SIM cards to ensure communication, avoiding doubled data charges and reducing costs. It also fully utilizes the idle communication capabilities of IoT devices, improving resource utilization.
[0053] From the perspective of the proxy communication device, an IoT communication method is provided, such as... Figure 3 As shown, the steps include: Step S310: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device via a distributed soft bus. An IoT device that provides communication capabilities to other IoT devices and acts as a proxy for other IoT devices to communicate with the cloud platform is called a proxy communication device. Correspondingly, the communication provided to other IoT devices is called proxy communication, while the communication provided to this device is called direct communication.
[0054] The proxy communication device publishes its local communication capabilities as a service. Other IoT devices listen for and discover the proxy communication device. When local communication is unavailable or manually triggered, a distributed soft bus session is established with the proxy communication device for communication between the IoT device and the cloud platform.
[0055] To ensure the proper functioning of the IoT communication system described in this application, each IoT device must first register on the cloud platform, and then the cloud platform will configure proxy communication devices from the IoT devices.
[0056] Specifically, in one example, N IoT devices upload their registration messages to the cloud platform. In one approach, after powering on, each IoT device sends a registration message to the cloud platform. This message includes at least wireless signal quality information, and also needs to carry the device's identifier and authentication information. The cloud platform records the wireless signal quality information for selecting a proxy communication device. Optionally, in another approach, each IoT device first sends a message to the cloud platform carrying its identifier and authentication information to complete registration, and then sends wireless signal quality information to the cloud platform. The cloud platform records this information for selecting a proxy communication device.
[0057] The cloud platform configures a device group containing a list of device identifiers, and subsequently selects proxy communication devices from this list. Specifically, based on the IoT device registration messages, the cloud platform selects X IoT devices with the best wireless signal quality from N IoT devices and sends activation proxy communication service messages to these X IoT devices. The cloud platform sorts the wireless signal quality from high to low, and selects the top X IoT devices from the sequence in descending order of quality; for example, selecting 5 from 10 IoT devices. After selecting the corresponding IoT devices, the cloud platform sends the activation proxy communication service message. When it is necessary to deactivate a proxy communication device, the cloud platform sends a deactivation proxy communication service message to the proxy communication device. The activation and deactivation proxy communication service messages can be two different messages or the same message. When they are the same message, they simply carry an activation identifier or a deactivation identifier depending on whether the current activation or deactivation is required.
[0058] Upon receiving the "Activate Proxy Communication Service" message, X IoT devices respond and are configured as proxy communication devices. Here, X is less than or equal to N, and X is greater than M. The cloud platform can configure all or some of the IoT devices as proxy communication devices. When all are configured as proxy communication devices, it's equivalent to each IoT device becoming a backup communication capability for the others. When some are configured as proxy communication devices, it's equivalent to some IoT devices becoming backup communication capabilities for others. The specific values of X, N, and M are set according to actual needs.
[0059] When an IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M proxy communication devices via a distributed soft bus. The IoT device monitors its own communication status in real time; if it detects a communication interruption or device offline status, it indicates that its communication is unavailable. Alternatively, the IoT device can be manually controlled to communicate with the cloud platform through proxy communication devices; that is, the IoT device receives a trigger command instructing it to communicate with the cloud platform through proxy communication devices. Specifically, the IoT device uses its own operating system's session opening function to establish a session with the proxy communication devices. This function specifies the proxy communication device identifier, service name (consistent with the service name used to create the proxy communication service), and callback functions for successful session establishment, data reception, and session closure. In one example, the specific steps for creating a proxy communication service include the proxy communication device calling the operating system's session server creation function to create the session service, specifying the service name, and callback functions for successful session establishment, data reception, and session closure.
[0060] Before IoT devices establish a session connection with proxy communication devices—that is, before IoT devices detect whether local communication is available or whether they have received a trigger command—the distributed soft bus is initialized, and the proxy communication device is located. In one example, the steps for initializing the distributed soft bus include environment and dependency checks, initializing the soft bus core services, registering device communication callbacks, verifying the initialization results, exception handling, and resource release. Of course, other feasible initialization schemes are not excluded.
[0061] Similarly, the proxy communication device also initializes the distributed soft bus and creates a proxy communication service after initialization. In one example, creating a proxy communication service means that the proxy communication device calls the operating system's session server creation function to create a session service, specifying the service name, callback functions for successful session establishment, data reception, session closure, etc.
[0062] Step S320: Based on the corresponding session connection, receive operational data sent by the IoT device. Specifically, the operational data transmission is via a distributed soft bus. For example, when the IoT device is a charging station, the operational data may include device status data, charging process data, energy consumption metering data, fault alarm information, etc.
[0063] Step S330 involves uploading the operational data to the cloud platform and receiving response data from the cloud platform in response to the operational data transmission. After receiving the operational data, the proxy communication device uploads it to the cloud platform, functioning as a proxy communication device. Upon receiving the operational data, the cloud platform processes it to generate response data, which the proxy communication device then receives. After receiving the response data, the proxy communication device sends it to the corresponding IoT device based on the corresponding session connection. Specifically, this is done via a distributed soft bus.
[0064] Step S340: Based on the corresponding session connection, send the response data to the corresponding IoT device.
[0065] There are two ways to use proxy communication devices to transmit operational data: In one way, such as Figure 4 As shown, the steps include: Step S410: Establish a session connection with the IoT device via a distributed soft bus based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command.
[0066] Step S420: Generate a session identifier corresponding to the session connection, establish a corresponding communication channel with the cloud platform, and establish the association between the session identifier and the communication channel.
[0067] Step S430: Based on the corresponding session connection, receive the operation data sent by the IoT device.
[0068] Step S440: Locate the corresponding communication channel based on the session identifier of the IoT device sending the operation data, upload the operation data to the cloud platform through the found communication channel, and receive the response data from the cloud platform in response to the operation data through the found communication channel.
[0069] Step S450: Locate the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and send the response data to the corresponding IoT device based on the session connection.
[0070] In this example, after establishing a session connection with an IoT device, the proxy communication device generates a session identifier corresponding to that session connection. For example, the session identifier is a unique and time-sensitive string or code used to identify and locate the corresponding session connection. The proxy communication device then establishes a corresponding communication channel with the cloud platform for this session connection. This communication channel corresponds one-to-one with the session connection and is dedicated to communication between the IoT device and the cloud platform. For example, the communication channel can be a TCP (Transmission Control Protocol) channel. To facilitate the one-to-one correspondence between the session channel and the communication channel, the session identifier is bound to the communication channel, forming a one-to-one relationship. Subsequently, all data transmission between the proxy communication device and the cloud platform is conducted through the communication channel. When the proxy communication device receives operational data sent by the IoT device, it looks up the corresponding communication channel based on the corresponding session identifier and sends the operational data to the cloud platform through that communication channel. When the proxy communication device receives response data from the cloud platform, it looks up the corresponding session connection based on the session identifier corresponding to the communication channel and sends the response data to the corresponding IoT device through that session connection.
[0071] In another way, such as Figure 5 As shown, the steps include: Step S510: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, establish a session connection with the IoT device through a distributed soft bus.
[0072] Step S520: Generate a session identifier corresponding to the session connection.
[0073] Step S530: Based on the corresponding session connection, receive the operation data sent by the IoT device.
[0074] Step S540: Respond to the running data by packaging the running data and the session identifier corresponding to the IoT device that sent the running data and sending them to the cloud platform.
[0075] Step S550: Receive the cloud platform's response operation data and the response data generated and returned by the session identifier corresponding to the IoT device that sent the operation data.
[0076] The proxy communication device finds the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and sends the response data to the corresponding IoT device based on the session connection.
[0077] To conserve communication channels on the cloud platform, the proxy communication device in this example does not create a new communication channel with the cloud platform. Instead, it sends the generated session identifier to the cloud platform while forwarding runtime data. When the cloud platform processes the runtime data and sends back the response data, it also sends back the session identifier synchronously. The session identifier is used to follow the entire data transmission process, ensuring that the data transmission has a unique identification. Subsequently, the proxy communication device uses the session identifier to find the corresponding session connection and transmits the response data to the corresponding IoT device.
[0078] This application's IoT communication method includes the following steps: establishing a connection with the IoT device via a distributed soft bus based on a connection establishment request sent by the IoT device when it detects local communication unavailability or receives a trigger command; receiving operational data sent by the IoT device based on the corresponding session connection; uploading the operational data to a cloud platform and receiving response data from the cloud platform in response to the operational data transmission; and sending the response data to the corresponding IoT device based on the corresponding session connection. This application enables communication between an IoT device and the cloud platform using other IoT devices configured as proxy communication devices when the communication capability of one IoT device is unavailable due to communication interruption, device offline, or other reasons. This eliminates the need for two SIM cards to ensure communication, avoids doubling data charges, reduces costs, and also fully utilizes the idle communication capabilities of IoT devices, improving resource utilization.
[0079] It should be understood that, although Figures 2-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2-5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0080] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0081] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0082] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An Internet of Things (IoT) communication system, characterized in that, It includes N IoT devices and a cloud platform; the IoT devices are connected via a distributed soft bus; the IoT devices communicate with the cloud platform; any one of the IoT devices can be configured as a proxy communication device relative to the other IoT devices. When the IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M of the agent communication devices through the distributed soft bus. The IoT device sends operating data to the proxy communication device based on the corresponding session connection; The proxy communication device uploads the operation data to the cloud platform and receives response data from the cloud platform in response to the operation data being transmitted back. The proxy communication device sends the response data to the corresponding IoT device based on the corresponding session connection.
2. The Internet of Things communication system according to claim 1, characterized in that, N IoT devices respectively upload IoT device registration messages to the cloud platform; the IoT device registration messages include at least wireless signal quality information; Based on the IoT device registration message, the cloud platform selects X IoT devices with the best wireless signal quality from N IoT devices and sends an activation proxy communication service message to the X IoT devices. The X IoT devices respond to the activation proxy communication service message and are configured to become the proxy communication devices; Wherein, X is less than or equal to N, and X is greater than or equal to M.
3. The Internet of Things communication system according to claim 1, characterized in that, Before detecting whether local communication is available or whether a trigger command has been received, the IoT device initializes the distributed soft bus and locates the proxy communication device.
4. The Internet of Things communication system according to any one of claims 1 to 3, characterized in that, When the IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M of the agent communication devices through the distributed soft bus. The proxy communication device generates a session identifier corresponding to the session connection, establishes a corresponding communication channel with the cloud platform, and establishes an association between the session identifier and the communication channel; The IoT device sends operating data to the proxy communication device based on the corresponding session connection; The proxy communication device finds the corresponding communication channel based on the session identifier of the IoT device that sent the operation data, uploads the operation data to the cloud platform through the found communication channel, and receives the response data from the cloud platform in response to the operation data being transmitted back through the found communication channel. The proxy communication device finds the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and sends the response data to the corresponding IoT device based on the session connection.
5. The Internet of Things communication system according to any one of claims 1 to 3, characterized in that, When the IoT device detects that local communication is unavailable or receives a trigger command, it establishes a session connection with M of the agent communication devices through the distributed soft bus. The proxy communication device generates a session identifier corresponding to the session connection; The IoT device sends operating data to the proxy communication device based on the corresponding session connection; The proxy communication device responds to the operation data by packaging the operation data and the session identifier corresponding to the IoT device that sent the operation data and sending it to the cloud platform. The proxy communication device receives the cloud platform's response to the operation data and the response data generated and returned by the session identifier corresponding to the IoT device that sent the operation data; The proxy communication device finds the corresponding session connection based on the session identifier of the IoT device that sent the operation data, and sends the response data to the corresponding IoT device based on the session connection.
6. An Internet of Things (IoT) communication method, characterized in that, Including the following steps: When local communication is detected to be unavailable or a trigger command is received, a session connection is established with M proxy communication devices via a distributed soft bus; the proxy communication devices are IoT devices selected and configured as proxy communication devices by the cloud platform. Based on the corresponding session connection, operation data is sent to the proxy communication device to instruct the proxy communication device to upload the operation data to the cloud platform; Based on the corresponding session connection, the system receives response data returned by the proxy communication device; the response data is data generated by the cloud platform in response to the operation data and transmitted to the proxy communication device.
7. The Internet of Things communication method according to claim 6, characterized in that, Before the step of establishing a session connection with M proxy communication devices via a distributed soft bus when local communication is detected to be unavailable or a trigger command is received, the method further includes the following step: The distributed soft bus is initialized, and the proxy communication device is located.
8. An Internet of Things (IoT) communication method, characterized in that, Including the following steps: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through a distributed soft bus; Based on the corresponding session connection, receive the operation data sent by the IoT device; The operation data is uploaded to the cloud platform, and the response data sent back by the cloud platform in response to the operation data is received. Based on the corresponding session connection, the response data is sent to the corresponding IoT device.
9. The Internet of Things communication method according to claim 8, characterized in that, Including the following steps: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through the distributed soft bus; Generate a session identifier corresponding to the session connection, establish a corresponding communication channel with the cloud platform, and establish an association between the session identifier and the communication channel; Based on the corresponding session connection, receive the operation data sent by the IoT device; The corresponding communication channel is located based on the session identifier of the IoT device that sends the operation data, and the operation data is uploaded to the cloud platform through the found communication channel. The response data of the cloud platform in response to the operation data is received through the found communication channel. The corresponding session connection is located based on the session identifier of the IoT device that sent the running data, and the response data is sent to the corresponding IoT device based on the session connection.
10. The Internet of Things communication method according to claim 8, characterized in that, Including the following steps: Based on the connection establishment request sent by the IoT device when it detects that local communication is unavailable or receives a trigger command, a session connection is established with the IoT device through the distributed soft bus; Generate a session identifier corresponding to the session connection; Based on the corresponding session connection, receive the operation data sent by the IoT device; In response to the operational data, the operational data and the session identifier corresponding to the IoT device that sent the operational data are packaged and sent to the cloud platform; Receive the cloud platform's response to the operation data and the response data generated and returned by the session identifier corresponding to the IoT device that sent the operation data; The corresponding session connection is located based on the session identifier of the IoT device that sent the running data, and the response data is sent to the corresponding IoT device based on the session connection.
Citation Information
Patent Citations
Remote management method and system for electric power Internet of Things equipment
CN112910954A
Equipment fault diagnosis method and device
CN115529225A
Equipment offline control method and device, equipment and storage medium
CN116112303A