CN106603611A - Method and device for achieving stateful operation in stateless network protocol - Google Patents

Method and device for achieving stateful operation in stateless network protocol Download PDF

Info

Publication number
CN106603611A
CN106603611A CN201510681160.1A CN201510681160A CN106603611A CN 106603611 A CN106603611 A CN 106603611A CN 201510681160 A CN201510681160 A CN 201510681160A CN 106603611 A CN106603611 A CN 106603611A
Authority
CN
China
Prior art keywords
session
internet
things
platform
instruction
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201510681160.1A
Other languages
Chinese (zh)
Inventor
李伟华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510681160.1A priority Critical patent/CN106603611A/en
Priority to PCT/CN2016/085873 priority patent/WO2016197995A1/en
Publication of CN106603611A publication Critical patent/CN106603611A/en
Pending legal-status Critical Current

Links

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

Landscapes

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

Abstract

The invention provides a method and a device for achieving stateful operation in a stateless network protocol. The method comprises the following steps: receiving a first session instruction comprising a first physical session identifier initiated by an internet-of-things application, analyzing the first session instruction, then creating a platform logic session node of the first session instruction after analysis, and storing the platform logic session node in a platform session linked list corresponding to an internet-of-things terminal identifier carried by the first session instruction; establishing a session connection between internet-of-things terminals corresponding to the internet-of-things terminal identifier carried by the first session instruction, and generating a logic session identifier; and returning a message of successful establishment of a logic session carrying the logic session identifier to the internet-of-things application and the internet-of-things terminals to enable the internet-of-things application and the internet-of-things terminals to transfer messages by virtue of the logic session identifier. The method and the device provided by the invention can solve multiple problems of session transfer in the prior art, and achieve stateful operation by the internet-of-things application on the internet-of-things terminals in a stateless network.

Description

The method and device of real standing state operation in a kind of stateless procotol
Technical field
The present invention relates to real standing state in internet of things field, more particularly to a kind of stateless procotol The method and device of operation.
Background technology
Resource can be defined as one it is can directly accessing, stand-alone development, can dispose, it is manageable With maintainable software component, it supports specific data.Internet of Things resourceoriented framework (ROA) is Internet of Things transmits the soft of (Representational State Transfer, REST) style based on declarative state Part framework, the resource in environment of internet of things can be certain ability of certain terminal unit, terminal unit or Person's platform or certain ability of application.In towards ROA, data exchange is carried out centered on resource Operation, resource has common mode of operation, i.e. REST modes, and REST design packet contains several fundamental characteristics, One of basic feature:Stateless (Statelessness), i.e. each request to resource are (such as:HTTP Request) all it is isolated, do not rely on the request before or after it.But as the actual demand of real world, Do not ensure that each operation is independent, but exist or front or rear association, with reference to following several fields Scape.
Application scenarios one:
When there are two or more application terminals to issue query statement to same terminal unit simultaneously, inquire about Instruction needs to change the setting of terminal unit, terminal unit before inquiry operation is performed, according to application terminal Query statement perform certain arrange operation, when query statement perform after the completion of, terminal is recovered again in application terminal Equipment is to original setting.In this process, the application terminal for interacting needs and terminal unit Complete conversation procedure is set up, that is, is arranged -->Inquiry -->Recover, need serially to connect in a conversation procedure It is continuous to complete.
Application scenarios two:
Internet of Things radio equipment to machine agreement (Wireless Machine to Machine Protocol, WMMP) in protocol communication, multiple requests and response can constitute a complete session.In such cases, When application data packet length is more than one message inclusion greatest length of Internet, it may appear that many bag dispositions, Several situations can be divided:
Request bag subpackage.I.e. in the session of a WMMP communication process, requesting party has a data to ask Bag is asked to need transmission, answer party to receive after the request, the packet size of the response of return exceedes message inclusion Greatest length.Now, answer party will send data subpackage in the form of many bags this response to requesting party, Requesting party then sends a new request after each subpackage is received, to ask next subpackage, until receiving most Latter subpackage.
Response bag subpackage.I.e. in the session of a WMMP communication process, the request bag data of requesting party Bag size exceedes message inclusion.Now requesting party is sent to answer party with many packet modes and sends data subpackage, should The side of answering is received after subpackage, returns the subpackage response, and requesting party receives and next subpackage is sent after subpackage response, directly To last subpackage;The response message that answer party receives all subpackages and produces after processing is less than message inclusion Greatest length, now returns response bag;
Request-reply subpackage.This kind of mode is the combination of above both of which.
In former case, a session must be complete, and otherwise communicating pair is invalid regarding whole process, if During session communication, when producing subpackage or subpackage response loss, then retransmitted by requesting party and asked.
Application scenarios three:
Server is connected with sending client and receiving client based on stateless procotol, in server At least two session nodes, session node and two client phases are set up in the session table of simulation articulamentum Correspondence;Send client and send solicited message to server, the solicited message is objective comprising reception is ready for sending The exchange data at family end;Above-mentioned exchange data are kept in the corresponding session node of reception client by server; Receive client and send solicited message to server, server determines the corresponding session node of transmission client, Determine from the session table of simulation articulamentum and obtain at session node temporary exchange data, replying Above-mentioned exchange data are carried in information.During the connection of stateless procotol can be solved, the behaviour of real standing state Make.But if multiple client to same reception client sends message, or multiple client to same It is individual to receive the operation that client sends exclusive resource, such as, perform an exclusive inquiry operation, the scene Cannot solve.
It should be noted that " Internet of Things ", i.e., by RF identification (RFID), infrared inductor, the whole world The information sensing equipment such as alignment system, laser scanner, by the agreement of agreement, any article and the Internet Couple together, enter row information and exchange and communicate, to realize Weigh sensor, positioning, tracking, monitoring and manage The network of reason.
Internet of Things architectural framework can be divided into three levels:Sensing layer, Internet, application layer.Sensing layer Mainly include two-dimension code label and recognizer, RFID tag and read write line, photographic head, global positioning system, Sensor, sensor network and sensor gateway etc., sensing layer is mainly realized perceiving, recognizing object, gather, Capturing information.
Internet includes first Access Layer and transport layer, the fusion net formed by various communication networks and the Internet Network;Additionally include various general character platforms, such as capability of Internet of things open platform, Internet of Things management platform and Internet of Things information centre, cloud computing platform, specialist system etc. magnanimity information is managed and intellectual analysis at Reason.
Application layer be technology of Internet of things in combination with industry professional field technology, realize extensive intelligent Application Solution.
The content of the invention
It is an object of the invention to provide in a kind of stateless procotol the method for real standing state operation and Device, it is intended to solve in prior art session when session is transmitted must keep completely, session subpackage loss when by The problem that cannot be operated when requesting party resends and multiple transmitting terminals send message to same receiving terminal, it is real Existing Internet of Things to be applied in stateless network and internet-of-things terminal is carried out the operation that has state.
The method that the embodiment of the present invention provides real standing state operation in a kind of stateless procotol, is applied to Platform of internet of things, methods described includes:
The first session instruction that Internet of Things application is initiated is received, wherein first session instruction is to include first The logical session instruction of physics session identification;
The platform logic meeting of the first session instruction after parsing is created after parsing to first session instruction Words node, is stored in what the first session instruction was carried by the platform logic session node according to priority Internet-of-things terminal is identified in corresponding platform session chained list;
Instruct with first session and set up between the internet-of-things terminal corresponding internet-of-things terminal of mark for carrying Session connection, generation makes to carry out the logic of logical session between the Internet of Things application and the internet-of-things terminal Session identification;
The logic for carrying the logical session mark is returned to the Internet of Things application and the internet-of-things terminal Session establishment success message, makes the Internet of Things application with the internet-of-things terminal by the logical session mark Know the transmission of completion message.
Wherein, it is described that the internet-of-things terminal corresponding internet-of-things terminal of mark for carrying is instructed with first session Between include the step of set up session connection:
The second session instruction is sent to the internet-of-things terminal;
Receive and returned after the internet-of-things terminal reception the second session instruction generation terminal logic session node The session establishment message returned.
Wherein, the generation makes to carry out logical session between the Internet of Things application and the internet-of-things terminal Logical session is identified, including:
Create after parsing after the platform logic session node of the first session instruction, acquisition the first physics session Mark;
Session connection is set up between the internet-of-things terminal, the second thing that the internet-of-things terminal is returned is received Reason session identification;
The logical session is generated according to the first physics session identification and the second physics session identification Mark.
Wherein, it is described to instruct the step of parsing also to include first session, obtain first meeting The internet-of-things terminal mark carried in words instruction and session attribute.
Wherein, it is described to first session instruction parse after create parsing after the first session instruction put down Platform logical session node, including:
The internet-of-things terminal according to carrying in first session instruction is identified in internet-of-things terminal list It is middle to search the whether existing session of current internet-of-things terminal corresponding with internet-of-things terminal mark;
If current internet-of-things terminal does not have session, increase a node newly in the internet-of-things terminal list and deposit The first node address of platform session chained list corresponding with current internet-of-things terminal is put, and creates the platform logic Session node;If there is session in current internet-of-things terminal, according to the platform that current internet-of-things terminal node is included The first node address of session chained list corresponds to platform session chained list according to priority lookup, by the first session after parsing The session that instruction is placed on priority at the same level is last.
Wherein, if current internet-of-things terminal has a session, and session attribute is when being sharing mode, methods described Also include:
The first session instruction folding is to priority at the same level and in resource identification identical session after parsing.
Wherein, methods described also includes:
Receive the termination session instruction of the carrying logical session mark that the Internet of Things application sends;
The termination session instruction is sent to the internet-of-things terminal, is deleted by the internet-of-things terminal and institute State platform of internet of things and set up the terminal logic session node generated during session connection;
The session termination success message of the carrying logical session mark that the internet-of-things terminal sends is received, And delete the platform logic session node;
The session termination success message for carrying the logical session mark is returned to the Internet of Things application, by institute State Internet of Things application and delete the application logical session node for initiating to be generated when first session is instructed, terminate meeting Words.
The embodiment of the present invention also provides a kind of method of real standing state operation in stateless procotol, application In Internet of Things application, methods described includes:
Initiate to include the first session instruction of the first physics session identification to platform of internet of things, by the Internet of Things Platform is parsed and is created the flat of the first session instruction after parsing to first session instruction for receiving After platform logical session node, session connection is set up between internet-of-things terminal;
Receive the platform of internet of things to set up session connection with the internet-of-things terminal and generate logical session mark The logical session comprising logical session mark sent after knowledge is successfully established message, parses and is patrolled described in obtaining Collect session identification and preserve, to the platform of internet of things feedback link success message.
Wherein, internet-of-things terminal mark and session attribute are carried in the first session instruction.
Wherein, during initiation the first session instruction to platform of internet of things, methods described also includes:
Generate and apply logical session node.
Wherein, methods described also includes:
The termination session instruction for carrying the logical session mark is sent to the platform of internet of things, by the thing Networked platforms send the termination session instruction to the internet-of-things terminal, and receive the internet-of-things terminal Return after the terminal logic session node generated when deleting and setting up session connection with the platform of internet of things Session termination success message;
Receive the session that the platform of internet of things described in is forwarded after the platform logic session node is deleted Terminate success message, delete the application logical session node, terminate session.
The embodiment of the present invention also provides a kind of method of real standing state operation in stateless procotol, application In internet-of-things terminal, methods described includes:
The second session instruction that platform of internet of things sends is received, the second session instruction is flat for the Internet of Things Send out after platform establishment platform logic session node and the first physics session identification between acquisition and Internet of Things application Send;
Session connection is set up between the platform of internet of things, session establishment is returned to the platform of internet of things and is disappeared Breath, being generated by the platform of internet of things makes to carry out logic between the Internet of Things application and the internet-of-things terminal The logical session mark of session;
The logical session for receiving the carrying logical session mark that the platform of internet of things sends is successfully established Message, according to the logical session transmission with the Internet of Things application completion message is identified.
Wherein, described to receive after the second session instruction that platform of internet of things sends, methods described also includes:
Generate terminal logic session node;
The session attribute carried in the second session instruction is extracted, and is preserved.
Wherein, methods described also includes:
Receive the carrying logical session of the platform of internet of things forwarding by described in the Internet of Things application sends Jing The termination session instruction of mark;
According to the termination session instruction, the terminal logic session node is deleted;
The session termination success message for carrying the logical session mark is sent to the platform of internet of things, by institute State platform of internet of things to delete described in the backward Internet of Things application return carrying of the platform logic session node The session termination success message of logical session mark, is deleted by the Internet of Things application and applies logical session node, Terminate session.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In platform of internet of things, described device includes:
First receiver module, for receiving the first session instruction of Internet of Things application initiation, wherein described first Session instruction is the logical session instruction for including the first physics session identification;
Processing module is created, for creating the first session after parsing after parsing to first session instruction The platform logic session node of instruction, described is stored in by the platform logic session node according to priority The internet-of-things terminal that one session instruction is carried is identified in corresponding platform session chained list;
Generation module is set up, for instructing the internet-of-things terminal corresponding thing of mark for carrying with first session Session connection is set up between networked terminals, generation makes to enter between the Internet of Things application and the internet-of-things terminal The logical session mark of row logical session;
First returns module, patrols described in carrying for returning to the Internet of Things application and the internet-of-things terminal The logical session for collecting session identification is successfully established message, makes the Internet of Things application logical with the internet-of-things terminal Cross the transmission that the logical session identifies completion message.
Wherein, the generation module of setting up includes:
Sending submodule, for sending the second session instruction to the internet-of-things terminal;
First receiving submodule, the second session instruction generation is received eventually for receiving the internet-of-things terminal The session establishment message returned after the logical session node of end.
Wherein, the generation module of setting up also includes:
Acquisition submodule, after the platform logic session node for the first session instruction after establishment parsing, obtains The first physics session identification;
Second receiving submodule, for setting up session connection between the internet-of-things terminal, receives the thing The second physics session identification that networked terminals are returned;
Submodule is generated, for giving birth to according to the first physics session identification and the second physics session identification Into logical session mark.
Wherein, the establishment processing module is further used for:
Obtain the internet-of-things terminal mark and session attribute carried in the first session instruction.
Wherein, the establishment processing module includes:
Submodule is searched, for existing according to the internet-of-things terminal mark carried in first session instruction Current internet-of-things terminal corresponding with internet-of-things terminal mark is searched in internet-of-things terminal list whether There is session;
Submodule is processed, if there is no session for current internet-of-things terminal, in the internet-of-things terminal list In increase the first node address that node deposits platform session chained list corresponding with current internet-of-things terminal newly, and Create the platform logic session node;If there is session in current internet-of-things terminal, according to current Internet of Things end The first node address of the platform session chained list that end node is included corresponds to platform session chained list according to priority lookup, The session that first session instruction after parsing is placed on into priority at the same level is last.
Wherein, if current internet-of-things terminal has a session, and session attribute is when being sharing mode, the process Submodule is further used for:
The first session instruction folding is to priority at the same level and in resource identification identical session after parsing.
Wherein, described device also includes:
Second receiver module, for receiving the carrying logical session mark that the Internet of Things application sends Terminate session instruction;
First sending module, for the termination session instruction to be sent to the internet-of-things terminal, by described Internet-of-things terminal deletes the terminal logic session node generated when setting up session connection with the platform of internet of things;
3rd receiver module, for receiving the carrying logical session mark that the internet-of-things terminal sends Session termination success message, and delete the platform logic session node;
Second returns module, for returning the session for carrying the logical session mark to the Internet of Things application Terminate success message, the application for initiating to be generated when first session is instructed is deleted by the Internet of Things application and is patrolled Session node is collected, terminates session.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In Internet of Things application, described device includes:
Initiation module, for initiating to include the first session instruction of the first physics session identification to platform of internet of things, By the platform of internet of things first session instruction for receiving is parsed and created first after parsing After the platform logic session node of session instruction, session connection is set up between internet-of-things terminal;
Processing module, session connection and life are set up for receiving the platform of internet of things with the internet-of-things terminal The logical session comprising logical session mark sent into after logical session mark is successfully established message, solves Analysis obtains the logical session and identifies and preserve, to the platform of internet of things feedback link success message.
Wherein, internet-of-things terminal mark and session attribute are carried in the first session instruction.
Wherein, the initiation module is further used for:
Generate and apply logical session node.
Wherein, described device also includes:
Second sending module, for sending the termination for carrying the logical session mark to the platform of internet of things Session is instructed, and the termination session instruction is sent to the internet-of-things terminal by the platform of internet of things, and Receive the internet-of-things terminal delete set up session connection with the platform of internet of things when terminal that generates patrol Collect the session termination success message returned after session node;
First receiving processing module, for receiving platform of internet of things described in Jing the platform logic session is being deleted The session termination success message forwarded after node, deletes the application logical session node, terminates session.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In internet-of-things terminal, described device includes:
4th receiver module, for receiving the second session instruction of platform of internet of things transmission, second session Instruct for the platform of internet of things create platform logic session node and obtain and Internet of Things application between the Send after one physics session identification;
Set up and return module, for setting up session connection between the platform of internet of things, to the Internet of Things Platform returns session establishment message, and being generated by the platform of internet of things makes the Internet of Things application and the Internet of Things The logical session mark of logical session is carried out between network termination;
Second receiving processing module, for receiving the carrying logical session mark that the platform of internet of things sends The logical session of knowledge is successfully established message, completes to disappear with the Internet of Things application according to logical session mark The transmission of breath.
Wherein, the 4th receiver module is further used for:Terminal logic session node is generated, extracts described The session attribute carried in second session instruction, and preserve.
Wherein, described device also includes:
5th receiver module, for receiving the platform of internet of things forwarding by described in the Internet of Things application sends Jing Carry the termination session instruction of the logical session mark;
Removing module, for according to the termination session instruction, deleting the terminal logic session node;
3rd sending module, for sending the session for carrying the logical session mark to the platform of internet of things Terminate success message, the backward Internet of Things of the platform logic session node is deleted by the platform of internet of things The session termination success message that the logical session is identified is carried using returning, is deleted by the Internet of Things application Using logical session node, terminate session.
The above-mentioned technical proposal of the embodiment of the present invention at least includes following beneficial effect:
The embodiment of the present invention initiates logical session instruction by Internet of Things application, and platform of internet of things is to logical session After instruction is parsed, create platform logic session node and stored;Set up and corresponding internet-of-things terminal it Between session connection, generate logical session mark;Send to Internet of Things application and internet-of-things terminal and carry logic The logical session of session identification is successfully established message, message between formation working application and internet-of-things terminal Transmission, can solve in prior art session when session is transmitted must keep completely, session subpackage loss when by The problem that cannot be operated when requesting party resends and multiple transmitting terminals send message to same receiving terminal, it is real Existing Internet of Things to be applied in stateless network and internet-of-things terminal is carried out the operation that has state.
Description of the drawings
Fig. 1 is the method schematic diagram one of real standing state operation in embodiment of the present invention stateless procotol;
Fig. 2 is embodiment of the present invention internet-of-things terminal list schematic diagram;
Fig. 3 is the method schematic diagram two of real standing state operation in embodiment of the present invention stateless procotol;
Fig. 4 is the method schematic diagram three of real standing state operation in embodiment of the present invention stateless procotol;
Fig. 5 sets up overall flow schematic diagram for embodiment of the present invention logical session;
Fig. 6 is embodiment of the present invention messaging flow schematic diagram;
Fig. 7 is embodiment of the present invention termination logic session schematic flow sheet.
Specific embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attached Figure and specific embodiment are described in detail.
Internet-of-things terminal, platform of internet of things, Internet of Things application in the present invention represents respectively sensing layer, network Layer and application layer.
The method that the present invention provides real standing state operation in a kind of stateless procotol, is applied to Internet of Things Platform, as shown in figure 1, methods described includes:
Step S101, the first session instruction for receiving Internet of Things application initiation, wherein first session refers to Order is the logical session instruction for including the first physics session identification;
Step S102, to first session instruction parse after create parsing after the first session instruction Platform logic session node, first session is stored in by the platform logic session node according to priority The internet-of-things terminal that instruction is carried is identified in corresponding platform session chained list;
Step S103 Internet of Things end corresponding with the internet-of-things terminal mark that first session instruction is carried Session connection is set up between end, generation makes to carry out logic between the Internet of Things application and the internet-of-things terminal The logical session mark of session;
Step S104, return to the Internet of Things application and the internet-of-things terminal and carry the logical session The logical session of mark is successfully established message, makes the Internet of Things application with the internet-of-things terminal by described Logical session identifies the transmission of completion message.
By above-mentioned steps, can cause to be identified by logical session between Internet of Things application and internet-of-things terminal The transmission of completion message, realizes that Internet of Things being applied in stateless network carry out internet-of-things terminal and has state Operation.
Platform of internet of things is the extensive concept of comparison, in actual applications, platform of internet of things can be by One or more equipment are constituted, such as capability of Internet of things open platform, Internet of Things management platform, Internet of Things information Center etc..
Specifically, platform of internet of things receive that Internet of Things application sends including the first of the first physics session identification Session is instructed, and the first session instruction is essentially logical session instruction.
It should be noted that end to end connection of the logical session comprising multiple Internet/transport layers, with opening Systems Interconnection Reference (Open System Interconnect, OSI) the layer conversation layer of model the 5th is different, OSI Session layer is mainly the management service of the dialogue connection that two session layer entities conversate and provide, OSI meetings Session layer relies on the end to end connection of Internet/transport layer.Briefly, logical session can include multiple OSI Session layer.If the session created when user A and server S connection is with terminal unit D and server S The session created during connection is two different sessions.In Internet of Things framework environment, then user A is needed Set up a session end to end to terminal unit D, this session can comprising user A and server S and The session of terminal unit D and server S.In order to distinguish two kinds of sessions, claim to include multiple meetings in the present invention The session of words is logical session, and the general session for being comprised in logical session is referred to as physics session.
Platform of internet of things is parsed after the first session instruction is received to the first session instruction, is then created The platform logic session node of the first session instruction after parsing, each platform logic session node represents a meeting Words, platform logic session node contains session attribute, priority etc..It should be noted that platform logic Session node is the logical session node of platform of internet of things establishment, creates and stored after platform logic session node In corresponding platform session chained list.
Platform session chained list is made up of one or more platform logic session nodes, and each internet-of-things terminal is unique Correspondence one platform session chained list, platform of internet of things create represent session platform logic session node after, The corresponding platform session chained list of the internet-of-things terminal is found by internet-of-things terminal mark, and by platform session The first node address of chained list, platform session chained list is put into by the platform logic session node of establishment according to priority Correct position.
The first node of each platform session chained list includes two data link tables:Instruction message chained list and response message Chained list.Instruction message storage of linked list one or more Internet of Things applications are sent to the message of internet-of-things terminal, ring The message storage of linked list internet-of-things terminal is answered to be sent to the message of one or more Internet of Things applications, response message The corresponding chained list of Internet of Things application is also set up according to Internet of Things application identities, platform of internet of things should according to Internet of Things With the outgoing data corresponding to chained list quick search Internet of Things application, response message chained list is mainly used in Internet of Things The information reporting of terminal.
Platform of internet of things instructs the internet-of-things terminal corresponding internet-of-things terminal of mark for carrying to build with the first session After vertical session connection, logical session mark is generated so that can enter between Internet of Things application and internet-of-things terminal Row logical session.Then platform of internet of things is returned to Internet of Things application and internet-of-things terminal and carries logical session mark The logical session of knowledge is successfully established message, completes the transmission of message between Internet of Things application and internet-of-things terminal.
In the above embodiment of the present invention, step S103 instructs the Internet of Things end for carrying with first session The step of setting up session connection between the corresponding internet-of-things terminal of end mark includes:
The second session instruction is sent to the internet-of-things terminal;
Receive and returned after the internet-of-things terminal reception the second session instruction generation terminal logic session node The session establishment message returned.
Specifically, platform of internet of things is parsed in the first session of reception instruction and to the first session instruction, creates The platform logic session node of the first session instruction after parsing is built, by platform logic session node according to priority After being stored in the corresponding platform session chained list of internet-of-things terminal mark that the first session instruction is carried, Xiang Yu The internet-of-things terminal that one session instruction is carried identifies corresponding internet-of-things terminal and sends the second session instruction so that Internet-of-things terminal generates terminal logic session node after the second session instruction is received, and flat to Internet of Things Platform return session establishment message, platform of internet of things receive internet-of-things terminal return session establishment message after, Complete the session connection between internet-of-things terminal.
In the above embodiment of the present invention, step S103 is generated and makes the Internet of Things application and the Internet of Things The logical session mark of logical session is carried out between terminal, including:
Create after parsing after the platform logic session node of the first session instruction, acquisition the first physics session Mark;
Session connection is set up between the internet-of-things terminal, the second thing that the internet-of-things terminal is returned is received Reason session identification;
The logical session is generated according to the first physics session identification and the second physics session identification Mark.
Specifically, platform of internet of things receive the first session instruction after, to the first session instruction parsed and Create after parsing after the platform logic session node of the first session instruction, obtain the and Internet of Things application between One physics session identification.Platform of internet of things is set up after session connection between internet-of-things terminal, receives Internet of Things The second physics session identification that network termination is returned.Sent according to the first physics session identification and internet-of-things terminal Second physics session identification, separately adds timestamp, and by hash function logical session mark is generated.Need explanation , the first physics session identification be stored in the first session instruction in, when platform of internet of things refers to the first session Order is parsed and created after the platform logic session node that the first session is instructed after parsing, is obtained and Internet of Things The first physics session identification using between;When platform of internet of things sends the second session instruction to internet-of-things terminal, Received after the second session instruction by internet-of-things terminal, generate terminal logic session node and return and put down with Internet of Things The second physics session identification between platform.
In the above embodiment of the present invention, step S101 instructs the step of parsing to first session Also include:
Obtain the internet-of-things terminal mark and session attribute carried in the first session instruction.
Specifically, platform of internet of things to the first session instruction parse when, obtain the first session instruction in The internet-of-things terminal mark of carrying and session attribute.Session attribute includes:It is shared or exclusive, if solely Access is accounted for, lock mechanism is set, and access request is ranked.So ensure in environment of internet of things, it is many When individual Internet of Things application accesses same internet-of-things terminal, unauthorized access is not resulted in.
In the above embodiment of the present invention, step S102 is created after parsing to first session instruction The platform logic session node of the first session instruction after parsing, including:
The internet-of-things terminal according to carrying in first session instruction is identified in internet-of-things terminal list It is middle to search the whether existing session of current internet-of-things terminal corresponding with internet-of-things terminal mark;
If current internet-of-things terminal does not have session, increase a node newly in the internet-of-things terminal list and deposit The first node address of platform session chained list corresponding with current internet-of-things terminal is put, and creates the platform logic Session node;If there is session in current internet-of-things terminal, according to the platform that current internet-of-things terminal node is included The first node address of session chained list corresponds to platform session chained list according to priority lookup, by the first session after parsing The session that instruction is placed on priority at the same level is last.
Specifically, as shown in Fig. 2 internet-of-things terminal list is organized by internet-of-things terminal, list node bag First node address containing internet-of-things terminal mark and corresponding platform session chained list.Internet-of-things terminal is obtained first Mark, searches corresponding with internet-of-things terminal mark according to internet-of-things terminal mark in internet-of-things terminal list The whether existing session of current internet-of-things terminal, if current internet-of-things terminal does not have session, needs A node is increased in internet-of-things terminal list newly, for depositing platform session corresponding with current internet-of-things terminal The first node address of chained list, while creating the platform logic meeting for preserving session in corresponding platform session chained list Words node.
If there is session in current internet-of-things terminal, according to the platform meeting that current internet-of-things terminal node is included The first node address of words chained list refers to the first session after parsing according to priority lookup correspondence platform session chained list The session that order is placed on priority at the same level is last.
The session attribute in the first session instruction is extracted, if current internet-of-things terminal has session, and session belongs to Property for sharing mode when, by the first session instruction folding after parsing to peer's priority and resource identification identical In session.
In the above embodiment of the present invention, methods described also includes:
Receive the termination session instruction of the carrying logical session mark that the Internet of Things application sends;
The termination session instruction is sent to the internet-of-things terminal, is deleted by the internet-of-things terminal and institute State platform of internet of things and set up the terminal logic session node generated during session connection;
The session termination success message of the carrying logical session mark that the internet-of-things terminal sends is received, And delete the platform logic session node;
The session termination success message for carrying the logical session mark is returned to the Internet of Things application, by institute State Internet of Things application and delete the application logical session node for initiating to be generated when first session is instructed, terminate meeting Words.
Specifically, the termination session instruction of the carrying logical session mark that Internet of Things application sends is received, will be taken Termination session instruction with logical session mark is forwarded to internet-of-things terminal so that internet-of-things terminal is according to termination Terminal logic session node is deleted in session instruction, and wherein terminal logic session node is internet-of-things terminal and Internet of Things Net platform sets up what is generated during session connection.Receive internet-of-things terminal to send out after terminal logic session node is deleted The session termination success message of the carrying logical session mark sent, and according to session termination success message, delete Platform logic session node.And the session termination to Internet of Things application return carrying logical session mark successfully disappears Breath so that Internet of Things application is deleted and applies logical session node, terminates session, wherein using logical session section Point is that Internet of Things application is initiated to be generated when the first session is instructed.
The embodiment of the present invention also provides a kind of method of real standing state operation in stateless procotol, application In Internet of Things application, as shown in figure 3, methods described includes:
Step S201, the first session instruction for including the first physics session identification to platform of internet of things initiation, By the platform of internet of things first session instruction for receiving is parsed and created first after parsing After the platform logic session node of session instruction, session connection is set up between internet-of-things terminal;
Step S202, the reception platform of internet of things set up session connection and generation with the internet-of-things terminal The logical session comprising logical session mark sent after logical session mark is successfully established message, parses Obtain the logical session to identify and preserve, to the platform of internet of things feedback link success message.
Specifically, Internet of Things application is to run software on the subscriber terminal, in the present invention, user terminal There is the software unit of a session management, for initiating/terminate session.When Internet of Things application needs to initiate meeting During words, the interface for calling session management to provide, therefore, session management unit can be served on user terminal Multiple Internet of Things applications a, internet-of-things terminal can run multiple Internet of Things applications.
Internet of Things application sends first to platform of internet of things includes that the first session of the first physics session identification refers to Order, applies logical session node so that platform of internet of things is connecing sending to be generated while the first session is instructed After receiving the first session instruction, the first session instruction is parsed, obtain what is carried in the first session instruction Internet-of-things terminal is identified and session attribute, then according to internet-of-things terminal identifier lookup to corresponding platform session Chained list, it should be noted that the composition internet-of-things terminal list of multiple internet-of-things terminals, internet-of-things terminal list In a list node represent an internet-of-things terminal, list node is identified comprising internet-of-things terminal and corresponded to Platform session chained list first node address.The first session instruction after parsing is created under platform session chained list Platform logic session node.Then set up by platform of internet of things and the session connection between internet-of-things terminal.
Receive platform of internet of things to set up session connection with internet-of-things terminal and generate transmission after logical session mark Logical session be successfully established message, wherein logical session is successfully established in message comprising logical session mark. Extraction logic session identification is successfully established in message from the logical session for receiving and is preserved, to platform of internet of things Feedback link success message, completes the foundation of the logical session between Internet of Things application and internet-of-things terminal.
In the above embodiment of the present invention, methods described also includes:
The termination session instruction for carrying the logical session mark is sent to the platform of internet of things, by the thing Networked platforms send the termination session instruction to the internet-of-things terminal, and receive the internet-of-things terminal Return after the terminal logic session node generated when deleting and setting up session connection with the platform of internet of things Session termination success message;
Receive the session that the platform of internet of things described in is forwarded after the platform logic session node is deleted Terminate success message, delete the application logical session node, terminate session.
Specifically, when session is terminated, the termination session for carrying logical session mark is sent to platform of internet of things Instruction so that platform of internet of things will terminate session instruction transmission to Internet of Things after termination session instruction is received Terminal, terminal logic session node, wherein terminal logic are deleted by internet-of-things terminal according to session instruction is terminated Session node is generated when internet-of-things terminal sets up session connection with platform of internet of things, is sent out to platform of internet of things Session termination success message is sent, session termination is forwarded after platform logic session node is deleted by platform of internet of things Success message, receives the session termination success message that platform of internet of things sends, and is successfully disappeared according to session termination Breath is deleted and applies logical session node, terminates conversation procedure.
The embodiment of the present invention also provides a kind of method of real standing state operation in stateless procotol, application In internet-of-things terminal, as shown in figure 4, methods described includes:
Step S301, the second session instruction for receiving platform of internet of things transmission, second session instructs and is The platform of internet of things creates platform logic session node and obtains and the first physics between Internet of Things application Send after session identification;
Session connection is set up between step S302 and the platform of internet of things, is returned to the platform of internet of things Session establishment message is returned, being generated by the platform of internet of things makes the Internet of Things application and the internet-of-things terminal Between carry out logical session logical session mark;
Step S303, the logic meeting for receiving the carrying logical session mark that the platform of internet of things sends Words are successfully established message, and according to the logical session transmission with the Internet of Things application completion message is identified.
Specifically, receive the first session instruction in platform of internet of things and the first session instruction is parsed, create Build the platform logic session node of the first session instruction after parsing, platform logic session node is stored and After obtaining the first physics session identification, the second session instruction is sent from platform of internet of things to internet-of-things terminal, connect The second session instruction that platform of internet of things sends is received, session connection is set up between platform of internet of things, to Internet of Things Net platform returns session establishment message.
The logical session for receiving platform of internet of things transmission is successfully established message, and wherein logical session is successfully established and disappears Platform of internet of things is carried in breath after session establishment message is received, according to the second of internet-of-things terminal return The logical session mark that physics session identification and the first physics session identification between Internet of Things application are generated, According to the transmission of logical session mark and Internet of Things application completion message.
It is described after the second session instruction that platform of internet of things sends is received in the above embodiment of the present invention Method also includes:
Generate terminal logic session node;
The session attribute carried in the second session instruction is extracted, and is preserved.
Specifically, after the second session instruction that platform of internet of things sends is received, given birth to according to the second session instruction Into terminal logic session node, this logical session attribute is preserved and arranged, and meeting is returned to platform of internet of things Words set up message.
In the above embodiment of the present invention, methods described also includes:
Receive the carrying logical session of the platform of internet of things forwarding by described in the Internet of Things application sends Jing The termination session instruction of mark;
According to the termination session instruction, the terminal logic session node is deleted;
The session termination success message for carrying the logical session mark is sent to the platform of internet of things, by institute State platform of internet of things to delete described in the backward Internet of Things application return carrying of the platform logic session node The session termination success message of logical session mark, is deleted by the Internet of Things application and applies logical session node, Terminate session.
Specifically, the termination session sent by Internet of Things application for receiving the forwarding of Jing platform of internet of things is instructed, its Logical session mark is carried in middle termination session instruction, is referred to according to the termination session for carrying logical session mark Order, deletes terminal logic session node;Then the session for carrying logical session mark is sent to platform of internet of things Terminate success message, it is backward that platform of internet of things deletes platform logic session node according to session termination success message Internet of Things application returns the session termination success message for carrying logical session mark, and Internet of Things application is according to session Terminate success message to delete using logical session node, terminate whole session flow process.
As shown in figure 5, setting up overall flow schematic diagram for embodiment of the present invention logical session:
Step S401, Internet of Things application send the first session instruction to platform of internet of things.
Step S402, platform of internet of things receive the first session instruction, and according to the first session generating platform is instructed Logical session node.
Step S403, platform of internet of things to internet-of-things terminal initiates the second session instruction.
Step S404, internet-of-things terminal receive the second session instruction, generate terminal logic session node.
Step S405, internet-of-things terminal to platform of internet of things sends session establishment message.
Step S406, platform of internet of things are generated after logical session mark, to Internet of Things application and Internet of Things end End sends logical session and is successfully established message.
Step S407, Internet of Things application and internet-of-things terminal are to platform of internet of things feedback link success message.
After logical session is successfully established, the transmission for carrying out message is needed, as shown in fig. 6, detailed process is such as Under:
Step S501, Internet of Things application send the first instruction message, identify comprising logical session in message.
Step S502, platform of internet of things receive the first instruction message, parse the first instruction message and create flat Platform logical session node, obtains logical session mark, preserves the first instruction message.
Step S503, platform of internet of things send the second instruction message, issue the Internet of Things of this logical session Terminal, identifies in message comprising logical session.
Step S504, internet-of-things terminal receive the second instruction message, generate terminal logic session node, protect The second instruction message is deposited, according to implementation strategy execute instruction, implementing result is generated.
Step S505, internet-of-things terminal to platform of internet of things returns response message, comprising logic meeting in message Words mark.
Step S506, platform of internet of things receive the response message of internet-of-things terminal return, parse and obtain and patrol Session identification is collected, generating platform logical session node preserves response message.
Step S507, platform of internet of things to Internet of Things application returns response message, wherein, in response message Contain logical session mark.
Step S508, Internet of Things application receive response message, parse and obtain implementing result, preserve response Message.
After the completion of interacting message, carry out terminating session flow process, as shown in fig. 7, being specially:
Step S601, Internet of Things application are initiated to terminate session instruction, identify comprising logical session in message.
Step S602, platform of internet of things forwarding terminate session instruction.
Step S603, internet-of-things terminal receive termination session instruction, delete terminal logic session node.
Step S604, internet-of-things terminal to platform of internet of things returns session termination success message, wraps in message Containing logical session mark.
Step S605, platform of internet of things delete platform logic session node.
Step S606, platform of internet of things to Internet of Things application returns session termination success message, wraps in message Containing logical session mark.
Step S607, Internet of Things application receive session termination success message, delete and apply logical session node.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In platform of internet of things, described device includes:
First receiver module, for receiving the first session instruction of Internet of Things application initiation, wherein described first Session instruction is the logical session instruction for including the first physics session identification;
Processing module is created, for creating the first session after parsing after parsing to first session instruction The platform logic session node of instruction, described is stored in by the platform logic session node according to priority The internet-of-things terminal that one session instruction is carried is identified in corresponding platform session chained list;
Generation module is set up, for instructing the internet-of-things terminal corresponding thing of mark for carrying with first session Session connection is set up between networked terminals, generation makes to enter between the Internet of Things application and the internet-of-things terminal The logical session mark of row logical session;
First returns module, patrols described in carrying for returning to the Internet of Things application and the internet-of-things terminal The logical session for collecting session identification is successfully established message, makes the Internet of Things application logical with the internet-of-things terminal Cross the transmission that the logical session identifies completion message.
In the above embodiment of the present invention, the generation module of setting up includes:
Sending submodule, for sending the second session instruction to the internet-of-things terminal;
First receiving submodule, the second session instruction generation is received eventually for receiving the internet-of-things terminal The session establishment message returned after the logical session node of end.
In the above embodiment of the present invention, the generation module of setting up also includes:
Acquisition submodule, after the platform logic session node for the first session instruction after establishment parsing, obtains The first physics session identification;
Second receiving submodule, for setting up session connection between the internet-of-things terminal, receives the thing The second physics session identification that networked terminals are returned;
Submodule is generated, for giving birth to according to the first physics session identification and the second physics session identification Into logical session mark.
In the above embodiment of the present invention, the establishment processing module is further used for:
Obtain the internet-of-things terminal mark and session attribute carried in the first session instruction.
In the above embodiment of the present invention, the establishment processing module includes:
Submodule is searched, for existing according to the internet-of-things terminal mark carried in first session instruction Current internet-of-things terminal corresponding with internet-of-things terminal mark is searched in internet-of-things terminal list whether There is session;
Submodule is processed, if there is no session for current internet-of-things terminal, in the internet-of-things terminal list In increase the first node address that node deposits platform session chained list corresponding with current internet-of-things terminal newly, and Create the platform logic session node;If there is session in current internet-of-things terminal, according to current Internet of Things end The first node address of the platform session chained list that end node is included corresponds to platform session chained list according to priority lookup, The session that first session instruction after parsing is placed on into priority at the same level is last.
In the above embodiment of the present invention, if current internet-of-things terminal has session, and session attribute is shared During mode, the process submodule is further used for:
The first session instruction folding is to priority at the same level and in resource identification identical session after parsing.
In the above embodiment of the present invention, described device also includes:
Second receiver module, for receiving the carrying logical session mark that the Internet of Things application sends Terminate session instruction;
First sending module, for the termination session instruction to be sent to the internet-of-things terminal, by described Internet-of-things terminal deletes the terminal logic session node generated when setting up session connection with the platform of internet of things;
3rd receiver module, for receiving the carrying logical session mark that the internet-of-things terminal sends Session termination success message, and delete the platform logic session node;
Second returns module, for returning the session for carrying the logical session mark to the Internet of Things application Terminate success message, the application for initiating to be generated when first session is instructed is deleted by the Internet of Things application and is patrolled Session node is collected, terminates session.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In Internet of Things application, described device includes:
Initiation module, for initiating to include the first session instruction of the first physics session identification to platform of internet of things, By the platform of internet of things first session instruction for receiving is parsed and created first after parsing After the platform logic session node of session instruction, session connection is set up between internet-of-things terminal;
Processing module, session connection and life are set up for receiving the platform of internet of things with the internet-of-things terminal The logical session comprising logical session mark sent into after logical session mark is successfully established message, solves Analysis obtains the logical session and identifies and preserve, to the platform of internet of things feedback link success message.
In the above embodiment of the present invention, in the first session instruction internet-of-things terminal mark and meeting are carried Words attribute.
In the above embodiment of the present invention, the initiation module is further used for:
Generate and apply logical session node.
In the above embodiment of the present invention, described device also includes:
Second sending module, for sending the termination for carrying the logical session mark to the platform of internet of things Session is instructed, and the termination session instruction is sent to the internet-of-things terminal by the platform of internet of things, and Receive the internet-of-things terminal delete set up session connection with the platform of internet of things when terminal that generates patrol Collect the session termination success message returned after session node;
First receiving processing module, for receiving platform of internet of things described in Jing the platform logic session is being deleted The session termination success message forwarded after node, deletes the application logical session node, terminates session.
The embodiment of the present invention also provides a kind of device of real standing state operation in stateless procotol, application In internet-of-things terminal, described device includes:
4th receiver module, for receiving the second session instruction of platform of internet of things transmission, second session Instruct for the platform of internet of things create platform logic session node and obtain and Internet of Things application between the Send after one physics session identification;
Set up and return module, for setting up session connection between the platform of internet of things, to the Internet of Things Platform returns session establishment message, and being generated by the platform of internet of things makes the Internet of Things application and the Internet of Things The logical session mark of logical session is carried out between network termination;
Second receiving processing module, for receiving the carrying logical session mark that the platform of internet of things sends The logical session of knowledge is successfully established message, completes to disappear with the Internet of Things application according to logical session mark The transmission of breath.
In the above embodiment of the present invention, the 4th receiver module is further used for:Generate terminal logic meeting Words node, extracts the session attribute carried in the second session instruction, and preserves.
In the above embodiment of the present invention, described device also includes:
5th receiver module, for receiving the platform of internet of things forwarding by described in the Internet of Things application sends Jing Carry the termination session instruction of the logical session mark;
Removing module, for according to the termination session instruction, deleting the terminal logic session node;
3rd sending module, for sending the session for carrying the logical session mark to the platform of internet of things Terminate success message, the backward Internet of Things of the platform logic session node is deleted by the platform of internet of things The session termination success message that the logical session is identified is carried using returning, is deleted by the Internet of Things application Using logical session node, terminate session.
The method that the embodiment of the present invention provides real standing state operation in a kind of stateless procotol, by thing Working application initiates logical session instruction, after platform of internet of things is parsed to logical session instruction, creates flat Platform logical session node is stored;Set up and the session connection between corresponding internet-of-things terminal, generate logic Session identification;The logical session foundation for carrying logical session mark is sent to Internet of Things application and internet-of-things terminal Success message, the transmission of message between formation working application and internet-of-things terminal, can solve prior art When middle session is transmitted session must keep completely, session subpackage loss when resend by requesting party and multiple The problem that transmitting terminal cannot be operated when sending message to same receiving terminal, realizes that Internet of Things is applied in stateless net The operation for having state is carried out to internet-of-things terminal in network.
It should be noted that real standing state operation in stateless procotol provided in an embodiment of the present invention Device is the device using said method, then all embodiments of said method are applied to the device, and Same or analogous beneficial effect can be reached.
The above is the preferred embodiment of the present invention, it is noted that for the common skill of the art For art personnel, on the premise of without departing from principle of the present invention, some improvements and modifications can also be made, These improvements and modifications also should be regarded as protection scope of the present invention.

Claims (28)

1. a kind of method that real standing state is operated in stateless procotol, is applied to platform of internet of things, its It is characterised by, methods described includes:
The first session instruction that Internet of Things application is initiated is received, wherein first session instruction is to include first The logical session instruction of physics session identification;
The platform logic meeting of the first session instruction after parsing is created after parsing to first session instruction Words node, is stored in what the first session instruction was carried by the platform logic session node according to priority Internet-of-things terminal is identified in corresponding platform session chained list;
Instruct with first session and set up between the internet-of-things terminal corresponding internet-of-things terminal of mark for carrying Session connection, generation makes to carry out the logic of logical session between the Internet of Things application and the internet-of-things terminal Session identification;
The logic for carrying the logical session mark is returned to the Internet of Things application and the internet-of-things terminal Session establishment success message, makes the Internet of Things application with the internet-of-things terminal by the logical session mark Know the transmission of completion message.
2. the method for claim 1, it is characterised in that described to carry with first session instruction Internet-of-things terminal identify the step of setting up session connection between corresponding internet-of-things terminal and include:
The second session instruction is sent to the internet-of-things terminal;
Receive and returned after the internet-of-things terminal reception the second session instruction generation terminal logic session node The session establishment message returned.
3. the method for claim 1, it is characterised in that the generation make the Internet of Things application with The logical session mark of logical session is carried out between the internet-of-things terminal, including:
Create after parsing after the platform logic session node of the first session instruction, acquisition the first physics session Mark;
Session connection is set up between the internet-of-things terminal, the second thing that the internet-of-things terminal is returned is received Reason session identification;
The logical session is generated according to the first physics session identification and the second physics session identification Mark.
4. the method for claim 1, it is characterised in that described that first session instruction is carried out The step of parsing, also includes, obtains the internet-of-things terminal carried in the first session instruction and identify and session category Property.
5. method as claimed in claim 4, it is characterised in that described that first session instruction is carried out The platform logic session node of the first session instruction after parsing is created after parsing, including:
The internet-of-things terminal according to carrying in first session instruction is identified in internet-of-things terminal list It is middle to search the whether existing session of current internet-of-things terminal corresponding with internet-of-things terminal mark;
If current internet-of-things terminal does not have session, increase a node newly in the internet-of-things terminal list and deposit The first node address of platform session chained list corresponding with current internet-of-things terminal is put, and creates the platform logic Session node;If there is session in current internet-of-things terminal, according to the platform that current internet-of-things terminal node is included The first node address of session chained list corresponds to platform session chained list according to priority lookup, by the first session after parsing The session that instruction is placed on priority at the same level is last.
6. method as claimed in claim 5, it is characterised in that if current internet-of-things terminal has session, And session attribute be sharing mode when, methods described also includes:
The first session instruction folding is to priority at the same level and in resource identification identical session after parsing.
7. the method for claim 1, it is characterised in that methods described also includes:
Receive the termination session instruction of the carrying logical session mark that the Internet of Things application sends;
The termination session instruction is sent to the internet-of-things terminal, is deleted by the internet-of-things terminal and institute State platform of internet of things and set up the terminal logic session node generated during session connection;
The session termination success message of the carrying logical session mark that the internet-of-things terminal sends is received, And delete the platform logic session node;
The session termination success message for carrying the logical session mark is returned to the Internet of Things application, by institute State Internet of Things application and delete the application logical session node for initiating to be generated when first session is instructed, terminate meeting Words.
8. a kind of method that real standing state is operated in stateless procotol, is applied to Internet of Things application, its It is characterised by, methods described includes:
Initiate to include the first session instruction of the first physics session identification to platform of internet of things, by the Internet of Things Platform is parsed and is created the flat of the first session instruction after parsing to first session instruction for receiving After platform logical session node, session connection is set up between internet-of-things terminal;
Receive the platform of internet of things to set up session connection with the internet-of-things terminal and generate logical session mark The logical session comprising logical session mark sent after knowledge is successfully established message, parses and is patrolled described in obtaining Collect session identification and preserve, to the platform of internet of things feedback link success message.
9. method as claimed in claim 8, it is characterised in that carry thing in the first session instruction Networked terminals are identified and session attribute.
10. method as claimed in claim 8, it is characterised in that described to initiate first to platform of internet of things When session is instructed, methods described also includes:
Generate and apply logical session node.
11. methods as claimed in claim 10, it is characterised in that methods described also includes:
The termination session instruction for carrying the logical session mark is sent to the platform of internet of things, by the thing Networked platforms send the termination session instruction to the internet-of-things terminal, and receive the internet-of-things terminal Return after the terminal logic session node generated when deleting and setting up session connection with the platform of internet of things Session termination success message;
Receive the session that the platform of internet of things described in is forwarded after the platform logic session node is deleted Terminate success message, delete the application logical session node, terminate session.
The method of real standing state operation, is applied to internet-of-things terminal in a kind of 12. stateless procotols, Characterized in that, methods described includes:
The second session instruction that platform of internet of things sends is received, the second session instruction is flat for the Internet of Things Send out after platform establishment platform logic session node and the first physics session identification between acquisition and Internet of Things application Send;
Session connection is set up between the platform of internet of things, session establishment is returned to the platform of internet of things and is disappeared Breath, being generated by the platform of internet of things makes to carry out logic between the Internet of Things application and the internet-of-things terminal The logical session mark of session;
The logical session for receiving the carrying logical session mark that the platform of internet of things sends is successfully established Message, according to the logical session transmission with the Internet of Things application completion message is identified.
13. methods as claimed in claim 12, it is characterised in that what the reception platform of internet of things sent After second session instruction, methods described also includes:
Generate terminal logic session node;
The session attribute carried in the second session instruction is extracted, and is preserved.
14. methods as claimed in claim 13, it is characterised in that methods described also includes:
Receive the carrying logical session of the platform of internet of things forwarding by described in the Internet of Things application sends Jing The termination session instruction of mark;
According to the termination session instruction, the terminal logic session node is deleted;
The session termination success message for carrying the logical session mark is sent to the platform of internet of things, by institute State platform of internet of things to delete described in the backward Internet of Things application return carrying of the platform logic session node The session termination success message of logical session mark, is deleted by the Internet of Things application and applies logical session node, Terminate session.
The device of real standing state operation, is applied to platform of internet of things in a kind of 15. stateless procotols, Characterized in that, described device includes:
First receiver module, for receiving the first session instruction of Internet of Things application initiation, wherein described first Session instruction is the logical session instruction for including the first physics session identification;
Processing module is created, for creating the first session after parsing after parsing to first session instruction The platform logic session node of instruction, described is stored in by the platform logic session node according to priority The internet-of-things terminal that one session instruction is carried is identified in corresponding platform session chained list;
Generation module is set up, for instructing the internet-of-things terminal corresponding thing of mark for carrying with first session Session connection is set up between networked terminals, generation makes to enter between the Internet of Things application and the internet-of-things terminal The logical session mark of row logical session;
First returns module, patrols described in carrying for returning to the Internet of Things application and the internet-of-things terminal The logical session for collecting session identification is successfully established message, makes the Internet of Things application logical with the internet-of-things terminal Cross the transmission that the logical session identifies completion message.
16. devices as claimed in claim 15, it is characterised in that the generation module of setting up includes:
Sending submodule, for sending the second session instruction to the internet-of-things terminal;
First receiving submodule, the second session instruction generation is received eventually for receiving the internet-of-things terminal The session establishment message returned after the logical session node of end.
17. devices as claimed in claim 15, it is characterised in that the generation module of setting up also includes:
Acquisition submodule, after the platform logic session node for the first session instruction after establishment parsing, obtains The first physics session identification;
Second receiving submodule, for setting up session connection between the internet-of-things terminal, receives the thing The second physics session identification that networked terminals are returned;
Submodule is generated, for giving birth to according to the first physics session identification and the second physics session identification Into logical session mark.
18. devices as claimed in claim 15, it is characterised in that the establishment processing module is further used In:
Obtain the internet-of-things terminal mark and session attribute carried in the first session instruction.
19. devices as claimed in claim 18, it is characterised in that the establishment processing module includes:
Submodule is searched, for existing according to the internet-of-things terminal mark carried in first session instruction Current internet-of-things terminal corresponding with internet-of-things terminal mark is searched in internet-of-things terminal list whether There is session;
Submodule is processed, if there is no session for current internet-of-things terminal, in the internet-of-things terminal list In increase the first node address that node deposits platform session chained list corresponding with current internet-of-things terminal newly, and Create the platform logic session node;If there is session in current internet-of-things terminal, according to current Internet of Things end The first node address of the platform session chained list that end node is included corresponds to platform session chained list according to priority lookup, The session that first session instruction after parsing is placed on into priority at the same level is last.
20. devices as claimed in claim 19, it is characterised in that if current internet-of-things terminal has session, And session attribute be sharing mode when, the process submodule is further used for:
The first session instruction folding is to priority at the same level and in resource identification identical session after parsing.
21. devices as claimed in claim 15, it is characterised in that described device also includes:
Second receiver module, for receiving the carrying logical session mark that the Internet of Things application sends Terminate session instruction;
First sending module, for the termination session instruction to be sent to the internet-of-things terminal, by described Internet-of-things terminal deletes the terminal logic session node generated when setting up session connection with the platform of internet of things;
3rd receiver module, for receiving the carrying logical session mark that the internet-of-things terminal sends Session termination success message, and delete the platform logic session node;
Second returns module, for returning the session for carrying the logical session mark to the Internet of Things application Terminate success message, the application for initiating to be generated when first session is instructed is deleted by the Internet of Things application and is patrolled Session node is collected, terminates session.
The device of real standing state operation, is applied to Internet of Things application in a kind of 22. stateless procotols, Characterized in that, described device includes:
Initiation module, for initiating to include the first session instruction of the first physics session identification to platform of internet of things, By the platform of internet of things first session instruction for receiving is parsed and created first after parsing After the platform logic session node of session instruction, session connection is set up between internet-of-things terminal;
Processing module, session connection and life are set up for receiving the platform of internet of things with the internet-of-things terminal The logical session comprising logical session mark sent into after logical session mark is successfully established message, solves Analysis obtains the logical session and identifies and preserve, to the platform of internet of things feedback link success message.
23. devices as claimed in claim 22, it is characterised in that carry in the first session instruction Internet-of-things terminal is identified and session attribute.
24. devices as claimed in claim 22, it is characterised in that the initiation module is further used for:
Generate and apply logical session node.
25. devices as claimed in claim 24, it is characterised in that described device also includes:
Second sending module, for sending the termination for carrying the logical session mark to the platform of internet of things Session is instructed, and the termination session instruction is sent to the internet-of-things terminal by the platform of internet of things, and Receive the internet-of-things terminal delete set up session connection with the platform of internet of things when terminal that generates patrol Collect the session termination success message returned after session node;
First receiving processing module, for receiving platform of internet of things described in Jing the platform logic session is being deleted The session termination success message forwarded after node, deletes the application logical session node, terminates session.
The device of real standing state operation, is applied to internet-of-things terminal in a kind of 26. stateless procotols, Characterized in that, described device includes:
4th receiver module, for receiving the second session instruction of platform of internet of things transmission, second session Instruct for the platform of internet of things create platform logic session node and obtain and Internet of Things application between the Send after one physics session identification;
Set up and return module, for setting up session connection between the platform of internet of things, to the Internet of Things Platform returns session establishment message, and being generated by the platform of internet of things makes the Internet of Things application and the Internet of Things The logical session mark of logical session is carried out between network termination;
Second receiving processing module, for receiving the carrying logical session mark that the platform of internet of things sends The logical session of knowledge is successfully established message, completes to disappear with the Internet of Things application according to logical session mark The transmission of breath.
27. devices as claimed in claim 26, it is characterised in that the 4th receiver module is further used In:Terminal logic session node is generated, the session attribute carried in the second session instruction is extracted, and is protected Deposit.
28. devices as claimed in claim 27, it is characterised in that described device also includes:
5th receiver module, for receiving the platform of internet of things forwarding by described in the Internet of Things application sends Jing Carry the termination session instruction of the logical session mark;
Removing module, for according to the termination session instruction, deleting the terminal logic session node;
3rd sending module, for sending the session for carrying the logical session mark to the platform of internet of things Terminate success message, the backward Internet of Things of the platform logic session node is deleted by the platform of internet of things The session termination success message that the logical session is identified is carried using returning, is deleted by the Internet of Things application Using logical session node, terminate session.
CN201510681160.1A 2015-10-19 2015-10-19 Method and device for achieving stateful operation in stateless network protocol Pending CN106603611A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510681160.1A CN106603611A (en) 2015-10-19 2015-10-19 Method and device for achieving stateful operation in stateless network protocol
PCT/CN2016/085873 WO2016197995A1 (en) 2015-10-19 2016-06-15 Method and device for realizing stateful operation in stateless network protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510681160.1A CN106603611A (en) 2015-10-19 2015-10-19 Method and device for achieving stateful operation in stateless network protocol

Publications (1)

Publication Number Publication Date
CN106603611A true CN106603611A (en) 2017-04-26

Family

ID=57504572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510681160.1A Pending CN106603611A (en) 2015-10-19 2015-10-19 Method and device for achieving stateful operation in stateless network protocol

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111064784A (en) * 2019-12-12 2020-04-24 天翼物联科技有限公司 Internet of things session realization method, terminal, platform, system and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072233B (en) * 2007-03-30 2011-05-18 腾讯科技(深圳)有限公司 Method and system for stimulating stateful connection based on stateless network protocol
CN102238201B (en) * 2010-04-23 2016-09-28 中兴通讯股份有限公司 Internet of Things application module and Internet of Things apply the communication means with internet-of-things terminal
WO2014124318A1 (en) * 2013-02-08 2014-08-14 Interdigital Patent Holdings, Inc. METHOD AND APPARATUS FOR INCORPORATING AN INTERNET OF THINGS (IoT) SERVICE INTERFACE PROTOCOL LAYER IN A NODE

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111064784A (en) * 2019-12-12 2020-04-24 天翼物联科技有限公司 Internet of things session realization method, terminal, platform, system and storage medium

Also Published As

Publication number Publication date
WO2016197995A1 (en) 2016-12-15

Similar Documents

Publication Publication Date Title
CN109905409A (en) Things-internet gateway real time bidirectional communication system based on Socket.IO
US20230300726A1 (en) Data processing method and apparatus, network element device, storage medium, and program product
CN107979592A (en) A kind of method and device for sending business request information
CN104811371A (en) Brand-new instant messaging system
CN107667550A (en) The method of request and its equipment are handled by polling channel in wireless communication system
US20230300106A1 (en) Data processing method, network element device and readable storage medium
CN108632305A (en) Cloud storage system, media data storage method and system
US20210377323A1 (en) Method and system for responding to video call service
CN110177098A (en) NDN and IP network borde gateway conversion method and device
CN107690149A (en) Trigger method, management function entity and the equipment of the core network of network strategy renewal
CN108600281A (en) A kind of cloud storage system, media data storage method and system
CN106331187A (en) NAT (Network Address Translation) penetration method, device and system
CN103338213A (en) Method, system and access gateway for intercommunication between local equipment and IMS (IP Multimedia Subsystem) network
CN107517227A (en) Session implementation method and device for distributed consensus system
CN111464431B (en) Instant message intercommunication method and instant message intercommunication system based on nodes
CN108769287A (en) A kind of router domain name access method, system, computer equipment and storage medium
JP2017503407A (en) Packet processing method and apparatus
CN103491517A (en) Method and equipment for obtaining PCC rules
US11863633B2 (en) Cloud communication method and apparatus
US7218714B2 (en) Method of calling service among devices in home network
CN105049543A (en) P2P communication system and method crossing asymmetric NAT between intelligent routers
CN106603611A (en) Method and device for achieving stateful operation in stateless network protocol
CN102355653B (en) Inter-terminal communication method, control equipment, user equipment, base station and network system
CN106792468A (en) The method and system of identification discovery in machine communication
US10581979B2 (en) Information transmission method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170426