Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, but be to be understood that, can realize in a variety of manners the disclosure and not should limit by the embodiment set forth here, other embodiments can comprise structure, logic, electric, process and other change.Embodiment only represents possible change.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.Herein, these embodiments of the present invention can be represented with term " invention " individually or always, this is only used to conveniently, and if in fact disclose the invention more than, be not the scope that will limit this application is automatically any single invention or inventive concept.
Fig. 1 is home network schematic diagram in the present invention; Home network comprises three method, apparatus, constrained devices 001, agent equipment 002 and gateway 003.The number of constrained devices 001, agent equipment 002 and gateway 003 is more than or equal to 1.
Constrained devices 001 and agent equipment 002 all need to be registered on gateway 003, and constrained devices 001 is due to limited ability, communication protocol isomery or the equipment being limited to communication distance, cannot be registered to voluntarily on gateway 003.
Agent equipment 002, to be registered on gateway 003, can as intermediate equipment, complete communicating of constrained devices 001 and gateway 003, finally overcome the defect of limited reason equipment 001 itself, realize registration.
Constrained devices 001, for sending provisional registration request to the agent equipment 002 completing registration, described provisional registration request comprises the described information of constrained devices 001 and the gateway address of request registration;
Agent equipment 002, for receiving described provisional registration request, judges that whether the gateway address that described request is registered is identical with the gateway address of register itself, if identical, sends proxy registration request message; Described proxy registration request message comprises: registration request type, gateway 003 information and agent equipment 002 information;
Gateway 003, for receiving registration request and described proxy registration request message, completing the registration of first equipment 001, and identifying the agent equipment 002 of constrained devices 001 according to the information received.
In the present invention, agent equipment 002 is be registered to the device registration on gateway 003, constrained devices 001 is by sending provisional registration request to agent equipment 002, agent equipment 002 receives provisional registration request, judge that whether the gateway address of request registration is identical with the gateway address of register itself, be judged to be identical, agent equipment 002 sends proxy registration request message to gateway 003, and gateway 003 completes registration.Further, if gateway 003 sends registration complete message, this message also can be forwarded on constrained devices 001 by agent equipment 002.
Fig. 2 is facility registration flow chart in the present invention; Facility registration comprises the following steps:
After S001, agent equipment 002 complete registration, receive provisional registration request; Provisional registration request comprises the information of constrained devices 001 and the gateway address of request registration.
S002, further, judge that whether the gateway address of request registration is identical with the gateway address of register itself;
If S003 is identical, the gateway 003 that agent equipment 002 is registered to it sends proxy registration request message; If different, then ignore this request.
Described proxy registration request message comprises: registration request type, device registration 003 information and agent equipment 002 information;
S004, gateway 003 Receiving Agent login request message, gateway 003 is registered constrained devices 001, and identifies agent equipment 002 for " agent equipment ".
On the embodiment basis of the said equipment registration, provide another embodiment, step S003, comprise further: preserve described provisional registration request.
In step S004, gateway 003 receives described proxy registration request message, and gateway 003 is registered constrained devices 001, and mark agent equipment 002 is " agent equipment ", comprises further: the relevant information of preserving device registration.
After the mark completing registration and agent equipment, gateway 003 is sent completely the acknowledge message of registration to described agent equipment 002, is forwarded to described constrained devices 001 by described agent equipment 002.
In the present invention, before agent equipment 002 receives provisional registration request, need the correspondence setting up agent equipment 002 and constrained devices 001, method is that constrained devices 001 initiatively determines agent equipment 002, also can be that agent equipment 002 is after completing gateway registration, broadcast the message of self, after being listened to by constrained devices 001, set up correspondence again.It should be noted that, the method connected between agent equipment 002 and constrained devices 001 includes but are not limited to said method.
Fig. 3 is constrained devices 001 request broker equipment 002 scheme one flow chart in the present invention; A kind of method of constrained devices 001 request broker equipment 002 is provided, comprises:
S01, described agent equipment 002 complete with the registration of described gateway 003 after broadcast registration information;
S02, constrained devices 001 receive described registration message;
S03, the gateway address judged in described registration message are identical with the gateway address that self need register;
S04, identical, send provisional registration request to described agent equipment 002, otherwise continue to intercept registration message.
Before completing the agent equipment reception provisional registration request of registration in another embodiment provided by the invention, constrained devices 001, according to preset gateway address, sends request query messages, and described request query messages comprises the identifier of gateway 003 to be responded;
The response of described gateway 003 is not obtained in stipulated time, described constrained devices 001 resends request broker query messages, and described request agents query message comprises the gateway address of requesting service and waits for the identifier of the registered agent equipment at described gateway to be registered response.
Fig. 4 is constrained devices 001 request broker equipment 002 scheme two flow chart in the present invention; The method of another kind of constrained devices 001 request broker equipment 002 is provided, comprises:
S11, agent equipment 002 receive request broker query messages;
S12, judge that whether the gateway address of described request equipment is consistent with the gateway address of register itself, and whether self identification symbol is the response of the registered agent equipment at described gateway to be registered; If all satisfied, then enter step S13;
S13, send response message to described constrained devices 001.
S14, constrained devices 001 confirm that the gateway address comprised in the response message of described agent equipment 002 is identical with self preset gateway address, send provisional registration request to described agent equipment 002.
Fig. 5 is the structure chart of constrained devices 001 1 in the present invention; A kind of constrained devices 001 is provided, comprises:
Intercept unit 101, for receiving the registration message of described agent equipment 002 broadcast;
Whether judging unit 102 is identical with the gateway address that self need register for judging the gateway address in described registration message;
Transmitting element 103, for sending provisional registration request to described agent equipment 002.
Receiving element 104, for receiving the acknowledge message completing registration that described agent equipment 002 forwards.
In the present invention, the unit 101 of intercepting of constrained devices intercepts broadcast, listens to the registration message of rear Receiving Agent equipment 002 broadcast, and this registration message comprises the gateway address that agent equipment 002 is registered.
Judging unit 102 reads the gateway address that self need register, and judges that whether the gateway address in registration message is identical with the gateway address that self need register; If not identical, continue the message intercepting other, if identical, then send provisional registration request by transmitting element 103 to agent equipment 002.
The type that this provisional registration request comprises registration request, the information of equipment that need register, the information of agent equipment.
The type of above-mentioned registration request represents self to be needed to be registered by agent equipment, and this registration message is proxy requests.
In the present invention, constrained devices can also comprise receiving element 104, can be used for receive gateway 003 send, agent equipment 002 forward registration complete after acknowledge message.
Fig. 6 is the structure chart of constrained devices 001 2 in the present invention; In the present embodiment, a kind of constrained devices 001 is provided, comprises:
Request registration unit 111, for according to preset gateway address, sends request query messages, and described request query messages comprises the identifier of gateway to be responded;
Request broker registering unit 112, when for not obtaining the response of described gateway at the appointed time, resend request broker query messages, described request agents query message comprises the gateway address of requesting service and waits for the identifier of the registered agent equipment at described gateway to be registered response;
Accept agency of trademark registration unit 113, for receiving the response message that described agent equipment 002 sends;
Judging unit 114 is identical with the gateway address that self need register for judging the gateway address in described registration message;
Transmitting element 115, for sending provisional registration request to described agent equipment 002.
Receiving element 116, for receiving the acknowledge message completing registration that described agent equipment 002 forwards.
In the present invention, the registration request unit 111 of constrained devices 001, according to preset gateway address, sends request query messages, and this requesting query message comprises the identifier of gateway to be responded.
This message is received by gateway 003, is judged, when gateway 003 because problem such as distance reason etc. cannot requesting query message, obtains because the problems such as communication protocol are not registrable.Then, request broker registering unit 112 resends request broker query messages, and this request broker query messages comprises the gateway address of requesting service and waits for the identifier of the registered agent equipment at described gateway to be registered response.
Request broker query messages is received by agent equipment 002, after agent equipment 002 receives request broker query messages, determine that the gateway address in this request is consistent with the gateway address that oneself is registered, and self be contained in the identifier wherein comprised, then feedback packet draws together the response message of gateway address.
Judging unit 114 judges that whether the gateway address in described response message is identical with the gateway address that self need register; Difference then abandons this request broker query messages, if identical, sends provisional registration request by transmitting element 115 to described agent equipment 002.
This constrained devices 002 can also comprise receiving element 116, receives the acknowledge message completing registration that described agent equipment 002 forwards.
Fig. 7 is the structure chart of agent equipment 002 1 in the present invention; In the present embodiment, a kind of agent equipment 002 is provided, comprises:
Receiving element 201, receives described provisional registration request, and the acknowledge message completing registration that described gateway 003 sends;
Judging unit 202, whether the gateway address for the gateway address with register itself that judge described request equipment is consistent, and whether self identification symbol is set to the response of the registered agent equipment at described gateway to be registered;
Response unit 203, for sending response message to described constrained devices 001;
Transmitting element 204, for sending proxy registration request message to the gateway 003 of registration, and completes the acknowledge message of registration described in sending to described constrained devices 001.
In the present invention, receiving element 201 receives described provisional registration request; Judge that whether the gateway address of described request equipment is consistent with the gateway address of register itself by judging unit 202, and whether self identification symbol is set to the response of the registered agent equipment at described gateway to be registered; If above-mentioned condition all meets, then response unit 203 sends response message to constrained devices 001.The gateway address of its registration is comprised in this response message.
Through judging to send proxy registration request message after constrained devices 001 receives response message; Retransmission unit 204 receives and sends proxy registration request message to the gateway 003 registered.
After completing registration, gateway 003 is replied and is determined message, and receiving element 201 receives the acknowledge message completing registration that gateway 003 sends, and completes the acknowledge message of registration described in retransmission unit 204 sends to described constrained devices 001.
On the basis of above-described embodiment, in the present invention, this agent equipment can also comprise memory cell 205, and all information related in preservation process, as provisional registration request etc.
Fig. 8 is the structure chart of agent equipment 002 2 in the present invention; In the present embodiment, another kind of agent equipment 002 is provided, comprises:
Receiving element 211, receives described provisional registration request, and the acknowledge message completing registration that described gateway 003 sends;
Judging unit 212, whether the gateway address for the gateway address with register itself that judge described request equipment is consistent, and among the identifier self whether belonging to the described registered agent equipment 002 at described gateway to be registered;
Response unit 213, for sending response message to described constrained devices 001;
Transmitting element 214, sends proxy registration request message for the gateway to registration, and completes the acknowledge message of registration described in sending to described constrained devices 001;
Registration message radio unit 216, for broadcast agent registration message, described proxy registration message comprises the gateway address of described agent equipment 002 registration.
In the present invention, registration message radio unit 216 is after agent equipment 002 completes registration, and broadcast agent registration message, described broadcast agent registration message comprises the gateway address of described agent equipment 002 registration.
The provisional registration request that receiving element 211 sends for receiving constrained devices 001, judge that whether the gateway address of described request equipment is consistent with the gateway address of register itself by judging unit, and whether self identification symbol is set to the identifier of the registered agent equipment at described gateway to be registered response; On above-mentioned 2 bases all met, send response message by response unit 213 to described constrained devices 001.
Constrained devices 001 carries out after judgement completes according to response message, and send proxy registration request message, retransmission unit 214 receives this message, and sends proxy registration request message to the gateway of registration.
After gateway 003 completes registration, reply and determine message, receiving element 211 receipt message has also been forwarded the acknowledge message of registration to constrained devices 001 by retransmission unit 214;
Technical at such scheme, in the present invention, this agent equipment 002 can also comprise memory cell 215, preserves the above-mentioned various information related to, as described in provisional registration request etc.
Fig. 9 is the structure chart of gateway in the present invention; In the present embodiment, a kind of gateway 003 is provided, comprises:
Receive log-on message unit 301, for receiving login request message and proxy registration request message;
Registering unit 302, for completing registration, preserves log-on message;
Send log-on message unit 303, for sending the response message registered;
Radio unit 304, for broadcast gateway log-on message, described gateway registration packets of information draws together gateway address.
The reception log-on message unit 301 of gateway 003 receives registration request and proxy registration request, completes registration by registering unit 302, preserves log-on message; Send log-on message unit 303 and send the response message registered.
Can also comprise radio unit 304 broadcast gateway log-on message, described gateway registration packets of information draws together gateway address.
It should be noted that, in the various embodiments described above, all can make other amendments to each module, unit in constrained devices 001, agent equipment 002, gateway 003, replace, split or combination, adaptively change and they are arranged in one or more equipment different from this embodiment.
And all parts embodiment with hardware implementing, or can realize with the software module run at one or more, or realize with their combination.
With a specific embodiment, the solution of the present invention is described below, Figure 10 is the structure chart of home network example in the present invention; For Fig. 9 structure, employing method for device registration of the present invention is illustrated.
A kind of method for device registration, comprises the following steps:
After equipment two and equipment three are registered to gateway one and gateway two respectively, the broadcast agent registration message in cycle, comprises the gateway information that this equipment is registered in this proxy registration message, comprises the mark of gateway, the title of gateway, the address etc. of gateway.
Specifically, equipment two is registered to gateway one, and the information of equipment two cycles broadcast oneself, specifically comprises the device id, device name, device type etc. of the message of gateway one, equipment of itself;
After equipment three is registered to gateway two, the information of equipment three periodic broadcasting oneself and the information of gateway two, specifically comprise the device id, device name, device type etc. of the message of gateway two, equipment of itself.
Equipment one is constrained devices, after it is reached the standard grade, is in listen mode, and equipment two does not receive the broadcast of gateway one at the appointed time, but have received the broadcast of equipment two and equipment three; Read the gateway information in message, contrast with preset gateway address, be confirmed whether identical.
Equipment one confirms that gateway address in the broadcast of equipment two is identical with preset, sends provisional registration request, contain the specifying information of equipment one and need the gateway address of registration to equipment two.
Equipment two receives the provisional registration request message that equipment one sends, and whether the gateway address that judgment device one is asked is identical with the gateway address that oneself is registered; Identical, equipment two preserves the facility information of equipment one, and sends proxy registration request message to gateway one, includes but are not limited to following information in this proxy registration request message:
1., the type of login request message, represent that this registration message is proxy requests;
2., device registration information
3., agent equipment information
After gateway one receives this registration message, equipment one is kept in list of devices, and the agent equipment of marking equipment one is equipment two; Gateway one returns acknowledge message to equipment two, and equipment two forwards this acknowledge message to equipment one.
Another kind of method for device registration, comprises the following steps:
After equipment one is reached the standard grade, according to preset gateway address, send query messages, contain the identifier expecting response in this query messages, identify and need this gateway to respond; Do not get the response of gateway one at the appointed time, equipment one resends query messages, will expect that the identifier of response is set to: wait for the device responds be registered on this gateway in this message.
After equipment two receives this query messages, confirm that the gateway address of request is consistent with the gateway address that oneself is registered, and expect that the identifier of response is also set to wait for the device responds be registered on this gateway; Equipment two sends response message to equipment one.
Equipment one confirms that the gateway address that comprises in the response message of equipment two is identical with preset, sends provisional registration request to equipment two.In provisional registration request, the specifying information comprising equipment one and the gateway address that will register; The provisional registration request that equipment two receiving equipment one sends, whether the gateway address that judgment device one is asked is identical with the gateway address that oneself is registered.
After the login request message of equipment two receiving equipment one, preserve its facility information, and send proxy registration request message to gateway one, in this proxy registration request message, include but are not limited to following information:
1., the type of login request message, represent that this registration message is proxy requests;
2., device registration information
3., agent equipment information
In the present embodiment, device registration is equipment 1, and this device registration is constrained devices, and agent equipment is equipment 2;
After gateway one receives this registration message, equipment one is kept in list of devices, and the agent equipment of marking equipment one is equipment two; Gateway one returns acknowledge message to equipment two, and equipment two forwards this acknowledge message to equipment one.
Finally should be noted that: above embodiment is only for illustration of the technical scheme of the application but not the restriction to its protection range; although with reference to above-described embodiment to present application has been detailed description; those of ordinary skill in the field are to be understood that: those skilled in the art still can carry out all changes, amendment or equivalent replacement to the embodiment of application after reading the application; but these change, revise or be equal to replacement, all applying within the claims awaited the reply.