Search

CN-121985387-A - Communication method, device and equipment of Internet of things equipment

CN121985387ACN 121985387 ACN121985387 ACN 121985387ACN-121985387-A

Abstract

The embodiment of the specification discloses a communication method, a device and equipment of Internet of things equipment, relates to the technical field of communication, and is used for solving the communication problem that the Internet of things equipment can ensure that the equipment realizes reliable data transmission in a weak network or disconnected network environment. The method comprises the steps of triggering first Internet of things equipment to establish a near field communication link with second Internet of things equipment through near field communication when the network connection quality of the first Internet of things equipment is lower than a preset threshold, and carrying out protocol forwarding on traffic of the first Internet of things equipment through a dual-stack gateway through the near field communication link to cascade network protocol stacks between the first Internet of things equipment and the second Internet of things equipment so as to enable the first Internet of things equipment to access a target network through the second Internet of things equipment, wherein the network protocol stacks comprise parallel system protocol stacks and private protocol stacks in the same dual-stack gateway.

Inventors

  • Mao shuai
  • XIAO LEI
  • ZHANG WANG

Assignees

  • 支付宝(杭州)数字服务技术有限公司

Dates

Publication Date
20260505
Application Date
20260403

Claims (20)

  1. 1. A method of communication for an internet of things device, the method comprising: When the network connection quality of the first Internet of things equipment is lower than a preset threshold value, triggering the first Internet of things equipment, and establishing a near field communication link with the second Internet of things equipment through near field communication; And carrying out protocol forwarding on the flow of the first Internet of things equipment through the dual-stack gateway through the near field communication link so as to cascade network protocol stacks between the first Internet of things equipment and the second Internet of things equipment, and realizing that the first Internet of things equipment accesses a target network through the second Internet of things equipment, wherein the network protocol stacks comprise parallel system protocol stacks and private protocol stacks in the same dual-stack gateway.
  2. 2. The method of claim 1, wherein the protocol forwarding, through the near field communication link, the traffic of the first internet of things device through a dual stack gateway to concatenate network protocol stacks between the first internet of things device and a second internet of things device, specifically comprises: Directing a standard network protocol data stream sent to a target network to a first private protocol stack of the dual-stack gateway in the first Internet of things device through a first system protocol stack of the dual-stack gateway in the first Internet of things device; based on the first private protocol stack, carrying out protocol adaptation conversion on the standard network protocol data stream to obtain a private transmission format data stream matched with the near field communication link; transmitting the private transport format data stream to the second internet-enabled device based on the near field communication link; and restoring the private transmission format data stream through the second internet of things device to obtain the standard network protocol data stream, and forwarding the standard network protocol data stream to the target network to realize network intercommunication of the first internet of things device through the second internet of things device.
  3. 3. The method of claim 2, directing, by a first system protocol stack of the dual-stack gateway in the first internet of things device, a standard network protocol data stream addressed to a target network to a first private protocol stack of the dual-stack gateway in the first internet of things device, specifically comprising: Intercepting a standard network protocol data stream sent to a target network through a preset routing strategy of the first system protocol stack, and redirecting an output path of the standard network protocol data stream to a virtual network interface instantiated by the first private protocol stack; And forwarding the standard network protocol data stream to a user state space corresponding to the first private protocol stack through the virtual network interface so that the first private protocol stack takes over the standard network protocol data stream.
  4. 4. The method according to claim 2, based on the first private protocol stack, performing protocol adaptation conversion on the standard network protocol data stream to obtain a private transport format data stream matched with the near field communication link, specifically comprising: analyzing the protocol structure of the standard network protocol data stream through the first private protocol stack to obtain data content to be transmitted; And adding a private protocol header to the data content to be transmitted based on a preset private protocol encapsulation format of the first private protocol stack to generate the private transmission format data stream, wherein the private protocol header contains control information matched with the near field communication link.
  5. 5. The method according to claim 4, wherein the second internet-based device restores the standard network protocol data stream to the target network, and the method specifically comprises: reversely analyzing the private transmission format data stream based on a second private protocol stack of the second internet equipment to remove the private protocol header to obtain the data content to be transmitted, and restoring the data content to be transmitted to obtain the standard network protocol data stream; and transmitting the restored standard network protocol data stream to a second system protocol stack of the second internet-connected device, so as to forward the standard network protocol data stream to the target network based on the second system protocol stack.
  6. 6. The method of claim 2, the method further comprising: performing end-to-end encryption on the standard network protocol data stream based on the first system protocol stack to generate inner ciphertext data, wherein an encryption key of the end-to-end encryption is held by the target network; Performing protocol adaptation conversion on the inner layer ciphertext data through the first private protocol stack to obtain a private transmission format data stream matched with the near field communication link; and based on the near field communication link, sending the private transmission format data stream to the second internet-of-things device so as to restore the private transmission format data stream based on the second internet-of-things device, obtaining the inner ciphertext data and forwarding the inner ciphertext data to the target network.
  7. 7. The method of claim 1, triggering the first internet of things device to establish a near field communication link with a second internet of things device by near field communication, specifically comprising: Establishing a bottom layer communication link with the second internet of things device through a built-in near field communication module of the first internet of things device; Based on a preset tunnel protocol, negotiation interaction is carried out between the first Internet of things device and the second Internet of things device so as to instantiate a virtual network interface in the first Internet of things device and redirect network traffic sent to a target network by the first Internet of things device to the virtual network interface; And establishing a near field communication link between the first Internet of things device and the second Internet of things device based on the virtual network interface and the bottom layer communication link.
  8. 8. The method of claim 7, wherein the establishing an underlying communication link with the second internet of things device through the built-in near field communication module of the first internet of things device specifically comprises: scanning and identifying the second internet of things equipment within a preset range through a built-in near field communication module of the first internet of things equipment, and initiating a connection request to the second internet of things equipment; And establishing physical layer connection of the first Internet of things device and the second Internet of things device based on the connection request so as to negotiate communication transmission parameters based on the physical layer connection and obtain a bottom layer communication link of the first Internet of things device and the second Internet of things device.
  9. 9. The method of claim 7, based on a preset tunneling protocol, performing negotiation interactions between the first internet of things device and the second internet of things device to instantiate a virtual network interface in the first internet of things device and redirect network traffic of the first internet of things device to a target network to the virtual network interface, specifically comprising: Through the bottom layer communication link, negotiation interaction based on the preset tunnel protocol is performed on the first Internet of things device and the second Internet of things device, so that tunnel configuration information is obtained; According to the tunnel configuration information, a first private protocol stack of a dual-stack gateway in the first Internet of things device is called, and a virtual network interface is instantiated; and establishing tunnel connection between the virtual network interface and the tunnel service of the second internet of things device through the first internet of things device, and redirecting network traffic sent to a target network by the first internet of things device to the virtual network interface.
  10. 10. The method of claim 9, the method further comprising: monitoring the transmission state of the bottom communication link and acquiring a frame loss instruction; responding to the frame loss instruction, triggering the first Internet of things equipment and the second Internet of things equipment to retransmit local data frames based on the preset tunnel protocol; Wherein the local data frame retransmission is performed inside the private protocol stack.
  11. 11. The method of claim 1, the method further comprising: determining a target network corresponding to a current service based on the current service of the first Internet of things device; And acquiring a network connection index of the first Internet of things device relative to the target network, so as to determine the network connection quality of the first Internet of things device according to the network connection index.
  12. 12. The method of claim 5, the method further comprising: If the second private protocol stack receives the private transport format data stream and contains a new session initial data frame, analyzing the new session initial data frame to obtain basic information of a target network; Transmitting the basic information of the target network to the second system protocol stack to determine whether a matched transmission layer connection exists according to the basic information of the target network; If the standard network protocol data stream does not exist, establishing a transmission layer connection between the second internet equipment and the target network based on the basic information, and adding the standard network protocol data stream into a transmission queue corresponding to the transmission layer connection; And if so, transmitting the standard network protocol data stream to the target network based on the transmission layer connection.
  13. 13. A communication apparatus of an internet of things device, comprising: the near field communication establishing module is used for triggering the first Internet of things equipment to establish a near field communication link with the second Internet of things equipment through near field communication when the network connection quality of the first Internet of things equipment is lower than a preset threshold value; And the cascade communication module is used for carrying out protocol forwarding on the flow of the first Internet of things equipment through the near field communication link so as to cascade network protocol stacks between the first Internet of things equipment and the second Internet of things equipment, and realizing that the first Internet of things equipment accesses a target network through the second Internet of things equipment, wherein the network protocol stacks comprise parallel system protocol stacks and private protocol stacks in the same dual-stack gateway.
  14. 14. The apparatus of claim 13, the cascade communication module specifically comprising: The pointing module is used for pointing the standard network protocol data stream sent to the target network to the first private protocol stack of the dual-stack gateway in the first Internet of things equipment through the first system protocol stack of the dual-stack gateway in the first Internet of things equipment; The conversion module is used for carrying out protocol adaptation conversion on the standard network protocol data stream based on the first private protocol stack to obtain a private transmission format data stream matched with the near field communication link; A sending module, configured to send the private transport format data stream to the second internet-enabled device based on the near field communication link; And the restoration module is used for restoring the private transmission format data stream through the second internet of things device, obtaining the standard network protocol data stream, and forwarding the standard network protocol data stream to the target network to realize the network intercommunication of the first internet of things device through the second internet of things device.
  15. 15. The apparatus of claim 14, the pointing module, in particular comprising: Intercepting a standard network protocol data stream sent to a target network through a preset routing strategy of the first system protocol stack, and redirecting an output path of the standard network protocol data stream to a virtual network interface instantiated by the first private protocol stack; And forwarding the standard network protocol data stream to a user state space corresponding to the first private protocol stack through the virtual network interface so that the first private protocol stack takes over the standard network protocol data stream.
  16. 16. The apparatus of claim 14, the conversion module specifically comprising: analyzing the protocol structure of the standard network protocol data stream through the first private protocol stack to obtain data content to be transmitted; And adding a private protocol header to the data content to be transmitted based on a preset private protocol encapsulation format of the first private protocol stack to generate the private transmission format data stream, wherein the private protocol header contains control information matched with the near field communication link.
  17. 17. The apparatus of claim 16, the reduction module specifically comprising: reversely analyzing the private transmission format data stream based on a second private protocol stack of the second internet equipment to remove the private protocol header to obtain the data content to be transmitted, and restoring the data content to be transmitted to obtain the standard network protocol data stream; and transmitting the restored standard network protocol data stream to a second system protocol stack of the second internet-connected device, so as to forward the standard network protocol data stream to the target network based on the second system protocol stack.
  18. 18. The apparatus of claim 14, further comprising an encryption module; the encryption module is used for carrying out end-to-end encryption on the standard network protocol data stream based on the first system protocol stack to generate inner layer ciphertext data, wherein an encryption key of the end-to-end encryption is held by the target network; Performing protocol adaptation conversion on the inner layer ciphertext data through the first private protocol stack to obtain a private transmission format data stream matched with the near field communication link; and based on the near field communication link, sending the private transmission format data stream to the second internet-of-things device so as to restore the private transmission format data stream based on the second internet-of-things device, obtaining the inner ciphertext data and forwarding the inner ciphertext data to the target network.
  19. 19. The apparatus of claim 13, the near field communication setup module specifically comprises: The bottom layer communication link establishment module is used for establishing a bottom layer communication link with the second internet of things device through the built-in near field communication module of the first internet of things device; The redirection module is used for carrying out negotiation interaction between the first Internet of things equipment and the second Internet of things equipment based on a preset tunnel protocol so as to instantiate a virtual network interface in the first Internet of things equipment and redirect network traffic sent to a target network by the first Internet of things equipment to the virtual network interface; And the near field communication link establishment module is used for establishing a near field communication link between the first Internet of things device and the second Internet of things device based on the virtual network interface and the bottom layer communication link.
  20. 20. The apparatus of claim 19, the underlying communication link establishment module specifically comprises: scanning and identifying the second internet of things equipment within a preset range through a built-in near field communication module of the first internet of things equipment, and initiating a connection request to the second internet of things equipment; And establishing physical layer connection of the first Internet of things device and the second Internet of things device based on the connection request so as to negotiate communication transmission parameters based on the physical layer connection and obtain a bottom layer communication link of the first Internet of things device and the second Internet of things device.

Description

Communication method, device and equipment of Internet of things equipment Technical Field The present disclosure relates to the field of communications technologies, and in particular, to a communication method, an apparatus, and a device for an internet of things device. Background Along with the popularization of the internet of things technology, various internet of things devices such as a cash register (POS), a handheld terminal, an industrial sensor and the like are widely applied to various application scenes such as commercial retail, logistics distribution, industrial service and the like. These internet of things devices typically rely on a cellular network or a wireless local area network (WIRELESS FIDELITY, wi-Fi for short) to maintain a connection with a cloud service platform to complete services such as payment transactions, data reporting, instruction receiving, etc. In the traditional scheme, the internet of things equipment mainly depends on a single communication module to be directly connected with the internet, when the environment is weak or unavailable, the internet of things equipment cannot recover connection through self capacity and can only wait for the improvement of the environment, so that the internet of things equipment is difficult to perform network communication to complete the interaction of service data. In practical application, intelligent devices with normal network connection exist around the Internet of things equipment with weak or broken network. In order to realize service of the internet of things device by using the network capability of the intelligent device, the prior art directly operates a private protocol on a physical layer such as a universal serial bus (Universal Serial Bus, abbreviated as USB) and the like to perform data transmission. But the internet of things device runs a standard system protocol stack, while near field links such as USB only support a specific link layer protocol, and transparent forwarding of service data can be broken if an upper layer service application is modified to adapt to the link layer protocol of the near field. And the physical layer link has electromagnetic interference and signal attenuation, so that the service data transmission is at risk of packet loss, disorder and disorder. Based on this, a method for ensuring reliable communication of the internet of things equipment in a weak network or a broken network environment is needed. Disclosure of Invention One or more embodiments of the present disclosure provide a communication method, an apparatus, and a device for an internet of things device, which are used for solving the technical problem that a method for ensuring reliable communication of an internet of things device in a weak network or a broken network environment is required. To solve the above technical problems, one or more embodiments of the present specification are implemented as follows: one or more embodiments of the present disclosure provide a communication method of an internet of things device, where the method includes: When the network connection quality of the first Internet of things equipment is lower than a preset threshold value, triggering the first Internet of things equipment, and establishing a near field communication link with the second Internet of things equipment through near field communication; And carrying out protocol forwarding on the flow of the first Internet of things equipment through the dual-stack gateway through the near field communication link so as to cascade network protocol stacks between the first Internet of things equipment and the second Internet of things equipment, and realizing that the first Internet of things equipment accesses a target network through the second Internet of things equipment, wherein the network protocol stacks comprise parallel system protocol stacks and private protocol stacks in the same dual-stack gateway. One or more embodiments of the present disclosure provide a communication apparatus of an internet of things device, including: the near field communication establishing module is used for triggering the first Internet of things equipment to establish a near field communication link with the second Internet of things equipment through near field communication when the network connection quality of the first Internet of things equipment is lower than a preset threshold value; And the cascade communication module is used for carrying out protocol forwarding on the flow of the first Internet of things equipment through the near field communication link so as to cascade network protocol stacks between the first Internet of things equipment and the second Internet of things equipment, and realizing that the first Internet of things equipment accesses a target network through the second Internet of things equipment, wherein the network protocol stacks comprise parallel system protocol stacks and private protocol stacks in the same dua