A method and system for direct interaction and control of local area network of intelligent devices
Through the LAN direct connection technology, the APP directly conducts UDP broadcast discovery and data transmission with the device side, solving the problems of high hardware costs and large communication delays in the existing technology, and realizing the LAN interaction of smart devices that saves hardware and server costs.
Patent Information
- Application Number
- CN202210846878.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-07-19
AI Technical Summary
The prior art has problems such as high hardware costs, large communication delays and high server costs in local area network communication of smart devices. Especially in terms of video transmission, Bluetooth bandwidth is insufficient and needs to be transferred through the server, which increases complexity and cost.
Through the local area network direct connection technology, the APP directly conducts UDP broadcast discovery with the device side, establishes a TCP link for signaling interaction, uses HTTP requests to push messages, and transmits data through UDP, including files, audio and video.
It realizes that there is no need to add Bluetooth modules on the device side, saves hardware costs, and directly interacts through the local area network, reducing network latency and server deployment costs.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication data transmission, and in particular to a method and system for direct interaction and control of a local area network of an intelligent device. Background Art
[0002] The discoverer and the discovered party are two different devices. The purpose of their communication in the local area network is to interact with the discovered party or call its camera to shoot in real time. Traditional screenless smart devices usually need to be controlled by mobile phones. They are generally connected through Bluetooth, or servers are deployed on the public network to provide discovery, signaling transmission, and even transfer of the entire media data for both parties. The Bluetooth bandwidth is too small to be suitable for video transmission, and it will also increase hardware costs; transferring through a server will increase server costs, increase communication delays, and increase R&D and traffic costs to improve the reliability of the entire link. Summary of the invention
[0003] The present invention provides a method for direct connection interaction and control of a smart device in a local area network, comprising the following steps:
[0004] Device discovery steps: APP and device are connected to the same WIFI, APP calls the Offer interface of SKYDiscoveryClient, initiates UDP broadcast data, and the device in the same LAN subnet replies with response data;
[0005] Data interaction steps: APP interacts with the device side for data.
[0006] As a further improvement of the present invention, the data interaction step includes:
[0007] Signaling interaction steps: APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication;
[0008] Message push steps: APP uses HTTP request to implement message interaction with the device side, and the device side has a built-in HTTPServer;
[0009] Data transmission steps: APP and device transmit data via UDP.
[0010] As a further improvement of the present invention, in the data transmission step, the transmitted data includes files, audio and / or video.
[0011] As a further improvement of the present invention, in the data transmission step, the transmission of audio and / or video is implemented as follows:
[0012] During the SKYPlayerSDK audio and / or video transmission process, select the SKYSIPUDP streaming channel and device parameters to achieve LAN streaming.
[0013] As a further improvement of the present invention, in the device discovery step:
[0014] If the Offer carries a specified device identifier, the corresponding device responds;
[0015] If the Offer carries a specific device identifier, all devices within the LAN subnet will respond.
[0016] As a further improvement of the present invention, in the signaling interaction step, the APP carries the device identification of the connected device when logging in. The device identification is the only difference of the Signaling link. The device side calls the CtrlNotify interface of SKYSignalingClient to realize message notification.
[0017] As a further improvement of the present invention, in the message push step, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient.
[0018] The present invention also provides a smart device LAN direct connection interaction and control system, comprising:
[0019] Device discovery module: The APP and the device are connected to the same WIFI. The APP calls the Offer interface of SKYDiscoveryClient to initiate UDP broadcast data, and the device in the same LAN subnet replies with response data.
[0020] Data interaction module: used for data interaction between APP and device.
[0021] As a further improvement of the present invention, the data interaction module includes:
[0022] Signaling interaction module: APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication;
[0023] Message push module: The APP uses HTTP requests to implement message interaction with the device, and the device has a built-in HTTPServer;
[0024] Data transmission module: used for data transmission between APP and device via UDP.
[0025] As a further improvement of the present invention, in the data transmission module, the transmitted data includes files, audio and / or video.
[0026] As a further improvement of the present invention, in the data transmission module, the transmission of audio and / or video is implemented as follows:
[0027] During the SKYPlayerSDK video transmission process, select the SKYSIPUDP streaming channel and device parameters to achieve LAN streaming.
[0028] As a further improvement of the present invention, in the device discovery module:
[0029] If the Offer carries a specified device identifier, the corresponding device responds;
[0030] If the Offer carries a specific device identifier, all devices within the LAN subnet will respond.
[0031] As a further improvement of the present invention, in the signaling interaction module, the APP carries the device identification of the connected device when logging in. The device identification is the only difference of the Signaling link. The device side calls the CtrlNotify interface of SKYSignalingClient to realize message notification.
[0032] As a further improvement of the present invention, in the message push module, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient.
[0033] The beneficial effects of the present invention are as follows: the present invention uses the LAN direct connection technology, and there is no need to add a Bluetooth module on the device side, thus saving hardware costs; at the same time, the present invention directly interacts with the device side through the LAN, thus reducing network latency and saving the cost of deploying a server. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is the principle diagram of the present invention;
[0035] Figure 2 It is a schematic diagram of the device discovery steps;
[0036] Figure 3 It is a schematic diagram of the signaling interaction steps;
[0037] Figure 4 This is the schematic diagram of the message push steps;
[0038] Figure 5 This is a schematic diagram of the video transmission steps. DETAILED DESCRIPTION
[0039] like Figure 1As shown, the present invention discloses a method for direct interaction and control of a smart device in a local area network, including a device discovery step and a data interaction step. The data interaction step includes: a signaling interaction step, a message push step and a video transmission step.
[0040] like Figure 2 As shown in the figure, the device discovery steps are: the APP calls the Offer interface of SKYDiscoveryClient, initiates UDP broadcast data, and the device end in the same LAN subnet answers the response data.
[0041] SKYDiscoveryClient means: define APP as client and provide LAN discovery device encapsulation.
[0042] The APP can be installed in a tablet or smartphone. The APP is the discoverer and the device is the discovered party. The discoverer and the discovered party are connected to the same WIFI.
[0043] In the device discovery step, if the Offer carries a specified device identifier (QID), the corresponding device will respond; if the Offer carries a specific device identifier (QID=XXXXXXXX), all device terminals in the LAN subnet will respond.
[0044] Data interaction steps: APP interacts with the device side for data.
[0045] like Figure 3 As shown in the figure, the signaling interaction steps are: the APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication.
[0046] SKYSignalingClient means: define APP as the client, based on LAN discovery, mainly conduct media signaling interaction of audio and video calls, such as encoding format, etc.
[0047] In the signaling interaction step, the QID of the connected device needs to be carried when logging in. Since SKYSignalingClient supports connecting to multiple devices at the same time, QID is the only difference in the Signaling link; the device side calls the CtrlNotify interface of SKYSignalingClient to implement message notification.
[0048] like Figure 4 As shown in the figure, the message push steps are as follows: the APP uses HTTP requests to implement message interaction with the device side, and the device side has a built-in HTTPServer.
[0049] In the message push step, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient, such as: GET request, http: / / XXXX:18086 / getSystemInfo; supports HTTPS; supports Authorization authority authentication.
[0050] Data transmission steps: APP and device transmit data via UDP.
[0051] In the data transmission step, the transmitted data includes files, audio and / or video.
[0052] In the data transmission step, the transmission of audio and / or video is implemented as follows: Figure 5 As shown, during the SKYPlayerSDK audio and / or video transmission process, different parameters are passed in: select the SKYSIPUDP streaming channel, and device-side parameters: edgeUid, edgeHost, edgePort, etc., to achieve LAN streaming.
[0053] SKYPlayerSDK means: the realization of the underlying playback capability of the APP can play the received audio and video.
[0054] SKYSIPUDP means: UDP channel for audio and video streaming in LAN.
[0055] In the data transmission step, when transmitting audio and / or video, the APP supports SKYSIPUDP streaming mode, and SKYSIPUDP is LAN streaming; the above LAN streaming supports the basic elements of streaming: such as switching resolution, switching frame rate, etc.
[0056] The present invention establishes a set of device-side / APP-side SDKs, which are mainly based on the fact that the discoverer and the discovered party are connected to the same WIFI. The discoverer uses the UDP broadcast address 255.255.255.255:15683 to send a broadcast instruction, and the WIFI router will forward it to all other clients connected to the current WIFI. Other clients listen on the broadcast address port, thus completing the entire LAN discovery function. Once the discovery of both parties is completed, the LAN IP addresses of both parties can be known. In this way, we use the UDP protocol to perform two-way data transmission on the ports defined in advance by both parties.
[0057] The present invention also discloses a smart device LAN direct connection interaction and control system, comprising:
[0058] Device discovery module: The APP and the device are connected to the same WIFI. The APP calls the Offer interface of SKYDiscoveryClient to initiate UDP broadcast data, and the device in the same LAN subnet replies with response data.
[0059] Data interaction module: used for data interaction between APP and device.
[0060] The data interaction module includes a signaling interaction module, a message push module and a data transmission module.
[0061] Signaling interaction module: APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication;
[0062] Message push module: The APP uses HTTP requests to implement message interaction with the device, and the device has a built-in HTTPServer;
[0063] Data transmission module: used for data transmission between APP and device via UDP.
[0064] In the data transmission module, the transmitted data includes files, audio and / or video.
[0065] In the data transmission module, the transmission of audio and / or video is implemented as follows: during the SKYPlayerSDK video transmission process, the SKYSIPUDP streaming channel and device-side parameters are selected to implement LAN streaming.
[0066] In the device discovery module:
[0067] If the Offer carries a specified device identifier, the corresponding device responds;
[0068] If the Offer carries a specific device identifier, all devices within the LAN subnet will respond.
[0069] In the signaling interaction module, the APP carries the device identification of the connected device when logging in. The device identification is the only difference of the Signaling link. The device side calls the CtrlNotify interface of SKYSignalingClient to implement message notification.
[0070] In the message push module, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient.
[0071] In the data transmission module, when transmitting audio and / or video, the APP supports SKYSIPUDP LAN streaming.
[0072] The present invention uses the LAN direct connection technology, and there is no need to add a Bluetooth module on the device side, thus saving hardware costs. At the same time, the LAN is used to directly interact with the device side, which reduces network latency and saves the cost of deploying a server.
[0073] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for direct interaction and control of a smart device in a local area network, characterized in that: The steps include: Device discovery step: APP and the device are connected to the same WIFI, APP calls the Offer interface of SKYDiscoveryClient, initiates UDP broadcast data, and the device in the same LAN subnet replies with response data. SKYDiscoveryClient indicates: define APP as the client, provide LAN discovery device encapsulation; APP is installed in the discovery device, and the device is the discovery device; Data interaction steps: APP interacts with the device side; The data interaction step includes: Signaling interaction steps: APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication; SKYSignalingClient means: define APP as the client, and perform media signaling interaction for audio and video calls based on LAN discovery; Message push steps: APP uses HTTP request to implement message interaction with the device side, and the device side has a built-in HTTPServer; Data transmission steps: APP and device transmit data via UDP; In the device discovery step: If the Offer carries a specified device identifier, the corresponding device responds; If the Offer carries a specific device identifier, all devices in the LAN subnet will respond; In the signaling interaction step, the APP carries the device ID of the connected device when logging in. The device ID is the only difference of the Signaling link. The device side calls the CtrlNotify interface of SKYSignalingClient to implement message notification; In the message push step, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient.
2. The method for direct interaction and control of a smart device in a local area network according to claim 1, characterized in that: In the data transmission step, the transmitted data includes files, audio and / or video.
3. The method for direct interaction and control of a smart device in a local area network according to claim 2, characterized in that: In the data transmission step, the audio and / or video transmission is implemented as follows: During the SKYPlayerSDK audio and / or video transmission process, select the SKYSIPUDP streaming channel and device-side parameters to implement LAN streaming; SKYPlayerSDK means: the implementation of the underlying playback capability of the APP to play the received audio and video; SKYSIPUDP means: the UDP channel for LAN audio and video streaming.
4. A smart device LAN direct connection interaction and control system, characterized in that: include: Device discovery module: APP and device are connected to the same WIFI. APP calls the Offer interface of SKYDiscoveryClient to initiate UDP broadcast data. The device in the same LAN subnet replies with response data. SKYDiscoveryClient means: APP is defined as the client and provides LAN discovery device encapsulation. APP is installed in the discovery device and the device is the discovery device. Data interaction module: used for data interaction between APP and device; The data interaction module includes: Signaling interaction module: APP calls the Login interface of SKYSignalingClient to establish a TCP link with the device to achieve two-way communication. SKYSignalingClient means: define APP as the client, and conduct media signaling interaction for audio and video calls based on LAN discovery; Message push module: The APP uses HTTP requests to implement message interaction with the device, and the device has a built-in HTTPServer; Data transmission module: used for data transmission between APP and device via UDP; In the device discovery module: If the Offer carries a specified device identifier, the corresponding device responds; If the Offer carries a specific device identifier, all devices in the LAN subnet will respond; In the signaling interaction module, the APP carries the device ID of the connected device when logging in. The device ID is the only difference of the Signaling link. The device side calls the CtrlNotify interface of SKYSignal ingCl ient to implement message notification; In the message push module, the APP constructs the URL of the HTTP request through the device LAN IP returned by SKYDiscoveryClient.
5. The smart device LAN direct connection interaction and control system according to claim 4, characterized in that: In the data transmission module, the transmitted data includes files, audio and / or video.
6. The smart device LAN direct connection interaction and control system according to claim 5, characterized in that: In the data transmission module, the audio and / or video transmission is implemented as follows: During the SKYPlayerSDK video transmission process, select the SKYSIPUDP streaming channel and device-side parameters to implement LAN streaming; SKYPlayerSDK means: the implementation of the underlying playback capability of the APP to play the received audio and video; SKYSIPUDP means: the UDP channel for LAN audio and video streaming.
Citation Information
Patent Citations
Method and device for transmitting data
CN102711175A
Local area network dual-channel device discovery method
CN109361551A