WO2020063086A1 - Data transmission method based on internet of things, and communication apparatus - Google Patents

Data transmission method based on internet of things, and communication apparatus Download PDF

Info

Publication number
WO2020063086A1
WO2020063086A1 PCT/CN2019/098059 CN2019098059W WO2020063086A1 WO 2020063086 A1 WO2020063086 A1 WO 2020063086A1 CN 2019098059 W CN2019098059 W CN 2019098059W WO 2020063086 A1 WO2020063086 A1 WO 2020063086A1
Authority
WO
WIPO (PCT)
Prior art keywords
long
application layer
layer device
iot platform
connections
Prior art date
Application number
PCT/CN2019/098059
Other languages
French (fr)
Chinese (zh)
Inventor
何国洲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020063086A1 publication Critical patent/WO2020063086A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Definitions

  • the IoT platform pushes the data to a third-party application loaded on the application layer device through a Hypertext Transfer Protocol (HTTP) push method.
  • HTTP Hypertext Transfer Protocol
  • the HTTP push method includes a synchronous HTTP push method and an asynchronous HTTP push method.
  • the application-layer terminal device sends an HTTP request to the IoT platform to request a callback address based on the short connection.
  • the IoT platform pushes the data to the third-party application on the application-layer terminal device through the callback address. .
  • the application layer device establishes N long connections with the IoT platform, including:
  • A-D is executed cyclically until the N long connections are established with the IoT platform.
  • the IoT platform will report to the perception layer device about the The TPS of the three-party application data determines whether it is necessary to continue to establish the next long connection.
  • the application layer device sends a long connection establishment request message to the IoT platform, and the long connection establishment request message carries the N long connection identifiers;
  • the method further includes: the application layer device receives a second notification message sent by the IoT platform, and the second notification message It is used to instruct the application layer terminal device to remove at least one long connection among the N long connections; the application layer device removes at least one long connection among the N long connections according to the second notification message.
  • a second notification message is sent to the application layer device through the Internet of Things platform to remove at least one of the N long connections to achieve the purpose of timely releasing the resources occupied by third-party applications.
  • the method further includes: the application layer device sends a request message to the IoT platform, and the request message is used to request a long connection Identification; the application layer device receives a response message sent by the IoT platform, where the response message carries the M long connection identifiers, M ⁇ N.
  • the number of long-connection identifiers M allocated to the third-party application is determined by the IoT platform.
  • the application-layer device establishes a long-connection for the third-party application.
  • the number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
  • the application layer device establishes N long connections with the IoT platform, including: the IoT platform includes multiple distributed IoT platforms, and the application layer device and the multiple distributed IoT platforms One or more distributed IoT platforms in the IoT platform establish the N long connections.
  • This solution is adopted to achieve the purpose of establishing multiple long-term connections between the application layer device and the distributed IoT platform.
  • the application layer device includes a terminal device or an application server.
  • an embodiment of the present application provides a data transmission method based on the Internet of Things.
  • the method can be applied to an Internet of Things platform or a chip in the Internet of Things platform.
  • the method is described below as an example applied to the Internet of Things platform, and the method includes: the Internet of Things platform establishes N long connections with application layer devices, where N ⁇ 2;
  • the IoT platform receives the first data sent by the application layer device through the N long connections, or sends the second data to the IoT platform through the N long connections, and the first data and The second data is data interacting between a third-party application loaded on the application layer device and the IoT platform.
  • the application layer device performs signaling interaction with the IoT platform to establish N long-term connections, and receives information about the third-party application sent by the IoT platform based on the N-long connections.
  • the second data, or the first data about the third-party application is sent to the IoT platform based on the N long connections.
  • N long connections are established between the application layer device and the Internet of Things platform.
  • Different N third-party applications have different long connections.
  • the purpose of each third-party application does not affect each other.
  • the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
  • the IoT platform and the application layer device establish N long connections, including:
  • the IoT platform receives a persistent connection establishment request message sent by the application layer device, the persistent connection establishment request message carries an i-th persistent connection identifier, and the i-th persistent connection identifier is the application layer device Any one of the long connection identifiers selected from the N long connection identifiers, 1 ⁇ i ⁇ N;
  • the IoT platform sends a long connection establishment response message to the application layer device, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. ;
  • the IoT platform determines the TPS of the established long connection transaction per second and the TPS of the sensing layer device, and determines whether to forward the TPS of the established long connection and the TPS of the sensing layer device to Sending, by the application layer device, a first notification message, where the first notification message is used to instruct the application layer device to continue to establish a next long connection;
  • E-G is executed cyclically until the N long connections are established by the application layer device.
  • the IoT platform will report to the perception layer device about the The TPS of the three-party application data determines whether it is necessary to continue to establish the next long connection.
  • the IoT platform establishes N long-term connections with the application layer device, including: the IoT platform sends a second notification message to the application layer device, and the second notification message is used to indicate The application layer device establishes N long connections; the IoT platform receives a long connection establishment request message sent by the application layer device, and the long connection establishment request message carries the N long connections; the IoT platform Sending a long connection establishment response message to the application layer device, where the long connection establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
  • the IoT platform determines the number of long connections M and sends the M long connection identifiers to the application layer device. Then, the application layer device selects N long connections from the M long connection identifiers, and interacts with the IoT platform to establish N long connections at the same time. In this process, the application layer device selects N permanent connection identifiers from M permanent connection identifiers, and establishes N permanent connections for third-party applications based on the N permanent connection identifiers, and N permanent connections for different third-party applications. Differently, when the IoT platform pushes data to a third-party application on the application-layer terminal device, the third-party application does not affect each other.
  • the method further includes:
  • the IoT platform sends a second notification message to the application layer device, and the second notification message is used to instruct the application layer terminal device to dismantle at least one of the N long connections.
  • a second notification message is sent to the application layer device through the Internet of Things platform to remove at least one of the N long connections to achieve the purpose of timely releasing the resources occupied by third-party applications.
  • the method further includes: the IoT platform receives a request message sent by the application layer device, and the request message is used to request a long connection identifier. ; The IoT platform sends a response message to the application layer device, where the response message carries the M long connection identifiers, M ⁇ N.
  • M ⁇ N M ⁇ N.
  • the number of long-connection identifiers M allocated to the third-party application is determined by the IoT platform.
  • the application-layer device establishes a long-connection for the third-party application.
  • the number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
  • the IoT platform establishes N long connections with application layer devices, including: the IoT platform includes multiple distributed IoT platforms, and one of the multiple distributed IoT platforms Or multiple distributed IoT platforms establish the N long connections with the application layer device.
  • This solution is adopted to achieve the purpose of establishing multiple long-term connections between the application layer device and the distributed IoT platform.
  • an embodiment of the present application provides a communication apparatus, which has a behavior function of an application layer device in the foregoing method embodiment.
  • the functions can be implemented by hardware, and can also be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the modules may be software and / or hardware.
  • the structure of the application layer device includes a processor, a memory, and a transceiver.
  • the memory stores a computer program that can be run on the processor, and the processor executes the computer program and establishes an IoT platform.
  • N long connections where N ⁇ 2 and being an integer, the processor also controls the transceiver to send the first data to the IoT platform through the N long connections, or through the N bars
  • the long connection receives second data sent by the Internet of Things platform, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the Internet of Things platform.
  • an embodiment of the present application provides a communication device, and the communication device is configured to implement a function of the behavior of an IoT platform in the foregoing method.
  • the functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the structure of the IoT platform includes a processor, a memory, and a transceiver.
  • the memory stores a computer program that can run on the processor, and the processor executes the computer program to establish an application-layer device.
  • the length of the connection is N ⁇ 2; the processor further controls the transceiver to receive the first data sent by the application layer device through the N length of connection, or to the
  • the IoT platform sends second data, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
  • an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the first aspect or each possible implementation manner of the first aspect.
  • the communication device may be an application layer device or a module applied to the application layer device, for example, it may be a chip applied to the application layer device.
  • an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the second aspect or each possible implementation manner of the second aspect.
  • the communication device may be an IoT platform or a module applied to the IoT platform, for example, it may be a chip applied to the IoT platform.
  • an embodiment of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to execute the foregoing first aspect or the methods in the various possible implementation manners of the first aspect.
  • an embodiment of the present application provides a computer program product including instructions, which when executed on a computer, causes the computer to execute the foregoing second aspect or the methods in various possible implementation manners of the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, causes the computer to execute the foregoing first aspect or each of the first aspect Of the possible implementations.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, the computer executes the second aspect or each of the second aspect Of the possible implementations.
  • the data transmission method and communication device based on the Internet of Things provided in the embodiments of the present application.
  • the application layer device performs signaling interaction with the Internet of Things platform to establish N long connections, and based on the N long connections Send the first data to the IoT platform, or receive the second data about the third-party application sent by the IoT platform based on the N long connections.
  • N long connections are established between the application layer device and the Internet of Things platform.
  • Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other.
  • the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
  • FIG. 1 is a schematic diagram of a process of pushing data to a third-party application on an application layer device through an HTTP push method by the IoT platform;
  • FIG. 2A is a schematic diagram of an IoT architecture provided by an embodiment of the present application.
  • FIG. 2B is a schematic diagram of another IoT architecture provided by an embodiment of the present application.
  • 3A is a flowchart of a data transmission method based on the Internet of Things provided by an embodiment of the present application
  • 3B is a flowchart of another Internet of Things-based data transmission method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a network logical architecture of a data transmission method based on the Internet of Things provided by an embodiment of the present application;
  • FIG. 5 is a logical schematic diagram of sequentially establishing a long connection applicable to a data transmission method based on the Internet of Things provided by an embodiment of the present application;
  • FIG. 6 is an authentication flowchart applicable to an Internet of Things-based data transmission method according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • Figure 1 is a schematic diagram of the process of pushing data by the IoT platform to a third-party application on the application layer device through HTTP push, including:
  • the application layer terminal device sends an HTTP request to the ELB module.
  • the application-layer terminal device sends an HTTP request to an elastic load balance (ELB) module, and the HTTP request carries a callback address of a third-party application loaded on the application-layer terminal device.
  • ELB elastic load balance
  • the ELB module is a functional module of the IoT platform, which is used to route and distribute data from third-party applications to different push modules of the IoT platform.
  • the ELB module sends an HTTP request to the IoT platform.
  • the push module is a functional module on the Internet of Things platform, which is used to handle data push related services.
  • the IoT platform sends an HTTP response to the ELB module.
  • the IoT platform sends an HTTP response to the ELB module, indicating that the callback address is successfully assigned to the third-party application.
  • the ELB module sends an HTTP response to the application-layer terminal device.
  • the IoT platform sends data from the third-party application to ELB through the callback address.
  • the IoT platform sends data of the third-party application to the ELB through the callback address.
  • the ELB module sends data of the third-party application to the application-layer terminal device.
  • the application-layer terminal device sends a positive response message to the ELB module.
  • the application layer terminal device sends an Acknowledgement (ACK) message to the ELB module.
  • ACK Acknowledgement
  • the ACK message is, for example, 200 Ok.
  • the ELB module sends an ACK message to the IoT platform.
  • the embodiment of the present application provides a data transmission method based on the Internet of Things.
  • a third-party application By establishing multiple long connections between a third-party application on an application layer device and the Internet of Things platform, each third-party application does not affect each other. purpose.
  • FIG. 2A is a schematic diagram of an IoT architecture provided by an embodiment of the present application.
  • the architecture includes: an application layer device, an IoT platform, and a perception layer device. These devices are described in detail below.
  • the application layer device First, the application layer device.
  • a third-party application (Application, APP) is deployed on the application layer device.
  • the application layer device can be a terminal device or an application server.
  • the terminal device is a device that can provide users with voice and / or data connectivity. Device, or other processing device connected to the wireless modem.
  • the terminal device may be a mobile terminal device, such as a mobile phone (also called a "cellular" phone) and a computer with a mobile terminal device, for example, it may be a portable, compact, handheld, computer-built or vehicle-mounted mobile device, which Exchange language and / or data with the radio access network.
  • PCS personal communication service
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDA personal digital assistants
  • computing devices or other processing devices connected to wireless modems in-vehicle devices, wearable devices, terminals in future 5G networks, or public land mobile networks that have evolved in the future (public land mobile network) , PLMN), etc.
  • this embodiment of the present application is not limited to this.
  • the terminal device can also be called a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, an access point, Remote terminal equipment (remote terminal), access terminal equipment (access terminal), user terminal equipment (user terminal), user agent (user agent), user equipment (user device), or user equipment (user equipment).
  • Remote terminal equipment remote terminal equipment
  • access terminal equipment access terminal
  • user terminal equipment user terminal
  • user agent user agent
  • user equipment user device
  • user equipment user equipment
  • the Internet of Things is the Internet connected to things, and it is a network that realizes intelligent identification, positioning, tracking, monitoring and management. Due to different access objects, different application fields or industries, and the functional differences of third-party applications, a variety of IoT systems will be formed.
  • the Internet of Things system has a variety of functions, such as communication with the background, device access, device management, data storage, access strategy, security policy, data push, etc.
  • the carrier that carries the Internet of Things with multiple functions is called Internet of things platform.
  • Internet of things platform is a kind of middleware based on the Internet that connects objects and implements the functions of the Internet of Things.
  • the IoT platform can be an independent server or a distributed server.
  • the sensing layer includes terminal devices such as sensor gateways and sensors.
  • the sensing layer device is used to collect data, etc .
  • the IoT platform is responsible for storing, transmitting, and processing the data collected by the sensing layer terminal device
  • the application layer includes the application layer device, which mainly provides data analysis, control, and human Machine interface, etc.
  • the sensing layer terminal device collects data and reports it to the IoT platform.
  • the IoT platform transmits the data to the application layer terminal device.
  • the user uses a third-party application loaded on the application layer terminal device to implement data query and data Analysis, etc.
  • FIG. 2B is a schematic diagram of another IoT architecture provided by an embodiment of the present application.
  • the IoT platform is an independent IoT platform.
  • the IoT platform includes multiple distributed IoT platforms.
  • N long connections are established between the application layer device and the IoT platform, and the application layer device sends data about the third-party application to the IoT platform through the N long connections;
  • the application layer device receives data about the third-party application sent by the IoT platform through the N long connections.
  • the data sent by the application layer device to the IoT platform is called first data
  • the data sent by the IoT platform to the application layer device is called second data.
  • the N long connections are for a specific third-party application, and specifically include the following scenarios:
  • Scenario 1 A third-party application is deployed on an application layer device, and the IoT platform is an independent IoT platform.
  • the N long connections include long connection 4 and long connection 5.
  • Scenario 2 The third-party application is deployed in a distributed manner, and the IoT platform is an independent IoT platform.
  • N long connections include long connection 1, long connection 2, and long connection 5.
  • Scenario 3 Third-party applications are deployed on an application layer device, and the IoT platform is a distributed IoT platform.
  • APP2 is deployed on the application layer device 1.
  • the IoT platform includes distributed IoT platform 1 and distributed IoT platform 2.
  • N long connections include long connections 8 and long connections 9.
  • Scenario 4 Third-party application deployment is distributed.
  • the IoT platform is a distributed IoT platform.
  • APP1 is deployed on application layer device 1 and application layer device 2.
  • the IoT platform includes distributed IoT platform 1 and distributed IoT platform 2.
  • N long connections include application layer devices Long connection 6 and long connection 7 between 1 and distributed IoT platform 1, and long connection 10 between application layer device 2 and distributed IoT platform 2.
  • the number of the application layer devices, the distributed IoT platform, and the number of sensing layer devices shown in FIG. 2A and FIG. 2B are merely exemplary, and the embodiments of the present application are not limited.
  • FIG. 3A the data transmission method based on the Internet of Things described in the embodiment of the present application will be described in detail. Specifically, refer to FIG. 3A.
  • FIG. 3A is a flowchart of a data transmission method based on the Internet of Things provided by an embodiment of the present application.
  • This embodiment describes the above-mentioned data transmission method based on the Internet of Things in detail from the perspective of the interaction between the application layer device and the Internet of Things platform, and the perspective that the Internet of Things platform sends the second data to the application layer device.
  • This embodiment includes:
  • An application layer device establishes N long connections with an IoT platform.
  • N 2 and is an integer.
  • the application layer device performs signaling interaction with the IoT platform to establish N long connections, and the application layer device and the IoT platform transmit based on the N long connections. Data about the app.
  • the second data is data that is exchanged between a third-party application loaded on the application layer device and the IoT platform.
  • the second data is data sent by the sensing layer device to the IoT platform, and the data is data related to a third-party application.
  • the IoT platform After the IoT platform receives the second data, it needs to push the second data to the application layer device for use by a third-party application on the application layer device.
  • the IoT platform sends the second data about the APP to the application layer device through the above N long connections; accordingly, the application layer device connects to the APP about the APP sent by the IoT platform through the above N long connections.
  • the application layer device connects to the APP about the APP sent by the IoT platform through the above N long connections.
  • the data transmission method based on the Internet of Things provided by the embodiments of this application.
  • the application layer device performs signaling interaction with the Internet of Things platform to establish N long connections, and receives the Internet of Things based on the N long connections.
  • the second data sent by the platform about the third-party application.
  • N long connections are established between the application layer device and the Internet of Things platform.
  • Different N third-party applications have different long connections.
  • third-party applications push data, the purpose of each third-party application does not affect each other.
  • the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
  • step 101a Specifically, reference may be made to the description of step 101a, and details are not described herein again.
  • the application layer device before the application layer device establishes N long connections with the IoT platform, it further sends a request message to the IoT platform, the request message is used to request a long connection identifier; the application layer The device receives a response message sent by the Internet of Things platform, and the response message carries M long-connection identifiers.
  • the number of persistent connection identifiers M allocated to the third-party application is determined by the Internet of Things platform.
  • the application-layer device establishes a persistent connection for the third-party application.
  • the number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
  • A-D is executed cyclically until the N long connections are established with the IoT platform.
  • the IoT platform sends a long connection establishment response message to the application layer device to successfully establish the first long connection, step F; correspondingly, the application layer device receives the long connection establishment sent by the IoT platform A response message, where the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established.
  • the IoT platform determines the transaction per second (TPS) of the first long connection, and the TPS of the sensing layer device.
  • the TPS of the first long connection is used to indicate the transmission of the first long connection. Data capability.
  • the TPS of the sensing layer device is used to indicate the ability of the sensing layer device to collect data about third-party applications.
  • the IoT platform will determine whether to continue to establish the next long connection according to the TPS of the long connection that has been established and the TPS of the sensing layer device. For example, assuming that two long connections have been established, the TPS of each long connection is 100 bits / second, and the TPS of data reported by the sensing layer device is 300 bits / second, the IoT platform determines that a total of 3 long connections need to be established At this time, the IoT platform sends a first notification message to the application layer device through any one of the two established long connections. The first notification message is used to instruct the application layer device to continue to establish the second long connection. .
  • the application layer device and the IoT platform simultaneously establish N long connections.
  • the application layer device establishes N long connections with the IoT platform, including:
  • the application layer device selects N long connection identifiers from the M long connection identifiers, and carries the N long connection identifiers in a long connection establishment request message and sends it to the IoT platform; After the IoT platform receives a request for establishing a long connection carrying N long connection identifiers, it performs identity authentication on the N long connection identifiers, the identity of a third-party application, etc., and sends a long connection to the application layer device after the authentication is passed The establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
  • the IoT platform determines the number of long connections M, and sends the M long connection identifiers to the application layer device. Then, the application layer device selects N long connections from the M long connection identifiers, and interacts with the IoT platform to establish N long connections at the same time. In this process, the application layer device selects N permanent connection identifiers from M permanent connection identifiers, and establishes N permanent connections for third-party applications based on the N permanent connection identifiers, and N permanent connections for different third-party applications. Differently, when the IoT platform pushes data to a third-party application on the application-layer terminal device, the third-party application does not affect each other.
  • the application layer device sends a request message to the ELB.
  • the metadata service module After receiving the request message, the metadata service module assigns a certain number of persistent connection identifiers to the above-mentioned APP, such as M persistent connection identifiers, and carries the M persistent connection identifiers in the response message, and sends it to the ELB module.
  • the ELB module sends the M long connection identifiers to the application layer device (this step is not shown in the figure).
  • the ELB module is used to connect a third-party application on the application layer device to a long connection between the IoT platform and the application layer device.
  • the application layer device interacts with the ELB module to complete the establishment of the long connection and the subscription request.
  • the ELB module interacts with the message queue agent sub-module in the IoT platform to complete the establishment and subscription of the long connection.
  • the message queue agent sub-module in the IoT platform interacts with the metadata service module to complete the authentication of the long connection.
  • the application layer device sends the long connection establishment request to the message queue (MQ) broker sub-module in the push module of the IoT platform through the ELB module.
  • MQ broker sub-module is a third-party application. Allocate M long connection identifiers, and carry the M long connection identifiers in a response message and send them to the application layer device through the ELB module.
  • Long connection establishment phase (the first day long connection is established): the application layer device selects a long connection identifier for the third-party application. Send a permanent connection establishment request to the MQ broker through the ELB module.
  • the long connection establishment request carries the identity, long-term connection identifier, secret key, etc. of the third-party application.
  • the MQ broker sub-module sends an authentication request to the metadata service module, and the metadata server module authenticates the identity of the third-party application, the identity of the persistent connection, and the like. After the authentication is passed, the metadata service module sends an authentication pass response message to the MQbroker submodule.
  • the MQbroker submodule successfully establishes a long connection artificially, and sends a long connection establishment response message to the application layer device through the ELB module.
  • the consumption submodule pushes the second data to the message queue client submodule.
  • the MQ broker sub-module pushes the second data to the ELB module through the long connection, and the ELB module further pushes the second data to the application layer device through the long connection.
  • the application layer device receives the second data about the third-party application, it responds to the IoT platform with a confirmation message according to the quality of service (QoS).
  • QoS quality of service
  • the TPS of the data reported by the sensing layer device and the TPS of the established long connection determine whether the next long connection needs to be established or whether the established long connection needs to be dismantled. Or reduce the number of long connections, achieve the ability to adaptively manage long connections, and improve the flexibility of the IoT platform.
  • each third-party application corresponds to a single message queue proxy submodule, a message queue client submodule, and a service bus in the service bus cluster.
  • the second data from the service bus is not pushed in chronological order. To the message queue agent sub-module to ensure timing.
  • the sensing layer device accesses the metadata service module of the IoT platform through a cloud access gateway (CIG).
  • the metadata service module stores the second data collected by the sensing layer device, and pushes the first data to the service bus. Two data. After the first long connection is established, push the module to the service bus to pull data.
  • the push module pushes the second data to the message queue proxy module.
  • the application layer device sends an ACK message to the ELB module.
  • the message queue proxy module sends an ACK message to the push module.
  • the push module sends a message requesting to determine the TPS to the determination module.
  • the determination module determines the TPS of the first long connection and the TPS of the data reported by the sensing layer device.
  • the IoT platform calculates the ability of the first long connection to receive data according to the average delay and the like, and converts the ability to TPS.
  • the perception layer device reports the second data to the metadata service module of the IoT platform.
  • the metadata service module pushes the second data to the service bus, the determination module counts the second data about the third-party application, and obtains the perception layer device according to the statistical result.
  • the TPS of the second data reported about the third-party application. Then, the determination module compares the two TPS. If the TPS of the data reported by the sensing layer device exceeds a certain multiple of the TPS of the first long connection (configurable, such as 1.2), and continues for a period of time, such as half an hour, then The determining module determines to send a first notification message to the application layer device to notify the application layer device to continue to establish the next long connection.
  • the determining module sends a first notification message to the pushing module.
  • the push module After receiving the first notification message, the push module sends the first notification message to the application layer device through the established long connection (such as the first long connection).
  • a fixed header field may be set for the first notification message.
  • the fixed header field includes a long connection identifier, and the application layer device parses the header field and establishes a long connection corresponding to the long connection identifier with the Internet of Things platform.
  • the determining module sends a second notification message to the application layer device to remove the first 1 long connection.
  • 306 to 308 are executed cyclically to establish N long connections in turn.
  • FIG. 6 is an authentication flowchart applicable to an Internet of Things-based data transmission method according to an embodiment of the present application, including:
  • An application layer device sends a request message to an ELB module.
  • the application layer device sends a request message carrying the identity (APP ID) of the third-party application to the ELB module.
  • the request message is, for example, an HTTP request.
  • the ELB module sends a request message to the metadata service module.
  • the metadata service module sends a 200 OK message to the ELB module.
  • the metadata service module allocates M persistent connection identifiers to the third-party application, and sends the M persistent connection identifiers to the ELB module in a 200 OK message.
  • the ELB module sends a 200 OK message to the application layer device.
  • the application layer device sends a persistent connection establishment request message to the ELB module.
  • the application layer device sends the identity identifier, the secret key, and the persistent connection identifier of the third-party application to the ELB in a persistent connection establishment request message.
  • the ELB module sends a persistent connection establishment request message to the message queue agent module.
  • the message queue proxy module sends an authentication callback message to the push module.
  • the push module sends an authentication request message to the metadata service module.
  • the metadata service module sends an authentication response message to the push module.
  • the push module sends a long connection successful establishment callback message to the message queue agent module.
  • the message queue proxy module sends an authentication success response message to the ELB module.
  • the ELB module sends an authentication success response message to the application layer device.
  • the push module sends a status update message to the metadata service module.
  • the push module sends a status update message to the metadata service module, so that the metadata service module updates the status of the third-party application of the application layer device, such as successfully establishing a long connection.
  • the application layer device sends a subscription request to the ELB.
  • the application layer device carries the long connection identifier, the message queue identifier, and the identifier of the third-party application to the ELB module in a subscription request.
  • the ELB sends a subscription request to the message queue proxy module, where the subscription request carries a long-connection identifier, an identifier of the message queue, and an identity identifier of a third-party application.
  • the message queue proxy module sends an authorization callback message to the push module.
  • the push module sends a verification message to the metadata service module.
  • the metadata service module sends a verification response message to the push module.
  • the push module sends a subscription success callback message to the message queue agent module.
  • the message queue proxy module sends a subscription success response message to the ELB module.
  • the ELB module sends a subscription success response message to the application layer device.
  • the metadata service module reports the second data to the service bus.
  • the consumption module pulls the second data from the service bus.
  • the consumption module pulls the second data from the service bus through a long connection.
  • the push module obtains the second data from the consumption module.
  • the consumption module pushes the second data to the push module in chronological order.
  • the push module pushes the second data to the message queue module.
  • the message queue agent module pushes the second data to the ELB module.
  • the ELB module pushes the second data to the application layer device.
  • the application layer device sends an OK message to the ELB, which is not shown in the figure.
  • the message queue agent module detects an abnormal long connection.
  • the message queue proxy module sends a persistent connection exception message to the push module.
  • the push module sends a long connection logout message to the consumption module.
  • the push module sends a long connection logout message (for example, the above-mentioned second notification message) to the consumption module.
  • the consumption module sends a long connection logout message to the service bus.
  • the service bus After receiving the persistent connection logout message, the service bus logs off the persistent connection.
  • the long connection is abnormal, all or some of the long connections are abnormal and eventually dismantled, resulting in no long connection, or the remaining long connection cannot meet the data requirements of the third-party application, repeat the above long connection identification acquisition phase, The long connection establishment phase, the subscription phase re-establishes and subscribes to the long connection, and then pushes the data.
  • FIG. 7 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the communication device involved in this embodiment may be an application layer device or a chip applied to an application layer device.
  • the communication apparatus may be configured to execute a function of an application layer device in the foregoing method embodiment.
  • the communication device may include a processing module 11 and a transceiver module 12. among them,
  • a processing module 11 configured to establish N long connections with the IoT platform, where N ⁇ 2, and is an integer;
  • the transceiver module 12 is configured to send first data to the IoT platform through the N long connections established by the processing module 11, or receive the IoT through the N long connections established by the processing module 11.
  • the second data sent by the platform, the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
  • the processing module 11 and the transceiver module 12 are specifically configured to execute A-D in a loop until the N long-term connections are established with the IoT platform, and the A-D includes:
  • the processing module 11 selects an i-th long connection identifier from M long-connection identifiers, where the i-th long-connection identifier is any one of the M long-connection identifiers, 1 ⁇ i ⁇ N;
  • the transceiver module 12 sends a long connection establishment request message to the IoT platform, where the long connection establishment request message carries the i-th long connection identifier;
  • the transceiver module 12 receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long corresponding to the i-th long connection identifier is successfully established. connection;
  • the transceiver module 12 receives a first notification message sent by the IoT platform through the i-th long connection, and the first notification message is used to instruct the application layer device to continue to establish a next long connection.
  • the processing module 11 is specifically configured to select N long connection identifiers from M long connection identifiers; and the transceiver module 12 is configured to send a long connection establishment request to the IoT platform Message, the persistent connection establishment request message carries the N persistent connection identifiers, and receives a persistent connection establishment response message sent by the IoT platform, where the persistent connection establishment response message is used to indicate to the application layer device that the establishment is successful
  • the long connections corresponding to the N long connections are identified.
  • the transceiver module 12 is further configured to receive a second notification message sent by the IoT platform after the processing module 11 establishes N long-term connections with the IoT platform.
  • the notification message is used to instruct the application-layer terminal device to remove at least one of the N long connections;
  • the processing module is further configured to remove at least one of the N long connections according to the second notification message.
  • the transceiver module 12 is further configured to send a request message to the IoT platform before the processing module 11 establishes N long connections with the IoT platform, and the request message is used to request Long connection identifier; receiving a response message sent by the IoT platform, the response message carrying the M long connection identifiers, M ⁇ N.
  • the processing module 11 communicates with one or more of the multiple distributed IoT platforms. Establishing the N long connections.
  • the application layer device includes a terminal device or an application server.
  • the communication device provided in the embodiment of the present application can perform the actions of the application layer device in the foregoing method embodiments.
  • the implementation principles and technical effects are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the communication device involved in this embodiment may be an IoT platform or a chip applied to the IoT platform.
  • the communication device may be configured to execute a function of the Internet of Things platform in the foregoing method embodiment.
  • the communication device may include a processing module 21 and a transceiver module 22. among them,
  • the transceiver module 22 is configured to receive the first data sent by the application layer device through the N long connections established by the processing module 21, or send the N long connections to the network through the N long connections established by the processing module 21.
  • the IoT platform sends second data, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
  • the processing module 21 and the transceiver module 22 are configured to perform E-G in a loop until the application layer device establishes the N long connections, and the E-G includes:
  • the transceiver module 22 receives a persistent connection establishment request message sent by the application layer device.
  • the persistent connection establishment request message carries an i-th persistent connection identifier, and the i-th persistent connection identifier is the application layer device. Any one of the long connection identifiers selected from the N long connection identifiers, 1 ⁇ i ⁇ N;
  • the transceiver module 22 sends a long connection establishment response message to the application layer device, where the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. ;
  • the processing module 21 determines the TPS of the established long connection transaction per second and the TPS of the sensing layer device, and determines whether to forward the TPS of the established long connection and the TPS of the sensing layer device. Sending, by the application layer device, a first notification message, where the first notification message is used to instruct the application layer device to continue to establish a next long connection;
  • E-G is executed cyclically until the N long connections are established by the application layer device.
  • the processing module 21 is specifically configured to use the transceiver module 22 to send a second notification message to the application layer device when establishing N long-term connections with the application layer device.
  • the notification message is used to instruct the application layer device to establish N long connections; receive a long connection establishment request message sent by the application layer device, and the long connection establishment request message carries the N long connections; to the application layer
  • the device sends a long connection establishment response message, and the long connection establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
  • the transceiver module 22 is further configured to send a second notification message to the application layer device after the processing module 21 establishes N long-term connections with the application layer device.
  • the message is used to instruct the application-layer terminal device to remove at least one of the N long connections.
  • the transceiver module 22 is further configured to receive a request message sent by the application layer device, and the request message is used to request the long Connection identifier; sending a response message to the application layer device, the response message carrying the M long connection identifiers, M ⁇ N.
  • the processing module 21 controls one or more distributed IoT platforms in the multiple distributed IoT platforms. Establishing the N long connections with the application layer device.
  • the communication device provided in the embodiment of the present application can perform the actions of the IoT platform in the foregoing method embodiments.
  • the implementation principles and technical effects are similar, and details are not described herein again.
  • the processing module can be implemented in the form of software calling through processing elements; it can also be implemented in the form of hardware.
  • the processing module may be a separately established processing element, or it may be integrated and implemented in a certain chip of the above-mentioned device.
  • it may also be stored in the memory of the above-mentioned device in the form of a program code. Invoke and execute the functions of the above processing modules.
  • all or part of these modules can be integrated together, or they can be implemented independently.
  • the processing element described herein may be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules may be completed by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
  • the communication device involved in this application may further include a power source 34, a communication bus 35, and a communication port 36.
  • the transceiver 33 may be integrated in the transceiver of the communication device, or may be an independent transceiver antenna on the communication device.
  • the communication bus 35 is used to implement a communication connection between the components.
  • the communication port 36 is used to implement connection and communication between the communication device and other peripheral devices.
  • the memory 32 is used to store computer-executable program code, and the program code includes instructions.
  • the instructions When the processor 31 executes the instructions, the instructions cause the processor 31 of the communication device to execute the application-layer device in the foregoing method embodiment.
  • the processing action causes the transceiver 33 to perform the sending and receiving actions of the application layer device in the foregoing embodiment, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center via a wired (e.g., Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integrations.
  • the size of the sequence numbers of the above processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not deal with the implementation of this application.
  • the implementation process of the example constitutes any limitation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Communication Control (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided are a data transmission method based on the Internet of Things, and a communication apparatus, the method involving: for a specific third-party application, an application layer device performing signaling interaction with an Internet-of-Things platform to establish N long connections, and sending first data to the Internet-of-Things platform based on the N long connections, or receiving, based on the N long connections, second data regarding the third-party application and sent by the Internet-of-Things platform. In this process, for a third-party application, the N long connections are established between the application layer device and the Internet-of-Things platform, and the N long connections of different third-party applications are different, such that the various third-party applications do not affect each other when the Internet-of-Things platform pushes data to the third-party applications on an application layer terminal device. In addition, there are multiple long connections, and therefore, compared with one long connection, the plurality of long connections can improve the real-time performance of data pushing.

Description

基于物联网的数据传输方法及通信装置Data transmission method and communication device based on internet of things
本申请要求于2018年9月26日提交中国国家知识产权局、申请号为201811126917.0、申请名称为“基于物联网的数据传输方法及通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on September 26, 2018 with the State Intellectual Property Office of China, with an application number of 201811126917.0, and an application name of "Data Transmission Method and Communication Device Based on the Internet of Things", the entire contents of which are incorporated by reference Incorporated in this application.
技术领域Technical field
本申请实施例涉及物联网技术领域,尤其涉及一种基于物联网的数据传输方法及通信装置。The embodiments of the present application relate to the technical field of the Internet of Things, and in particular, to a data transmission method and a communication device based on the Internet of Things.
背景技术Background technique
物联网(Internet of Things,IoT)是新一代信息技术的重要组成部分,指物物相连的互联网。从技术架构的角度来说,物联网包括感知层、物联网平台和应用层,其中,感知层包括传感器网关、传感器等感知层终端设备,用于采集信息等;物联网平台负责存储、传递和处理感知层终端设备采集的信息;应用层包括应用层设备,应用层设备主要提供数据分析、控制以及物联网人机接口等。数据传输过程中,感知层终端设备采集数据并向物联网平台上报,由物联网平台将数据传输给应用层终端设备,用户通过加载在应用层终端设备上的第三方应用,实现数据查询、数据分析等。The Internet of Things (IoT) is an important part of the new generation of information technology, which refers to the Internet connected to things. From the perspective of technical architecture, the Internet of Things includes a perception layer, an IoT platform, and an application layer. Among them, the perception layer includes sensor gateways, sensors, and other sensing layer terminal devices for collecting information. The Internet of Things platform is responsible for storing, transmitting, and Processes the information collected by the terminal devices at the perception layer; the application layer includes application layer devices, which mainly provide data analysis, control, and human-machine interfaces for the Internet of Things. During the data transmission process, the sensing layer terminal device collects data and reports it to the IoT platform. The IoT platform transmits the data to the application layer terminal device. The user uses a third-party application loaded on the application layer terminal device to implement data query and data Analysis, etc.
现有技术中,物联网平台接收到感知层终端设备上报的数据后,通过超文本传输协议(hyper text transfer protocol,HTTP)推送方式,将数据推送给加载在应用层设备上的第三方应用。具体的,HTTP推送方式包括同步HTTP推送方式和异步HTTP推送方式。同步HTTP推送方式中,应用层终端设备基于短连接的方式向物联网平台发送HTTP请求,以请求回调地址,然后,物联网平台通过该回调地址将数据推送给应用层终端设备上的第三方应用。该过程中,物联网平台每次向应用层终端设备发送数据时,都需要应用层终端设备发送HTTP请求以申请资源(即回调地址),数据发送完毕后释放该资源。对于一个第三方应用来说,该第三方应用不会一直占用该资源,导致物联网平台向不同第三方应用推送数据时,不同第三方应用之间相互影响。极端情况下,若一个第三方应用占用了所有的资源,则导致其他第三方应用没有资源可用而无法接收到物联网平台推送的数据。异步推送方式中,不同第三方应用的HTTP请求形成等待队列,按顺序从资源池中获取资源。该过程中,本质上依然是不同的第三应用共享资源池,当一个第三方应用瞬间并发上报数据时,该第三方应用占用所有的资源,导致其他第三方应用不能申请到资源。In the prior art, after receiving the data reported by the terminal device at the perception layer, the IoT platform pushes the data to a third-party application loaded on the application layer device through a Hypertext Transfer Protocol (HTTP) push method. Specifically, the HTTP push method includes a synchronous HTTP push method and an asynchronous HTTP push method. In the synchronous HTTP push method, the application-layer terminal device sends an HTTP request to the IoT platform to request a callback address based on the short connection. Then, the IoT platform pushes the data to the third-party application on the application-layer terminal device through the callback address. . In this process, each time the IoT platform sends data to the application-level terminal device, it is necessary for the application-level terminal device to send an HTTP request to apply for a resource (that is, a callback address), and release the resource after the data is sent. For a third-party application, the third-party application does not occupy the resource all the time, which causes the third-party applications to interact with each other when the IoT platform pushes data to different third-party applications. In extreme cases, if one third-party application occupies all resources, it will cause other third-party applications to have no resources available and cannot receive data pushed by the IoT platform. In the asynchronous push method, HTTP requests from different third-party applications form a waiting queue, and resources are sequentially obtained from the resource pool. In this process, different third application shared resource pools are still in essence. When a third-party application reports data concurrently and instantaneously, the third-party application occupies all resources, resulting in that other third-party applications cannot apply for resources.
上述同步推送方式和异步推送方式中,均会导致不同的第三方应用之间相互影响。因此,物联网技术中,物联网平台如何向应用层设备上加载的第三方应用推送数据,实为急待解决的问题。In the foregoing synchronous push method and asynchronous push method, different third-party applications will affect each other. Therefore, in the Internet of Things technology, how the Internet of Things platform pushes data to third-party applications loaded on application-layer devices is an urgent issue.
发明内容Summary of the Invention
本申请实施例提供一种基于物联网的数据传输方法及通信装置,以实现物联网平台向 应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。The embodiments of the present application provide a data transmission method and communication device based on the Internet of Things, so as to achieve the purpose of not affecting each other when the Internet of Things platform pushes data to a third-party application on an application-layer terminal device.
第一方面,本申请实施例提供一种基于物联网的数据传输方法,该方法可以应用于应用层设备、也可以应用于应用层设备中的芯片。下面以应用于应用层设备为例对该方法进行描述,该方法包括:应用层设备与物联网平台建立N条长连接,所述N≥2,且为整数;所述应用层设备通过所述N条长连接向所述物联网平台发送第一数据,或者,通过所述N条长连接接收所述物联网平台发送的第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。采用该种方案,对于一个具体的第三方应用,应用层设备与物联网平台进行信令交互以建立N条长连接,并基于该N条长连接接收物联网平台发送的关于该第三方应用的第二数据,或者,基于该N条长连接向物联网平台发送关于第三方应用的第一数据。该过程中,通过对一个第三方应用,在应用层设备与物联网平台之间建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。另外,由于长连接是多条长连接,因此,相较于一条长连接,可以提升数据推送的实时性。In a first aspect, an embodiment of the present application provides a data transmission method based on the Internet of Things. The method can be applied to an application layer device or a chip in the application layer device. The method is described below using an application layer device as an example. The method includes: establishing N long connections between the application layer device and the IoT platform, where N≥2, and being an integer; the application layer device passes the N long connections send first data to the IoT platform, or receive second data sent by the IoT platform through the N long connections, the first data and the second data are loaded in Data interacted between a third-party application on the application layer device and the IoT platform. With this solution, for a specific third-party application, the application layer device performs signaling interaction with the IoT platform to establish N long-term connections, and receives information about the third-party application sent by the IoT platform based on the N-long connections. The second data, or the first data about the third-party application is sent to the IoT platform based on the N long connections. In this process, through a third-party application, N long connections are established between the application layer device and the Internet of Things platform. Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other. In addition, since the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
一种可行的设计中,所述应用层设备与物联网平台建立N条长连接,包括:In a feasible design, the application layer device establishes N long connections with the IoT platform, including:
A、所述应用层设备从M个长连接标识中,选择第i个长连接标识,所述第i个长连接标识是所述M个长连接标识中的任意一个,1≤i≤N;A. The application layer device selects an i-th long connection identifier from M long-connection identifiers, where the i-th long-connection identifier is any one of the M long-connection identifiers, 1≤i≤N;
B、所述应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述第i个长连接标识;B. The application layer device sends a persistent connection establishment request message to the IoT platform, where the persistent connection establishment request message carries the i-th persistent connection identifier;
C、所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;C. The application layer device receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long corresponding to the i-th long connection identifier is successfully established. connection;
D、所述应用层设备接收所述物联网平台通过所述第i条长连接发送的第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;D. The application layer device receives a first notification message sent by the IoT platform through the i-th long connection, and the first notification message is used to instruct the application layer device to continue to establish a next long connection;
循环执行A-D,直至与所述物联网平台建立所述N条长连接。A-D is executed cyclically until the N long connections are established with the IoT platform.
采用该种方案,应用层设备与物联网设备建立N条长连接的过程中,每建立一条长连接后,物联网平台均会根据已建立的长连接的TPS,与感知层设备上报的关于第三方应用的数据的TPS,确定是否需要继续建立下一条长连接,通过依次建立N条长连接,避免同时针对一个第三方应用建立多条长连接,而该多条长连接不满足第三方应用的需求,造成无法及时传输关于第三方应用的数据的弊端;或者,避免同时针对一个第三方应用建立多条长连接,该多条长连接超出第三方用的需求,造成资源浪费或影响其他第三方应用建立长连接的弊端。With this solution, during the process of establishing N long-term connections between the application layer device and the IoT device, after each long-term connection is established, the IoT platform will report to the perception layer device about the The TPS of the three-party application data determines whether it is necessary to continue to establish the next long connection. By sequentially establishing N long connections, it is possible to avoid establishing multiple long connections for a third-party application at the same time, and the multiple long connections do not satisfy the third-party application. Requirements, resulting in the inability to transmit data about third-party applications in a timely manner; or avoid establishing multiple long connections to a third-party application at the same time, which exceed the needs of third-party applications, causing waste of resources or affecting other third parties Disadvantages of applications establishing long connections.
一种可行的设计中,所述应用层设备与物联网平台建立N条长连接,包括:In a feasible design, the application layer device establishes N long connections with the IoT platform, including:
所述应用层设备从M个长连接标识中,选择N个长连接标识;The application layer device selects N long connection identifiers from M long connection identifiers;
所述应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述N个长连接标识;The application layer device sends a long connection establishment request message to the IoT platform, and the long connection establishment request message carries the N long connection identifiers;
所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。The application layer device receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the N long connection identifiers is successfully established.
采用该种方案,应用层设备与物联网设备建立N条长连接的过程中,物联网平台确定出长连接的个数M,并将M个长连接标识发送给应用层设备。然后,应用层设备从M个长 连接标识中选择出N个长连接,并与物联网平台交互,同时建立N条长连接。该过程中,应用层设备从M个长连接标识中选择出N个长连接标识,并基于该N个长连接标识为第三方应用建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。With this solution, during the process of establishing N long connections between the application layer device and the IoT device, the IoT platform determines the number of long connections M and sends the M long connection identifiers to the application layer device. Then, the application layer device selects N long connections from the M long connection identifiers, and interacts with the IoT platform to establish N long connections at the same time. In this process, the application layer device selects N permanent connection identifiers from M permanent connection identifiers, and establishes N permanent connections for third-party applications based on the N permanent connection identifiers, and N permanent connections for different third-party applications. Differently, when the IoT platform pushes data to a third-party application on the application-layer terminal device, the third-party application does not affect each other.
一种可行的设计中,所述应用层设备与物联网平台建立N条长连接之后,还包括:所述应用层设备接收所述物联网平台发送的第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接;所述应用层设备根据所述第二通知消息,拆除所述N条长连接中的至少一条长连接。采用该种方案,通过物联网平台向应用层设备发送第二通知消息以拆除N条长连接中的至少一条长连接,实现及时释放第三方应用占用的资源的目的。In a feasible design, after the application layer device establishes N long connections with the IoT platform, the method further includes: the application layer device receives a second notification message sent by the IoT platform, and the second notification message It is used to instruct the application layer terminal device to remove at least one long connection among the N long connections; the application layer device removes at least one long connection among the N long connections according to the second notification message. With this solution, a second notification message is sent to the application layer device through the Internet of Things platform to remove at least one of the N long connections to achieve the purpose of timely releasing the resources occupied by third-party applications.
一种可行的设计中,所述应用层设备与物联网平台建立N条长连接之前,还包括:所述应用层设备向所述物联网平台发送请求消息,所述请求消息用于请求长连接标识;所述应用层设备接收所述物联网平台发送的响应消息,所述响应消息携带所述M个长连接标识,M≥N。采用该种方案,对于一个具体的第三方应用,由物联网平台决定分配给该第三方应用的长连接标识的个数M,建立长连接时,应用层设备为该第三方应用建立的长连接的个数N≤M,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。In a feasible design, before the application layer device and the IoT platform establish N long connections, the method further includes: the application layer device sends a request message to the IoT platform, and the request message is used to request a long connection Identification; the application layer device receives a response message sent by the IoT platform, where the response message carries the M long connection identifiers, M≥N. With this solution, for a specific third-party application, the number of long-connection identifiers M allocated to the third-party application is determined by the IoT platform. When establishing a long-connection, the application-layer device establishes a long-connection for the third-party application. The number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
一种可行的设计中,所述应用层设备与物联网平台建立N条长连接,包括:所述物联网平台包括多个分布式物联网平台,所述应用层设备与所述多个分布式物联网平台中的一个或多个分布式物联网平台建立所述N条长连接。采用该种方案,实现应用层设备与分布式物联网平台建立多个长连接的目的。In a feasible design, the application layer device establishes N long connections with the IoT platform, including: the IoT platform includes multiple distributed IoT platforms, and the application layer device and the multiple distributed IoT platforms One or more distributed IoT platforms in the IoT platform establish the N long connections. This solution is adopted to achieve the purpose of establishing multiple long-term connections between the application layer device and the distributed IoT platform.
一种可行的设计中,所述应用层设备包括终端设备或应用服务器。In a feasible design, the application layer device includes a terminal device or an application server.
第二方面,本申请实施例提供一种基于物联网的数据传输方法,该方法可以应用于物联网平台、也可以应用于物联网平台中的芯片。下面以应用于物联网平台为例对该方法进行描述,该方法包括:物联网平台与应用层设备建立N条长连接,所述N≥2;In a second aspect, an embodiment of the present application provides a data transmission method based on the Internet of Things. The method can be applied to an Internet of Things platform or a chip in the Internet of Things platform. The method is described below as an example applied to the Internet of Things platform, and the method includes: the Internet of Things platform establishes N long connections with application layer devices, where N≥2;
所述物联网平台通过所述N条长连接接收所述应用层设备发送的第一数据,或者,通过所述N条长连接向所述物联网平台发送第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。采用该种方案,对于一个具体的第三方应用,应用层设备与物联网平台进行信令交互以建立N条长连接,并基于该N条长连接接收物联网平台发送的关于该第三方应用的第二数据,或者,基于该N条长连接向物联网平台发送关于第三方应用的第一数据。该过程中,通过对一个第三方应用,在应用层设备与物联网平台之间建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。另外,由于长连接是多条长连接,因此,相较于一条长连接,可以提升数据推送的实时性。The IoT platform receives the first data sent by the application layer device through the N long connections, or sends the second data to the IoT platform through the N long connections, and the first data and The second data is data interacting between a third-party application loaded on the application layer device and the IoT platform. With this solution, for a specific third-party application, the application layer device performs signaling interaction with the IoT platform to establish N long-term connections, and receives information about the third-party application sent by the IoT platform based on the N-long connections. The second data, or the first data about the third-party application is sent to the IoT platform based on the N long connections. In this process, through a third-party application, N long connections are established between the application layer device and the Internet of Things platform. Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other. In addition, since the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
一种可行的设计中,所述物联网平台与应用层设备建立N条长连接,包括:In a feasible design, the IoT platform and the application layer device establish N long connections, including:
E、所述物联网平台接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带第i个长连接标识,所述第i个长连接标识是所述应用层设备从所述N个长连接标识中选择出的任意一个长连接标识,1≤i≤N;E. The IoT platform receives a persistent connection establishment request message sent by the application layer device, the persistent connection establishment request message carries an i-th persistent connection identifier, and the i-th persistent connection identifier is the application layer device Any one of the long connection identifiers selected from the N long connection identifiers, 1≤i≤N;
F、所述物联网平台向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;F. The IoT platform sends a long connection establishment response message to the application layer device, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. ;
G、所述物联网平台确定已建立的长连接的每秒事务处理量TPS,以及感知层设备的TPS,根据所述已建立的长连接的TPS与所述感知层设备的TPS,确定是否向所述应用层设备发送第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;G. The IoT platform determines the TPS of the established long connection transaction per second and the TPS of the sensing layer device, and determines whether to forward the TPS of the established long connection and the TPS of the sensing layer device to Sending, by the application layer device, a first notification message, where the first notification message is used to instruct the application layer device to continue to establish a next long connection;
循环执行E-G,直至于所述应用层设备建立所述N条长连接。E-G is executed cyclically until the N long connections are established by the application layer device.
采用该种方案,应用层设备与物联网设备建立N条长连接的过程中,每建立一条长连接后,物联网平台均会根据已建立的长连接的TPS,与感知层设备上报的关于第三方应用的数据的TPS,确定是否需要继续建立下一条长连接,通过依次建立N条长连接,避免同时针对一个第三方应用建立多条长连接,而该多条长连接不满足第三方应用的需求,造成无法及时传输关于第三方应用的数据的弊端;或者,避免同时针对一个第三方应用建立多条长连接,该多条长连接超出第三方用的需求,造成资源浪费或影响其他第三方应用建立长连接的弊端。With this solution, during the process of establishing N long-term connections between the application layer device and the IoT device, after each long-term connection is established, the IoT platform will report to the perception layer device about the The TPS of the three-party application data determines whether it is necessary to continue to establish the next long connection. By sequentially establishing N long connections, it is possible to avoid establishing multiple long connections for a third-party application at the same time, and the multiple long connections do not satisfy the third-party application. Requirements, resulting in the inability to transmit data about third-party applications in a timely manner; or avoid establishing multiple long connections to a third-party application at the same time, which exceed the needs of third-party applications, causing waste of resources or affecting other third parties Disadvantages of applications establishing long connections.
一种可行的设计中,所述物联网平台与应用层设备建立N条长连接,包括:所述物联网平台向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层设备建立N条长连接;所述物联网平台接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带所述N条长连接;所述物联网平台向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。采用该种方案,应用层设备与物联网设备建立N条长连接的过程中,物联网平台确定出长连接的个数M,并将M个长连接标识发送给应用层设备。然后,应用层设备从M个长连接标识中选择出N个长连接,并与物联网平台交互,同时建立N条长连接。该过程中,应用层设备从M个长连接标识中选择出N个长连接标识,并基于该N个长连接标识为第三方应用建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。In a feasible design, the IoT platform establishes N long-term connections with the application layer device, including: the IoT platform sends a second notification message to the application layer device, and the second notification message is used to indicate The application layer device establishes N long connections; the IoT platform receives a long connection establishment request message sent by the application layer device, and the long connection establishment request message carries the N long connections; the IoT platform Sending a long connection establishment response message to the application layer device, where the long connection establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established. With this solution, during the process of establishing N long connections between the application layer device and the IoT device, the IoT platform determines the number of long connections M and sends the M long connection identifiers to the application layer device. Then, the application layer device selects N long connections from the M long connection identifiers, and interacts with the IoT platform to establish N long connections at the same time. In this process, the application layer device selects N permanent connection identifiers from M permanent connection identifiers, and establishes N permanent connections for third-party applications based on the N permanent connection identifiers, and N permanent connections for different third-party applications. Differently, when the IoT platform pushes data to a third-party application on the application-layer terminal device, the third-party application does not affect each other.
一种可行的设计中,所述物联网平台与应用层设备建立N条长连接之后,还包括:In a feasible design, after the IoT platform and the application layer device establish N long connections, the method further includes:
所述物联网平台向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接。采用该种方案,通过物联网平台向应用层设备发送第二通知消息以拆除N条长连接中的至少一条长连接,实现及时释放第三方应用占用的资源的目的。The IoT platform sends a second notification message to the application layer device, and the second notification message is used to instruct the application layer terminal device to dismantle at least one of the N long connections. With this solution, a second notification message is sent to the application layer device through the Internet of Things platform to remove at least one of the N long connections to achieve the purpose of timely releasing the resources occupied by third-party applications.
一种可行的设计中,所述物联网平台与应用层设备建立N条长连接之前,还包括:所述物联网平台接收应用层设备发送的请求消息,所述请求消息用于请求长连接标识;所述物联网平台向所述应用层设备发送响应消息,所述响应消息携带所述M个长连接标识,M≥N。采用该种方案,对于一个具体的第三方应用,由物联网平台决定分配给该第三方应用的长连接标识的个数M,建立长连接时,应用层设备为该第三方应用建立的长连接的个数N≤M,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。In a feasible design, before the IoT platform and the application layer device establish N long connections, the method further includes: the IoT platform receives a request message sent by the application layer device, and the request message is used to request a long connection identifier. ; The IoT platform sends a response message to the application layer device, where the response message carries the M long connection identifiers, M≥N. With this solution, for a specific third-party application, the number of long-connection identifiers M allocated to the third-party application is determined by the IoT platform. When establishing a long-connection, the application-layer device establishes a long-connection for the third-party application. The number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
一种可行的设计中,所述物联网平台与应用层设备建立N条长连接,包括:所述物 联网平台包括多个分布式物联网平台,所述多个分布式物联网平台中的一个或多个分布式物联网平台与所述应用层设备建立所述N条长连接。采用该种方案,实现应用层设备与分布式物联网平台建立多个长连接的目的。In a feasible design, the IoT platform establishes N long connections with application layer devices, including: the IoT platform includes multiple distributed IoT platforms, and one of the multiple distributed IoT platforms Or multiple distributed IoT platforms establish the N long connections with the application layer device. This solution is adopted to achieve the purpose of establishing multiple long-term connections between the application layer device and the distributed IoT platform.
第三方面,本申请实施例提供一种通信装置,所述通信装置具有实再上述方法实施例中应用层设备的行为功能。所述功能可以通过硬件实现,也可以通过硬件执行相应软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。所述模块可以是软件和/或硬件。In a third aspect, an embodiment of the present application provides a communication apparatus, which has a behavior function of an application layer device in the foregoing method embodiment. The functions can be implemented by hardware, and can also be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and / or hardware.
在一个可能的设计中,应用层设备的结构中包括处理器、存储器与收发器,所述存储器存储可在处理器上运行的计算机程序,所述处理器执行所述计算机程序与物联网平台建立N条长连接,所述N≥2,且为整数,所述处理器还控制所述收发器通过所述N条长连接向所述物联网平台发送第一数据,或者,通过所述N条长连接接收所述物联网平台发送的第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。In a possible design, the structure of the application layer device includes a processor, a memory, and a transceiver. The memory stores a computer program that can be run on the processor, and the processor executes the computer program and establishes an IoT platform. N long connections, where N≥2 and being an integer, the processor also controls the transceiver to send the first data to the IoT platform through the N long connections, or through the N bars The long connection receives second data sent by the Internet of Things platform, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the Internet of Things platform.
第四方面,本申请实施例提供一种通信装置,该通信装置用于实现上述方法实际中物联网平台的行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。According to a fourth aspect, an embodiment of the present application provides a communication device, and the communication device is configured to implement a function of the behavior of an IoT platform in the foregoing method. The functions may be implemented by hardware, and may also be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
在一个可能的设计中,物联网平台的结构包括处理器、存储器与收发器,所述存储器存储可在处理器上运行的计算机程序,所述处理器执行所述计算机程序与应用层设备建立N条长连接,所述N≥2;所述处理器还控制所述收发器通过所述N条长连接接收所述应用层设备发送的第一数据,或者,通过所述N条长连接向所述物联网平台发送第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。In a possible design, the structure of the IoT platform includes a processor, a memory, and a transceiver. The memory stores a computer program that can run on the processor, and the processor executes the computer program to establish an application-layer device. The length of the connection is N≥2; the processor further controls the transceiver to receive the first data sent by the application layer device through the N length of connection, or to the The IoT platform sends second data, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
第五方面,本申请实施例提供一种通信装置,包括用于执行以上第一方面或第一方面各可能的实现方式所提供的方法的单元、模块或电路。该通信装置可以为应用层设备,也可以为应用于应用层设备的一个模块,例如,可以为应用于应用层设备的芯片。In a fifth aspect, an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the first aspect or each possible implementation manner of the first aspect. The communication device may be an application layer device or a module applied to the application layer device, for example, it may be a chip applied to the application layer device.
第六方面,本申请实施例提供一种通信装置,包括用于执行以上第二方面或第二方面各可能的实现方式所提供的方法的单元、模块或电路。该通信装置可以为物联网平台,也可以为应用于物联网平台的一个模块,例如,可以为应用于物联网平台的芯片。According to a sixth aspect, an embodiment of the present application provides a communication device including a unit, a module, or a circuit for performing the method provided in the second aspect or each possible implementation manner of the second aspect. The communication device may be an IoT platform or a module applied to the IoT platform, for example, it may be a chip applied to the IoT platform.
第七方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的各种可能的实现方式中的方法。In a seventh aspect, an embodiment of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to execute the foregoing first aspect or the methods in the various possible implementation manners of the first aspect.
第八方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二方面或第二方面的各种可能的实现方式中的方法。In an eighth aspect, an embodiment of the present application provides a computer program product including instructions, which when executed on a computer, causes the computer to execute the foregoing second aspect or the methods in various possible implementation manners of the second aspect.
第九方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的各种可能的实现方式中的方法。In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, causes the computer to execute the foregoing first aspect or each of the first aspect Of the possible implementations.
第十方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第二方面或第二方面 的各种可能的实现方式中的方法。According to a tenth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, the computer executes the second aspect or each of the second aspect Of the possible implementations.
本申请实施例提供的基于物联网的数据传输方法及通信装置,对于一个具体的第三方应用,应用层设备与物联网平台进行信令交互以建立N条长连接,并基于该N条长连接向物联网平台发送第一数据,或者,基于该N条长连接接收物联网平台发送的关于该第三方应用的第二数据。该过程中,通过对一个第三方应用,在应用层设备与物联网平台之间建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。另外,由于长连接是多条长连接,因此,相较于一条长连接,可以提升数据推送的实时性。The data transmission method and communication device based on the Internet of Things provided in the embodiments of the present application. For a specific third-party application, the application layer device performs signaling interaction with the Internet of Things platform to establish N long connections, and based on the N long connections Send the first data to the IoT platform, or receive the second data about the third-party application sent by the IoT platform based on the N long connections. In this process, through a third-party application, N long connections are established between the application layer device and the Internet of Things platform. Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other. In addition, since the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是物联网平台通过HTTP推送方式向应用层设备上的第三方应用推送数据的过程示意图;FIG. 1 is a schematic diagram of a process of pushing data to a third-party application on an application layer device through an HTTP push method by the IoT platform;
图2A是本申请实施例提供的一个物联网架构示意图;FIG. 2A is a schematic diagram of an IoT architecture provided by an embodiment of the present application; FIG.
图2B是本申请实施例提供的另一个物联网架构示意图;2B is a schematic diagram of another IoT architecture provided by an embodiment of the present application;
图3A是本申请实施例提供的一种基于物联网的数据传输方法的流程图;3A is a flowchart of a data transmission method based on the Internet of Things provided by an embodiment of the present application;
图3B是本申请实施例提供的另一种基于物联网的数据传输方法的流程图;3B is a flowchart of another Internet of Things-based data transmission method according to an embodiment of the present application;
图4是本申请实施例提供的一种基于物联网的数据传输方法的网络逻辑架构示意图;4 is a schematic diagram of a network logical architecture of a data transmission method based on the Internet of Things provided by an embodiment of the present application;
图5是本申请实施例提供的一种基于物联网的数据传输方法适用的依次建立长连接的逻辑示意图;FIG. 5 is a logical schematic diagram of sequentially establishing a long connection applicable to a data transmission method based on the Internet of Things provided by an embodiment of the present application; FIG.
图6是本申请实施例提供的一个基于物联网的数据传输方法所适用的认证流程图;6 is an authentication flowchart applicable to an Internet of Things-based data transmission method according to an embodiment of the present application;
图7为本申请实施例提供的一种通信装置的结构示意图;7 is a schematic structural diagram of a communication device according to an embodiment of the present application;
图8为本申请实施例提供的一种通信装置的结构示意图;8 is a schematic structural diagram of a communication device according to an embodiment of the present application;
图9为本申请实施例提供的一种通信装置的结构示意图;9 is a schematic structural diagram of a communication device according to an embodiment of the present application;
图10为本申请实施例提供的一种通信装置的结构示意图。FIG. 10 is a schematic structural diagram of a communication device according to an embodiment of the present application.
具体实施方式detailed description
图1是物联网平台通过HTTP推送方式向应用层设备上的第三方应用推送数据的过程示意图,包括:Figure 1 is a schematic diagram of the process of pushing data by the IoT platform to a third-party application on the application layer device through HTTP push, including:
11、应用层终端设备向ELB模块发送HTTP请求。11. The application layer terminal device sends an HTTP request to the ELB module.
本步骤中,应用层终端设备向弹性负载均衡(elastic load balance,ELB)模块发送HTTP请求,该HTTP请求携带加载在应用层终端设备上的某个第三方应用的回调地址。ELB模块是物联网平台的一个功能模块,用于将第三方应用的数据路由和分发到物联网平台的不同推送模块中。In this step, the application-layer terminal device sends an HTTP request to an elastic load balance (ELB) module, and the HTTP request carries a callback address of a third-party application loaded on the application-layer terminal device. The ELB module is a functional module of the IoT platform, which is used to route and distribute data from third-party applications to different push modules of the IoT platform.
12、ELB模块将HTTP请求发送给物联网平台。12. The ELB module sends an HTTP request to the IoT platform.
推送模块是物联网平台上的一个功能模块,用于处理数据推送相关业务。The push module is a functional module on the Internet of Things platform, which is used to handle data push related services.
13、物联网平台向ELB模块发送HTTP响应。13. The IoT platform sends an HTTP response to the ELB module.
本步骤中,物联网平台向ELB模块发送HTTP响应,表示成功为第三方应用分配回调地址。In this step, the IoT platform sends an HTTP response to the ELB module, indicating that the callback address is successfully assigned to the third-party application.
14、ELB模块向应用层终端设备发送HTTP响应。14. The ELB module sends an HTTP response to the application-layer terminal device.
15、物联网平台通过上述的回调地址向ELB发送第三方应用的数据。15. The IoT platform sends data from the third-party application to ELB through the callback address.
本步骤中,物联网平台通过上述的回调地址向ELB发送第三方应用的数据。In this step, the IoT platform sends data of the third-party application to the ELB through the callback address.
16、ELB模块向应用层终端设备发送第三方应用的数据。16. The ELB module sends data of the third-party application to the application-layer terminal device.
17、应用层终端设备向ELB模块发送肯定应答消息。17. The application-layer terminal device sends a positive response message to the ELB module.
例如,应用层终端设备上的第三方应用成功接收到数据后,应用层终端设备向ELB模块发送肯定应答(Acknowledge,ACK)消息。该ACK消息例如为200Ok。For example, after a third-party application on the application layer terminal device successfully receives data, the application layer terminal device sends an Acknowledgement (ACK) message to the ELB module. The ACK message is, for example, 200 Ok.
18、ELB模块向物联网平台发送ACK消息。18. The ELB module sends an ACK message to the IoT platform.
上述HTTP推送方式中,需要应用层终端设备发送HTTP请求以申请资源(即回调地址),多个第三方应用共享资源池时,不同的第三方应用之间相互影响。In the above HTTP push method, it is necessary for the application-layer terminal device to send an HTTP request to apply for a resource (that is, a callback address). When multiple third-party applications share a resource pool, different third-party applications affect each other.
有鉴于此,本申请实施例提供一种基于物联网的数据传输方法,通过为应用层设备上的第三方应用与物联网平台之间建立多条长连接,从而各个第三方应用互不影响的目的。In view of this, the embodiment of the present application provides a data transmission method based on the Internet of Things. By establishing multiple long connections between a third-party application on an application layer device and the Internet of Things platform, each third-party application does not affect each other. purpose.
图2A是本申请实施例提供的一个物联网架构示意图。请参照图2A,该架构包括:应用层设备、物联网平台和感知层设备。下面,对该些设备进行详细说明。FIG. 2A is a schematic diagram of an IoT architecture provided by an embodiment of the present application. Referring to FIG. 2A, the architecture includes: an application layer device, an IoT platform, and a perception layer device. These devices are described in detail below.
首先,应用层设备。First, the application layer device.
应用层设备上部署第三方应用(Application,APP),应用层设备可以是终端设备或应用服务器等;终端设备是可以向用户提供语音和/或数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。终端设备可以是移动终端设备,如移动电话(或称为“蜂窝”电话)和具有移动终端设备的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(personal communication service,PCS)电话、无绳电话、会话发起协议(session initiation protocol,SIP)话机、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,未来5G网络中的终端或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。终端设备也可以称为系统、订户单元(subscriber unit)、订户站(subscriber station),移动站(mobile station)、移动台(mobile)、远程站(remote station)、接入点(access point)、远程终端设备(remote terminal)、接入终端设备(access terminal)、用户终端设备(user terminal)、用户代理(user agent)、用户设备(user device)、或用户装备(user equipment)。A third-party application (Application, APP) is deployed on the application layer device. The application layer device can be a terminal device or an application server. The terminal device is a device that can provide users with voice and / or data connectivity. Device, or other processing device connected to the wireless modem. The terminal device may be a mobile terminal device, such as a mobile phone (also called a "cellular" phone) and a computer with a mobile terminal device, for example, it may be a portable, compact, handheld, computer-built or vehicle-mounted mobile device, which Exchange language and / or data with the radio access network. For example, personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants, PDA), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminals in future 5G networks, or public land mobile networks that have evolved in the future (public land mobile network) , PLMN), etc., this embodiment of the present application is not limited to this. The terminal device can also be called a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, an access point, Remote terminal equipment (remote terminal), access terminal equipment (access terminal), user terminal equipment (user terminal), user agent (user agent), user equipment (user device), or user equipment (user equipment).
其次,物联网平台。Second, the Internet of Things platform.
物联网是物物相连的互联网,是实现智能化识别、定位、跟踪、监控和管理的一种网络。由于接入物的不同,应用领域或者行业不同,以及第三方应用本身的功能差异,会形成各种各样的物联网系统。物联网系统具有多种功能,如物和后台的通信、设备接入、设备管理、数据存储、接入策略、安全策略、数据推送等,承载该具有多种功能的物联网的载体称之为物联网平台,物联网平台是一种基于互联网的、连接物体和实现物联网功能的中间件。The Internet of Things is the Internet connected to things, and it is a network that realizes intelligent identification, positioning, tracking, monitoring and management. Due to different access objects, different application fields or industries, and the functional differences of third-party applications, a variety of IoT systems will be formed. The Internet of Things system has a variety of functions, such as communication with the background, device access, device management, data storage, access strategy, security policy, data push, etc. The carrier that carries the Internet of Things with multiple functions is called Internet of things platform. Internet of things platform is a kind of middleware based on the Internet that connects objects and implements the functions of the Internet of Things.
从物理形态来讲,物联网平台可以是独立的服务器或分布式服务器等。In terms of physical form, the IoT platform can be an independent server or a distributed server.
最后,感知层设备。Finally, the perception layer device.
感知层包括传感器网关、传感器等感知层终端设备。The sensing layer includes terminal devices such as sensor gateways and sensors.
再请参照图2A,感知层设备用于采集数据等;物联网平台负责存储、传递和处理感知层终端设备采集的数据;应用层包括应用层设备,应用层设备主要提供数据分析、控制以及人机接口等。数据传输过程中,感知层终端设备采集数据并向物联网平台上报,由物联网平台将数据传输给应用层终端设备,用户通过加载在应用层终端设备上的第三方应用,实现数据查询、数据分析等。Please refer to FIG. 2A again, the sensing layer device is used to collect data, etc .; the IoT platform is responsible for storing, transmitting, and processing the data collected by the sensing layer terminal device; the application layer includes the application layer device, which mainly provides data analysis, control, and human Machine interface, etc. During the data transmission process, the sensing layer terminal device collects data and reports it to the IoT platform. The IoT platform transmits the data to the application layer terminal device. The user uses a third-party application loaded on the application layer terminal device to implement data query and data Analysis, etc.
图2B是本申请实施例提供的另一个物联网架构示意图。相较于图2A中物联网平台为独立的物联网平台,本实施例中,物联网平台包括多个分布式物联网平台。FIG. 2B is a schematic diagram of another IoT architecture provided by an embodiment of the present application. Compared to FIG. 2A, the IoT platform is an independent IoT platform. In this embodiment, the IoT platform includes multiple distributed IoT platforms.
本申请实施例中,对于一个具体的第三方应用,应用层设备与物联网平台之间建立N条长连接,应用层设备通过该N条长连接向物联网平台发送关于第三方应用的数据;并且,应用层设备通过该N条长连接接收物联网平台发送的关于该第三方应用的数据。以下为清楚起见,将应用层设备发送给物联网平台的数据称之为第一数据,将物联网平台发送给应用层设备的数据称之为第二数据。In the embodiment of the present application, for a specific third-party application, N long connections are established between the application layer device and the IoT platform, and the application layer device sends data about the third-party application to the IoT platform through the N long connections; In addition, the application layer device receives data about the third-party application sent by the IoT platform through the N long connections. For clarity, the data sent by the application layer device to the IoT platform is called first data, and the data sent by the IoT platform to the application layer device is called second data.
本申请实施例中,N条长连接是针对一个具体的第三方应用而言的,具体包含下面几种场景:In the embodiment of the present application, the N long connections are for a specific third-party application, and specifically include the following scenarios:
场景一、第三方应用部署在一个应用层设备上,物联网平台为独立的物联网平台。Scenario 1: A third-party application is deployed on an application layer device, and the IoT platform is an independent IoT platform.
例如,请参照图2A,APP2部署在应用层设备1上,此时,N条长连接包括长连接4和长连接5。For example, referring to FIG. 2A, APP2 is deployed on the application layer device 1. At this time, the N long connections include long connection 4 and long connection 5.
场景二、第三方应用分布式部署,物联网平台为独立的物联网平台。Scenario 2: The third-party application is deployed in a distributed manner, and the IoT platform is an independent IoT platform.
例如,请参照图2A,APP1部署在应用层设备1和应用层设备2上,此时,N条长连接包括长连接1、长连接2和长连接5。For example, referring to FIG. 2A, APP1 is deployed on application layer device 1 and application layer device 2. At this time, N long connections include long connection 1, long connection 2, and long connection 5.
场景三、第三方应用部署在一个应用层设备上,物联网平台为分布式物联网平台。Scenario 3: Third-party applications are deployed on an application layer device, and the IoT platform is a distributed IoT platform.
例如,请参照图2B,APP2部署在应用层设备1上,物联网平台包括分布式物联网平台1和分布式物联网平台2,此时,N条长连接包括长连接8和长连接9。For example, referring to FIG. 2B, APP2 is deployed on the application layer device 1. The IoT platform includes distributed IoT platform 1 and distributed IoT platform 2. At this time, N long connections include long connections 8 and long connections 9.
场景四、第三方应用部署分布式部署,物联网平台为分布式物联网平台。Scenario 4: Third-party application deployment is distributed. The IoT platform is a distributed IoT platform.
例如,请参照图2B,APP1部署在应用层设备1和应用层设备2上,物联网平台包括分布式物联网平台1和分布式物联网平台2,此时,N条长连接包括应用层设备1与分布式物联网平台1之间的长连接6和长连接7,以及应用层设备2与分布式物联网平台2之间的长连接10。For example, referring to FIG. 2B, APP1 is deployed on application layer device 1 and application layer device 2. The IoT platform includes distributed IoT platform 1 and distributed IoT platform 2. At this time, N long connections include application layer devices Long connection 6 and long connection 7 between 1 and distributed IoT platform 1, and long connection 10 between application layer device 2 and distributed IoT platform 2.
需要说明的是,上述图2A和图2B中所示应用层设备、分布式物联网平台的个数以及感知层设备的个数,仅仅是示例性的,本申请实施例并不限制。It should be noted that the number of the application layer devices, the distributed IoT platform, and the number of sensing layer devices shown in FIG. 2A and FIG. 2B are merely exemplary, and the embodiments of the present application are not limited.
下面,在上述图2A和图2B的基础上,对本申请实施例所述的基于物联网的数据传输方法进行详细说明。具体的,可参见图3A。Hereinafter, based on the above FIG. 2A and FIG. 2B, the data transmission method based on the Internet of Things described in the embodiment of the present application will be described in detail. Specifically, refer to FIG. 3A.
图3A是本申请实施例提供的一种基于物联网的数据传输方法的流程图。本实施例是从应用层设备与物联网平台交互的角度,以及物联网平台向应用层设备发送第二数据的角度,对上述的基于物联网的数据传输方法进行详细说明的。本实施例包括:FIG. 3A is a flowchart of a data transmission method based on the Internet of Things provided by an embodiment of the present application. This embodiment describes the above-mentioned data transmission method based on the Internet of Things in detail from the perspective of the interaction between the application layer device and the Internet of Things platform, and the perspective that the Internet of Things platform sends the second data to the application layer device. This embodiment includes:
101a、应用层设备与物联网平台建立N条长连接。101a. An application layer device establishes N long connections with an IoT platform.
其中,所述N≥2,且为整数。Wherein, N ≧ 2 and is an integer.
本步骤中,针对一个具体的第三方应用,即具体的APP,应用层设备与物联网平台进行信令交互,以建立N条长连接,应用层设备与物联网平台基于该N条长连接传输关于该APP的数据。In this step, for a specific third-party application, that is, a specific APP, the application layer device performs signaling interaction with the IoT platform to establish N long connections, and the application layer device and the IoT platform transmit based on the N long connections. Data about the app.
本实施例中,长连接是一种传输控制协议(transmission control protocol,TCP)连接,该TCP连接建立后,完成一次数据后,继续保持连接状态不断开,下次数据传输时继续使用该TCP连接,该种TCP连接即为本申请实施例所述的长连接。In this embodiment, the long connection is a transmission control protocol (TCP) connection. After the TCP connection is established, after completing the data once, it continues to maintain the connection state without being disconnected, and the next data transmission is continued to use the TCP connection. This kind of TCP connection is a long connection as described in the embodiments of the present application.
102a、所述物联网平台通过所述N条长连接向应用层设备发送的第二数据。102a. The second data sent by the IoT platform to the application layer device through the N long connections.
其中,所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。示例性的,该第二数据是感知层设备发送给物联网平台的数据,该数据是第三方应用相关的数据。物联网平台接收到该第二数据后,需要将该第二数据推送给应用层设备,供应用层设备上的第三方应用使用。The second data is data that is exchanged between a third-party application loaded on the application layer device and the IoT platform. Exemplarily, the second data is data sent by the sensing layer device to the IoT platform, and the data is data related to a third-party application. After the IoT platform receives the second data, it needs to push the second data to the application layer device for use by a third-party application on the application layer device.
本步骤中,物联网平台通过上述的N条长连接向应用层设备发送关于上述的APP的第二数据;相应的,应用层设备通过上述的N条长连接接物联网平台发送的关于APP的第二数据。In this step, the IoT platform sends the second data about the APP to the application layer device through the above N long connections; accordingly, the application layer device connects to the APP about the APP sent by the IoT platform through the above N long connections.第二 数据。 The second data.
本申请实施例提供的基于物联网的数据传输方法,对于一个具体的第三方应用,应用层设备与物联网平台进行信令交互以建立N条长连接,并基于该N条长连接接收物联网平台发送的关于该第三方应用的第二数据。该过程中,通过对一个第三方应用,在应用层设备与物联网平台之间建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。另外,由于长连接是多条长连接,因此,相较于一条长连接,可以提升数据推送的实时性。The data transmission method based on the Internet of Things provided by the embodiments of this application. For a specific third-party application, the application layer device performs signaling interaction with the Internet of Things platform to establish N long connections, and receives the Internet of Things based on the N long connections. The second data sent by the platform about the third-party application. In this process, through a third-party application, N long connections are established between the application layer device and the Internet of Things platform. Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other. In addition, since the long connection is multiple long connections, compared with one long connection, the real-time performance of data push can be improved.
图3B是本申请实施例提供的另一种基于物联网的数据传输方法的流程图。本实施例是从应用层设备与物联网平台交互的角度,以及应用层设备向物联网平台发送第一数据的角度,对上述的基于物联网的数据传输方法进行详细说明的。本实施例包括:FIG. 3B is a flowchart of another Internet of Things-based data transmission method provided by an embodiment of the present application. This embodiment describes the above-mentioned data transmission method based on the Internet of Things in detail from the perspective of the interaction between the application layer device and the Internet of Things platform, and the perspective of the application layer device sending the first data to the Internet of Things platform. This embodiment includes:
101b、应用层设备与物联网平台建立N条长连接。101b. The application layer device establishes N long connections with the IoT platform.
其中,所述N≥2,且为整数。Wherein, N ≧ 2 and is an integer.
具体的,可参见上述步骤101a的描述,此处不再赘述。Specifically, reference may be made to the description of step 101a, and details are not described herein again.
102b、所述应用层设备通过所述N条长连接向所述物联网平台发送第一数据,102b. The application layer device sends first data to the IoT platform through the N long connections,
其中,所述第一数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。示例性的,该第二数据是应用层设备发送给感知层设备的数据,该数据是用户通过第三方应用发送给感知层设备的控制指令。物联网平台接收到该第一数据后,需要将该第一数据推送给感知层设备,以实现用户通过应用层设备上的第三方应用控制感知层设备的目的。The first data is data interacting between a third-party application loaded on the application layer device and the IoT platform. Exemplarily, the second data is data sent by the application layer device to the sensing layer device, and the data is a control instruction sent by the user to the sensing layer device through a third-party application. After the IoT platform receives the first data, it needs to push the first data to the sensing layer device, so as to achieve the purpose that the user controls the sensing layer device through a third-party application on the application layer device.
具体的,可参见上述步骤101b的描述,此处不再赘述。Specifically, reference may be made to the description of step 101b, and details are not described herein again.
本申请实施例提供的基于物联网的数据传输方法,对于一个具体的第三方应用,应用层设备与物联网平台进行信令交互以建立N条长连接,并基于该N条长连接向物联网平台发送的关于该第三方应用的第一数据。该过程中,通过对一个第三方应用,在应用层设备与物联网平台之间建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。The data transmission method based on the Internet of Things provided by the embodiments of the present application. For a specific third-party application, the application layer device performs signaling interaction with the Internet of Things platform to establish N long connections, and based on the N long connections to the Internet of Things. The first data sent by the platform about the third-party application. In this process, through a third-party application, N long connections are established between the application layer device and the Internet of Things platform. Different N third-party applications have different long connections. When third-party applications push data, the purpose of each third-party application does not affect each other.
上述实施例中,应用层设备与物联网平台之间建立N条连接的过程中,N的大小是由 物联网平台决定的。下面,对物联网平台如何向应用层设备通知N进行详细说明。In the above embodiment, in the process of establishing N connections between the application layer device and the IoT platform, the size of N is determined by the IoT platform. The following describes in detail how the IoT platform notifies N to the application layer device.
一种可行的实现方式中,所述应用层设备与物联网平台建立N条长连接之前,还向所述物联网平台发送请求消息,所述请求消息用于请求长连接标识;所述应用层设备接收所述物联网平台发送的响应消息,所述响应消息携带M个长连接标识。In a feasible implementation manner, before the application layer device establishes N long connections with the IoT platform, it further sends a request message to the IoT platform, the request message is used to request a long connection identifier; the application layer The device receives a response message sent by the Internet of Things platform, and the response message carries M long-connection identifiers.
本申请实施例中,长连接标识是长连接的唯一身份标识,用于鉴权认证等。本实施例中,建立N条长连接之前,应用层设备向物联网平台发送请求消息,以请求获取长连接标识;相应的,物联网平台接收该请求消息。接收到请求消息后,物联网平台根据自身能够承载长连接的个数的能力和/或感知层设备上报的关于第三方应用的数据量等,为应用层设备上的一个具体的第三方应用分配M个长连接,并将M个长连接标识携带在响应消息中发送给应用层设备;相应的,应用层设备接收携带M个长连接标识的响应消息。例如,假设物联网平台最多能够建立30条长连接,且当前已建立15条长连接,感知层设备上报的关于第三方应用的数据量较大,则物联网平台可以将M取较大值,如4,然后选择4个长连接标识携带在响应消息中发送给应用层设备;再如,假设物联网平台最多能够建立30条长连接,且当前已经建立27条长连接,此时,即使感知层设备上报的关于第三方应用的数据量较大,物联网平台也将M的值设为1等,然后选择1个长连接标识携带在响应消息中发送给应用层设备;再如,物联网平台为任意的第三方应用预分配5个长连接标识,即M=5。In the embodiment of the present application, the persistent connection identifier is a unique identifier of the persistent connection and is used for authentication and the like. In this embodiment, before N long connections are established, the application layer device sends a request message to the IoT platform to request to obtain the long connection identifier; accordingly, the IoT platform receives the request message. After receiving the request message, the IoT platform allocates a specific third-party application on the application layer device according to its ability to carry the number of long connections and / or the amount of data reported by the third-party application on the perception layer device. M long connections, and carry the M long connection identifiers in a response message to send to the application layer device; correspondingly, the application layer device receives the response message carrying the M long connection identifiers. For example, assuming that the IoT platform can establish a maximum of 30 long connections, and currently 15 long connections have been established, and the amount of data reported by the perception layer device about third-party applications is large, the IoT platform can take a larger value of M, Such as 4, and then select 4 long connection identifiers to be carried in the response message and send to the application layer device; for another example, suppose that the IoT platform can establish up to 30 long connections, and 27 long connections have been established at this time. The amount of data reported by third-party devices on third-party applications is relatively large. The IoT platform also sets the value of M to 1, etc., and then selects a long connection identifier to be carried in the response message and sends it to the application-layer device. The platform pre-allocates 5 long-connection identifiers for any third-party application, that is, M = 5.
本实施例中,对于一个具体的第三方应用,由物联网平台决定分配给该第三方应用的长连接标识的个数M,建立长连接时,应用层设备为该第三方应用建立的长连接的个数N≤M,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。In this embodiment, for a specific third-party application, the number of persistent connection identifiers M allocated to the third-party application is determined by the Internet of Things platform. When establishing a persistent connection, the application-layer device establishes a persistent connection for the third-party application. The number N is less than or equal to M, to achieve the purpose of the third-party applications do not affect each other when the IoT platform pushes data to third-party applications on the application layer terminal device.
上述实施例中,应用层设备与物联网平台之间建立N条长连接时,可以同时建立N条长连接,也可以依次建立N条长连接。下面,对该两种方式进行详细说明。In the above embodiment, when N long connections are established between the application layer device and the IoT platform, N long connections may be established at the same time, or N long connections may be established in sequence. The two methods are described in detail below.
一种可行的实现方式中,应用层设备与物联网平台依次建立N条长连接。此时,所述应用层设备与物联网平台建立N条长连接,包括:In a feasible implementation manner, the application layer device and the IoT platform establish N long connections in turn. At this time, the application layer device establishes N long connections with the IoT platform, including:
步骤A、所述应用层设备从所述M个长连接标识中,选择第i个长连接标识,所述第i个长连接标识是所述M个长连接标识中的任意一个,1≤i≤N。Step A: The application layer device selects an i-th long-connection identifier from the M long-connection identifiers, where the i-th long-connection identifier is any one of the M long-connection identifiers, and 1≤i ≤N.
步骤B、所述应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述第i个长连接标识;Step B: The application layer device sends a long connection establishment request message to the IoT platform, where the long connection establishment request message carries the i-th long connection identifier;
步骤C、所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;Step C: The application layer device receives a long connection establishment response message sent by the IoT platform, where the long connection establishment response message is used to indicate to the application layer device that the i-th long connection identifier corresponding to the successful establishment of the Long connection;
步骤D、所述应用层设备接收所述物联网平台通过所述第i条长连接发送的第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;Step D: The application layer device receives a first notification message sent by the IoT platform through the i-th long connection, and the first notification message is used to instruct the application layer device to continue to establish a next long connection;
循环执行A-D,直至与所述物联网平台建立所述N条长连接。A-D is executed cyclically until the N long connections are established with the IoT platform.
具体的,建立N条长连接中的第一条长连接时,应用层设备从M个长连接标识中随机选择一个长连接标识(例如为第i个长连接标识),然后,将该第i个长连接标识携带在长连接建立请求消息中发送给物联网平台;相应的,物联网平台接收该携带第i个长连接标识的长连接建立请求,即步骤E;物联网平台对该包含第i个长连接标识的长连接请求进行身份认证,例如,该长连接请求携带第i个长连接标识、第三方应用的身份标识以 及密钥等,物联网平台对第三方应用的身份标识等进行身份认证;然后,物联网平台向所述应用层设备发送长连接建立响应消息从而成功建立第一条长连接,即步骤F;相应的,应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接。之后,物联网平台确定第一条长连接的每秒事务处理量(transaction per second,TPS),以及感知层设备的TPS,其中,第一条长连接的TPS用于指示第一条长连接传输数据的能力,感知层设备的TPS用于指示感知层设备采集关于第三方应用的数据的能力,物联网平台根据该两个TPS,确定是否继续建立第二天长连接,若需要建立第二条长连接,则向应用层设备发送第一通知消息,即步骤G;相应的,应用层设备接收该第一通知消息,并从剩余的M-1个长连接标识中随机选择一个长连接,循环执行上述的步骤A~D;对于物联网平台来说,循环执行步骤E~G。Specifically, when the first long connection among the N long connections is established, the application layer device randomly selects one long connection identifier (for example, the i-th long connection identifier) from the M long-connection identifiers, and then, The long connection identifier is carried in the long connection establishment request message and sent to the IoT platform; correspondingly, the IoT platform receives the long connection establishment request carrying the i-th long connection identifier, that is, step E; The long connection request of the i long connection identifier performs identity authentication. For example, the long connection request carries the i-th long connection identifier, the identity of the third-party application, and the key. The IoT platform performs the identity identification of the third-party application. Identity authentication; then, the IoT platform sends a long connection establishment response message to the application layer device to successfully establish the first long connection, step F; correspondingly, the application layer device receives the long connection establishment sent by the IoT platform A response message, where the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. After that, the IoT platform determines the transaction per second (TPS) of the first long connection, and the TPS of the sensing layer device. The TPS of the first long connection is used to indicate the transmission of the first long connection. Data capability. The TPS of the sensing layer device is used to indicate the ability of the sensing layer device to collect data about third-party applications. The IoT platform determines whether to continue to establish a second-day long connection based on the two TPS. For a long connection, a first notification message is sent to the application layer device, that is, step G; correspondingly, the application layer device receives the first notification message, and randomly selects a long connection from the remaining M-1 long connection identifiers, and the cycle Steps A to D described above are performed; for the Internet of Things platform, steps E to G are performed cyclically.
上述建立N条长连接的过程中,每次建立长连接后,物联网平台都会根据已经建立的长连接的TPS,以及感知层设备的TPS,确定是否继续建立下一条长连接。例如,假设当前已经建立了2条长连接,每条长连接的TPS是100比特/秒,感知层设备上报数据的TPS是300比特/秒,则物联网平台确定出总共需要建立3条长连接,此时,物联网平台通过已建立的2条长连接中的任意一条长连接,向应用层设备发送第一通知消息,该第一通知消息用于指示应用层设备继续建立第2条长连接。建立第3条长连接后,物联网平台确定3条长连接的TPS是300比特/秒,与感知层设备上报数据的TPS是相同的。此时,物联网平台无需再向应用层设备发送第一通知消息以建立第4条长连接。In the above process of establishing N long connections, after each long connection is established, the IoT platform will determine whether to continue to establish the next long connection according to the TPS of the long connection that has been established and the TPS of the sensing layer device. For example, assuming that two long connections have been established, the TPS of each long connection is 100 bits / second, and the TPS of data reported by the sensing layer device is 300 bits / second, the IoT platform determines that a total of 3 long connections need to be established At this time, the IoT platform sends a first notification message to the application layer device through any one of the two established long connections. The first notification message is used to instruct the application layer device to continue to establish the second long connection. . After the third long connection is established, the IoT platform determines that the TPS of the three long connections is 300 bits / second, which is the same as the TPS of the data reported by the sensing layer device. At this time, the IoT platform no longer needs to send a first notification message to the application layer device to establish the fourth long connection.
本实施例中,应用层设备与物联网设备建立N条长连接的过程中,每建立一条长连接后,物联网平台均会根据已建立的长连接的TPS,与感知层设备上报的关于第三方应用的数据的TPS,确定是否需要继续建立下一条长连接,通过依次建立N条长连接,避免同时针对一个第三方应用建立多条长连接,而该多条长连接不满足第三方应用的需求,造成无法及时传输关于第三方应用的数据的弊端;或者,避免同时针对一个第三方应用建立多条长连接,该多条长连接超出第三方用的需求,造成资源浪费或影响其他第三方应用建立长连接的弊端。In this embodiment, in the process of establishing N long connections between the application layer device and the IoT device, after each long connection is established, the IoT platform will report to the perceptual layer device on the first long connection based on the established TPS of the long connection. The TPS of the three-party application data determines whether it is necessary to continue to establish the next long connection. By sequentially establishing N long connections, it is possible to avoid establishing multiple long connections for a third-party application at the same time, and the multiple long connections do not satisfy the third-party application. Requirements, resulting in the inability to transmit data about third-party applications in a timely manner; or avoid establishing multiple long connections to a third-party application at the same time, which exceed the needs of third-party applications, causing waste of resources or affecting other third parties Disadvantages of applications establishing long connections.
一种可行的实现方式中,应用层设备与物联网平台同时建立N条长连接。此时,所述应用层设备与物联网平台建立N条长连接,包括:In a feasible implementation manner, the application layer device and the IoT platform simultaneously establish N long connections. At this time, the application layer device establishes N long connections with the IoT platform, including:
应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述N个长连接标识;所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。The application layer device sends a long connection establishment request message to the IoT platform, and the long connection establishment request message carries the N long connection identifiers; the application layer device receives the long connection establishment response message sent by the IoT platform The long connection establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
具体的,对于一个具体的第三方应用,应用层设备从M个长连接标识中,选择N个长连接标识,并将N个长连接标识携带在长连接建立请求消息中发送给物联网平台;物联网平台接收到携带N个长连接标识的长连接建立请求后,对该N个长连接标识、第三方应用的身份标识等进行身份认证,认证通过后,向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。Specifically, for a specific third-party application, the application layer device selects N long connection identifiers from the M long connection identifiers, and carries the N long connection identifiers in a long connection establishment request message and sends it to the IoT platform; After the IoT platform receives a request for establishing a long connection carrying N long connection identifiers, it performs identity authentication on the N long connection identifiers, the identity of a third-party application, etc., and sends a long connection to the application layer device after the authentication is passed The establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
上述建立N条长连接的过程中,物联网平台为应用层设备上的一个第三应用分配M个 长连接标识,并将M个长连接标识携带在响应消息中发送给应用层设备,应用层设备接收到M个长连接标识后,从M个长连接标识中选择N个长连接标识,并将该N个长连接标识携带在长连接建立请求中发送给物联网平台,以同时建立N条长连接。例如,N=4,则应用层设备向物联网平台发送携带4个长连接标识的长连接建立请求消息,物联网平台接收到该长连接建立请求消息后,与应用层设备建立该4个长连接标识对应的长连接。In the above process of establishing N long connections, the IoT platform allocates M long connection identifiers for a third application on the application layer device, and carries the M long connection identifiers in a response message and sends it to the application layer device. The application layer After the device receives M persistent connection identifiers, it selects N persistent connection identifiers from the M persistent connection identifiers, and carries the N persistent connection identifiers in the persistent connection establishment request and sends them to the IoT platform to establish N concurrently. Long connection. For example, if N = 4, the application layer device sends a long connection establishment request message carrying the four long connection identifiers to the IoT platform. After receiving the long connection establishment request message, the IoT platform establishes the four long connections with the application layer device. The long connection corresponding to the connection ID.
本实施例中,应用层设备与物联网设备建立N条长连接的过程中,物联网平台确定出长连接的个数M,并将M个长连接标识发送给应用层设备。然后,应用层设备从M个长连接标识中选择出N个长连接,并与物联网平台交互,同时建立N条长连接。该过程中,应用层设备从M个长连接标识中选择出N个长连接标识,并基于该N个长连接标识为第三方应用建立N条长连接,不同的第三方应用的N条长连接不同,实现物联网平台向应用层终端设备上的第三方应用推送数据时,各个第三方应用互不影响的目的。In this embodiment, during the process of establishing N long connections between the application layer device and the IoT device, the IoT platform determines the number of long connections M, and sends the M long connection identifiers to the application layer device. Then, the application layer device selects N long connections from the M long connection identifiers, and interacts with the IoT platform to establish N long connections at the same time. In this process, the application layer device selects N permanent connection identifiers from M permanent connection identifiers, and establishes N permanent connections for third-party applications based on the N permanent connection identifiers, and N permanent connections for different third-party applications. Differently, when the IoT platform pushes data to a third-party application on the application-layer terminal device, the third-party application does not affect each other.
上述实施例中,为了避免一个第三方应用长期占用N条长连接,应用层设备与物联网平台建立N条长连接之后,接收所述物联网平台发送的第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接。In the above embodiment, in order to prevent a third-party application from occupying N long connections for a long time, after the application layer device establishes N long connections with the IoT platform, it receives a second notification message sent by the IoT platform, and the second notification The message is used to instruct the application-layer terminal device to remove at least one of the N long connections.
具体的,应用层设备与物联网平台之间建立N条长连接后,持续一定时长(如半个小时)后,物联网平台确定出感知层设备上报数据的TPS远小于N条长连接的TPS后,向应用层设备发送第二通知消息,以拆除至少一条长连接。例如,N=4,每条长连接的TPS是100比特/秒,感知层设备上报数据的TPS是200比特/秒,则物联网平台向应用层设备发送第二通知消息,通知应用层设备拆除2条长连接。应用层设备接收到第二通知消息后,与物联网平台进行信令交互以拆除4条长连接中的任意2条长连接。Specifically, after N long connections are established between the application layer device and the IoT platform, after a certain period of time (such as half an hour), the IoT platform determines that the TPS of the data reported by the sensing layer device is much smaller than the TPS of the N long connections. Then, a second notification message is sent to the application layer device to remove at least one long connection. For example, if N = 4, the TPS of each long connection is 100 bits / second, and the TPS of the data reported by the device at the sensing layer is 200 bits / second. 2 long connections. After the application layer device receives the second notification message, it performs signaling interaction with the IoT platform to remove any two of the four long connections.
本实施例中,通过物联网平台向应用层设备发送第二通知消息以拆除N条长连接中的至少一条长连接,实现及时释放第三方应用占用的资源的目的。In this embodiment, a second notification message is sent to the application layer device through the Internet of Things platform to remove at least one of the N long connections to achieve the purpose of timely releasing the resources occupied by the third-party application.
下面,用一个具体的例子对上述基于物联网的数据传输方法进行详细说明。示例性的,请参见图4。In the following, a specific example is used to describe the above-mentioned data transmission method based on the Internet of Things in detail. For example, see FIG. 4.
图4是本申请实施例提供的一种基于物联网的数据传输方法的网络逻辑架构示意图。该网络逻辑架构中,应用层设备与物联网平台建立N条长连接,物联网平台包括ELB模块、至少一个推送模块、至少一条服务总线(servce bus)、至少一个元数据服务器(meta data service)模块,至少一条服务器总线形成簇(cluster)。推送模块包括至少一个消息队列代理子模块、至少一个消息队列客户端子模块和至少一个消费子模块,每个长连接对应一个消息队列代理子模块、一个消息队列客户端子模块、一条服务总线和一个消费子模块。下面,基于图4,以物联网平台向应用层设备发送第二数据为例,对上述的基于物联网的数据传输方法进行详细说明。示例性的,以建立依次建立N条长连接为例,图4主要流程如下:FIG. 4 is a schematic diagram of a network logical architecture of a data transmission method based on the Internet of Things provided by an embodiment of the present application. In this network logical architecture, the application layer equipment establishes N long-term connections with the Internet of Things platform. The Internet of Things platform includes an ELB module, at least one push module, at least one service bus, and at least one metadata server. Modules, at least one server bus forms a cluster. The push module includes at least one message queue proxy sub-module, at least one message queue client sub-module, and at least one consumer sub-module. Each long connection corresponds to one message queue proxy sub-module, one message queue client sub-module, one service bus, and one consumer. Submodule. Next, based on FIG. 4, the above-mentioned data transmission method based on the Internet of Things will be described in detail by taking the Internet of Things platform to send second data to the application layer device as an example. Exemplarily, taking the establishment of N long connections in sequence as an example, the main flow of FIG. 4 is as follows:
201、应用层设备向ELB发送请求消息。201. The application layer device sends a request message to the ELB.
本步骤中,对于一个截图的APP,应用层设备向ELB发送请求消息以请求分配长连接标识。In this step, for a screenshot of the APP, the application layer device sends a request message to the ELB to request the allocation of a persistent connection identifier.
该步骤中,应用层设备仅发起请求消息,至于请求分配长连接标识的数量,应用层设备是无法确定的,而是由物联网平台确定。In this step, the application layer device only initiates a request message. As for the number of requests for allocation of long-connection identifiers, the application layer device cannot be determined, but is determined by the IoT platform.
202、ELB模块向元数据服务模块发送请求消息。202. The ELB module sends a request message to the metadata service module.
元数据服务模块接收到请求消息后,为上述的APP分配一定数量的长连接标识,如M个长连接标识,并将该M个长连接标识携带在响应消息中,发送给ELB模块,进而由ELB模块将该M个长连接标识发送给应用层设备(图中未示出该步骤)。ELB模块用于将应用层设备上的第三方应用接入到物联网平台与应用层设备之间的长连接中。After receiving the request message, the metadata service module assigns a certain number of persistent connection identifiers to the above-mentioned APP, such as M persistent connection identifiers, and carries the M persistent connection identifiers in the response message, and sends it to the ELB module. The ELB module sends the M long connection identifiers to the application layer device (this step is not shown in the figure). The ELB module is used to connect a third-party application on the application layer device to a long connection between the IoT platform and the application layer device.
203、应用层设备与ELB模块交互以完成长连接的建立及订阅请求。203. The application layer device interacts with the ELB module to complete the establishment of the long connection and the subscription request.
204、ELB模块与物联网平台中的消息队列代理子模块交互以完成长连接的建立及订阅。204. The ELB module interacts with the message queue agent sub-module in the IoT platform to complete the establishment and subscription of the long connection.
205、物联网平台中的消息队列代理子模块与元数据服务模块交互以完成长连接的认证。205. The message queue agent sub-module in the IoT platform interacts with the metadata service module to complete the authentication of the long connection.
上述步骤203~205中,详细过程如下:In the above steps 203 to 205, the detailed process is as follows:
长连接标识获取阶段:应用层设备通过ELB模块将长连接建立请求发送给物联网平台的推送模块中的消息队列(message queue,MQ)代理(broker)子模块,MQ broker子模块为第三方应用分配M个长连接标识,并将该M个长连接标识携带在响应消息里通过ELB模块发送给应用层设备。Long connection identity acquisition phase: The application layer device sends the long connection establishment request to the message queue (MQ) broker sub-module in the push module of the IoT platform through the ELB module. The MQ broker sub-module is a third-party application. Allocate M long connection identifiers, and carry the M long connection identifiers in a response message and send them to the application layer device through the ELB module.
长连接建立阶段(建立第一天长连接):应用层设备为第三方应用选择一个长连接标识。通过ELB模块向MQ broker发送长连接建立请求,该长连接建立请求携带第三方应用的身份标识、长连接标识、秘钥等。MQ broker子模块向元数据服务(meta data service)模块发送认证请求,元数据服务器模块对第三方应用的身份标识、长连接标识等进行认证。认证通过后,元数据服务模块向MQ broker子模块发送认证通过响应消息,MQ broker子模块人为成功建立长连接,通过ELB模块向应用层设备发送长连接建立响应消息。Long connection establishment phase (the first day long connection is established): the application layer device selects a long connection identifier for the third-party application. Send a permanent connection establishment request to the MQ broker through the ELB module. The long connection establishment request carries the identity, long-term connection identifier, secret key, etc. of the third-party application. The MQ broker sub-module sends an authentication request to the metadata service module, and the metadata server module authenticates the identity of the third-party application, the identity of the persistent connection, and the like. After the authentication is passed, the metadata service module sends an authentication pass response message to the MQbroker submodule. The MQbroker submodule successfully establishes a long connection artificially, and sends a long connection establishment response message to the application layer device through the ELB module.
该过程中,通过物联网平台为第三方应用分配长连接标识,实现物联网平台控制长连接数量的目的。In this process, the long-distance connection identifier is allocated to the third-party application through the Internet of Things platform, so as to achieve the purpose of the Internet of Things platform to control the number of long-connections.
206、元数据服务模块向服务总线发送第二数据。206. The metadata service module sends the second data to the service bus.
207、消费子模块到服务总线拉取数据。207. The consumption submodule pulls data from the service bus.
208、消费子模块将第二数据推送给消息队列客户端子模块。208: The consumption submodule pushes the second data to the message queue client submodule.
209、消息队列客户端子模块将第二数据推送给MQ broker子模块。209. The message queue client sub-module pushes the second data to the MQ broker sub-module.
之后,MQ broker子模块向通过长连接将第二数据推送给ELB模块,由ELB模块进一步的通过长连接将第二数据推送给应用层设备。应用层设备接收到关于第三方应用的第二数据之后,根据服务质量(quality of service,QoS)等,向物联网平台回复确认消息。After that, the MQ broker sub-module pushes the second data to the ELB module through the long connection, and the ELB module further pushes the second data to the application layer device through the long connection. After the application layer device receives the second data about the third-party application, it responds to the IoT platform with a confirmation message according to the quality of service (QoS).
本申请实施例中,建立长连接的过程中,感知层设备上报数据的TPS和已经建立的长连接的TPS,确定是否需要建立下一条长连接或是否需要拆除已建立的长连接,通过自动增加或减少长连接的数量,达到自适应管理长连接的能力,提升了物联网平台的弹性。进一步的,建立了多条长连接之后,对于一个第二数据,元数据服务模块只选择一条长链路将该第二数据推送给服务总线,进而被一个消费子模块拉取并推送指消息队列客户端子模块,每个第二数据的头域中增加额外字段,如消息队列网关身份标识(message gateway identity,MSGID),第三方应用可以根据该MSGID来识别消息的唯一性。也就是说,消息队列客户端子模块中的第二数据是互不相同的,每个长连接传输的第二数据不同,避免数据重复推送的弊端。另外,上述数据传输过程中,每个第三方应用对应唯一一个消息队列代理子模块、一个消息队列客户端子模块和服务总线簇中的一条服务总线,来自服务总线 中第二数据按时间顺序别推送至消息队列代理子模块,从而保证时序性。In the embodiment of the present application, during the process of establishing a long connection, the TPS of the data reported by the sensing layer device and the TPS of the established long connection determine whether the next long connection needs to be established or whether the established long connection needs to be dismantled. Or reduce the number of long connections, achieve the ability to adaptively manage long connections, and improve the flexibility of the IoT platform. Further, after establishing multiple long connections, for a piece of second data, the metadata service module selects only one long link to push the second data to the service bus, which is then pulled by a consumer submodule and pushed to the message queue In the client submodule, additional fields are added in the header field of each second data, such as a message queue gateway identity (MSGID), and a third-party application can identify the uniqueness of the message according to the MSGID. In other words, the second data in the message queue client submodule is different from each other, and the second data transmitted by each long connection is different, so as to avoid the disadvantages of repeated data push. In addition, during the above data transmission process, each third-party application corresponds to a single message queue proxy submodule, a message queue client submodule, and a service bus in the service bus cluster. The second data from the service bus is not pushed in chronological order. To the message queue agent sub-module to ensure timing.
需要说明的是,虽然上述实施例中,是将消息队列代理子模块作为推送模块的子模块对本申请所述方法进行详细说明的,然而,本申请实施例并不限制,例如,消息队列代理子模块、消息队列客户端子模块等也可以与推送模块独立部署。It should be noted that, although the message queue agent submodule is used as a submodule of the push module to describe the method described in this embodiment in detail in the above embodiment, the embodiment of the present application is not limited, for example, the message queue agent submodule Modules, message queue client submodules, etc. can also be deployed independently of the push module.
下面,对上述图4中,建立第1条长连接后,如何推送数据并建立剩下的长连接进行详细说明。具体的,可参见图5,图5是本申请实施例提供的一种基于物联网的数据传输方法适用的依次建立长连接的逻辑示意图,该逻辑架构中,消息队列代理模块和推送模块独立设置,物联网平台还包括确定模块,本实施例的主要流程如下:Next, how to push data and establish the remaining long connections after the first long connection is established in FIG. 4 described above is described in detail. Specifically, reference may be made to FIG. 5, which is a logical schematic diagram of sequentially establishing a long connection applicable to an Internet of Things-based data transmission method provided in an embodiment of the present application. In this logical architecture, the message queue proxy module and the push module are independently set The IoT platform also includes a determination module. The main process of this embodiment is as follows:
301、推送模块到服务总线拉取第二数据。301: Push the module to the service bus to pull the second data.
示例性的,感知层设备通过云接入网关(cloud interworking gateway,CIG)接入物联网平台的元数据服务模块,元数据服务模块存储感知层设备采集的第二数据,并向服务总线推送第二数据。建立第1条长连接后,推送模块到服务总线拉取数据。Exemplarily, the sensing layer device accesses the metadata service module of the IoT platform through a cloud access gateway (CIG). The metadata service module stores the second data collected by the sensing layer device, and pushes the first data to the service bus. Two data. After the first long connection is established, push the module to the service bus to pull data.
302、推送模块将第二数据推送给消息队列代理模块。302: The push module pushes the second data to the message queue proxy module.
303、消息队列代理模块将第二数据推送给ELB模块。303. The message queue proxy module pushes the second data to the ELB module.
304、应用层设备向ELB模块发送ACK消息。304. The application layer device sends an ACK message to the ELB module.
305、ELB模块向消息队列代理模块发送ACK消息。305. The ELB module sends an ACK message to the message queue agent module.
306、消息队列代理模块向推送模块发送ACK消息。306. The message queue proxy module sends an ACK message to the push module.
上述步骤301~306中,推送模块通过已经建立的第1条长连接向应用层设备上的第三方应用推送第二数据。In the above steps 301 to 306, the push module pushes the second data to the third-party application on the application layer device through the established first long connection.
307、推送模块向确定模块发送请求确定TPS的消息。307. The push module sends a message requesting to determine the TPS to the determination module.
本步骤中,接收到请求确定TPS的消息后,确定模块确定第1条长连接的TPS,以及感知层设备上报数据的TPS。In this step, after receiving the message requesting the determination of the TPS, the determination module determines the TPS of the first long connection and the TPS of the data reported by the sensing layer device.
示例性的,物联网平台根据平均时延等,计算第1条长连接接收数据的能力,并将该能力转换为TPS。Exemplarily, the IoT platform calculates the ability of the first long connection to receive data according to the average delay and the like, and converts the ability to TPS.
感知层设备上报第二数据到物联网平台的元数据服务模块,元数据服务模块将第二数据推送给服务总线,确定模块统计出关于第三方应用的第二数据,根据统计结果得到感知层设备上报的关于第三方应用的第二数据的TPS。然后,确定模块比较该两个TPS,如果感知层设备上报数据的TPS超过第1条长连接的TPS的某个倍数值(可配置,如1.2),并且持续一段时间,如半个小时,则确定模块确定向应用层设备发送第一通知消息,以通知应用层设备继续建立下一条长连接。The perception layer device reports the second data to the metadata service module of the IoT platform. The metadata service module pushes the second data to the service bus, the determination module counts the second data about the third-party application, and obtains the perception layer device according to the statistical result. The TPS of the second data reported about the third-party application. Then, the determination module compares the two TPS. If the TPS of the data reported by the sensing layer device exceeds a certain multiple of the TPS of the first long connection (configurable, such as 1.2), and continues for a period of time, such as half an hour, then The determining module determines to send a first notification message to the application layer device to notify the application layer device to continue to establish the next long connection.
308、确定模块向推送模块发送第一通知消息。308. The determining module sends a first notification message to the pushing module.
推送模块接收到第一通知消息后,将该第一通知消息通过已建立的长连接(如第1条长连接)发送给应用层设备。示例性的,可以对该第一通知消息设置固定头域,该固定头域包含一个长连接标识,应用层设备解析该头域,与物联网平台建立该长连接标识对应的长连接。After receiving the first notification message, the push module sends the first notification message to the application layer device through the established long connection (such as the first long connection). Exemplarily, a fixed header field may be set for the first notification message. The fixed header field includes a long connection identifier, and the application layer device parses the header field and establishes a long connection corresponding to the long connection identifier with the Internet of Things platform.
另外,上述步骤307中,如果感知层设备上报数据的TPS小于第1条长连接的TPS的某个倍数值,且持续一段时间,则确定模块向应用层设备发送第二通知消息,以拆除第1条长连接。每次建立一条新的长连接后,均循环执行306~308,以依次建立N条长连接。In addition, in the above step 307, if the TPS of the data reported by the sensing layer device is less than a certain multiple of the TPS of the first long connection and continues for a period of time, the determining module sends a second notification message to the application layer device to remove the first 1 long connection. Each time a new long connection is established, 306 to 308 are executed cyclically to establish N long connections in turn.
下面,对上述实施例中,物联网平台如何进行安全认证进行详细说明。示例性的,可 参见图6。图6是本申请实施例提供的一个基于物联网的数据传输方法所适用的认证流程图,包括:In the following, how the Internet of Things platform performs security authentication is described in detail. For example, see FIG. 6. FIG. 6 is an authentication flowchart applicable to an Internet of Things-based data transmission method according to an embodiment of the present application, including:
长连接标识获取阶段:Persistent ID acquisition phase:
401、应用层设备向ELB模块发送请求消息。401. An application layer device sends a request message to an ELB module.
本步骤中,应用层设备向ELB模块发送携带第三方应用的身份标识(APP ID)的请求消息。该请求消息例如为HTTP请求。In this step, the application layer device sends a request message carrying the identity (APP ID) of the third-party application to the ELB module. The request message is, for example, an HTTP request.
402、ELB模块向元数据服务模块发送请求消息。402. The ELB module sends a request message to the metadata service module.
403、元数据服务模块向ELB模块发送200OK消息。403. The metadata service module sends a 200 OK message to the ELB module.
元数据服务模块为第三方应用分配M个长连接标识,并将该M个长连接标识携带在200OK消息中发送给ELB模块。The metadata service module allocates M persistent connection identifiers to the third-party application, and sends the M persistent connection identifiers to the ELB module in a 200 OK message.
404、ELB模块向应用层设备发送200OK消息。404. The ELB module sends a 200 OK message to the application layer device.
长连接建立阶段:Long connection establishment phase:
405、应用层设备向ELB模块发送长连接建立请求消息。405. The application layer device sends a persistent connection establishment request message to the ELB module.
本步骤中,应用层设备将第三方应用的身份标识、秘钥以及长连接标识等,携带在长连接建立请求消息中发送给ELB。In this step, the application layer device sends the identity identifier, the secret key, and the persistent connection identifier of the third-party application to the ELB in a persistent connection establishment request message.
406、ELB模块向消息队列代理模块发送长连接建立请求消息。406. The ELB module sends a persistent connection establishment request message to the message queue agent module.
407、消息队列代理模块向推送模块发送鉴权回调消息。407. The message queue proxy module sends an authentication callback message to the push module.
408、推送模块向元数据服务模块发送鉴权请求消息。408. The push module sends an authentication request message to the metadata service module.
409、元数据服务模块向推送模块发送鉴权响应消息。409. The metadata service module sends an authentication response message to the push module.
410、推送模块向消息队列代理模块发送长连接成功建立回调消息。410: The push module sends a long connection successful establishment callback message to the message queue agent module.
411、消息队列代理模块向ELB模块发送鉴权成功响应消息。411. The message queue proxy module sends an authentication success response message to the ELB module.
412、ELB模块向应用层设备发送鉴权成功响应消息。412. The ELB module sends an authentication success response message to the application layer device.
413、推送模块向元数据服务模块发送状态更新消息。413: The push module sends a status update message to the metadata service module.
本步骤中,推送模块向元数据服务模块发送状态更新消息,以使得元数据服务模块更新应用层设备的第三方应用的状态,如成功建立长连接等。In this step, the push module sends a status update message to the metadata service module, so that the metadata service module updates the status of the third-party application of the application layer device, such as successfully establishing a long connection.
需要说明的是,上述的步骤410和413并无严格的先后顺序。It should be noted that there is no strict sequence of the above steps 410 and 413.
订阅阶段:Subscription phase:
414、应用层设备向ELB发送订阅请求。414. The application layer device sends a subscription request to the ELB.
长连接成功建立后,本步骤中,应用层设备将长连接标识、消息队列标识以及第三方应用的标识等携带在订阅请求中发送给ELB模块。After the long connection is successfully established, in this step, the application layer device carries the long connection identifier, the message queue identifier, and the identifier of the third-party application to the ELB module in a subscription request.
415、ELB向消息队列代理模块发送订阅请求,该订阅请求携带长连接标识、消息队列的标识以及第三方应用的身份标识等。415. The ELB sends a subscription request to the message queue proxy module, where the subscription request carries a long-connection identifier, an identifier of the message queue, and an identity identifier of a third-party application.
415、消息队列代理模块向推送模块发送授权回调消息。415. The message queue proxy module sends an authorization callback message to the push module.
416、推送模块向元数据服务模块发送校验消息。416. The push module sends a verification message to the metadata service module.
418、元数据服务模块向推送模块发送校验响应消息。418. The metadata service module sends a verification response message to the push module.
419、推送模块向消息队列代理模块发送订阅成功回调消息。419. The push module sends a subscription success callback message to the message queue agent module.
420、消息队列代理模块向ELB模块发送订阅成功响应消息。420: The message queue proxy module sends a subscription success response message to the ELB module.
421、ELB模块向应用层设备发送订阅成功响应消息。421. The ELB module sends a subscription success response message to the application layer device.
数据推送阶段:Data push phase:
422、元数据服务模块向服务总线上报第二数据。422. The metadata service module reports the second data to the service bus.
423、消费模块从服务总线拉取第二数据。423. The consumption module pulls the second data from the service bus.
本步骤中,消费模块通过一条长连接从服务总线拉取第二数据。In this step, the consumption module pulls the second data from the service bus through a long connection.
424、推送模块从消费模块获取第二数据。424. The push module obtains the second data from the consumption module.
本步骤中,消费模块按照时间顺序将第二数据推送给推送模块。In this step, the consumption module pushes the second data to the push module in chronological order.
425、推送模块向消息队列模块推动第二数据。425: The push module pushes the second data to the message queue module.
426、消息队列代理模块向ELB模块推送第二数据。426. The message queue agent module pushes the second data to the ELB module.
427、ELB模块向应用层设备推送第二数据。427. The ELB module pushes the second data to the application layer device.
之后,应用层设备向ELB回复Ok消息等,图中未示出。After that, the application layer device sends an OK message to the ELB, which is not shown in the figure.
长连接异常阶段:Long connection abnormal phase:
428、消息队列代理模块检测到长连接异常。428. The message queue agent module detects an abnormal long connection.
429、消息队列代理模块向推送模块发送长连接异常消息。429. The message queue proxy module sends a persistent connection exception message to the push module.
430、推送模块向消费模块发送长连接注销消息。430: The push module sends a long connection logout message to the consumption module.
本步骤中,推送模块向消费模块发送长连接注销消息(例如上述的第二通知消息)。In this step, the push module sends a long connection logout message (for example, the above-mentioned second notification message) to the consumption module.
431、消费模块向服务总线发送长连接注销消息。431: The consumption module sends a long connection logout message to the service bus.
接收到长连接注销消息后,服务总线注销该长连接。After receiving the persistent connection logout message, the service bus logs off the persistent connection.
若长连接异常阶段,所有的长连接或部分长连接发生异常,最终被拆除,导致没有长连接,或者剩余的长连接无法满足第三方应用的数据需求,则重复上述的长连接标识获取阶段、长连接建立阶段、订阅阶段重新建立并订阅长连接,然后再推送数据。If the long connection is abnormal, all or some of the long connections are abnormal and eventually dismantled, resulting in no long connection, or the remaining long connection cannot meet the data requirements of the third-party application, repeat the above long connection identification acquisition phase, The long connection establishment phase, the subscription phase re-establishes and subscribes to the long connection, and then pushes the data.
图7为本申请实施例提供的一种通信装置的结构示意图。本实施例所涉及的通信装置可以为应用层设备,也可以为应用于应用层设备的芯片。该通信装置可以用于执行上述方法实施例中应用层设备的功能。如图7所示,该通信装置可以包括:处理模块11和收发模块12。其中,FIG. 7 is a schematic structural diagram of a communication device according to an embodiment of the present application. The communication device involved in this embodiment may be an application layer device or a chip applied to an application layer device. The communication apparatus may be configured to execute a function of an application layer device in the foregoing method embodiment. As shown in FIG. 7, the communication device may include a processing module 11 and a transceiver module 12. among them,
处理模块11,用于与物联网平台建立N条长连接,所述N≥2,且为整数;A processing module 11 configured to establish N long connections with the IoT platform, where N≥2, and is an integer;
收发模块12,用于通过处理模块11建立的所述N条长连接向所述物联网平台发送第一数据,或者,通过所述处理模块11建立的所述N条长连接接收所述物联网平台发送的第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。The transceiver module 12 is configured to send first data to the IoT platform through the N long connections established by the processing module 11, or receive the IoT through the N long connections established by the processing module 11. The second data sent by the platform, the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
一种可行的设计中,所述处理模块11和所述收发模块12,具体用于循环执行A-D,直至与所述物联网平台建立所述N条长连接,所述A-D包括:In a feasible design, the processing module 11 and the transceiver module 12 are specifically configured to execute A-D in a loop until the N long-term connections are established with the IoT platform, and the A-D includes:
A、所述处理模块11从M个长连接标识中,选择第i个长连接标识,所述第i个长连接标识是所述M个长连接标识中的任意一个,1≤i≤N;A. The processing module 11 selects an i-th long connection identifier from M long-connection identifiers, where the i-th long-connection identifier is any one of the M long-connection identifiers, 1≤i≤N;
B、所述收发模块12向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述第i个长连接标识;B. The transceiver module 12 sends a long connection establishment request message to the IoT platform, where the long connection establishment request message carries the i-th long connection identifier;
C、所述收发模块12接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;C. The transceiver module 12 receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long corresponding to the i-th long connection identifier is successfully established. connection;
D、所述收发模块12接收所述物联网平台通过所述第i条长连接发送的第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接。D. The transceiver module 12 receives a first notification message sent by the IoT platform through the i-th long connection, and the first notification message is used to instruct the application layer device to continue to establish a next long connection.
一种可行的设计中,所述处理模块11,具体用于从M个长连接标识中,选择N个长 连接标识;所述收发模块12,用于向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述N个长连接标识,接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。In a feasible design, the processing module 11 is specifically configured to select N long connection identifiers from M long connection identifiers; and the transceiver module 12 is configured to send a long connection establishment request to the IoT platform Message, the persistent connection establishment request message carries the N persistent connection identifiers, and receives a persistent connection establishment response message sent by the IoT platform, where the persistent connection establishment response message is used to indicate to the application layer device that the establishment is successful The long connections corresponding to the N long connections are identified.
一种可行的设计中,所述收发模块12,在所述处理模块11与物联网平台建立N条长连接之后,还用于接收所述物联网平台发送的第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接;In a feasible design, the transceiver module 12 is further configured to receive a second notification message sent by the IoT platform after the processing module 11 establishes N long-term connections with the IoT platform. The notification message is used to instruct the application-layer terminal device to remove at least one of the N long connections;
所述处理模块,还用于根据所述第二通知消息,拆除所述N条长连接中的至少一条长连接。The processing module is further configured to remove at least one of the N long connections according to the second notification message.
一种可行的设计中,所述收发模块12,在所述处理模块11与物联网平台建立N条长连接之前,还用于向所述物联网平台发送请求消息,所述请求消息用于请求长连接标识;接收所述物联网平台发送的响应消息,所述响应消息携带所述M个长连接标识,M≥N。In a feasible design, the transceiver module 12 is further configured to send a request message to the IoT platform before the processing module 11 establishes N long connections with the IoT platform, and the request message is used to request Long connection identifier; receiving a response message sent by the IoT platform, the response message carrying the M long connection identifiers, M≥N.
一种可行的设计中,所述处理模块11,在所述物联网平台包括多个分布式物联网平台时,与所述多个分布式物联网平台中的一个或多个分布式物联网平台建立所述N条长连接。In a feasible design, when the IoT platform includes multiple distributed IoT platforms, the processing module 11 communicates with one or more of the multiple distributed IoT platforms. Establishing the N long connections.
一种可行的设计中,所述应用层设备包括终端设备或应用服务器。In a feasible design, the application layer device includes a terminal device or an application server.
本申请实施例提供的通信装置,可以执行上述方法实施例中应用层设备的动作,其实现原理和技术效果类似,在此不再赘述。The communication device provided in the embodiment of the present application can perform the actions of the application layer device in the foregoing method embodiments. The implementation principles and technical effects are similar, and details are not described herein again.
图8为本申请实施例提供的一种通信装置的结构示意图。本实施例所涉及的通信装置可以为物联网平台,也可以为应用于物联网平台的芯片。该通信装置可以用于执行上述方法实施例中物联网平台的功能。如图8所示,该通信装置可以包括:处理模块21和收发模块22。其中,FIG. 8 is a schematic structural diagram of a communication device according to an embodiment of the present application. The communication device involved in this embodiment may be an IoT platform or a chip applied to the IoT platform. The communication device may be configured to execute a function of the Internet of Things platform in the foregoing method embodiment. As shown in FIG. 8, the communication device may include a processing module 21 and a transceiver module 22. among them,
处理模块21,用于与应用层设备建立N条长连接,所述N≥2;A processing module 21, configured to establish N long connections with the application layer device, where N≥2;
收发模块22,用于通过所述处理模块21建立的所述N条长连接接收所述应用层设备发送的第一数据,或者,通过所述处理模块21建立的所述N条长连接向所述物联网平台发送第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。The transceiver module 22 is configured to receive the first data sent by the application layer device through the N long connections established by the processing module 21, or send the N long connections to the network through the N long connections established by the processing module 21. The IoT platform sends second data, and the first data and the second data are data interacting between a third-party application loaded on the application layer device and the IoT platform.
一种可行的设计中,所述处理模块21和所述收发模块22用于循环执行E-G,直至于所述应用层设备建立所述N条长连接,所述E-G包括:In a feasible design, the processing module 21 and the transceiver module 22 are configured to perform E-G in a loop until the application layer device establishes the N long connections, and the E-G includes:
E、所述收发模块22接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带第i个长连接标识,所述第i个长连接标识是所述应用层设备从所述N个长连接标识中选择出的任意一个长连接标识,1≤i≤N;E. The transceiver module 22 receives a persistent connection establishment request message sent by the application layer device. The persistent connection establishment request message carries an i-th persistent connection identifier, and the i-th persistent connection identifier is the application layer device. Any one of the long connection identifiers selected from the N long connection identifiers, 1≤i≤N;
F、所述收发模块22向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;F. The transceiver module 22 sends a long connection establishment response message to the application layer device, where the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. ;
G、所述处理模块21确定已建立的长连接的每秒事务处理量TPS,以及感知层设备的TPS,根据所述已建立的长连接的TPS与所述感知层设备的TPS,确定是否向所述应用层设备发送第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;G. The processing module 21 determines the TPS of the established long connection transaction per second and the TPS of the sensing layer device, and determines whether to forward the TPS of the established long connection and the TPS of the sensing layer device. Sending, by the application layer device, a first notification message, where the first notification message is used to instruct the application layer device to continue to establish a next long connection;
循环执行E-G,直至于所述应用层设备建立所述N条长连接。E-G is executed cyclically until the N long connections are established by the application layer device.
一种可行的设计中,所述处理模块21在与应用层设备建立N条长连接时,具体用于利用所述收发模块22,向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层设备建立N条长连接;接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带所述N条长连接;向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。In a feasible design, the processing module 21 is specifically configured to use the transceiver module 22 to send a second notification message to the application layer device when establishing N long-term connections with the application layer device. The notification message is used to instruct the application layer device to establish N long connections; receive a long connection establishment request message sent by the application layer device, and the long connection establishment request message carries the N long connections; to the application layer The device sends a long connection establishment response message, and the long connection establishment response message is used to indicate to the application layer device that the long connections corresponding to the N long connection identifiers are successfully established.
一种可行的设计中,所述收发模块22,在所述处理模块21与应用层设备建立N条长连接之后,还用于向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接。In a feasible design, the transceiver module 22 is further configured to send a second notification message to the application layer device after the processing module 21 establishes N long-term connections with the application layer device. The message is used to instruct the application-layer terminal device to remove at least one of the N long connections.
一种可行的设计中,所述收发模块22,在所述处理模块21与应用层设备建立N条长连接之前,还用于接收应用层设备发送的请求消息,所述请求消息用于请求长连接标识;向所述应用层设备发送响应消息,所述响应消息携带所述M个长连接标识,M≥N。In a feasible design, before the processing module 21 establishes N long connections with the application layer device, the transceiver module 22 is further configured to receive a request message sent by the application layer device, and the request message is used to request the long Connection identifier; sending a response message to the application layer device, the response message carrying the M long connection identifiers, M≥N.
一种可行的设计中,所述处理模块21,在所述物联网平台包括多个分布式物联网平台时,控制所述多个分布式物联网平台中的一个或多个分布式物联网平台与所述应用层设备建立所述N条长连接。In a feasible design, when the IoT platform includes multiple distributed IoT platforms, the processing module 21 controls one or more distributed IoT platforms in the multiple distributed IoT platforms. Establishing the N long connections with the application layer device.
本申请实施例提供的通信装置,可以执行上述方法实施例中物联网平台的动作,其实现原理和技术效果类似,在此不再赘述。The communication device provided in the embodiment of the present application can perform the actions of the IoT platform in the foregoing method embodiments. The implementation principles and technical effects are similar, and details are not described herein again.
需要说明的是,应理解以上收发模块实际实现时可以为收发器。而处理模块可以以软件通过处理元件调用的形式实现;也可以以硬件的形式实现。例如,处理模块可以为单独设立的处理元件,也可以集成在上述装置的某一个芯片中实现,此外,也可以以程序代码的形式存储于上述装置的存储器中,由上述装置的某一个处理元件调用并执行以上处理模块的功能。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。It should be noted that it should be understood that when the above transceiver module is actually implemented, it may be a transceiver. The processing module can be implemented in the form of software calling through processing elements; it can also be implemented in the form of hardware. For example, the processing module may be a separately established processing element, or it may be integrated and implemented in a certain chip of the above-mentioned device. In addition, it may also be stored in the memory of the above-mentioned device in the form of a program code. Invoke and execute the functions of the above processing modules. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described herein may be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules may be completed by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital signal processor (DSP), or one or more field programmable gate array (FPGA). As another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. As another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
图9为本申请实施例提供的一种通信装置的结构示意图。如图9所示,该通信装置30可以包括:处理器31(例如CPU)、存储器32、收发器33;收发器33耦合至处理器31,处理器31控制收发器33的接收动作;存储器32可能包含高速随机存取存储器(random-access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器32中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方法步骤。可选的,本申请涉及的通信装置还可以包括:电源34、通信总线35以及通信端口36。收发器33可以集成在通信装置的收发信机中,也可以为通信装置上独立的收发天线。通信总线35用于实现元件之 间的通信连接。上述通信端口36用于实现通信装置与其他外设之间进行连接通信。FIG. 9 is a schematic structural diagram of a communication device according to an embodiment of the present application. As shown in FIG. 9, the communication device 30 may include: a processor 31 (such as a CPU), a memory 32, and a transceiver 33; the transceiver 33 is coupled to the processor 31, and the processor 31 controls the receiving action of the transceiver 33; the memory 32 May include high-speed random access memory (random-access memory, RAM), and may also include non-volatile memory (non-volatile memory (NVM)), such as at least one disk memory. The memory 32 may store various instructions to It is used to complete various processing functions and implement the method steps of the present application. Optionally, the communication device involved in this application may further include a power source 34, a communication bus 35, and a communication port 36. The transceiver 33 may be integrated in the transceiver of the communication device, or may be an independent transceiver antenna on the communication device. The communication bus 35 is used to implement a communication connection between the components. The communication port 36 is used to implement connection and communication between the communication device and other peripheral devices.
在本申请实施例中,上述存储器32用于存储计算机可执行程序代码,程序代码包括指令;当处理器31执行指令时,指令使通信装置的处理器31执行上述方法实施例中应用层设备的处理动作,使收发器33执行上述实施例中应用层设备的收发动作,其实现原理和技术效果类似,在此不再赘述。In the embodiment of the present application, the memory 32 is used to store computer-executable program code, and the program code includes instructions. When the processor 31 executes the instructions, the instructions cause the processor 31 of the communication device to execute the application-layer device in the foregoing method embodiment. The processing action causes the transceiver 33 to perform the sending and receiving actions of the application layer device in the foregoing embodiment, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
图10为本申请实施例提供的一种通信装置的结构示意图。如图10所示,该通信装置40可以包括:处理器41(例如CPU)、存储器42、收发器43;收发器43耦合至处理器41,处理器41控制收发器43的收发动作;存储器42可能包含高速随机存取存储器(random-access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器42中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方法步骤。可选的,本申请涉及的通信装置还可以包括通信总线44。收发器43可以集成在通信装置的收发信机中,也可以为通信装置上独立的收发天线。通信总线44用于实现元件之间的通信连接。上述通信端口46用于实现通信装置与其他外设之间进行连接通信。FIG. 10 is a schematic structural diagram of a communication device according to an embodiment of the present application. As shown in FIG. 10, the communication device 40 may include: a processor 41 (such as a CPU), a memory 42, and a transceiver 43; the transceiver 43 is coupled to the processor 41, and the processor 41 controls the transmitting and receiving actions of the transceiver 43; the memory 42 It may include high-speed random-access memory (RAM), or it may also include non-volatile memory (NVM), such as at least one disk memory, and various instructions can be stored in the memory 42 to It is used to complete various processing functions and implement the method steps of the present application. Optionally, the communication device involved in this application may further include a communication bus 44. The transceiver 43 may be integrated in the transceiver of the communication device, or may be an independent transceiver antenna on the communication device. The communication bus 44 is used to implement a communication connection between the components. The communication port 46 is used to implement connection and communication between the communication device and other peripheral devices.
在本申请实施例中,上述存储器42用于存储计算机可执行程序代码,程序代码包括指令;当处理器41执行指令时,指令使通信装置的处理器41执行上述实施例或可选实施例中物联网平台的处理动作,使收发器43执行上述方法实施例中物联网平台的接收动作,其实现原理和技术效果类似,在此不再赘述。In the embodiment of the present application, the above-mentioned memory 42 is configured to store computer-executable program code, and the program code includes instructions. When the processor 41 executes the instructions, the instructions cause the processor 41 of the communication device to execute the above-mentioned embodiment or the optional embodiment. The processing action of the Internet of Things platform causes the transceiver 43 to perform the receiving action of the Internet of Things platform in the above method embodiment. The implementation principles and technical effects are similar, which are not described again here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center via a wired (e.g., Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integrations. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk (SSD)), and the like.
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。The term "plurality" herein refers to two or more. The term "and / or" in this document is only a kind of association relationship describing related objects, which means that there can be three kinds of relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and exists alone B these three cases. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship; in the formula, the character "/" indicates that the related objects are a "divide" relationship.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It can be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application.
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It can be understood that, in the embodiment of the present application, the size of the sequence numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not deal with the implementation of this application. The implementation process of the example constitutes any limitation.

Claims (19)

  1. 一种基于物联网的数据传输方法,其特征在于,包括:A data transmission method based on the Internet of Things, which is characterized by:
    应用层设备与物联网平台建立N条长连接,所述N≥2,且为整数;The application layer device establishes N long connections with the IoT platform, where N≥2, and is an integer;
    所述应用层设备通过所述N条长连接向所述物联网平台发送第一数据,或者,通过所述N条长连接接收所述物联网平台发送的第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。The application layer device sends first data to the IoT platform through the N long connections, or receives second data sent by the IoT platform through the N long connections, and the first data and The second data is data interacting between a third-party application loaded on the application layer device and the IoT platform.
  2. 根据权利要求1所述的方法,其特征在于,所述应用层设备与物联网平台建立N条长连接,包括:The method according to claim 1, characterized in that the application layer device establishes N long connections with the IoT platform, comprising:
    A、所述应用层设备从M个长连接标识中,选择第i个长连接标识,所述第i个长连接标识是所述M个长连接标识中的任意一个,1≤i≤N;A. The application layer device selects an i-th long connection identifier from M long-connection identifiers, where the i-th long-connection identifier is any one of the M long-connection identifiers, 1≤i≤N;
    B、所述应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述第i个长连接标识;B. The application layer device sends a persistent connection establishment request message to the IoT platform, where the persistent connection establishment request message carries the i-th persistent connection identifier;
    C、所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;C. The application layer device receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long corresponding to the i-th long connection identifier is successfully established. connection;
    D、所述应用层设备接收所述物联网平台通过所述第i条长连接发送的第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;D. The application layer device receives a first notification message sent by the IoT platform through the i-th long connection, and the first notification message is used to instruct the application layer device to continue to establish a next long connection;
    循环执行A-D,直至与所述物联网平台建立所述N条长连接。A-D is executed cyclically until the N long connections are established with the IoT platform.
  3. 根据权利要求1所述的方法,其特征在于,所述应用层设备与物联网平台建立N条长连接,包括:The method according to claim 1, characterized in that the application layer device establishes N long connections with the IoT platform, comprising:
    所述应用层设备从M个长连接标识中,选择N个长连接标识;The application layer device selects N long connection identifiers from M long connection identifiers;
    所述应用层设备向所述物联网平台发送长连接建立请求消息,所述长连接建立请求消息携带所述N个长连接标识;The application layer device sends a long connection establishment request message to the IoT platform, and the long connection establishment request message carries the N long connection identifiers;
    所述应用层设备接收所述物联网平台发送的长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。The application layer device receives a long connection establishment response message sent by the IoT platform, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the N long connection identifiers is successfully established.
  4. 根据权利要求1~3任一项所述的方法,其特征在于,所述应用层设备与物联网平台建立N条长连接之后,还包括:The method according to any one of claims 1 to 3, wherein after the application layer device establishes N long connections with the Internet of Things platform, the method further comprises:
    所述应用层设备接收所述物联网平台发送的第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接;Receiving, by the application layer device, a second notification message sent by the IoT platform, where the second notification message is used to instruct the application layer terminal device to remove at least one of the N long connections;
    所述应用层设备根据所述第二通知消息,拆除所述N条长连接中的至少一条长连接。The application layer device removes at least one long connection among the N long connections according to the second notification message.
  5. 根据权利要求2~4任一项所述的方法,其特征在于,所述应用层设备与物联网平台建立N条长连接之前,还包括:The method according to any one of claims 2 to 4, before the application layer device and the IoT platform establish N long connections, further comprising:
    所述应用层设备向所述物联网平台发送请求消息,所述请求消息用于请求长连接标识;The application layer device sends a request message to the IoT platform, the request message is used to request a long connection identifier;
    所述应用层设备接收所述物联网平台发送的响应消息,所述响应消息携带所述M个长连接标识,M≥N。The application layer device receives a response message sent by the Internet of Things platform, and the response message carries the M long connection identifiers, M≥N.
  6. 根据权利要求1~5任一项所述的方法,其特征在于,所述应用层设备与物联网平台建立N条长连接,包括:The method according to any one of claims 1 to 5, wherein the application layer device establishes N long-term connections with the Internet of Things platform, including:
    所述物联网平台包括多个分布式物联网平台,所述应用层设备与所述多个分布式物联网平台中的一个或多个分布式物联网平台建立所述N条长连接。The IoT platform includes multiple distributed IoT platforms, and the application layer device establishes the N long connections with one or more of the multiple distributed IoT platforms.
  7. 根据权利要求1~6任一项所述的方法,其特征在于,所述应用层设备包括终端设备或应用服务器。The method according to any one of claims 1 to 6, wherein the application layer device comprises a terminal device or an application server.
  8. 一种基于物联网的数据传输方法,其特征在于,包括:A data transmission method based on the Internet of Things, which is characterized by:
    物联网平台与应用层设备建立N条长连接,所述N≥2;The IoT platform establishes N long connections with the application layer devices, where N≥2;
    所述物联网平台通过所述N条长连接接收所述应用层设备发送的第一数据,或者,通过所述N条长连接向所述物联网平台发送第二数据,所述第一数据与所述第二数据是加载在所述应用层设备上的第三方应用与所述物联网平台之间交互的数据。The IoT platform receives the first data sent by the application layer device through the N long connections, or sends the second data to the IoT platform through the N long connections, and the first data and The second data is data interacting between a third-party application loaded on the application layer device and the IoT platform.
  9. 根据权利要求8所述的方法,其特征在于,所述物联网平台与应用层设备建立N条长连接,包括:The method according to claim 8, wherein the establishment of N long-term connections between the IoT platform and the application layer device comprises:
    E、所述物联网平台接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带第i个长连接标识,所述第i个长连接标识是所述应用层设备从所述N个长连接标识中选择出的任意一个长连接标识,1≤i≤N;E. The IoT platform receives a persistent connection establishment request message sent by the application layer device, the persistent connection establishment request message carries an i-th persistent connection identifier, and the i-th persistent connection identifier is the application layer device Any one of the long connection identifiers selected from the N long connection identifiers, 1≤i≤N;
    F、所述物联网平台向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述第i个长连接标识对应的长连接;F. The IoT platform sends a long connection establishment response message to the application layer device, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the i-th long connection identifier is successfully established. ;
    G、所述物联网平台确定已建立的长连接的每秒事务处理量TPS,以及感知层设备的TPS,根据所述已建立的长连接的TPS与所述感知层设备的TPS,确定是否向所述应用层设备发送第一通知消息,所述第一通知消息用于指示所述应用层设备继续建立下一条长连接;G. The IoT platform determines the TPS of the established long connection transaction per second and the TPS of the sensing layer device, and determines whether to forward the TPS of the established long connection and the TPS of the sensing layer device to Sending, by the application layer device, a first notification message, where the first notification message is used to instruct the application layer device to continue to establish a next long connection;
    循环执行E-G,直至于所述应用层设备建立所述N条长连接。E-G is executed cyclically until the N long connections are established by the application layer device.
  10. 根据权利要求8所述的方法,其特征在于,所述物联网平台与应用层设备建立N条长连接,包括:The method according to claim 8, wherein the establishment of N long-term connections between the IoT platform and the application layer device comprises:
    所述物联网平台向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层设备建立N条长连接;Sending, by the IoT platform, a second notification message to the application layer device, where the second notification message is used to instruct the application layer device to establish N long connections;
    所述物联网平台接收所述应用层设备发送的长连接建立请求消息,所述长连接建立请求消息携带所述N条长连接;The IoT platform receives a long connection establishment request message sent by the application layer device, and the long connection establishment request message carries the N long connections;
    所述物联网平台向所述应用层设备发送长连接建立响应消息,所述长连接建立响应消息用于向所述应用层设备指示成功建立所述N个长连接标识对应的长连接。The IoT platform sends a long connection establishment response message to the application layer device, and the long connection establishment response message is used to indicate to the application layer device that a long connection corresponding to the N long connection identifiers is successfully established.
  11. 根据权利要求8~10任一项所述的方法,其特征在于,所述物联网平台与应用层设备建立N条长连接之后,还包括:The method according to any one of claims 8 to 10, wherein after the IoT platform and the application layer device establish N long connections, the method further comprises:
    所述物联网平台向所述应用层设备发送第二通知消息,所述第二通知消息用于指示所述应用层终端设备拆除所述N条长连接中的至少一条长连接。The IoT platform sends a second notification message to the application layer device, and the second notification message is used to instruct the application layer terminal device to dismantle at least one of the N long connections.
  12. 根据权利要求8~11任一项所述的方法,其特征在于,所述物联网平台与应用层设备建立N条长连接之前,还包括:The method according to any one of claims 8 to 11, before the NIoT platform and the application layer device establish N long connections, further comprising:
    所述物联网平台接收应用层设备发送的请求消息,所述请求消息用于请求长连接标识;Receiving, by the IoT platform, a request message sent by an application layer device, where the request message is used to request a long connection identifier;
    所述物联网平台向所述应用层设备发送响应消息,所述响应消息携带M个长连接标识,M≥N。The IoT platform sends a response message to the application-layer device, where the response message carries M long-connection identifiers, M≥N.
  13. 根据权利要求8~12任一项所述的方法,其特征在于,所述物联网平台与应用层设备建立N条长连接,包括:The method according to any one of claims 8 to 12, wherein the establishment of N long-term connections between the IoT platform and an application layer device includes:
    所述物联网平台包括多个分布式物联网平台,所述多个分布式物联网平台中的一个或 多个分布式物联网平台与所述应用层设备建立所述N条长连接。The IoT platform includes multiple distributed IoT platforms, and one or more of the multiple distributed IoT platforms establish the N long connections with the application layer device.
  14. 一种通信装置,包括处理器、存储器、收发器及存储在所述存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,控制所述收发器实现如上述权利要求1-7任一项所述的方法。A communication device includes a processor, a memory, a transceiver, and a computer program stored on the memory and executable on the processor. The communication device controls the transceiver when the processor executes the program. Implement the method according to any of the preceding claims 1-7.
  15. 一种通信装置,包括处理器、存储器、收发器及存储在所述存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时,控制所述收发器实现如上述权利要求8-13任一项所述的方法。A communication device includes a processor, a memory, a transceiver, and a computer program stored on the memory and executable on the processor. The communication device controls the transceiver when the processor executes the program. Implement the method according to any one of the preceding claims 8-13.
  16. 一种计算机可读存储介质,其特征在于,用于存储计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行权利要求1-7任一项所述的方法。A computer-readable storage medium, characterized in that it stores computer programs or instructions, and when the computer programs or instructions are run on a computer, the computer causes the computer to execute the method according to any one of claims 1-7 .
  17. 一种计算机可读存储介质,其特征在于,用于存储计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行权利要求8-13任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program or instructions, and when the computer program or instructions are run on a computer, cause the computer to execute the method according to any one of claims 8-13 .
  18. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-7任一项所述的方法。A computer program product, wherein when the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1-7.
  19. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求8-13任一项所述的方法。A computer program product, wherein when the computer program product runs on a computer, the computer is caused to execute the method according to any one of claims 8-13.
PCT/CN2019/098059 2018-09-26 2019-07-27 Data transmission method based on internet of things, and communication apparatus WO2020063086A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811126917.0A CN110958281B (en) 2018-09-26 2018-09-26 Data transmission method and communication device based on Internet of things
CN201811126917.0 2018-09-26

Publications (1)

Publication Number Publication Date
WO2020063086A1 true WO2020063086A1 (en) 2020-04-02

Family

ID=69949856

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/098059 WO2020063086A1 (en) 2018-09-26 2019-07-27 Data transmission method based on internet of things, and communication apparatus

Country Status (2)

Country Link
CN (1) CN110958281B (en)
WO (1) WO2020063086A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542359A (en) * 2021-06-17 2021-10-22 聚好看科技股份有限公司 Terminal state updating method and device in online conference and electronic equipment
CN114390087A (en) * 2021-12-16 2022-04-22 航天信息股份有限公司 Control method and system for data acquisition equipment of tax-control oiling machine
CN114449029A (en) * 2022-01-27 2022-05-06 中国建设银行股份有限公司 Service data acquisition method, system, device, computer equipment and storage medium
CN115967735A (en) * 2022-12-30 2023-04-14 广东百德朗科技有限公司 Equipment management method and system based on Internet of things platform
WO2024078050A1 (en) * 2022-10-14 2024-04-18 华为云计算技术有限公司 Method and apparatus for performing data transmission

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11055378B1 (en) 2020-08-21 2021-07-06 Coupang Corp. Systems and methods for loading websites with multiple items
CN113132489A (en) * 2021-04-22 2021-07-16 中国工商银行股份有限公司 Method, device, computing equipment and medium for downloading file
CN113254103A (en) * 2021-05-28 2021-08-13 深圳市广和通无线股份有限公司 Application function implementation method and device and storage medium
CN115002238A (en) * 2022-05-09 2022-09-02 阿里云计算有限公司 Traffic transmission method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104010001A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Method and system for carrying out connection communication on same networking requests in mobile terminal
CN107135279A (en) * 2017-07-07 2017-09-05 网宿科技股份有限公司 It is a kind of to handle the method and apparatus that request is set up in long connection
US20180041905A1 (en) * 2016-08-05 2018-02-08 Nxgen Partners Ip, Llc Ultra-broadband virtualized telecom and internet

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882903B (en) * 2011-07-12 2017-07-28 腾讯科技(深圳)有限公司 A kind of many website application message acquisition methods and system
CN105357445B (en) * 2015-12-04 2019-03-08 杭州东方通信软件技术有限公司 A kind of Internet of things system
CN107959761B (en) * 2016-10-14 2020-06-30 北京京东尚科信息技术有限公司 Transmit-receive double-link realization method and device based on open source telephone soft switching system
CN108429820A (en) * 2018-05-23 2018-08-21 深圳远征技术有限公司 A kind of communication means of internet of things application layer, system and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104010001A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Method and system for carrying out connection communication on same networking requests in mobile terminal
US20180041905A1 (en) * 2016-08-05 2018-02-08 Nxgen Partners Ip, Llc Ultra-broadband virtualized telecom and internet
CN107135279A (en) * 2017-07-07 2017-09-05 网宿科技股份有限公司 It is a kind of to handle the method and apparatus that request is set up in long connection

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542359A (en) * 2021-06-17 2021-10-22 聚好看科技股份有限公司 Terminal state updating method and device in online conference and electronic equipment
CN113542359B (en) * 2021-06-17 2023-09-05 聚好看科技股份有限公司 Terminal state updating method and device in online conference and electronic equipment
CN114390087A (en) * 2021-12-16 2022-04-22 航天信息股份有限公司 Control method and system for data acquisition equipment of tax-control oiling machine
CN114449029A (en) * 2022-01-27 2022-05-06 中国建设银行股份有限公司 Service data acquisition method, system, device, computer equipment and storage medium
WO2024078050A1 (en) * 2022-10-14 2024-04-18 华为云计算技术有限公司 Method and apparatus for performing data transmission
CN115967735A (en) * 2022-12-30 2023-04-14 广东百德朗科技有限公司 Equipment management method and system based on Internet of things platform
CN115967735B (en) * 2022-12-30 2023-10-24 广东百德朗科技有限公司 Equipment management method and system based on Internet of things platform

Also Published As

Publication number Publication date
CN110958281B (en) 2021-07-09
CN110958281A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
WO2020063086A1 (en) Data transmission method based on internet of things, and communication apparatus
EP3629552B1 (en) Method, registration center and device for service discovery
EP3266188B1 (en) Network and application management using service layer capabilities
US10498831B2 (en) Communication sessions at a CoAP protocol layer
WO2019075848A1 (en) Coordination of terminal slicing function and network slicing function
WO2014067311A1 (en) Resource subscription method and device
EP3981190B1 (en) Method and apparatus for enforcement of maximum number of protocol data unit sessions per network slice in a communication system
US8601139B2 (en) Multiple core session initiation protocol (SIP)
CN105721512A (en) Remote process calling system and method thereof
WO2016187515A1 (en) Methods and apparatus for analyzing and grouping service layer subscriptions and notifications for enhanced efficiency
WO2011130940A1 (en) Multi-service integration processing method and service integration platform
CN112631788B (en) Data transmission method and data transmission server
WO2018112327A1 (en) Methods of concurrency control for block transfer in coap publish-subscribe architecture
WO2013189394A2 (en) Resource information acquisition method, system and device for internet of things terminal device
CN110830282A (en) Method, device and equipment for configuring user plane function
US11700301B2 (en) Service registration based on service capabilities requirements and preferences
US20240056496A1 (en) Method and Apparatus for Selecting Edge Application Server
CN113115332A (en) UPF (unified power flow) determination method and device
CN102571912A (en) Method for realizing unload protocol stack based on multi-core processor and hybrid operating system
CN106131162B (en) A method of network service agent is realized based on IOCP mechanism
CN113424608B (en) Entity for providing external services to a network
CN112653716B (en) Service binding method and device
WO2015061989A1 (en) Method and device for data transmission
WO2012126212A1 (en) Communication apparatus and method for interface layer of radio frequency identification device
WO2017040948A1 (en) Enabling time flexibility for block transfer in coap protocol

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19866002

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19866002

Country of ref document: EP

Kind code of ref document: A1