WO2016197995A1 - Procédé et dispositif pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états - Google Patents

Procédé et dispositif pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états Download PDF

Info

Publication number
WO2016197995A1
WO2016197995A1 PCT/CN2016/085873 CN2016085873W WO2016197995A1 WO 2016197995 A1 WO2016197995 A1 WO 2016197995A1 CN 2016085873 W CN2016085873 W CN 2016085873W WO 2016197995 A1 WO2016197995 A1 WO 2016197995A1
Authority
WO
WIPO (PCT)
Prior art keywords
session
internet
things
logical
platform
Prior art date
Application number
PCT/CN2016/085873
Other languages
English (en)
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 WO2016197995A1 publication Critical patent/WO2016197995A1/fr

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/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/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • 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

Definitions

  • the present application relates to, but is not limited to, the field of Internet of Things technologies, and in particular, to a method and apparatus for implementing stateful operation in a stateless network protocol.
  • a resource can be defined as a directly accessible, independently developed, deployable, manageable, and maintainable software component that supports specific data.
  • the Resource-Oriented Architecture is a software architecture based on the Representational State Transfer (REST) style of the Internet of Things.
  • the resources in the IoT environment can be a terminal device or a terminal device.
  • data exchange is resource-centric operation. Resources have a common operation mode, namely REST mode.
  • REST design contains several basic characteristics, one of which is basic statelessness (Statelessness), that is, each pair Resource requests (such as HTTP requests) are isolated and do not depend on their previous or subsequent requests.
  • Statelessness basic statelessness
  • the query command needs to modify the settings of the terminal device, and the terminal device performs a certain setting operation according to the query instruction of the application terminal before performing the query operation.
  • the application terminal restores the terminal device to the original setting.
  • the application terminal that is undergoing interaction needs to establish a complete session process with the terminal device, that is, setting --> query --> recovery, and needs to be serially completed in a session process.
  • WMMP Wireless Machine to Machine Protocol
  • Request packet subcontracting That is, in a session of a WMMP communication process, the requester has a data request packet to be transmitted, and after receiving the request, the responder returns a response packet whose packet size exceeds the maximum length of the packet body. At this point, the responder will send the response to the requester in the form of multiple packets, and the requester will send a new request after receiving each packet to request the next packet until the last one is received. Subcontracting.
  • the response packet is subcontracted. That is, in a session of a WMMP communication process, the requester's request packet data packet size exceeds the maximum length of the packet body. At this time, the requester sends a data packet to the responder in a multi-packet manner. After receiving the packet, the responder returns the packet response, and the requester receives the packet response and then sends the next packet until the last packet is received; The response packet generated by the responder after receiving all the packets and processing is smaller than the maximum length of the packet body, and the response packet is returned at this time.
  • the server is connected to the sending client and the receiving client based on the stateless network protocol, and at least two session nodes are established in the connection state table of the simulated connection layer of the server, and the session node corresponds to the two clients; the sending client sends the request message.
  • the request information includes the exchange data to be sent to the receiving client; the server temporarily stores the exchange data to the session node corresponding to the receiving client; the receiving client sends the request message to the server, and the server determines to send the session node corresponding to the client.
  • the temporary exchange data is obtained from the session node determined in the connection state table of the simulation connection layer, and the communication data is carried in the reply information. It can solve stateless operations in stateless network protocol connections. However, if multiple clients send messages to the same receiving client, or multiple clients send exclusive resources to the same receiving client, for example, performing an exclusive query operation, the scenario cannot be resolved.
  • the "Internet of Things” that is, information sensing devices such as radio frequency identification (RFID), infrared sensors, global positioning systems, laser scanners, etc., connect any items to the Internet according to a contractual agreement, and carry out information. Exchange and communication to enable intelligent identification, location, tracking, monitoring and management of the network.
  • RFID radio frequency identification
  • infrared sensors such as infrared sensors
  • global positioning systems such as global positioning systems, laser scanners, etc.
  • the Internet of Things architecture can be divided into three levels: the perception layer, the network layer, and the application layer.
  • the sensing layer mainly includes two-dimensional code labels and readers, RFID tags and readers, cameras, global positioning systems, sensors, sensor networks and sensor gateways.
  • the sensing layer mainly realizes sensing, recognizing objects, collecting and capturing information.
  • the network layer first includes an access layer and a transport layer, such as a converged network formed by various communication networks and the Internet; and also includes various common platforms, such as an Internet of Things capability open platform, an Internet of Things management platform, and an Internet of Things information center, and a cloud. Computing platform, expert system, etc., for management and intelligent analysis of massive information.
  • a transport layer such as a converged network formed by various communication networks and the Internet
  • various common platforms such as an Internet of Things capability open platform, an Internet of Things management platform, and an Internet of Things information center, and a cloud.
  • Computing platform, expert system, etc. for management and intelligent analysis of massive information.
  • the application layer is a combination of IoT technology and industry expertise to achieve a wide range of intelligent application solutions.
  • Embodiments of the present invention provide a method and apparatus for implementing stateful operation in a stateless network protocol, which are intended to solve the problem in the related art that when a session is delivered, the session must remain intact, the session packet is lost, and the sender is resent and multiple senders are lost.
  • the problem that the message cannot be operated when sending a message to the same receiving end enables the IoT application to perform stateful operations on the IoT terminal in the stateless network.
  • An embodiment of the present invention provides a method for implementing a stateful operation in a stateless network protocol, which is applied to an Internet of Things platform, and the method includes:
  • first session instruction initiated by the Internet of Things application, where the first session instruction is a logical session instruction including a first physical session identifier;
  • a platform logical session node that resolves the first session instruction and creates a parsed first session instruction, and stores the platform logical session node according to the priority to a platform corresponding to the IoT terminal identifier carried by the first session instruction In the conversation list;
  • the logical session establishment success message carrying the logical session identifier to the Internet of Things terminal, so that the Internet of Things application and the Internet of Things terminal complete the delivery of the message through the logical session identifier.
  • the step of establishing a session connection between the Internet of Things terminals corresponding to the IoT terminal identifier carried by the first session instruction includes:
  • the first physical session identifier is obtained
  • the step of parsing the first session instruction further includes: acquiring an IoT terminal identifier and a session attribute carried in the first session instruction.
  • the platform logical session node that creates the parsed first session instruction after parsing the first session instruction includes:
  • a node is added to the list of the Internet of Things terminals to store the first node address of the platform session linked list corresponding to the current Internet of Things terminal, and the platform logical session node is created;
  • the corresponding session session list is searched according to the priority of the first node address of the platform session list included in the current IoT terminal node, and the parsed first session instruction is placed at the end of the session of the same priority.
  • the method further includes: if the current IoT terminal has a session, and the session attribute is the shared mode, the first session instruction is parsed into a session with the same priority and the same resource identifier.
  • the method further includes:
  • a session termination success message carrying the logical session identifier, and deleting, by the IoT application, an application logical session node generated when the first session instruction is initiated, and terminating the session.
  • the embodiment of the present invention further provides a method for implementing a stateful operation in a stateless network protocol, which is applied to an Internet of Things application, and the method includes:
  • a logical session establishment success message including the logical session identifier sent by the Internet of Things platform after establishing a session connection with the Internet of Things terminal and generating a logical session identifier, parsing and obtaining the logical session identifier, and saving, to the object
  • the networking platform feeds back the connection success message.
  • the first session instruction carries an Internet of Things terminal identifier and a session attribute.
  • the method further includes: generating an application logical session node.
  • the method further includes:
  • the termination session instruction is sent by the IoT platform to the Internet of Things terminal, and receiving the IoT terminal is deleted and The session termination success message returned after the terminal logical session node is generated when the Internet of Things platform establishes a session connection;
  • the embodiment of the present invention further provides a method for implementing a stateful operation in a stateless network protocol, which is applied to an Internet of Things terminal, and the method includes:
  • the method further includes: generating a terminal logical session node; extracting the session attribute carried in the second session instruction, and saving.
  • the method further includes:
  • the embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things platform, and the device includes:
  • a first receiving module configured to receive a first session instruction initiated by the Internet of Things application, where the first session instruction is a logical session instruction including a first physical session identifier;
  • a processing processing module is configured to: after parsing the first session instruction, create a platform logical session node of the parsed first session instruction, and store the platform logical session node according to the priority The platform session list corresponding to the IoT terminal identifier carried by the first session instruction;
  • Establishing a generation module configured to establish a session connection between the Internet of Things terminals corresponding to the IoT terminal identifier carried by the first session instruction, and generate logic for performing a logical session between the Internet of Things application and the Internet of Things terminal Session identifier
  • a first returning module configured to return a logical session establishment success message carrying the logical session identifier to the Internet of Things application and the Internet of Things terminal, to enable the Internet of Things application and the Internet of Things terminal to pass the logical session Identifies the delivery of the completion message.
  • the establishing the generating module includes:
  • a sending submodule configured to send a second session instruction to the Internet of Things terminal
  • the first receiving submodule is configured to receive a session establishment message returned after the IoT terminal receives the second session instruction to generate a logical session node of the terminal.
  • the establishing the generating module includes:
  • a second receiving sub-module configured to establish a session connection with the Internet of Things terminal, and receive a second physical session identifier returned by the Internet of Things terminal;
  • Generating a submodule configured to generate the logical session identifier according to the first physical session identifier and the second physical session identifier.
  • the creation processing module is further configured to: acquire an IoT terminal identifier and a session attribute carried in the first session instruction.
  • the creation processing module includes:
  • a locating sub-module configured to search, in the IoT terminal list, whether the current IoT terminal corresponding to the IoT terminal identifier has a session according to the IoT terminal identifier carried in the first session instruction;
  • the processing submodule is configured to: if the current IoT terminal does not have a session, add a node in the IoT terminal list to store the first node address of the platform session linked list corresponding to the current IoT terminal, and create the platform logic Session node; if there is a session in the current IoT terminal, according to The first node address of the platform session list included in the previous IoT terminal node searches the corresponding platform session list according to the priority, and places the parsed first session instruction at the end of the session of the same priority.
  • the processing sub-module is further configured to: if the current IoT terminal has a session, and the session attribute is the shared mode, the first session instruction is parsed into a session with the same priority and the same resource identifier.
  • the device further comprises:
  • a second receiving module configured to receive a termination session command that is sent by the Internet of Things application and that carries the logical session identifier
  • a first sending module configured to send the termination session instruction to the Internet of Things terminal, and delete, by the IoT terminal, a terminal logical session node generated when establishing a session connection with the Internet of Things platform;
  • a third receiving module configured to receive a session termination success message sent by the Internet of Things terminal that carries the logical session identifier, and delete the platform logical session node;
  • a second returning module configured to return a session termination success message carrying the logical session identifier to the Internet of Things application, where the application logical session node generated when the first session instruction is initiated is deleted by the Internet of Things application, Terminate the session.
  • the embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things application, and the device includes:
  • the initiating module is configured to initiate a first session instruction including the first physical session identifier to the Internet of Things platform, where the first session instruction received by the Internet of Things platform is parsed and the parsed first session instruction is created After the platform logical session node, establish a session connection with the Internet of Things terminal;
  • a processing module configured to receive a logical session establishment success message including the logical session identifier sent after the IoT platform establishes a session connection with the Internet of Things terminal, and generates a logical session identifier, and obtains the logical session identifier and saves And feeding back the connection success message to the Internet of Things platform.
  • the first session instruction carries an Internet of Things terminal identifier and a session attribute.
  • the initiating module is further configured to: generate an application logical session node.
  • the device further comprises:
  • a second sending module configured to send a termination session instruction carrying the logical session identifier to the Internet of Things platform, where the termination session command is sent by the Internet of Things platform to the Internet of Things terminal, and the receiving Determining a session termination success message returned by the Internet of Things terminal after deleting the terminal logical session node generated when the session connection is established with the Internet of Things platform;
  • the first receiving processing module is configured to receive the session termination success message forwarded by the IoT platform after deleting the platform logical session node, delete the application logical session node, and terminate the session.
  • the embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things terminal, and the device includes:
  • a fourth receiving module configured to receive a second session instruction sent by the Internet of Things platform, where the second session instruction creates a platform logical session node for the IoT platform and acquires a first physical session with the Internet of Things application Sent after the identification;
  • Establishing a return module configured to establish a session connection with the Internet of Things platform, and return a session establishment message to the Internet of Things platform, wherein the Internet of Things application and the Internet of Things terminal are generated by the Internet of Things platform a logical session identifier between logical sessions;
  • the second receiving processing module is configured to receive a logical session establishment success message that is sent by the Internet of Things platform and that carries the logical session identifier, and complete the delivery of the message according to the logical session identifier and the Internet of Things application.
  • the fourth receiving module is further configured to: generate a logical session node of the terminal, extract the session attribute carried in the second session instruction, and save the session attribute.
  • the device further comprises:
  • a fifth receiving module configured to receive, by the IoT application, a termination session instruction that is sent by the Internet of Things platform and that carries the logical session identifier;
  • Deleting a module, configured to delete the terminal logical session node according to the terminating session instruction
  • a third sending module configured to send a session termination success message carrying the logical session identifier to the Internet of Things platform, where the IoT platform deletes the platform logical session node and returns to the Internet of Things application a session termination success message identified by the logical session, by the The IoT application deletes the application logical session node and terminates the session.
  • Embodiments of the present invention further provide a computer readable storage medium storing computer executable instructions that, when executed, implement a method for implementing stateful operations in the above stateless network protocol applied to an Internet of Things platform.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that, when executed, implement a method for implementing stateful operations in the above stateless network protocol applied to an Internet of Things application.
  • Embodiments of the present invention further provide a computer readable storage medium storing computer executable instructions, which when implemented, implement a method for implementing stateful operations in the above stateless network protocol applied to an Internet of Things terminal.
  • the embodiment of the present invention initiates a logical session instruction through the Internet of Things application, and after the Internet of Things platform parses the logical session instruction, creates a platform logical session node for storage; establishes a session connection with the corresponding IoT terminal, and generates a logical session identifier;
  • the Internet of Things application and the Internet of Things terminal send a logical session establishment success message carrying the logical session identifier to form a message transmission between the Internet of Things application and the Internet of Things terminal, which can solve the problem that the session must be kept intact and the session packet is lost when the session is delivered in the related art.
  • the IoT application can perform stateful operations on the IoT terminal in the stateless network.
  • FIG. 1 is a first schematic diagram of a method for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a list of an Internet of Things terminal according to an embodiment of the present invention.
  • FIG. 3 is a second schematic diagram of a method for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention
  • FIG. 4 is a third schematic diagram of a method for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of an overall process of establishing a logical session according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a message delivery process according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a termination logical session according to an embodiment of the present invention.
  • FIG. 8 is a first schematic diagram of an apparatus for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention
  • FIG. 9 is a second schematic diagram of an apparatus for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention.
  • FIG. 10 is a third schematic diagram of an apparatus for implementing stateful operation in a stateless network protocol according to an embodiment of the present invention.
  • the Internet of Things terminal, the Internet of Things platform, and the Internet of Things application respectively represent the sensing layer, the network layer, and the application layer.
  • An embodiment of the present invention provides a method for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things platform. As shown in FIG. 1 , the method includes the following steps:
  • Step S101 Receive a first session instruction initiated by an Internet of Things application, where the first session instruction is a logical session instruction including a first physical session identifier;
  • Step S102 After the first session instruction is parsed, the platform logical session node of the parsed first session instruction is created, and the platform logical session node is stored according to the priority to the IoT terminal identifier carried by the first session instruction. Corresponding platform session list;
  • Step S103 Establish a session connection between the Internet of Things terminals corresponding to the IoT terminal identifier carried by the first session instruction, and generate a logical session identifier for performing a logical session between the Internet of Things application and the Internet of Things terminal;
  • Step S104 Returning, to the Internet of Things application, the logical session establishment success message carrying the logical session identifier to the Internet of Things terminal, so that the Internet of Things application and the Internet of Things terminal complete the message through the logical session identifier transfer.
  • the communication between the Internet of Things application and the Internet of Things terminal can be completed through the logical session identification, so that the Internet of Things application can perform stateful operations on the Internet of Things terminal in the stateless network.
  • the Internet of Things platform is a relatively broad concept.
  • the Internet of Things platform can be composed of one or more devices, such as the Internet of Things capability open platform, the Internet of Things management platform, and the Internet of Things information center.
  • the IoT platform receives the first session instruction that is sent by the IoT application and includes the first physical session identifier, and the first session instruction is substantially a logical session instruction.
  • the logical session includes multiple network layer/transport layer end-to-end connections, which is different from the Open System Interconnect (OSI) model layer 5 session layer.
  • the OSI session layer is mainly two sessions.
  • the management service of the dialog connection provided by the layer entity for the session, the OSI session layer relies on the end-to-end connection of the network layer/transport layer.
  • a logical session can contain multiple OSI session layers.
  • the session created when the session created when user A and server S are connected to terminal device D and server S is two different sessions.
  • user A is required to establish an end-to-end session with terminal device D.
  • This session will contain sessions between user A and server S and terminal device D and server S.
  • a session including multiple sessions is referred to as a logical session, and a general session included in a logical session is referred to as a physical session.
  • the Internet of Things platform After receiving the first session instruction, the Internet of Things platform parses the first session instruction, and then creates a platform logical session node of the parsed first session instruction, each platform logical session node represents a session, and the platform logical session node includes the session Attributes, priorities, etc. It should be noted that the platform logical session node is a logical session node created by the Internet of Things platform, and the platform logical session node is created and stored in the corresponding platform session list.
  • the platform session list is composed of one or more platform logical session nodes, and each IoT terminal uniquely corresponds to a platform session list. After the IoT platform creates a platform logical session node representing the session, the IoT terminal identifies the IoT terminal. Corresponding platform session list, and through the first node address of the platform session list, the created platform logical session node is placed in the appropriate position of the platform session list according to the priority.
  • the first node of each platform session list contains two data linked lists: instruction message list and response Interest list.
  • the instruction message linked list stores one or more messages sent by the Internet of Things application to the Internet of Things terminal
  • the response message linked list stores the message sent by the IoT terminal to one or more IoT applications
  • the response message also establishes the Internet of Things according to the IoT application identifier.
  • Applying the corresponding linked list the Internet of Things platform quickly queries the pending data corresponding to the Internet of Things application according to the IoT application linked list, and the response message linked list is mainly used for reporting the information of the Internet of Things terminal.
  • a logical session identifier is generated, so that a logical session can be performed between the Internet of Things application and the IoT terminal. Then, the Internet of Things platform returns a logical session establishment success message carrying the logical session identifier to the Internet of Things application and the Internet of Things terminal, and completes the delivery of the message between the Internet of Things application and the Internet of Things terminal.
  • step S103 establishing a session connection between the Internet of Things terminals corresponding to the identifier of the Internet of Things terminal carried by the first session instruction includes:
  • the IoT platform receives the first session instruction and parses the first session instruction, creates a platform logical session node of the first session instruction after parsing, and stores the platform logical session node according to the priority to the object carried by the first session instruction.
  • the second session instruction is sent to the Internet of Things terminal corresponding to the IoT terminal identifier carried by the first session instruction, so that the Internet of Things terminal generates the terminal logic after receiving the second session instruction.
  • the session node returns a session establishment message to the Internet of Things platform, and the Internet of Things platform completes the session connection with the Internet of Things terminal after receiving the session establishment message returned by the Internet of Things terminal.
  • step S103 generating a logical session identifier for performing a logical session between the Internet of Things application and the Internet of Things terminal, including:
  • the first physical session identifier is obtained
  • the IoT platform obtains the first physical session identifier between the IoT application and the IoT application after the first session instruction is parsed and the platform logical session node of the first session instruction is parsed. After establishing the session connection with the Internet of Things terminal, the Internet of Things platform receives the second physical session identifier returned by the Internet of Things terminal. And generating a logical session identifier by using a hash function according to the first physical session identifier and the second physical session identifier sent by the Internet of Things terminal.
  • the first physical session identifier is stored in the first session instruction, and after the Internet of Things platform parses the first session instruction and creates a platform logical session node of the first session instruction after parsing, acquiring the application with the Internet of Things a first physical session identifier; when the Internet of Things platform sends a second session instruction to the Internet of Things terminal, and after receiving the second session instruction by the Internet of Things terminal, generating a terminal logical session node and returning a second physics with the Internet of Things platform Session ID.
  • step of parsing the first session instruction in step S102 further includes:
  • the IoT platform acquires the IoT terminal identifier and the session attribute carried in the first session instruction when parsing the first session instruction.
  • Session attributes include: shared or exclusive, if it is exclusive access, set the lock mechanism, and queue access requests. This ensures that in the IoT environment, multiple IoT applications will not cause illegal access when accessing the same IoT terminal.
  • the platform logical session node that parses the first session instruction after parsing the first session instruction includes:
  • a node is added to the list of the Internet of Things terminals to store the first node address of the platform session linked list corresponding to the current Internet of Things terminal, and the platform logical session node is created;
  • the corresponding platform session list is searched according to the priority, and the first session refers to the parsed Order the session at the same level as the priority.
  • the Internet of Things terminal list is organized by the Internet of Things terminal, and the list node includes the IoT terminal identifier and the first node address of the corresponding platform session linked list.
  • the identifier of the Internet of Things terminal is obtained, and according to the identifier of the Internet of Things terminal, the Internet of Things terminal list is searched for whether the current Internet of Things terminal corresponding to the IoT terminal identifier already has a session. If there is no session in the current IoT terminal, a node is added to the IoT terminal list to store the first node address of the platform session list corresponding to the current IoT terminal, and the save is created in the corresponding platform session list.
  • the corresponding platform session list is searched according to the priority according to the first node address of the platform session list included in the current IoT terminal node, and the parsed first session instruction is placed at the end of the session of the same priority.
  • the session attribute in the first session instruction is extracted. If the current IoT terminal has a session and the session attribute is in the shared mode, the parsed first session instruction is merged into the session with the same priority and the same resource identifier.
  • the method further includes:
  • a session termination success message carrying the logical session identifier, and deleting, by the IoT application, an application logical session node generated when the first session instruction is initiated, and terminating the session.
  • the termination session instruction that carries the logical session identifier sent by the Internet of Things application forwards the termination session instruction carrying the logical session identifier to the Internet of Things terminal, so that the Internet of Things terminal deletes the terminal logical session node according to the termination session instruction, where the terminal logical session A node is generated when an IoT terminal establishes a session connection with an IoT platform.
  • Terminating the success message causes the IoT application to delete the application logical session node and terminate the session, wherein the application logical session node is generated when the IoT application initiates the first session instruction.
  • the embodiment of the present invention further provides a method for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things application. As shown in FIG. 3, the method includes the following steps:
  • Step S201 initiating a first session instruction including a first physical session identifier to the Internet of Things platform, parsing the received first session instruction by the Internet of Things platform, and creating a platform logical session of the first session instruction after parsing After the node, establish a session connection with the Internet of Things terminal;
  • Step S202 receiving a logical session establishment success message that is sent by the Internet of Things platform and establishing the session connection with the Internet of Things terminal, and generating the logical session identifier, and the logical session establishment success message is obtained, and the logical session identifier is obtained and saved.
  • the Internet of Things platform feeds back a connection success message.
  • the Internet of Things application is software running on the user terminal.
  • the user terminal also has a session management software unit for initiating/terminating the session.
  • the interface provided by the session management is invoked. Therefore, the session management unit can serve multiple IoT applications on the user terminal, and one IoT terminal can run multiple IoT applications.
  • the IoT application first sends a first session instruction including the first physical session identifier to the Internet of Things platform, and generates an application logical session node while sending the first session instruction, so that the Internet of Things platform receives the first session instruction,
  • a session instruction parses, obtains an IoT terminal identifier and a session attribute carried in the first session instruction, and then finds a corresponding platform session linked list according to the IoT terminal identifier.
  • a plurality of IoT terminals constitute an IoT terminal list, and a list node in the IoT terminal list represents an IoT terminal, and the list node includes an IoT terminal identifier and a corresponding node node linked list first node address.
  • a platform logical session node that resolves the first session instruction is created under the platform session list. The session connection between the IoT terminal and the IoT terminal is then established by the IoT platform.
  • a logical session establishment success message sent after the IoT platform establishes a session connection with the IoT terminal and generates a logical session identifier where the logical session establishment success message includes a logical session identifier.
  • the logical session identifier is extracted and saved from the received logical session establishment success message, and the connection success message is fed back to the Internet of Things platform to complete the establishment of the logical session between the Internet of Things application and the Internet of Things terminal.
  • the method further includes:
  • the termination session instruction is sent by the IoT platform to the Internet of Things terminal, and receiving the IoT terminal is deleted and The session termination success message returned after the terminal logical session node is generated when the Internet of Things platform establishes a session connection;
  • the terminating session instruction carrying the logical session identifier is sent to the Internet of Things platform, so that the IoT platform sends the terminating session command to the Internet of Things terminal after receiving the terminating session command, and the IoT terminal terminates the session command according to the termination session command.
  • the success message receives the session termination success message sent by the Internet of Things platform, and deletes the application logical session node according to the session termination success message, and terminates the session process.
  • the embodiment of the present invention further provides a method for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things terminal. As shown in FIG. 4, the method includes the following steps:
  • Step S301 Receive a second session instruction sent by the Internet of Things platform, where the second session instruction is sent after the first logical session node is created by the IoT platform and the first physical session identifier is obtained between the IoT application and the IoT application. ;
  • Step S302 establishing a session connection with the Internet of Things platform, returning a session establishment message to the Internet of Things platform, and generating, by the IoT platform, a logical session between the Internet of Things application and the Internet of Things terminal Logical session identifier;
  • Step S303 Receive a logical session establishment success message that is sent by the Internet of Things platform and carry the logical session identifier, and complete the delivery of the message according to the logical session identifier and the Internet of Things application.
  • the platform logical session node that is configured to receive the first session instruction and the first session instruction is completed, and the platform logical session node of the first session instruction is configured to be stored, and after acquiring the first physical session identifier,
  • the Internet of Things platform sends a second session instruction to the Internet of Things terminal, and the Internet of Things terminal receives the second session instruction sent by the Internet of Things platform, establishes a session connection with the Internet of Things platform, and returns a session establishment message to the Internet of Things platform.
  • the IoT terminal receives the logical session establishment success message sent by the Internet of Things platform, wherein the logical session establishment success message carries the second physical session identifier returned by the Internet of Things terminal and the Internet of Things after the IoT platform receives the session establishment message.
  • the first physical session between the applications identifies the generated logical session identifier, according to the logical session identifier and the delivery of the IoT application completion message.
  • the method after receiving the second session instruction sent by the Internet of Things platform, the method further includes:
  • the terminal logical session node After receiving the second session instruction sent by the Internet of Things platform, the terminal logical session node is generated according to the second session instruction, the current logical session attribute is saved and set, and the session establishment message is returned to the Internet of Things platform.
  • the method further includes:
  • the terminating session instruction sent by the Internet of Things application is forwarded by the IoT platform, wherein the terminating session instruction carries a logical session identifier, and the terminal logical session node is deleted according to the termination session instruction carrying the logical session identifier; and then the Internet of Things is sent to the Internet of Things.
  • the platform sends a session termination success message carrying the logical session identifier, and the IoT platform deletes the platform logical session node according to the session termination success message and returns a session termination success message carrying the logical session identifier to the IoT application, and the IoT application deletes according to the session termination success message. Apply the logical session node to terminate the entire session process.
  • the overall process of establishing a logical session in the embodiment of the present invention includes the following steps:
  • Step S401 The Internet of Things application sends a first session instruction to the Internet of Things platform.
  • Step S402 the Internet of Things platform receives the first session instruction, and generates a platform according to the first session instruction.
  • Logical session node the Internet of Things platform receives the first session instruction, and generates a platform according to the first session instruction.
  • Step S403 The Internet of Things platform initiates a second session instruction to the Internet of Things terminal.
  • Step S404 The Internet of Things terminal receives the second session instruction, and generates a terminal logical session node.
  • Step S405 The Internet of Things terminal sends a session establishment message to the Internet of Things platform.
  • Step S406 After the IoT platform generates the logical session identifier, send a logical session establishment success message to the Internet of Things application and the Internet of Things terminal.
  • Step S407 the Internet of Things application and the Internet of Things terminal feed back a connection success message to the Internet of Things platform.
  • the process includes the following steps:
  • Step S501 The Internet of Things application sends a first instruction message, where the message includes a logical session identifier.
  • Step S502 The Internet of Things platform receives the first instruction message, parses the first instruction message, creates a platform logical session node, acquires a logical session identifier, and saves the first instruction message.
  • Step S503 The Internet of Things platform sends a second instruction message to the Internet of Things terminal of the logical session, where the message includes a logical session identifier.
  • Step S504 The IoT terminal receives the second instruction message, generates a terminal logical session node, saves the second instruction message, and generates an execution result according to the execution policy execution instruction.
  • Step S505 The Internet of Things terminal returns a response message to the Internet of Things platform, where the message includes a logical session identifier.
  • Step S506 The Internet of Things platform receives the response message returned by the Internet of Things terminal, parses and acquires the logical session identifier, generates a platform logical session node, and saves the response message.
  • Step S507 The Internet of Things platform returns a response message to the Internet of Things application, where the response message includes a logical session identifier.
  • Step S508 The Internet of Things application receives the response message, parses and obtains the execution result, and saves the response message.
  • the session termination process is performed. As shown in FIG. 7, the process includes the following steps:
  • Step S601 The Internet of Things application initiates a termination session instruction, and the message includes a logical session identifier.
  • Step S602 The Internet of Things platform forwards the termination session instruction.
  • Step S603 The Internet of Things terminal receives the termination session instruction, and deletes the terminal logical session node.
  • Step S604 The Internet of Things terminal returns a session termination success message to the Internet of Things platform, where the message includes a logical session identifier.
  • Step S605 The Internet of Things platform deletes the platform logical session node.
  • Step S606 The Internet of Things platform returns a session termination success message to the Internet of Things application, where the message includes a logical session identifier.
  • Step S607 The Internet of Things application receives the session termination success message, and deletes the application logical session node.
  • the embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things platform, and the device includes:
  • a first receiving module configured to receive a first session instruction initiated by the Internet of Things application, where the first session instruction is a logical session instruction including a first physical session identifier;
  • a processing processing module configured to: after the parsing the first session instruction, create a platform logical session node of the parsed first session instruction, and store the platform logical session node according to the priority to the object carried by the first session instruction The platform session list corresponding to the networked terminal identifier;
  • Establishing a generation module configured to establish a session connection between the Internet of Things terminals corresponding to the IoT terminal identifier carried by the first session instruction, and generate logic for performing a logical session between the Internet of Things application and the Internet of Things terminal Session identifier
  • a first returning module configured to return a logical session establishment success message carrying the logical session identifier to the Internet of Things application and the Internet of Things terminal, to enable the Internet of Things application and the Internet of Things terminal to pass the logical session Identifies the delivery of the completion message.
  • the establishing the generating module includes:
  • a sending submodule configured to send a second session instruction to the Internet of Things terminal
  • the first receiving submodule is configured to receive a session establishment message returned after the IoT terminal receives the second session instruction to generate a logical session node of the terminal.
  • the establishing the generating module further includes:
  • a second receiving sub-module configured to establish a session connection with the Internet of Things terminal, and receive a second physical session identifier returned by the Internet of Things terminal;
  • Generating a submodule configured to generate the logical session identifier according to the first physical session identifier and the second physical session identifier.
  • the creation processing module is further configured to: acquire an IoT terminal identifier and a session attribute carried in the first session instruction.
  • the creating a processing module includes:
  • a locating sub-module configured to search, in the IoT terminal list, whether the current IoT terminal corresponding to the IoT terminal identifier has a session according to the IoT terminal identifier carried in the first session instruction;
  • the processing submodule is configured to: if the current IoT terminal does not have a session, add a node in the IoT terminal list to store the first node address of the platform session linked list corresponding to the current IoT terminal, and create the platform logic a session node; if there is a session in the current IoT terminal, according to the first node address of the platform session list included in the current IoT terminal node, the corresponding platform session list is searched according to the priority, and the parsed first session instruction is placed in the session of the same priority At last.
  • the processing sub-module is further configured to: if the current IoT terminal has a session, and the session attribute is the shared mode, the first session instruction after parsing is merged into the same-level priority and the resource identifier is the same. In the conversation.
  • the device further includes:
  • a second receiving module configured to receive a termination session command that is sent by the Internet of Things application and that carries the logical session identifier
  • a first sending module configured to send the termination session instruction to the Internet of Things terminal, where the terminal logical session node generated when establishing a session connection with the Internet of Things platform is deleted by the Internet of Things terminal;
  • a third receiving module configured to receive a session termination success message sent by the Internet of Things terminal that carries the logical session identifier, and delete the platform logical session node;
  • a second returning module configured to return to the IoT application to carry the logical session identifier a session termination success message, wherein the application logical session node generated when the first session instruction is initiated is deleted by the IoT application, and the session is terminated.
  • the embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things application, and the device includes:
  • the initiating module is configured to initiate a first session instruction including the first physical session identifier to the Internet of Things platform, where the first session instruction received by the Internet of Things platform is parsed and the parsed first session instruction is created After the platform logical session node, establish a session connection with the Internet of Things terminal;
  • a processing module configured to receive a logical session establishment success message including the logical session identifier sent after the IoT platform establishes a session connection with the Internet of Things terminal, and generates a logical session identifier, and obtains the logical session identifier and saves And feeding back the connection success message to the Internet of Things platform.
  • the first session instruction carries an Internet of Things terminal identifier and a session attribute.
  • the initiating module is further configured to: generate an application logical session node.
  • the device further includes:
  • a second sending module configured to send a termination session instruction carrying the logical session identifier to the Internet of Things platform, where the termination session command is sent by the Internet of Things platform to the Internet of Things terminal, and the receiving Determining a session termination success message returned by the Internet of Things terminal after deleting the terminal logical session node generated when the session connection is established with the Internet of Things platform;
  • the first receiving processing module is configured to receive the session termination success message forwarded by the IoT platform after deleting the platform logical session node, delete the application logical session node, and terminate the session.
  • an embodiment of the present invention further provides a device for implementing stateful operation in a stateless network protocol, which is applied to an Internet of Things terminal, and the device includes:
  • a fourth receiving module configured to receive a second session instruction sent by the Internet of Things platform, where the second session instruction creates a platform logical session node for the IoT platform and acquires a first physical session with the Internet of Things application Sent after the identification;
  • Establishing a return module configured to establish a session connection with the Internet of Things platform, and return a session establishment message to the Internet of Things platform, wherein the Internet of Things application and the Internet of Things terminal are generated by the Internet of Things platform a logical session identifier between logical sessions;
  • the second receiving processing module is configured to receive a logical session establishment success message that is sent by the Internet of Things platform and that carries the logical session identifier, and complete the delivery of the message according to the logical session identifier and the Internet of Things application.
  • the fourth receiving module is further configured to: generate a terminal logical session node, extract the session attribute carried in the second session instruction, and save the session attribute.
  • the device further includes:
  • a fifth receiving module configured to receive, by the IoT application, a termination session instruction that is sent by the Internet of Things platform and that carries the logical session identifier;
  • Deleting a module, configured to delete the terminal logical session node according to the terminating session instruction
  • a third sending module configured to send a session termination success message carrying the logical session identifier to the Internet of Things platform, where the IoT platform deletes the platform logical session node and returns to the Internet of Things application The session termination success message identified by the logical session, the application logical session node is deleted by the Internet of Things application, and the session is terminated.
  • Embodiments of the present invention provide a method for implementing stateful operation in a stateless network protocol, which initiates a logical session instruction through an Internet of Things application, and after the Internet of Things platform parses the logical session instruction, creates a platform logical session node for storage; establishing and corresponding The session connection between the Internet of Things terminals generates a logical session identifier; sends a logical session establishment success message carrying the logical session identifier to the Internet of Things application and the Internet of Things terminal, and forms a message transmission between the Internet of Things application and the Internet of Things terminal, which can be solved
  • the session must be kept complete when the session is delivered, the requester is resent when the session is lost, and the problem cannot be operated when multiple senders send messages to the same receiver, so that the Internet of Things application in the stateless network is in the Internet of Things.
  • the terminal performs stateful operations.
  • a device for implementing stateful operation is a device applying the foregoing method, and all embodiments of the foregoing method are applicable to the device, and both can achieve the same or similar Beneficial effect.
  • the embodiment of the invention further provides a computer readable storage medium, which stores a computer executable finger
  • the method of implementing stateful operations in the above stateless network protocol applied to the Internet of Things platform is implemented when the computer executable instructions are executed.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that, when executed, implement a method for implementing stateful operations in the above stateless network protocol applied to an Internet of Things application.
  • Embodiments of the present invention further provide a computer readable storage medium storing computer executable instructions, which when implemented, implement a method for implementing stateful operations in the above stateless network protocol applied to an Internet of Things terminal.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • the embodiments of the present application are not limited to any particular form of combination of hardware and software.
  • the embodiment of the present invention provides a method and an apparatus for implementing a stateful operation in a stateless network protocol, which can solve the problem that the session must be kept complete when the session is delivered, the session is resent, and the multiple senders are sent to the sender.
  • the problem that the same receiving end cannot operate when sending a message enables the IoT application to perform stateful operations on the IoT terminal in a stateless network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer And Data Communications (AREA)

Abstract

L'invention concerne un procédé pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états. Le procédé comprend les étapes consistant à : recevoir une première instruction de session contenant un premier identifiant de session physique, initiée par une application de l'Internet des objets ; après que la première instruction de session a été analysée, créer un nœud de session logique de plate-forme pour la première instruction de session analysée, et enregistrer le nœud de session logique de plate-forme dans une liste liée à une session de plate-forme correspondant à un identifiant de terminal de l'Internet des objets contenu dans la première instruction de session ; établir une connexion de session avec un terminal de l'Internet des objets correspondant à l'identifiant de terminal de l'Internet des objets contenu dans la première instruction de session, et générer un identifiant de session logique ; et retourner un message de réussite d'établissement de session logique contenant l'identifiant de session logique à l'application de l'Internet des objets et au terminal de l'Internet des objets, de sorte que l'application de l'Internet des objets et le terminal de l'Internet des objets exécutent une distribution de message au moyen de l'identifiant de session logique. La solution selon l'invention peut résoudre une variété de problèmes liés, dans l'état de la technique, à une distribution de session, et réalise une opération à états d'une application de l'Internet des objets sur un terminal de l'Internet des objets dans un réseau n'utilisant pas d'états.
PCT/CN2016/085873 2015-10-19 2016-06-15 Procédé et dispositif pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états WO2016197995A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510681160.1 2015-10-19
CN201510681160.1A CN106603611A (zh) 2015-10-19 2015-10-19 一种无状态网络协议中实现有状态操作的方法及装置

Publications (1)

Publication Number Publication Date
WO2016197995A1 true WO2016197995A1 (fr) 2016-12-15

Family

ID=57504572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/085873 WO2016197995A1 (fr) 2015-10-19 2016-06-15 Procédé et dispositif pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états

Country Status (2)

Country Link
CN (1) CN106603611A (fr)
WO (1) WO2016197995A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111064784A (zh) * 2019-12-12 2020-04-24 天翼物联科技有限公司 物联网会话实现方法、终端、平台、系统和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072233A (zh) * 2007-03-30 2007-11-14 腾讯科技(深圳)有限公司 基于无状态网络协议模拟有状态连接的方法及系统
CN102238201A (zh) * 2010-04-23 2011-11-09 中兴通讯股份有限公司 物联网应用模块及物联网应用与物联网终端的通信方法
WO2014124318A1 (fr) * 2013-02-08 2014-08-14 Interdigital Patent Holdings, Inc. Procédé et appareil pour incorporer une couche de protocole d'interface de service de l'internet des objets (iot) dans un nœud

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072233A (zh) * 2007-03-30 2007-11-14 腾讯科技(深圳)有限公司 基于无状态网络协议模拟有状态连接的方法及系统
CN102238201A (zh) * 2010-04-23 2011-11-09 中兴通讯股份有限公司 物联网应用模块及物联网应用与物联网终端的通信方法
WO2014124318A1 (fr) * 2013-02-08 2014-08-14 Interdigital Patent Holdings, Inc. Procédé et appareil pour incorporer une couche de protocole d'interface de service de l'internet des objets (iot) dans un nœud

Also Published As

Publication number Publication date
CN106603611A (zh) 2017-04-26

Similar Documents

Publication Publication Date Title
CN109067914B (zh) Web服务的代理方法、装置、设备及存储介质
CN108667730B (zh) 基于负载均衡的报文转发方法、装置、存储介质和设备
CN103780679B (zh) 基于http协议的长延时远程调用方法
US9392081B2 (en) Method and device for sending requests
US9185077B2 (en) Isolation proxy server system
EP3211852A1 (fr) Procédé et système d'analyse de session sur la base d'un protocole ssh
KR102208935B1 (ko) 데이터 교환을 위한 컨텍스트를 설정하는 http 프로토콜을 통한 메시징 api
US10958735B2 (en) Client connection method and system
US20160241664A1 (en) Method, device, and system for redirecting data by using service proxy
WO2014067311A1 (fr) Procédé et dispositif d'abonnement à des ressources
CN109327511B (zh) 一种基于http协议的数据请求方法和服务器
US11489810B2 (en) Intelligently routing a response packet along a same connection as a request packet
US20160337467A1 (en) Method and system for information exchange utilizing an asynchronous persistent store protocol
US20230421663A1 (en) Efficient resource representation exchange between service layers
CN104506450A (zh) 媒体资源反馈方法及装置
WO2020224241A1 (fr) Procédé et appareil de communication en nuage, équipement utilisateur et dispositif de réseau
CN111064729B (zh) 报文的处理方法及装置、存储介质和电子装置
WO2016197995A1 (fr) Procédé et dispositif pour réaliser une opération à états dans un protocole de réseau n'utilisant pas d'états
WO2019201111A1 (fr) Procédé, appareil et dispositif de traitement d'informations, et support de stockage lisible par ordinateur
CN110661850A (zh) 一种边缘计算方法、系统、计算机设备和存储介质
CN114172958B (zh) 隐私计算节点、系统、方法、装置以及存储介质
CN105912477B (zh) 一种目录读取的方法、装置及系统
CN110661895A (zh) 一种服务器的网络地址映射方法及网络地址映射设备
CN113746794B (zh) 账号的处理方法、装置、电子设备和计算机存储介质
EP4331211A1 (fr) Hachage cohérent pour dispositifs de communication

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: 16806893

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: 16806893

Country of ref document: EP

Kind code of ref document: A1