The content of the invention
It is an object of the invention to provide a kind of gateway replacement method, the gateway for possessing professional ability is replaced with realizing
Change.
First aspect provides a kind of gateway replacement method, and methods described includes:
Server receives the gateway replacement notice that the second gateway is sent, and the gateway replacement carries replacement in notifying and referred to
Show, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
The server generation gateway replaces mark, and the gateway, which replaces mark, to be used to identify gateway replacement;
The server sends the gateway to second gateway and replaces mark;
The server receives the establishing resource request that first gateway is sent, and is carried in the establishing resource request
The second service capability layer mark of second gateway and the gateway replace mark, the second service capability layer mark and institute
State gateway replacement mark and first gateway is sent to by second gateway or the server;
The server is identified according to the first service capability layer mark and second service capability layer, updates professional ability
Layer resource, the first service capability layer mark replaces notice according to the gateway by the server or the establishing resource please
Ask acquisition;
The server sends first message to first gateway, the first message carry the server into
Work(creates the information of the service capability layer resource.
Based in a first aspect, in the first possible embodiment, the gateway is replaced notify in also comprising described the
First service capability layer mark of one gateway.
Based in a first aspect, or first aspect the first possible embodiment, in second of possible embodiment
In, the first service capability layer mark and described replace indicate to be sent to second gateway by first gateway.
Based in a first aspect, or first aspect the first possible embodiment, in the third possible embodiment
In, it is described to receive the gateway replacement notice that the second gateway is sent, before, in addition to:
The server receives first service capability layer mark and the replacement instruction that first gateway is sent;
First service capability layer mark and the replacement instruction are sent to second gateway by the server.
The first possible embodiment or second of possible embodiment based on first aspect, in the 4th kind of possibility
Embodiment in, server generation gateway is replaced before mark, in addition to:
The server detects that first service capability layer is identified whether effectively;
The server generates the gateway and replaces mark when first service capability layer mark is effective.
Based in a first aspect, in the 5th kind of possible embodiment, receiving what the second gateway was sent in the server
Gateway, which is replaced, to be notified, afterwards, methods described also includes:
Whether the second gateway described in the server check can be replaced;
The server generates the gateway and replaces mark when second gateway can be replaced.
Based in a first aspect, or first aspect the first possible embodiment, in the 6th kind of possible embodiment
In, the server to the second gateway send the gateway replace identify while, also send wait to second gateway and refer to
Show, it is described etc. to be instructed for indicating that second gateway needs to wait offline instruction.
Based in a first aspect, in the 7th kind of possible embodiment, being sent in the server to first gateway
First message, afterwards, in addition to:
The server is sent to second gateway and notified, first is carried in the notice and is indicated and first gateway
The URL of service capability layer, described first indicates to be used to indicate that gateway replaces completion.
Second aspect includes there is provided a kind of gateway replacement method, methods described:
First gateway receives gateway replacement mark and the second service capability layer of second gateway that the second gateway is sent
Mark;
First gateway sends establishing resource request to server, and described second is carried in the establishing resource request
Service capability layer is identified and the gateway replaces mark, and the establishing resource request triggering server is according to first net
The the first service capability layer mark and second service capability layer mark closed, update service capability layer resource, first industry
Business capability layer mark is in the gateway replacement that the establishing resource is asked or second gateway is sent is notified;
First gateway receives the first message that the server is sent, and the first message has carried the server
Through the information for successfully creating the service capability layer resource;
First gateway receives the second message that second gateway is sent, and second packet contains second net
Close the corresponding resource information of equipment for being registered to second gateway of storage;
First gateway is according to second information received, to the renewal of the equipment being registered on second gateway
Gateway information.
Based on second aspect, in the first possible embodiment, first gateway is receiving the transmission of the second gateway
Gateway replace mark and second gateway the second service capability layer identify, before, in addition to:
First gateway to second gateway send first gateway first service capability layer mark and
Replace and indicate, described replace indicates to be used to indicate that second gateway will be replaced by first gateway, in order to described second
Gateway sends the gateway to server to be replaced and notifies, the gateway is replaced notify in carry described replace and indicate and described the
One service capability layer is identified.
Based on second aspect, in second of possible embodiment, first gateway receives what the second gateway was sent
Gateway replaces mark and the second service capability layer of second gateway is identified;Before, in addition to:
First gateway sends the first service capability layer mark to the server and described replace indicates, so as to
First service capability layer mark and the replacement instruction are sent to second gateway in the server.
Second of the first possible embodiment or second aspect based on second aspect or second aspect is possible
Embodiment, in the third possible embodiment, the gateway information includes the service capability layer of first gateway
The URL of the service capability layer of URL and second gateway.
Based on second aspect, in the 4th kind of possible embodiment, first gateway is according to described received
Two message, to the renewal of the equipment gateway information being registered on second gateway, are specifically included:
The corresponding equipment of application resource that first gateway is included to first gateway sends the 3rd message, and described the
The URL and the professional ability of second gateway of service capability layer comprising first gateway in three message
The URL of layer;The application resource refers to the corresponding resource of the equipment being registered on second gateway.
The 4th kind of possible embodiment based on second aspect, in the 5th kind of possible embodiment, described first
The corresponding equipment of application resource of gateway to first gateway sends the 3rd message, afterwards, in addition to
First gateway receives the 4th message that online equipment is sent, and the 4th message carries the online equipment and connect
Receive the information of the new information.
The 5th kind of possible embodiment based on second aspect, in the 6th kind of possible embodiment, the described 4th
The URL that message also carries the service capability layer that the online equipment updates second gateway is described
The information of the URL of the service capability layer of second gateway.
The 5th kind of possible embodiment based on second aspect, it is described to receive in the 7th kind of possible embodiment
The confirmation message of online equipment, also includes afterwards:
The corresponding online equipment of the 4th message that first gateway described in first flag is received.
The 5th kind of possible embodiment based on second aspect, in the 8th kind of possible embodiment, described first
Gateway is according to second information received, to the renewal of the equipment gateway information being registered on second gateway, further
Including:
Whether the corresponding resource of equipment that the first gateway inspection does not update is expired, if expired, described in deletion not
The corresponding resource of equipment of renewal.
The third aspect includes there is provided a kind of gateway replacement method, methods described;
Second gateway sends gateway to server to be replaced and notifies, the gateway is replaced notify in carry replacement and indicate and the
The first service capability layer mark of one gateway, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;;
Second gateway receives the gateway replacement mark that the server is sent, and the gateway, which replaces mark, to be used to identify
Gateway is replaced;
The second service capability layer that second gateway sends second gateway to first gateway is identified and described
Gateway replaces mark;
Second gateway receives the first message that first gateway is sent, and the first message carries the server
The information of the service capability layer resource is successfully created;
Second gateway sends the second message to first gateway, and second message package is deposited containing second gateway
The corresponding resource information of equipment for being registered to second gateway of storage.
Based on the third aspect, in the first possible embodiment, gateway is sent to server in second gateway
Replace and notify, before, in addition to:
Second gateway receive shown in the first service capability layer mark of first gateway for sending of the first gateway and
Shown replace indicates that the gateway is replaced in mark and also identified comprising first service capability layer.
Based on the third aspect, in second of possible embodiment, second gateway sends network to server and replaced
Notice is changed, the gateway, which is replaced, carries replacement instruction in notice, afterwards, in addition to:
The gateway that second gateway receives the server transmission replaces mark and waits to be instructed.
It is described to send described second to first gateway in the third possible embodiment based on the third aspect
Second service capability layer mark of gateway and the gateway replace mark;Before, in addition to:
The URL of the service capability layer for first gateway that the second gateway the reception server is sent
Is indicated with described replace
Based on the third aspect, in the 4th kind of possible embodiment, second gateway is sent to first gateway
The corresponding money of equipment for being registered to second gateway stored in second message, second message comprising second gateway
Source information, afterwards, in addition to:
Second gateway is offline after the confirmation message that first gateway is sent is received, and the confirmation message is used for
Confirm that first gateway receives second message.
Fourth aspect includes there is provided a kind of server, the server:
First receiving unit, receives the gateway replacement notice that the second gateway is sent, the gateway is replaced logical for server
Carry replacement in knowing to indicate, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
Generation unit, replaces mark, the gateway, which replaces mark, to be used to identify gateway replacement for generating gateway;
First transmitting element, mark is replaced for sending the gateway to second gateway;
Second receiving unit, for receiving the establishing resource request that first gateway is sent, the establishing resource request
In carry second gateway the second service capability layer mark and the gateway replace mark, second service capability layer
Mark and the gateway replace mark and are sent to first gateway by second gateway or the server;
Updating block, for being identified according to the first service capability layer mark and second service capability layer, more new business
Capability layer resource, the first service capability layer mark is replaced by the server according to the gateway to be notified or the establishment money
Source request is obtained;
Second transmitting element, for sending first message to first gateway, the first message carries the service
Device has successfully created the information of the service capability layer resource.
Based on fourth aspect, in the first possible embodiment, the gateway is replaced notify in also comprising described the
First service capability layer mark of one gateway;
The first possible implementation based on fourth aspect or fourth aspect, in second of possible embodiment
In, the first service capability layer mark and described replace indicate to be sent to second gateway by first gateway.
Based on fourth aspect, in the third possible embodiment, the gateway, which is replaced, also includes the first net in notice
The the first service capability layer mark closed;The server also includes:
3rd receiving unit, for receiving the first service capability layer mark and the replacement instruction that the first gateway is sent;
3rd transmitting element, for first service capability layer mark and the replacement instruction to be sent into described second
Gateway.
Second of the first possible implementation or fourth aspect based on fourth aspect or fourth aspect is possible
Implementation, in the 4th kind of possible embodiment, the server also includes:
Detection unit, for detecting that first service capability layer is identified whether effectively.
The generation unit, for when first service capability layer mark is effective, generating the gateway and replacing mark.
Based on fourth aspect, in the 5th kind of possible embodiment, second transmitting element is additionally operable to send described
It is to be instructed to second gateway transmission etc. while gateway replaces mark, for notifying second gateway to need under waiting
Line is indicated.
Based on fourth aspect, in the 6th kind of possible embodiment, the server also includes:
4th transmitting element, is notified for being sent to second gateway, carry in the notice described first indicate and
The URL of the first gateway service capability layer, described first indicates to be used to indicate that gateway replaces completion.
5th aspect is there is provided a kind of gateway, and the gateway includes:
First receiving unit, mark and the second industry of second gateway are replaced for receiving the gateway that the second gateway is sent
Business capability layer mark;
First transmitting element, for sending establishing resource request to the server, is carried in the establishing resource request
There is second service capability layer mark and the gateway to replace mark, the establishing resource request triggering server according to
The the first service capability layer mark and second service capability layer mark of first gateway, update the service capability layer money
Source, the first service capability layer mark is included in the gateway that the establishing resource is asked or second gateway is sent and replaces logical
In knowing;
Second receiving unit, for receiving the first message that the server is sent, the first message carries the clothes
Business device has successfully created the information of the service capability layer resource;
3rd receiving unit, for receiving the second message that second gateway is sent, second message package is containing described
The corresponding resource information of equipment for being registered to second gateway of second gateway storage;
Updating block, for second message received according to the 3rd receiving unit, to being registered to described
Renewal of the equipment gateway information on two gateways.
Based on the 5th aspect, in the first possible embodiment, the gateway also includes:
Second transmitting element, for sent to second gateway first gateway the first service capability layer mark and
Replace and indicate, described replace indicates to be used to indicate that second gateway will be replaced by second gateway, in order to described second
Gateway sends network to server and replaces notice, and the gateway replacement carries described replace in notifying and indicated and first industry
Business capability layer mark.
Based on the 5th aspect, in second of possible embodiment, the gateway also includes:
3rd transmitting element, refers to for sending the first service capability layer mark and the replacement to the server
Show, in order to which first service capability layer mark and the replacement instruction are sent to second gateway by the server.
Second of the first possible implementation or the 5th aspect based on the 5th aspect or the 5th aspect is possible
Implementation, in the third possible embodiment, first gateway is according to second message received, to registration
Renewal of the equipment gateway information onto second gateway, wherein, the gateway information includes the business energy of first gateway
The URL of the URL of power layer and the service capability layer of the second gateway.
Based on the 5th aspect, in the 4th kind of possible embodiment, the updating block specifically for:
The corresponding equipment of application resource that first gateway is included to first gateway sends the 3rd message, and described the
The URL and the professional ability of second gateway of service capability layer comprising first gateway in three message
The URL of layer;The application resource refers to the corresponding resource of the equipment being registered on second gateway.
Based on the 4th kind of possible implementation of the 5th aspect, in the 5th kind of possible embodiment, the gateway
Also include:
4th receiving unit, the 4th message for receiving online equipment transmission, the 4th message described in the 4th message
Carry the information that the online equipment receives the new information.
Based on the 4th kind of possible implementation of the 5th aspect, in the 6th kind of possible embodiment, the gateway
Also include:
Indexing unit, for the corresponding equipment of the 4th message for marking the 4th receiving unit to receive.
Based on the 4th kind of possible implementation of the 5th aspect, in the 7th kind of possible embodiment, the gateway
Also include:
Processing unit, for determining whether the corresponding resource of equipment that does not update expired, however, it is determined that it is described do not update set
Standby corresponding resource is expired, then the corresponding resource of equipment not updated described in deletion.
6th aspect is there is provided a kind of gateway, and the gateway includes;
First transmitting element, replaces notice, the gateway is replaced to carry in notice and replaced for sending gateway to server
Instruction is changed, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
First receiving unit, replaces mark, the gateway, which replaces mark, to be used to mark for the gateway that the reception server is sent
Know gateway to replace;
Second transmitting element, for sent to first gateway second gateway the second service capability layer mark and
The gateway replaces mark;
Second receiving unit, for receiving the first message that first gateway is sent, the first message carries described
Server has successfully created the information of the service capability layer resource;
3rd transmitting element, for sending the second message to first gateway, second message package contains described second
The corresponding resource information of equipment for being registered to second gateway of gateway storage.
Based on the 6th aspect, in the first possible embodiment, the gateway also includes:
3rd receiving unit, the first service capability layer mark of first gateway sent for the first gateway of the reception
Know and described replace indicates, also including first service capability layer in the gateway replacement mark identifies.
The first possible implementation based on the 6th aspect or the 6th aspect, in second of possible embodiment
In, the gateway, in addition to:4th receiving unit, for receiving, the gateway that the server is sent replaces mark and wait refers to
Show.
The first possible implementation based on the 6th aspect or the 6th aspect, in the third possible embodiment
In, the gateway also includes:
5th receiving unit, the URL of the service capability layer of the first gateway sent for the reception server
Indicated with replacing;
Second of the first possible implementation or the 6th aspect based on the 6th aspect or the 6th aspect is possible
Second of possible implementation of implementation or the 6th aspect, in the 4th kind of possible embodiment, the gateway is also
Including:
6th receiving unit, for receiving the confirmation message that first gateway is sent;
Processing unit, the confirmation message for being received according to the 6th receiving unit is offline, and the confirmation disappears
Cease for confirming that first gateway receives second message.
By gateway replacement method provided in an embodiment of the present invention, replacing for the gateway with service capability layer can be realized
Change, it is necessary to replace object for appreciation macroscopic view by server before the information mail sending charge per message that the gateway being replaced is stored replaces gateway
Checking, before gateway replaces completion, is replaced gateway normal work, will not be offline before completion is replaced, it is ensured that note
Volume being capable of normal work to the equipment for being replaced gateway.
Embodiment
Below by drawings and examples, technical scheme is described in further detail.
Fig. 1 is the Organization Chart of gateway replacement method provided in an embodiment of the present invention, as shown in figure 1, the application frame of this method
Structure, mainly includes the second gateway 20, the first gateway 10 and server 30, and be registered at least one equipment of the second gateway 20
40, wherein, the equipment 40 can be M2M terminals with professional ability or not possess the M2M of professional ability whole
End, the first gateway 10 and the second gateway 20 all possess professional ability, and the second gateway 20 is identified with the second gateway service capability layer
(English full name:Gateway Service Capability Layer Identity, english abbreviation:GSCL ID), the second net
Close 20 information for being stored with the armamentarium for being registered to the second gateway 20.On other occasions, it is necessary to enter to the second gateway 20
Row is replaced, and the second gateway 20 is replaced with the first gateway 10, is added in the first gateway 10 before network is communicated, it is necessary to carry out
Checking and safeguard protection flow, wherein checking and safeguard protection flow can be bootstrap flows and the flow of service connection,
Wherein, bootstrap flows are that the first gateway obtains the first service capability layer mark(GSCL ID), the generation of service connection flow
Corresponding key, the information such as key and SCL ID is provided to the Network capability layer of server 30(Network Service
Capability Layer, NSCL), therefore the related data authenticated to the first gateway 10 that is stored with server 30.
Based on the framework shown in Fig. 1, the embodiments of the invention provide a kind of gateway replacement method, methods described is deployed in tool
There is the server 30 of service capability layer, from Figure 2 it can be seen that methods described includes:
201, server receives the gateway replacement notice that the second gateway is sent, and the gateway replacement carries replacement in notifying
Indicate, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
202, the server generation gateway replaces mark, and the gateway, which replaces mark, to be used to identify gateway replacement;
203, the server sends the gateway to second gateway and replaces mark;
204, the server receives the establishing resource request that the first gateway is sent, and is carried in the establishing resource request
The second service capability layer mark of second gateway and the gateway replace mark, the service capability layer mark of second gateway
Know and the gateway replaces mark and is sent to first gateway by second gateway or server;
205, the server is identified according to the first service capability layer mark and second service capability layer, more new business
Capability layer resource, the first service capability layer mark is replaced by the server according to the gateway to be notified or the establishment money
Source request is obtained;
In various embodiments, the first service capability layer mark can be obtained by different modes, for example may be used
To carry in gateway replaces notice, it can also carry in establishing resource request.
206, the server sends in first message, the first message to first gateway and carries the server
It has been successfully updated the information of the service capability layer resource.
In various embodiments, the initiator for replacing flow is different, therefore, in different notices, the letter of carrying
Breath is also corresponding different.For example, in one embodiment, can be initiated to replace flow by the first gateway, then the gateway is replaced
Also the first service capability layer comprising the first gateway is identified in notice, and the first service capability layer mark and described replace indicate
Second gateway is sent to by first gateway, more specifically embodiment, be illustrated later.
In another embodiment, the gateway replaces the first service capability layer mark that the first gateway is also included in notice
Know;It is described to receive the gateway replacement notice that the second gateway is sent, before, in addition to:
The server receives the first service capability layer mark and the replacement instruction that first gateway is sent;
First service capability layer mark and the replacement instruction are sent to second gateway by the server.
In two kinds of above-mentioned embodiments, it is effective in first service capability layer mark that the gateway, which replaces mark,
Shi Shengcheng's, the generation gateway is replaced before mark, in addition to:
Detect that first service capability layer is identified whether effectively;
When first service capability layer mark is effective, the server generates the gateway and replaces mark.
In a kind of embodiment for initiating replacement flow by the second gateway, the gateway replacement that the second gateway is sent is being received
Notify, afterwards, in addition to:
Whether the second gateway described in the server check can be replaced;
The server is when second gateway can be replaced, and the server generates the gateway and replaces mark.
The server to second gateway send the gateway replace identify while, the server is also to described
Second gateway send etc. it is to be instructed, it is described etc. it is to be instructed be used for indicate that second gateway needs to wait offline instruction, that is,
Saying needs to wait after first gateway addition, and second gateway can be offline, to ensure that system is normally run.
After the server sends the first message to first gateway, in addition to:
The server is sent to second gateway and notified, described first is carried in the notice and is indicated and described first
The URL of gateway service capability layer, described first indicates to be used to indicate that gateway replaces completion.
By the above embodiments, the replacement of the gateway with service capability layer can be realized, will in the gateway being replaced
Checking of the macroscopic view by server is played, it is necessary to replace before its information mail sending charge per message stored replaces gateway, replaces and completes in gateway
Before, gateway normal work is replaced, will not be offline before completion is replaced, it is ensured that be registered to the equipment for being replaced gateway
Being capable of normal work.
As shown in figure 3, based on the framework shown in Fig. 1, the embodiment of the present invention additionally provides a kind of gateway replacement method, at this
Executive agent in embodiment is the first gateway 10 in Fig. 1, and as seen from Figure 3, described method includes:
301, the first gateway receives gateway replacement mark and the second business energy of second gateway that the second gateway is sent
Power layer mark;
302, first gateway sends establishing resource to the server and asked, and is carried in the establishing resource request
The second service capability layer mark of second gateway and the gateway replace mark, the establishing resource request triggering clothes
Device of being engaged in is identified according to the first service capability layer mark and second service capability layer, updates service capability layer resource, described the
One service capability layer mark is in the gateway replacement that the establishing resource is asked or second gateway is sent is notified;
303, first gateway receives the first message that the server is sent, and the first message carries the service
Device has successfully created the information of the service capability layer resource;
304, first gateway receives the second message that second gateway is sent, and second message package is containing described the
The corresponding resource information of equipment for being registered to second gateway of two gateways storage;
305, first gateway is according to second message received, the equipment to being registered on second gateway
Update gateway information.
In one embodiment, first gateway replaces mark and described in the gateway for receiving second gateway transmission
The second service capability layer mark of second gateway, before, in addition to:
First gateway to second gateway send first gateway first service capability layer mark and
Replace and indicate, described replace indicates to be used to indicate that second gateway will be replaced by first gateway, in order to described second
Gateway sends the gateway to server to be replaced and notifies, the gateway is replaced notify in carry described replace and indicate and described the
One service capability layer is identified.
In second of embodiment, the first gateway described in step 301 receives the gateway replacement mark that the second gateway is sent
Identified with the second service capability layer of second gateway, the gateway replace mark by server generate after be sent to described the
Two gateways;Before, in addition to:
First gateway sends the first service capability layer mark to the server and described replace indicates, so as to
First service capability layer mark and the replacement instruction are sent to second gateway in the server.
Any one in two kinds of above-mentioned embodiments, the gateway information includes the professional ability of the first gateway
The URL of the URL of layer and the service capability layer of the second gateway.
After the first gateway is successfully replaced, in step 305, first gateway disappears according to receive described second
Breath, to the renewal of the equipment gateway information being registered on second gateway, is specifically included:
The corresponding equipment of application resource that first gateway is included to first gateway sends the 3rd message, and described the
The service capability layer of the URL of service capability layer comprising the first gateway and second gateway in three message
URL, the application resource refers to the corresponding resource of the equipment being registered on second gateway.
It is described after application resource the 3rd message of corresponding equipment transmission of first gateway to first gateway
First gateway receives the 4th message that online equipment is sent, and the 4th message carries the online equipment and receives the renewal
The information of message.
Further, the 4th message also carries the service capability layer of the online equipment renewal second gateway
URL is the information of the URL of the service capability layer of first gateway.
First gateway is received after the 4th message of online equipment, in addition to:
Corresponding online equipment of the 4th message that first gateway described in first flag is received;
First gateway is according to second information received, to the renewal of the equipment being registered on second gateway
Gateway information, further comprises:
Whether the corresponding resource of equipment that the first gateway inspection does not update is expired, if expired, described in deletion not
The corresponding resource of equipment of renewal.
By the above embodiments, the replacement of the gateway with service capability layer can be realized, will in the gateway being replaced
Checking of the macroscopic view by server is played, it is necessary to replace before its information mail sending charge per message stored replaces gateway, replaces and completes in gateway
Before, gateway normal work is replaced, will not be offline before completion is replaced, it is ensured that be registered to the equipment for being replaced gateway
Being capable of normal work.
Accordingly, as shown in figure 4, based on the network architecture shown in Fig. 1, the embodiment of the present invention additionally provides a kind of gateway and replaced
Change method, in the embodiment, executive agent be Fig. 1 in the second gateway 20, that is, the gateway being replaced, in the present embodiment
In, described method includes:
401, the second gateway sends gateway to server and replaces notice, and the gateway replacement carries replacement in notifying and referred to
Show, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
402, the second gateway receives the gateway replacement mark that the server is sent, and the gateway replaces mark by server
Generation, the gateway, which replaces mark, to be used to identify gateway replacement;
403, the second gateway sends the second service capability layer mark and the gateway of the second gateway to first gateway
Replace mark;
404, the second gateway receives the first message that first gateway is sent, and the first message carries the server
The information of the service capability layer resource is successfully created;
405, the second gateway sends the second message to first gateway, and second information includes second net
Close the corresponding resource information of equipment for being registered to the second gateway of storage.
In the first embodiment, before step 401, in addition to:
Second gateway receives the first service capability layer mark for first gateway that the first gateway is sent and replaced and indicates,
The gateway is replaced in mark and also identified comprising first service capability layer.
In another embodiment, step 401, afterwards, in addition to:
The shown gateway that second gateway receives the server transmission replaces mark and waits to be instructed.
Step 403, before, in addition to:
The URL of the service capability layer for shown first gateway that the second gateway the reception server is sent
Indicated with described replace;
Step 405, afterwards, in addition to:
Second gateway is offline after the confirmation message that first gateway is sent is received, and the confirmation message is used
The storage device message is received in confirmation first gateway.
By the above embodiments, the replacement of the gateway with service capability layer can be realized, will in the gateway being replaced
Checking of the macroscopic view by server is played, it is necessary to replace before its information mail sending charge per message stored replaces gateway, replaces and completes in gateway
Before, gateway normal work is replaced, will not be offline before completion is replaced, it is ensured that be registered to the equipment for being replaced gateway
Being capable of normal work.
The gateway replacement method provided with reference to above-mentioned Fig. 2 to Fig. 4 three kinds of embodiments, the embodiment of the present invention introduced below is carried
The interaction figure of three kinds of embodiments of the gateway replacement method of confession, as shown in figure 5, in the first embodiment:
First gateway is being added before network is communicated, it is necessary to carry out Bootstrap flows and the flow of service connection;
SCL ID can be obtained by the two flows first gateways and corresponding key is generated, NSCL can be also obtained to first net
Close the relevant information of authentication;
501st, first gateway sends the first GSCL ID of first gateway and replacement is indicated to the second gateway.
502nd, second gateway is received indicates in the message of first gateway comprising the first GSCL ID and replacement, should
Second gateway, which sends gateway, to be replaced and notifies NSCL to server, the gateway is replaced notify in carry the replacement indicate and this first
GSCL ID。
503rd, the NSCL of the server detects whether the first GSCL ID are effective;
Specifically, the NSCL detects whether the first GSCL ID pass through MSBF and MAS checking, if the first GSCL ID
Effectively, then step 504 is performed, refuse information is sent if invalid and gives second gateway.
504th, NSCL distributes a gateway and replaces mark and reply second gateway;
505th, the 2nd GSCL ID of second gateway and the gateway are replaced mark and are sent to first net by second gateway
Close;
506th, first gateway sends establishing resource request message and gives the NSCL, carried in the establishing resource request this
Two GSCL ID and the gateway replace mark;
507th, the NSCL is replaced according to the 2nd GSCL ID, the first GSCL ID and the network and identified, and updates the service
Device is the SCL resources that second gateway is created;
Specially:The NSCL detects the content in the establishing resource message that first gateway is sent, if the establishing resource
Message, which is carried, replaces mark, then it represents that the establishing resource message is the renewal for resource, so the NSCL is according to second net
The GSCL ID closed find the resource that second gateway is registered in network side, and this resource is included content with being somebody's turn to do by the server
Content in the establishing resource request that first gateway is sent is compareed, and different contents is updated, identical is kept
It is constant.
508th, the NSCL sends first message to first gateway, and the first message carries and has been successfully updated the industry
The information for capability layer resource of being engaged in.
509th, first gateway replies second gateway, and expression is successfully updated the NSCL resources.
510th, second gateway sends the second information to first gateway, and offline;
Wherein, the letter for the equipment for being registered to second gateway that second message package is stored containing second gateway
Breath, for example:The time of facility registration, the attribute of equipment, equipment storage to the content on gateway etc..Equipment herein can also be
One kind application.
511st, first gateway is according to the information included in second message received, and renewal is registered to second net
The gateway information for the equipment shut;
For example, wherein updating gateway information, include the URI and the URI of second gateway of first gateway.
More specifically, step 511, first gateway can pass through to the renewal of the equipment addressing information being registered on gateway
Flow shown in Fig. 6 realizes that now second gateway is offline.
601st, the corresponding equipment of all application resources of first gateway to first gateway sends the 3rd message;
Specifically, first gateway can be by multicast or broadcast transmission new information, in this new information
URI comprising second gateway and first gateway URI.The professional ability of second gateway is included in 3rd message
The URL of the URL of layer and the service capability layer of the second gateway;The application resource refers to described
The corresponding resource for the equipment being registered on second gateway.
602nd, online equipment receives the 3rd message of first gateway, and correspondence is found according to the URI of second gateway
Resource, then update this second gateway URI be first gateway URI, then by the 4th message acknowledgment this first
Gateway, the 4th message represents that the online equipment receives the new information.
603rd, first gateway sets mark for the corresponding application resource of equipment replied, represents that this equipment is updated.
Meanwhile, the expired time of the corresponding resource of equipment not updated is checked, judges whether expired, if expired, is deleted
Except this resource;Timer is set, at the time of sending new information next time in terms of.
604th, dormancy terminal is reached the standard grade.
Specifically, the dormancy terminal reached the standard grade sends a message to the gateway of app resources second, but be due to second gateway under
Line, so the dormancy terminal reached the standard grade will not receive any reply.
The dormancy terminal now reached the standard grade starts timer, and waits new information;If receiving new information, stop meter
When device.
605th, the timer of first gateway to sending multicast new information after the time again.
606th, online dormancy terminal receives new information stopping timer, and replies first gateway fresh information.
If the dormancy terminal reached the standard grade within the time of whole timer does not all receive any new information, again
Select gateway.
Fig. 7 is the interaction figure of the another embodiment of gateway replacement method, compared with the embodiment shown in Fig. 5, its area
It is not do not have communication mechanism between the first gateway and the second gateway, therefore, first gateway needs to be sent to second gateway
The first GSCL ID and gateway replace and indicate to need to carry out transfer by the NSCL of server, therefore, second gateway to this
Server is sent before gateway replacement notice, in addition to:
First gateway sends the first service capability layer mark and replaced and indicates to the server;
The server identifies first service capability layer and the replacement indicates to be sent to second gateway.
Remaining the step of, is all identical with the embodiment shown in Fig. 5, therefore seldom repeats.
Fig. 8 is the interaction figure of the another embodiment of gateway replacement method, in the present embodiment, replaces flow by second
Gateway is initiated, and as seen from Figure 8, described method includes:
801st, the second gateway sends gateway and replaces the NSCL notified to server, and the gateway, which is replaced, notifies that carrying replacement refers to
Show;
802nd, the NSCL examines the authority of second gateway;
Specifically, second gateway can write the attribute of oneself in the resource created in registration, NSCL detections
Whether second gateway has the authority being replaced, and gateway is arbitrarily replaced to prevent criminal.And this authority can be stored in this second
In the attribute of gateway.
After upchecking, step 803 is performed, refuse information is otherwise sent and gives second gateway.
803rd, the NSCL generates gateway and replaces mark and be sent to second gateway, is waited while being sent to second gateway
Indicate;
Specifically, second gateway receive the NSCL transmission this etc. it is to be instructed, that is, represent second gateway now not
Can be with offline, it is necessary to wait after the addition of the first gateway, can substitute just can be with offline when it works.Afterwards, second gateway etc.
Treat that first gateway is added and worked on.
After step 803, in 804, second gateway needs to interact second gateway with first gateway
2nd GSCL ID and the gateway replace mark and are sent to first gateway.Specifically, first gateway and second gateway can
To carry out information exchange by wired mode or wireless local net mode etc..
805th, the transmission establishing resource of first gateway asks to give the NSCL, wherein the 2nd GSCL comprising second gateway
ID, the first GSCL ID and the gateway replace mark;
806th, the NSCL verify the first gateway the validity, then the NSCL according to the first GSCL ID, this second
GSCL ID and the replacement are identified, the SCL resources for updating the server once for second gateway establishment;
The NSCL detects the content in the establishing resource message that first gateway is sent, and mark, table are replaced if carried
It is the renewal for resource to show this message, so NSCL finds second gateway according to the 2nd GSCL ID of second gateway
This resource is included interior establishing resource for being dissolved in first gateway transmission and asked by the resource registered in network side, the server
In content compareed, different contents is updated, identical keep it is constant.
808th, the NSCL is sent to second gateway and notified, described first is carried in the notice and is indicated and described first
The URL of gateway service capability layer.
809th, the GSCL of second gateway replies the NSCL of server, notifies its notified;
810th, the resource that the GSCL of second gateway is stored according to the GSCL URI of the first gateway by the second message
Information is sent to the GSCL of first gateway;
811st, the GSCL of first gateway replies the GSCL of second gateway, represents to receive the second of second gateway transmission
Message;
Specifically, similar with foregoing embodiment, second message package is stored containing second gateway, be registered to this
The information of equipment on two gateways, for example:
The time of facility registration, the attribute of equipment, equipment storage to the content on gateway etc..Equipment herein can also be
Using.
812nd, the GSCL of second gateway is offline;
813rd, information of first gateway in second message received, to being registered on second gateway
Renewal of the equipment gateway information, the gateway information includes new URI and old URI.
Specifically, step 813 is similar with the embodiment shown in Fig. 6, therefore, seldom repeat.
Accordingly, as shown in figure 9, the embodiments of the invention provide a kind of server, Fig. 9 is the structural representation of the embodiment
Figure, as seen from Figure 9, described server includes:
First receiving unit 901, the gateway replacement notice that the second gateway is sent is received for server, and the gateway is replaced
Carry replacement in notice to indicate, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
Generation unit 902, replaces mark, the gateway is replaced mark and will carried out for informing network for generating gateway
Gateway is replaced;
First transmitting element 903, mark is replaced for sending the gateway to second gateway;
Second receiving unit 904, for receiving the establishing resource request that first gateway is sent, the establishing resource please
The the second service capability layer mark and the gateway that second gateway is carried in asking replace mark, second professional ability
Layer mark and the gateway replace mark and are sent to first gateway by second gateway or the server;
Updating block 905, for the correspondence identified according to the first service capability layer and second service capability layer is identified
Relation, updates service capability layer resource, and the first service capability layer mark replaces logical by the server according to the gateway
Know or establishing resource request is obtained;
Second transmitting element 906, carries described for being sent to first gateway in first message, the first message
Server has been successfully updated the information of the service capability layer resource.
In a kind of possible embodiment, the gateway replaces the first professional ability that the first gateway is also included in notice
Layer mark, the first service capability layer mark and described replace indicate to be sent to second gateway by first gateway.
The server also includes:
3rd receiving unit, for receiving the first service capability layer mark and the replacement instruction that first gateway is sent;
3rd transmitting element, for first service capability layer mark and the replacement instruction to be sent into described second
Gateway.
Optionally, the server that takes also includes:
Detection unit, for detecting that first service capability layer is identified whether effectively.
The generation unit, is additionally operable to, when first service capability layer mark is effective, generate the gateway and replace mark
Know.
In alternatively possible embodiment, described server also includes:
Verification unit, for verifying whether second gateway can be replaced;
The generation unit 902 is additionally operable to when second gateway can be replaced, and is generated the gateway and is replaced mark.
Optionally, second transmitting element, be additionally operable to the second gateway send etc. it is to be instructed, for notifying described second
Gateway needs to wait offline instruction.
Optionally, described server, in addition to:
4th transmitting element, is notified for being sent to second gateway, carry in the notice described first indicate and
The URL of the first gateway service capability layer, described first indicates to be used to indicate that gateway replaces completion.
There is provided by server provided in an embodiment of the present invention, can be realized with professional ability by the embodiment of the present invention
The replacement of the gateway of layer, it is necessary to replace object for appreciation macroscopic view before the information mail sending charge per message that the gateway being replaced is stored replaces gateway
By the checking of server, before gateway is replaced and completed, be replaced gateway normal work, replace complete before will not under
Line, it is ensured that be registered to be replaced the equipment of gateway being capable of normal work.
Accordingly, the embodiment of the present invention additionally provides a kind of gateway, and the gateway for example can be the first net in Fig. 1
Close, Figure 10 is the structure chart of the gateway, and as seen from Figure 10, the gateway includes:
First receiving unit 1001, the of mark and second gateway is replaced for receiving the gateway that the second gateway is sent
Two service capability layer are identified, the gateway replace mark by server generate after be sent to second gateway;
First transmitting element 1002, is carried for being sent to the server in establishing resource request, the establishing resource
There are the second service capability layer mark and the gateway to replace mark, the establishing resource request touches server according to the first industry
Capability layer mark of being engaged in and second service capability layer mark update service capability layer resource, first industry for relation
Business capability layer mark is in the gateway replacement that the establishing resource is asked or second gateway is sent is notified;
Second receiving unit 1003, for receiving the first message that the server is sent, the first message carries institute
State the information that server has successfully created the service capability layer resource;
3rd receiving unit 1004, for receiving the second message that second gateway is sent, second message package contains
The corresponding resource information of equipment for being registered to second gateway of the second gateway storage;
Updating block 1005, for second message received according to the 3rd receiving unit, to being registered to
State the renewal of the equipment gateway information on the second gateway.
In one embodiment, the gateway also includes:
Second transmitting element, for sent to shown second gateway first gateway the first service capability layer mark and
Replace and indicate, described replace indicates to be used to indicate that second gateway will be replaced by second gateway, in order to described second
Gateway sends network to server and replaces notice, and the gateway replacement carries described replace in notifying and indicated and the first business energy
Power layer mark.
Optionally, the gateway also includes:3rd transmitting element, for sending the first business energy to the server
Power layer is identified and replaced and indicates, in order to which first service capability layer mark and the replacement are indicated to send by the server
To second gateway.
Optionally, the updating block, sends out specifically for the corresponding equipment of application resource included to first gateway
Send the URL of the service capability layer comprising first gateway and described the in the 3rd message, the 3rd message
The URL of the service capability layer of two gateways;The application resource refers to described be registered on second gateway
The corresponding resource of equipment.
Optionally, the gateway also includes:
4th receiving unit, the 4th message for receiving online equipment transmission, the 4th message carries described online
Equipment receives the information of the new information.
Optionally, the gateway also includes:
Indexing unit, for the corresponding equipment of the 4th message for marking the 4th receiving unit to receive.
Optionally, the gateway also includes:
Processing unit, for determining whether the corresponding resource of equipment that does not update expired, however, it is determined that it is described do not update set
Standby corresponding resource is expired, then the corresponding resource of equipment not updated described in deletion.
There is provided by gateway provided in an embodiment of the present invention, can be realized with service capability layer by the embodiment of the present invention
Gateway replacement, it is necessary to which to replace object for appreciation macroscopic view logical before information mail sending charge per message that the gateway being replaced is stored replaces gateway
The checking of server is crossed, before gateway replaces completion, gateway normal work is replaced, will not be offline before completion is replaced,
Can ensure to be registered to the equipment for being replaced gateway being capable of normal work.
Accordingly, the embodiment of the present invention additionally provides a kind of gateway, and the gateway for example can be the second net in Fig. 1
Close, Figure 11 is the structure chart of the gateway, and as seen from Figure 11, the gateway includes:
First transmitting element 1101, replaces notice, the gateway is replaced in notice and carried for sending network to server
There is replacement to indicate, described replace indicates to be used to indicate that second gateway will be replaced by the first gateway;
First receiving unit 1102, mark is replaced for the gateway that the reception server is sent, the gateway replace mark by
Server is generated, and the gateway, which replaces mark, to be used to identify gateway replacement;
Second transmitting element 1103, is identified and described for sending the second service capability layer of itself to first gateway
Gateway replaces mark;
Second receiving unit 1104, for receiving the first message that first gateway is sent, the first message is carried
The server has successfully created the information of the service capability layer resource;
3rd transmitting element 1105, for sending the second information to first gateway, second packet is containing described
The corresponding resource information of equipment for being registered to second gateway of second gateway storage.
In one embodiment, institute's gateway also includes:
3rd receiving unit, refers to for receiving first service capability layer mark that the first gateway is sent with the replacement
Show, described replace is indicated to be used to indicate that the second gateway will be replaced by first gateway, and the gateway is replaced also to be included in mark
The first service capability layer mark, the gateway replaces the first business energy for being carried in notice and replacing instruction and the first gateway
Power layer mark.
4th receiving unit, for receiving the gateway replacement mark of the server transmission and waiting to be instructed.
In another embodiment, described gateway also includes:
5th receiving unit, the URL of the service capability layer of the first gateway sent for the reception server
Indicated with replacing;
Optionally, described gateway also includes:
6th receiving unit, for receiving the confirmation message that first gateway is sent;
Processing unit, the confirmation message for being received according to the 6th receiving unit is offline, and the confirmation disappears
Cease for confirming that first gateway receives second message.
Above-mentioned server, gateway can perform the method for above method embodiment respectively, and here is omitted.
There is provided by gateway provided in an embodiment of the present invention, can be realized with service capability layer by the embodiment of the present invention
Gateway replacement, it is necessary to which to replace object for appreciation macroscopic view logical before information mail sending charge per message that the gateway being replaced is stored replaces gateway
The checking of server is crossed, before gateway replaces completion, gateway normal work is replaced, will not be offline before completion is replaced,
Can ensure to be registered to the equipment for being replaced gateway being capable of normal work.
As shown in figure 12, the embodiments of the invention provide a kind of server, the server can be disposed for performing sheet
Method shown in inventive embodiments Fig. 2;As shown in figure 12, the server includes network interface 1201, processor 1202 and storage
Device 1203.System bus 1204 is used to connect network interface 1201, processor 1202 and memory 1203.
Network interface 1201 is used for and other network node communications.
Memory 1203 is used to deposit program.Specifically, program can include program code, and described program code includes meter
Calculation machine operational order.Memory 1203 may include high-speed random access memory(Random access memory, referred to as
RAM)Memory, it is also possible to also including nonvolatile memory(non-volatile memory), for example, at least one disk deposits
Reservoir.Device driver can also be included in the memory 1203.
Processor 1202 performs the program deposited in memory 1203, for performing:
The gateway for receiving the transmission of the second gateway replaces notice, and the gateway replacement carries replacement in notifying and indicated, described
Replace and indicate to be used to indicate that second gateway will be replaced by the first gateway;
Generate gateway and replace mark, the gateway, which replaces mark, to be used to identify gateway replacement;
The gateway, which is sent, to second gateway replaces mark;
The establishing resource request that first gateway is sent is received, second net is carried in the establishing resource request
The the second service capability layer mark closed and the gateway replace mark, and the second service capability layer mark and the gateway are replaced
Mark is sent to first gateway by second gateway or the server;
According to the first service capability layer mark and second service capability layer mark, service capability layer resource, institute are updated
State the first service capability layer mark and notice or establishing resource request acquisition are replaced according to the gateway by the server;
First message is sent to first gateway, the first message carrying server has been successfully updated described
The information of service capability layer resource.
It should be noted that:The processor 1202 can also further perform other steps in correlation method embodiment,
Here is omitted.
As shown in Figure 13, the embodiment of the present invention additionally provides a kind of gateway, and the gateway is used to perform the embodiment of the present invention
Method shown in middle Fig. 3;As shown in figure 13, the gateway includes network interface 1301, processor 1302 and memory 1303.System
Bus 1304 is used to connect network interface 1301, processor 1302 and memory 1403.
Network interface 1301 is used for and other network node communications.
Memory 1303 is used to deposit program.Specifically, program can include program code, and described program code includes meter
Calculation machine operational order.Memory 1303 may include high-speed random access memory(Random access memory, referred to as
RAM)Memory, it is also possible to also including nonvolatile memory(non-volatile memory), for example, at least one disk deposits
Reservoir.Device driver can also be included in the memory 1303.
Processor 1302 performs the program deposited in memory 1303, for performing:
The gateway for receiving the transmission of the second gateway replaces mark and the second service capability layer mark of second gateway;
Establishing resource request is sent to server, the second service capability layer mark is carried in the establishing resource request
Know and the gateway replaces mark, the establishing resource asks the triggering server according to the first business of first gateway
Capability layer is identified and second service capability layer mark, updates service capability layer resource, the first service capability layer mark
Replaced included in the gateway that the establishing resource is asked or second gateway is sent in notifying;
The first message that the server is sent is received, the first message carries the server and successfully created institute
State the information of service capability layer resource;
The second message that second gateway is sent is received, second packet contains the registration that second gateway is stored
To the corresponding resource information of equipment of second gateway;
According to second information received, to the renewal of the equipment gateway information being registered on second gateway.
It should be noted that:The processor 1302 can also further perform other steps in correlation method embodiment,
Here is omitted.
As shown in figure 14, the embodiment of the present invention additionally provides a kind of gateway, and the gateway is used to perform the embodiment of the present invention
Method shown in Fig. 3;As shown in figure 14, the gateway includes network interface 1301, processor 1402 and memory 1403.System is total
Line 1404 is used to connect network interface 1401, processor 1402 and memory 1403.
Network interface 1401 is used for and other network node communications.
Memory 1403 is used to deposit program.Specifically, program can include program code, and described program code includes meter
Calculation machine operational order.Memory 1403 may include high-speed random access memory(Random access memory, referred to as
RAM)Memory, it is also possible to also including nonvolatile memory(non-volatile memory), for example, at least one disk deposits
Reservoir.Device driver can also be included in the memory 1403.
Processor 1402 performs the program deposited in memory 1403, for performing:
Gateway is sent to server and replaces notice, and the gateway replacement carries replacement in notifying and indicated, the replacement refers to
Show for indicating that second gateway will be replaced by the first gateway;
The gateway for receiving the server transmission replaces mark, and the gateway replaces mark for identifying gateway replacement;
The the second service capability layer mark and the gateway for sending second gateway to first gateway replace mark;
The first message that first gateway is sent is received, the first message carries the server and successfully created
The information of the service capability layer resource;
The second message is sent to first gateway, second message package is registered to institute containing what second gateway was stored
State the corresponding resource information of equipment of the second gateway.
It should be noted that:The processor 1402 can also further perform other steps in correlation method embodiment,
Here is omitted.
Professional should further appreciate that, each example described with reference to the embodiments described herein
Unit and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, hard in order to clearly demonstrate
The interchangeability of part and software, generally describes the composition and step of each example according to function in the above description.
These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.
Professional and technical personnel can realize described function to each specific application using distinct methods, but this realize
It is not considered that beyond the scope of this invention.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm
Software module, or the two combination are implemented.Software module can be placed in random access memory(RAM), internal memory, read-only storage
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Above-described embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect
Describe in detail, should be understood that the embodiment that the foregoing is only the present invention, be not intended to limit the present invention
Protection domain, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc. all should be included
Within protection scope of the present invention.