CN109379331A - Message treatment method, device, cloud platform and Internet of things system - Google Patents
Message treatment method, device, cloud platform and Internet of things system Download PDFInfo
- Publication number
- CN109379331A CN109379331A CN201811045224.9A CN201811045224A CN109379331A CN 109379331 A CN109379331 A CN 109379331A CN 201811045224 A CN201811045224 A CN 201811045224A CN 109379331 A CN109379331 A CN 109379331A
- Authority
- CN
- China
- Prior art keywords
- protocol layer
- message
- sub
- protocol
- layer
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
Abstract
The embodiment of the present invention provides a kind of message treatment method, device, cloud platform and Internet of things system, this method comprises: obtaining first message;The first message is handled by the first protocol layer, wherein, first protocol layer includes multiple sub-protocol layers, has preset call relation between the multiple sub-protocol layer, each sub-protocol layer for realizing first protocol layer a kind of function.The coupling that this method realizes protocol layer is low, so that the maintenance complexity of protocol stack is low.
Description
Technical field
The present embodiments relate to the communication technology more particularly to a kind of message treatment method, device, cloud platform and Internet of Things
System.
Background technique
In Internet of things system, a large amount of equipment may be coupled to cloud platform, is uniformly managed by cloud platform.Cloud platform
When interacting between equipment, need to interact based on specific agreement.Therefore, it needs to distinguish in cloud platform and equipment side
Realize the corresponding protocol stack of specific protocol.
In the prior art, cloud platform, will for each protocol layer of protocol stack when realizing the protocol stack of Internet of Things fidonetFido
The function of the protocol layer realizes that the various functions of being supported the protocol layer mix realization as unified function.
But the coupling that the method for the prior art may cause the protocol stack realization of cloud platform is excessively high.
Summary of the invention
The embodiment of the present invention provides a kind of message treatment method, device, cloud platform and Internet of things system, existing for solving
The excessively high problem of technology medium cloud platform protocol stack coupling.
First aspect of the embodiment of the present invention provides a kind of message treatment method, comprising:
Obtain first message;
The first message is handled by the first protocol layer, wherein first protocol layer includes multiple sub- associations
Layer is discussed, there is preset call relation between the multiple sub-protocol layer, each sub-protocol layer is for realizing described first
A kind of function of protocol layer.
Further, before the acquisition first message, further includes:
When establishing session on first protocol layer, the call relation between the multiple sub-protocol layer is determined, it is described
The call relation when message that call relation includes call relation when handling message to be sent and processing receives.
Further, first protocol layer is CoAP protocol layer, and first protocol layer includes at least session sub-protocol
Layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block transmit sub-protocol layer.
Further, the call relation between the multiple sub-protocol layer of the determination, comprising:
Using the session sublayer as initial layers, the duplicate removal sublayer, reliable transmission are determined according to the first preset order
The call relation of layer and block transmission sublayer when handling message to be sent;
Using the session sublayer as initial layers, the duplicate removal sublayer, reliable transmission are determined according to the second preset order
The call relation of layer and block transmission sublayer in the message that processing receives.
Further, first protocol layer that passes through handles the first message, comprising:
First sub-protocol layer calls the Processing Interface of the second sub-protocol layer, triggers the second sub-protocol layer to described first
Message is handled.
Further, the acquisition first message, comprising:
First message to be sent is obtained, alternatively, receiving first message.
Second aspect of the embodiment of the present invention provides a kind of message processing apparatus, comprising:
Module is obtained, for obtaining first message;
Processing module, for being handled by the first protocol layer the first message, wherein first protocol layer
Including multiple sub-protocol layers, there is preset call relation between the multiple sub-protocol layer, each sub-protocol layer is used for
Realize a kind of function of first protocol layer.
Further, further includes:
Determining module when for establishing session on first protocol layer, determines between the multiple sub-protocol layer
Call relation, the tune when message that the call relation includes call relation when handling message to be sent and processing receives
With relationship.
Further, first protocol layer is CoAP protocol layer, and first protocol layer includes at least session sub-protocol
Layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block transmit sub-protocol layer.
Further, the determining module, comprising:
First determination unit, for being gone according to described in the determination of the first preset order using the session sublayer as initial layers
The call relation of baryon layer, reliable transmission sublayer and block transmission sublayer when handling message to be sent;
Second determination unit, for being gone according to described in the determination of the second preset order using the session sublayer as initial layers
The call relation of baryon layer, reliable transmission sublayer and block transmission sublayer in the message that processing receives.
Further, the processing module, comprising:
Processing unit triggers second son for calling the Processing Interface of the second sub-protocol layer by the first sub-protocol layer
Protocol layer handles the first message.
Further, the acquisition module, is specifically used for:
First message to be sent is obtained, alternatively, receiving first message.
The third aspect of the embodiment of the present invention provides a kind of cloud platform, comprising:
Memory, for storing program instruction;
Processor executes side described in above-mentioned first aspect for calling and executing the program instruction in the memory
Method step.
Fourth aspect present invention provides a kind of Internet of things system, including cloud platform described in the above-mentioned third aspect.
The 5th aspect of the embodiment of the present invention provides a kind of readable storage medium storing program for executing, and calculating is stored in the readable storage medium storing program for executing
Machine program, the computer program is for executing method described in above-mentioned first aspect.
Message treatment method, device provided by the embodiment of the present invention, cloud platform and Internet of things system, by by protocol layer
It is divided by function and is independent sub-protocol layer, there is only call relations between sub-protocol layer, when some function of protocol layer needs
It changes, alternatively, when needing to increase new function in protocol layer, it is only necessary at sub-protocol layer involved in function
Reason, without handling other sub-protocol layers, therefore, so that the coupling that protocol layer is realized is low, so that agreement
The maintenance complexity of stack is low.
Detailed description of the invention
It, below will be to embodiment or the prior art in order to illustrate more clearly of the present invention or technical solution in the prior art
Attached drawing needed in description is briefly described, it should be apparent that, the accompanying drawings in the following description is of the invention one
A little embodiments for those of ordinary skill in the art without any creative labor, can also be according to this
A little attached drawings obtain other attached drawings.
Fig. 1 is a kind of system architecture diagram applied by message treatment method provided in an embodiment of the present invention;
Fig. 2 is a kind of possible protocol stack structure of Internet of things system;
Fig. 3 is the flow diagram of message treatment method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of message treatment method provided in an embodiment of the present invention;
Fig. 5 is a kind of example of first preset order of above-mentioned first protocol layer in the message that processing receives;
Fig. 6 is a kind of example of second preset order of above-mentioned first protocol layer when handling message to be sent;
Fig. 7 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention;
Fig. 8 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention;
Fig. 9 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention;
Figure 10 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention;
Figure 11 is a kind of entity block diagram of cloud platform provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention
Figure, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
In the prior art, cloud platform, will for each protocol layer of protocol stack when realizing the protocol stack of Internet of Things fidonetFido
The function of the protocol layer realizes that the various functions of being supported the protocol layer mix realization as unified function.
The coupling of this implementation is high, once the partial function of the protocol layer needs to adjust, then needs to entire protocol layer even
The implementation of protocol stack is modified, and causes the maintenance complexity of protocol stack high.
The embodiment of the present invention based on the above issues, proposes a kind of message treatment method, by drawing protocol layer according to function
It is divided into independent sub-protocol layer, there is only call relation between sub-protocol layer, when some function of protocol layer needs to change, or
Person, when needing to increase new function in protocol layer, it is only necessary to sub-protocol layer involved in function is handled, without
Other sub-protocol layers are handled, therefore, so that the coupling that protocol layer is realized is low, so that the maintenance of protocol stack is complicated
It spends low.
Fig. 1 is a kind of system architecture diagram applied by message treatment method provided in an embodiment of the present invention, as shown in Figure 1,
This method can be applied to Internet of things system, be related to cloud platform and at least one equipment.At least one equipment can be object
Any equipment, such as intellectual water meter, intelligent electric meter, intelligent gas meter in networked system etc., the embodiment of the present invention does not do this
Limitation.At least one equipment can be established respectively with above-mentioned cloud platform and be communicated to connect, and carry out pipe to these equipment by cloud platform
Reason.Illustratively, after intellectual water meter and cloud platform establish communication connection, intellectual water meter can according to the instruction of cloud platform, to
Cloud platform reports the information such as the present flow rate of intellectual water meter, remaining amount to be sent to cloud platform, and cloud platform can be to intellectual water meter
Issue software upgrade package etc..
In the specific implementation, the interaction between equipment and cloud platform can be carried out Internet of things system based on specific agreement.
Fig. 2 is that a kind of possible protocol stack structure of Internet of things system may include LWM2M object in the protocol stack from top to bottom
Layer, LWM2M protocol layer, CoAP protocol layer, DTLS layers etc..Wherein, the http protocol of the function of CoAP agreement and internet area
It is corresponding, correspondingly, CoAP protocol layer shown in Fig. 2 is based on CoAP agreement, for realizing re-transmission, resource discovering and resource description etc.
Function.By taking cloud platform side as an example, in cloud platform side, it can be established in CoAP protocol layer and be directed to the session of equipment, in the session
Protocol stack can handle CoAP request, and LWM2M protocol layer is called to carry out upper layer processing, meanwhile, it is realized in CoAP protocol layer
Session can also save information, such as message duplicate removal state, retransmission state, block transmission state, at the same time it can also pass through timer
Handle time exceeded message etc..
It should be noted that method provided by the embodiment of the present invention can be applied in the realization of CoAP protocol layer, together
When, it also can be applied in other protocol layers of above-mentioned protocol stack shown in Fig. 2.Illustratively, for described in above-mentioned Fig. 2
The protocol layer can also be divided into multiple sub-protocol layers, multiple sub-protocols according to the function of the protocol layer by LWM2M object layer
There is call relation between layer.Further, method provided by the embodiment of the present invention can also be applied to other kinds of association
It discusses in stack, the embodiment of the present invention is without limitation.
In addition, for the angle of system, by taking the system architecture of above-mentioned internet of things field shown in FIG. 1 as an example, the present invention
The method that embodiment provides both can be applied to cloud platform, also can be applied to equipment, the embodiment of the present invention is without limitation.
As long as protocol layer is divided into multiple independent sub-protocol layers to handle, all the protection scope of the embodiment of the present invention it
It is interior.
For ease of description, following embodiment of the present invention is with protocol stack CoAP protocol layer shown in above-mentioned Fig. 2 in cloud platform
It is illustrated for realization.
Fig. 3 is the flow diagram of message treatment method provided in an embodiment of the present invention, and the executing subject of this method can be with
For above-mentioned cloud platform, it is also possible to above-mentioned equipment, as shown in figure 3, this method comprises:
S301, first message is obtained.
Optionally, above-mentioned first message is either message to be sent, is also possible to the message received from opposite end.
Optionally, by taking cloud platform as an example, cloud platform in equipment interactive process, both needed to equipment send message,
The message that possible receiving device is sent.Therefore, cloud platform may be the sender of message, it is also possible to the recipient of message.
S302, above-mentioned first message is handled by the first protocol layer, wherein above-mentioned first protocol layer includes multiple
Sub-protocol layer has preset call relation between above-mentioned multiple sub-protocol layers, and each above-mentioned sub-protocol layer is for realizing above-mentioned
A kind of function of first protocol layer.
Wherein, above-mentioned first protocol layer can be a specific protocol layer in cloud platform protocol stack, for example, can be
CoAP protocol layer.
It include multiple sub-protocol layers in above-mentioned first protocol layer, each sub-protocol layer in these sub-protocol layers has been responsible for
At one of above-mentioned first protocol layer corresponding function function, meanwhile, there is preset call relation between these sub-protocol layers.
The call relation can indicate the sequencing when handling message.For example, sub-protocol layer 1 can in preset call relation
To call sub-protocol layer 2, then sub-protocol layer 1 can execute alignment processing, in turn, invocation protocol layer 2, by agreement to message first
Layer 2 carries out execution respective handling continuing with message.Call relation before sub-protocol layer, which can according to need, to be adjusted, and is shown
Example property, in some scenes, sub-protocol layer 1 can call sub-protocol layer 2, and under other scenes, for these scenes
Needs, call relation can be changed to by sub-protocol layer 2 call sub-protocol layer 1.
In addition, the use between how many sub-protocol layers and each sub-protocol layer can be divided into above-mentioned first protocol layer
The call relation of which kind of order can be handled flexibly in the first protocol layer as needed, and these processing are for the
It is all transparent for protocol layer except one protocol layer.Illustratively, the above-mentioned protocol stack shown in Fig. 2 of cloud platform, in the association
It discusses in stack, multiple sub-protocol layers has been divided into inside CoAP protocol layer, multiple sub-protocol layers are before according to specific call relation
It is called, and for the upper layer of CoAP protocol layer, i.e., for LWM2M protocol layer, only receives CoAP protocol layer and carried out
Whole treated message, and message to be sent is issued to CoAP protocol layer, i.e., LWM2M protocol layer can't perceive CoAP
Processing inside protocol layer.
Optionally, for message to be sent, above-mentioned first protocol layer is from one layer thereon acquisition message, and in the first agreement
Layer is internal successively to be handled according to preset call relation, after the completion of each sub-protocol layer is all handled, then transfers to the first agreement
The lower layer of layer is handled.
Optionally, for the message being received externally, above-mentioned first protocol layer is from its next layer acquisition message, and
It is successively handled inside one protocol layer according to preset call relation, after the completion of each sub-protocol layer is all handled, then transfers to
The upper layer of one protocol layer is handled.
It should be noted that for message to be sent and the message received, call relation inside the first protocol layer
Sequence should be opposite sequence.
In the present embodiment, it is independent sub-protocol layer by the way that protocol layer to be divided by function, is only deposited between sub-protocol layer
In call relation, when some function of protocol layer needs to change, alternatively, when needing to increase new function in protocol layer, it is only necessary to
Sub-protocol layer involved in function is handled, without handling other sub-protocol layers, therefore, so that agreement
The coupling that layer is realized is low, so that the maintenance complexity of protocol stack is low.
In a kind of optional embodiment, the call relation of each sub-protocol layer of the first protocol layer can establish session
When determine.
Optionally, when establishing session on above-mentioned first protocol layer, determine that the calling between above-mentioned multiple sub-protocol layers is closed
System, the call relation when message which includes call relation when handling message to be sent and processing receives.
Specifically, by taking cloud platform as an example, when equipment is desirably connected to cloud platform, i.e., sends connection request to cloud platform,
The IP and port numbers that cloud platform can be sent according to equipment are that equipment establishes session, and the session and the equipment correspond.This
In embodiment, when cloud platform establishes session, it can determine that the calling inside the first protocol layer between each sub-protocol layer is closed simultaneously
System.The call relation can also be directed to the call relation of the equipment, i.e., different call relations can be used in different equipment, from
And it can satisfy the different needs of distinct device.
Following embodiment of the present invention mainly illustrates the division of sub-protocol layer and the realization of call relation of CoAP protocol layer.
According to the regulation of CoAP agreement, CoAP protocol layer is mainly used for realizing session establishment, the duplicate removal of message, reliable transmission
(re-transmission) and block transmission.
In embodiments of the present invention, optionally, when above-mentioned first protocol layer is CoAP protocol layer, the first protocol layer is at least
It may include session sub-protocol layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block transmission sub-protocol layer.
Wherein, above-mentioned piece of transmission sub-protocol layer can specifically include 2 block transmission sub-protocol layers, and a block transmits sub-protocol
For carrying out piecemeal processing to request message, another block transmits submodule and is used to carry out piecemeal processing to response message layer.
Fig. 4 is the flow diagram of message treatment method provided in an embodiment of the present invention, as shown in figure 4, working as CoAP agreement
When layer is partitioned in the above sub-protocol layer, determine that the process of the call relation between these sub-protocol layers includes:
S401, using above-mentioned session sublayer as initial layers, determine above-mentioned duplicate removal sublayer according to the first preset order, reliable pass
The call relation of defeated sublayer and block transmission sublayer when handling message to be sent.
S402, using above-mentioned session sublayer as initial layers, determine above-mentioned duplicate removal sublayer according to the second preset order, reliable pass
The call relation of defeated sublayer and block transmission sublayer in the message that processing receives.
Optionally, for CoAP protocol layer, message to be sent, or the message that processing receives either are handled,
It can be using session sublayer as initial layers.By taking above-mentioned cloud platform as an example, it is equipment which, which specifically can be cloud platform,
The session of foundation.Above-mentioned first preset order and the second preset order can be that opposite sequence in the specific implementation process can
Directly to know the second preset order by the first preset order.
In turn, it is based on above-mentioned first preset order, can be determined between each sub-protocol layer when handling message to be sent
Specific call relation.And it is based on above-mentioned second preset order, it can determine and disappear between each sub-protocol layer what processing received
Call relation when breath.
Specifically, protocol layer A for one knows this according to the position of the sub-protocol layer A in the first preset order
The upper layer subprotocol layer B of sub-protocol layer, and sub-protocol layer B is set by the message sink sub-protocol layer of the sub-protocol layer, thus
Determine the call relation of sub-protocol layer A.
Protocol layer A for one knows the sub-protocol according to the position of the sub-protocol layer A in the second preset order
The lower layer subprotocol layer B of layer, and sub-protocol layer B is set by the transmission sub-protocol layer of the sub-protocol layer, so that it is determined that sub-protocol
The call relation of layer A.
Fig. 5 is a kind of example of first preset order of above-mentioned first protocol layer in the message that processing receives, such as Fig. 5
Shown, session sub-protocol layer is initial layers, and session sub-protocol layer calls duplicate removal sub-protocol layer, and so on.Specifically, CoAP is assisted
Discuss layer creation session (session) after, after session receives CoAP message, first calling session sub-protocol layer to message at
Reason calls duplicate removal sub-protocol layer by session sub-protocol layer in turn, and so on, finally called by session by its Recv interface
Upper-layer protocol, continuation are handled by upper-layer protocol.
Fig. 6 is a kind of example of second preset order of above-mentioned first protocol layer when handling message to be sent, such as Fig. 6 institute
Showing, session sub-protocol layer is initial layers, and session sub-protocol layer calls block to transmit sub-protocol layer 2, and so on.Specifically, CoAP
After protocol layer creates session (session), session receives upper-layer protocol, and when needing to send message, calling session first is assisted
View layer handles message, in turn, calls block to transmit sub-protocol layer 2 by session sub-protocol layer, and so on, finally by session
Lower-layer protocols are called by its Send interface, continuation is handled by lower-layer protocols, and message is sent.
In turn, optionally, when carrying out Message Processing, the first sub-protocol layer calls the Processing Interface of the second sub-protocol layer,
The second sub-protocol layer is triggered to handle above-mentioned first message.
Wherein, when handling message to be sent, the second sub-protocol layer is the lower layer subprotocol layer of the first sub-protocol layer, is being located
When managing the message received, the second sub-protocol layer is the upper layer subprotocol layer of the first sub-protocol layer, i.e. the first sub-protocol layer processing
The second sub-protocol layer is needed to continue to handle message after the completion.
Optionally, in the specific implementation process, for handling the message received, each sub-protocol layer is one corresponding
Recever can determine that the recver of the first sub-protocol layer is the second sub-protocol when determining the call relation of each sub-protocol layer
Layer.In turn, in the present embodiment, after the first sub-protocol layer has handled message, the Recv interface of recever is called directly, i.e.,
It can trigger the second sub-protocol layer to handle first message.
Below based on above-mentioned Fig. 5 and calling shown in fig. 6 sequence, illustrate disappearing for CoAP protocol layer middle part molecule protocol layer
Breath processing and calling process.
It should be noted that Fig. 5 and session sub-protocol layer shown in fig. 6 are initial layers, which can be with
Subsequent sub-protocol layer processing is transmitted the message to, therefore following embodiment no longer says the processing of session sub-protocol layer
It is bright.
In addition, following CON, NON, ACK and RST message as described in the examples are that defined disappears in CoAP agreement
It ceases, is no longer repeated in the concrete regulation embodiment of the present invention.
Firstly, the process for the message that each sub-protocol layer processing receives in CoAP protocol layer are as follows:
1, duplicate removal sub-protocol layer
The message status for saving CON and NON, checks whether CON the and NON message received repeats.If NON message weight
It is multiple, then ignore.If CON message repeats, the processing status of the message is ignored in inspection if the message is also in processes
The message replys identical ACK or RST if processed finish.
If what duplicate removal sub-protocol layer received is not CON message or NON message, according to the method for above-described embodiment,
The Processing Interface of layer subprotocol layer thereon is called, to trigger upper processing of the layer subprotocol layer to the message.
2, reliable transmission sub-protocol layer
Whether judge to receive is ACK or RST message, if it is not, then according to the method call upper layer of above-described embodiment
The Processing Interface of sub-protocol layer, to trigger upper processing of the layer subprotocol layer to the message.If so, not re-recording the CON of transmission
State, and the CON is no longer retransmitted, also, ACK or RST are reported to upper layer subprotocol layer.
Secondly, each sub-protocol layer handles the process of message to be sent in CoAP protocol layer are as follows:
1, duplicate removal sub-protocol layer
The processing result to the CON message received is saved, the corresponding ACK or RST message of CON message is saved, so that
Identical ACK or RST is replied after receiving duplicate CON message.
2, reliable transmission sub-protocol layer
Judge whether message to be sent is CON message, if it is not, then according to straton under the method call of above-described embodiment
The Processing Interface of protocol layer, to trigger lower processing of the layer subprotocol layer to the message.If so, the transmission shape of record CON message
State, is the initial time-out time of CON message definition, and session can call Update () letter of each sub-protocol layer at regular intervals
Number checks that each has sent but has not received the CON of response also and disappears in Update () function of reliable transmission sub-protocol layer
The state of breath, if a message retransmission number is more than designated value or total sending time is more than designated value, straton association in notice
It discusses layer ACK time-out and retransmits CON message if retransmitting apart from last time is more than time-out time.Wherein, initial time-out time is random
, after retransmitting message every time, time-out time can be exponential incremental.
Fig. 7 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention, as shown in fig. 7, the device
Include:
Module 701 is obtained, for obtaining first message.
Processing module 702, for being handled by the first protocol layer the first message, wherein first association
View layer includes multiple sub-protocol layers, has preset call relation, each sub-protocol layer between the multiple sub-protocol layer
For realizing a kind of function of first protocol layer.
The device is for realizing preceding method embodiment, and it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Fig. 8 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention, as shown in figure 8, the device
Further include:
Determining module 703 when for establishing session on first protocol layer, determines between the multiple sub-protocol layer
Call relation, when the message that the call relation includes call relation when handling message to be sent and processing receives
Call relation.
In another embodiment, first protocol layer is CoAP protocol layer, and first protocol layer includes at least session
Protocol layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block transmit sub-protocol layer.
Fig. 9 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention, as shown in figure 9, determining mould
Block 703 includes:
First determination unit 7031, for determining institute according to the first preset order using the session sublayer as initial layers
State the call relation of duplicate removal sublayer, reliable transmission sublayer and block transmission sublayer when handling message to be sent.
Second determination unit 7032, for determining institute according to the second preset order using the session sublayer as initial layers
State the call relation of duplicate removal sublayer, reliable transmission sublayer and block transmission sublayer in the message that processing receives.
Figure 10 is a kind of function structure chart of message processing apparatus provided in an embodiment of the present invention, as shown in Figure 10, processing
Module 702, comprising:
7021, for calling the Processing Interface of the second sub-protocol layer by the first sub-protocol layer, trigger second sub-protocol
Layer handles the first message.
In another embodiment, module 701 is obtained, is specifically used for:
First message to be sent is obtained, alternatively, receiving first message.
Figure 11 is a kind of entity block diagram of cloud platform provided in an embodiment of the present invention, as shown in figure 11, the cloud platform 1100
Include:
Memory 1101, for storing program instruction.
Processor 1102 executes described in above-mentioned first aspect for calling and executing the program instruction in memory 1101
Method and step.
The embodiment of the present invention also provides a kind of Internet of things system, including above-mentioned cloud platform.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (15)
1. a kind of message treatment method characterized by comprising
Obtain first message;
The first message is handled by the first protocol layer, wherein first protocol layer includes multiple sub-protocol layers,
There is preset call relation, each sub-protocol layer is for realizing first protocol layer between the multiple sub-protocol layer
A kind of function.
2. the method according to claim 1, wherein before the acquisition first message, further includes:
When establishing session on first protocol layer, the call relation between the multiple sub-protocol layer, the calling are determined
The call relation when message that relationship includes call relation when handling message to be sent and processing receives.
3. according to the method described in claim 2, it is characterized in that, first protocol layer be CoAP protocol layer, described first
Protocol layer includes at least session sub-protocol layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block and transmits sub-protocol layer.
4. according to the method described in claim 3, it is characterized in that, the calling between the multiple sub-protocol layer of the determination is closed
System, comprising:
Using the session sublayer as initial layers, according to the first preset order determine the duplicate removal sublayer, reliable transmission sublayer with
And call relation of the block transmission sublayer when handling message to be sent;
Using the session sublayer as initial layers, according to the second preset order determine the duplicate removal sublayer, reliable transmission sublayer with
And call relation of the block transmission sublayer in the message that processing receives.
5. according to the method described in claim 4, it is characterized in that, first protocol layer that passes through carries out the first message
Processing, comprising:
First sub-protocol layer calls the Processing Interface of the second sub-protocol layer, triggers the second sub-protocol layer to the first message
It is handled.
6. method according to claim 1-5, which is characterized in that the acquisition first message, comprising:
First message to be sent is obtained, alternatively, receiving first message.
7. a kind of message processing apparatus characterized by comprising
Module is obtained, for obtaining first message;
Processing module, for being handled by the first protocol layer the first message, wherein first protocol layer includes
Multiple sub-protocol layers, have preset call relation between the multiple sub-protocol layer, each sub-protocol layer for realizing
A kind of function of first protocol layer.
8. device according to claim 7, which is characterized in that further include:
Determining module when for establishing session on first protocol layer, determines the calling between the multiple sub-protocol layer
Relationship, the calling when message that the call relation includes call relation when handling message to be sent and processing receives are closed
System.
9. device according to claim 8, which is characterized in that first protocol layer be CoAP protocol layer, described first
Protocol layer includes at least session sub-protocol layer, duplicate removal sub-protocol layer, reliable transmission sub-protocol layer and block and transmits sub-protocol layer.
10. device according to claim 9, which is characterized in that the determining module, comprising:
First determination unit, for removing baryon according to described in the determination of the first preset order using the session sublayer as initial layers
The call relation of layer, reliable transmission sublayer and block transmission sublayer when handling message to be sent;
Second determination unit, for removing baryon according to described in the determination of the second preset order using the session sublayer as initial layers
The call relation of layer, reliable transmission sublayer and block transmission sublayer in the message that processing receives.
11. device according to claim 10, which is characterized in that the processing module, comprising:
Processing unit triggers second sub-protocol for calling the Processing Interface of the second sub-protocol layer by the first sub-protocol layer
Layer handles the first message.
12. according to the described in any item devices of claim 7-11, which is characterized in that the acquisition module is specifically used for:
First message to be sent is obtained, alternatively, receiving first message.
13. a kind of cloud platform characterized by comprising
Memory, for storing program instruction;
Processor, for calling and executing the program instruction in the memory, perform claim requires the described in any item sides of 1-6
Method step.
14. a kind of Internet of things system, which is characterized in that including the cloud platform described in claim 13.
15. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter in the readable storage medium storing program for executing
Calculation machine program requires the described in any item methods of 1-6 for perform claim.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811045224.9A CN109379331A (en) | 2018-09-07 | 2018-09-07 | Message treatment method, device, cloud platform and Internet of things system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811045224.9A CN109379331A (en) | 2018-09-07 | 2018-09-07 | Message treatment method, device, cloud platform and Internet of things system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109379331A true CN109379331A (en) | 2019-02-22 |
Family
ID=65405478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811045224.9A Pending CN109379331A (en) | 2018-09-07 | 2018-09-07 | Message treatment method, device, cloud platform and Internet of things system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109379331A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070076628A1 (en) * | 2005-09-19 | 2007-04-05 | Li Chris C | Network modeling system and method of simulating network operation with configurable node models |
CN101060470A (en) * | 2006-06-22 | 2007-10-24 | 华为技术有限公司 | A WIMAX-based base station service processing method and system |
CN101222385A (en) * | 2008-01-18 | 2008-07-16 | 重庆重邮东电通信技术有限公司 | Design method and system of protocol simulation system facing service |
CN101388898A (en) * | 2007-09-11 | 2009-03-18 | 华为技术有限公司 | Architecture of peer-to-peer network platform |
CN103152370A (en) * | 2011-12-06 | 2013-06-12 | 中国移动通信集团福建有限公司 | Service gateway system of internet of things and application method |
CN104507076A (en) * | 2014-11-19 | 2015-04-08 | 哈尔滨工程大学 | Practical Internet of things application platform based on Contiki system and 61br system |
CN104936202A (en) * | 2015-06-04 | 2015-09-23 | 南京邮电大学 | CoAP protocol based 6LoWPAN wireless sensor network management system |
CN105487996A (en) * | 2015-11-20 | 2016-04-13 | 国家电网公司 | Data bus based data acquisition and forwarding mode |
-
2018
- 2018-09-07 CN CN201811045224.9A patent/CN109379331A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070076628A1 (en) * | 2005-09-19 | 2007-04-05 | Li Chris C | Network modeling system and method of simulating network operation with configurable node models |
CN101060470A (en) * | 2006-06-22 | 2007-10-24 | 华为技术有限公司 | A WIMAX-based base station service processing method and system |
CN101388898A (en) * | 2007-09-11 | 2009-03-18 | 华为技术有限公司 | Architecture of peer-to-peer network platform |
CN101222385A (en) * | 2008-01-18 | 2008-07-16 | 重庆重邮东电通信技术有限公司 | Design method and system of protocol simulation system facing service |
CN103152370A (en) * | 2011-12-06 | 2013-06-12 | 中国移动通信集团福建有限公司 | Service gateway system of internet of things and application method |
CN104507076A (en) * | 2014-11-19 | 2015-04-08 | 哈尔滨工程大学 | Practical Internet of things application platform based on Contiki system and 61br system |
CN104936202A (en) * | 2015-06-04 | 2015-09-23 | 南京邮电大学 | CoAP protocol based 6LoWPAN wireless sensor network management system |
CN105487996A (en) * | 2015-11-20 | 2016-04-13 | 国家电网公司 | Data bus based data acquisition and forwarding mode |
Non-Patent Citations (1)
Title |
---|
Z.SHELBY等: ""The Constrained Application Protocol (CoAP)"", 《IETF》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109167829B (en) | Internet of things communication method and cloud gateway | |
CN110233881A (en) | Service request processing method, device, equipment and storage medium | |
EP1859594B1 (en) | Server side tftp flow control | |
CN106656846A (en) | Construction method of coordination layer in software defined network (SDN) architecture | |
JP2003179580A5 (en) | ||
CN104601523B (en) | A kind of method and device for transmitting data | |
CN106464596B (en) | Open flows communication means, system, controller and Service Gateway | |
CN105528254B (en) | A kind of method for processing business and device | |
JP2000259525A (en) | Response returning method for communication protocol, and communication controller | |
CN107682460A (en) | A kind of distributed storage trunked data communication method and system | |
CN110928258A (en) | Industrial data acquisition system | |
CN109040970A (en) | Method and terminal device are handled in plan of operation based on cloud computing | |
CN102571912A (en) | Method for realizing unload protocol stack based on multi-core processor and hybrid operating system | |
JP2002532777A (en) | Timeout object for object-oriented real-time process control system and method of operation thereof | |
CN109379331A (en) | Message treatment method, device, cloud platform and Internet of things system | |
CN104683460B (en) | A kind of communication means of Internet of Things, device and server | |
CN106131039A (en) | The processing method and processing device of SYN flood attack | |
CN104022910B (en) | A kind of parameter consultation method and its device | |
CN110266446A (en) | A kind of method and apparatus based on SACK mode adjustment random ordering duration | |
CN113992740A (en) | Middleware based on autonomous control and data transmission method | |
EP1427127A2 (en) | Communication control method, communication system and communication apparatus that can improve throughput | |
CN107330064A (en) | A kind of method and system that small documents are created based on CIFS agreements | |
CN112118284A (en) | Gateway device-oriented http data request method, device and medium | |
CN111212404A (en) | Robot communication method, system, device, robot and storage medium | |
CN114401292B (en) | Equipment message acquisition system and method based on object shadow |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190222 |
|
RJ01 | Rejection of invention patent application after publication |