Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below with reference to drawings and Examples, the present invention is described in further detail.
First, summarize the present invention and realize the technology path that thin client device is connected with access device:
The priority of access device is previously generated according to the state of access device in network, and by corresponding with the access of access device mark for priority storage.Wherein, priority characterizes the connective stability of access device, and priority is the highest, and connective stability is the strongest.While access device is declared to identify self and be available for the access mark that thin client device is found in a network, the priority that declaration is corresponding;When thin client device needs to connect access device, send broadcast and find the online access device in network, select the other online access device of high priority to be attached as target access device according to the priority of online access device.Thus, thin client device can be with the high access device of preferential attachment stability, obtain stable network insertion, avoid and frequently change network structure, the problem of network insertion interactive performance difference because of what access device produced because of low frequently the going offline of stability, improve the utilization rate of the high access device of operation stability simultaneously.
More specifically method of attachment refers to two shown in Fig. 1 and Fig. 2 embodiment.
Referring to Fig. 1, this figure show the flow chart of thin client device of the present invention and first embodiment of method of attachment of access device.
Comprise the steps: as it is shown in figure 1, this embodiment realizes the process that thin client device is connected with access device
Step 101: thin client device sends the broadcast comprising access device access mark, finds the online access device with this access mark in a network.
Thin client device is after networking, it is possible to the access or arranging all access devices in network by arranging program on this thin client device on third party's (device as described in Fig. 3 to Fig. 5) of realization connection access device identifies.Wherein, access mark and be preferably the name of access device.Thin client device if desired access network in subsequent process, then identify according to the access of known access device and send a broadcast, will include and wish that the access of the access device connected identifies in this broadcast.
General, the mark that accesses of access device has certain systematicness.Such as, if the name of access device is as accessing mark, name is made up of many parts, and some equipment exists identical part.Thus, facilitating follow-up screening for searching out access device as much as possible, the access mark content included in broadcast is the fewest.
Step 102: judge whether to find the online access device of coupling.If so, step 103 is performed;Otherwise, go to step 101, continue to send broadcast, find online access device.
If not finding the online access device of coupling within sending the certain time after broadcast, such as, within the searching cycle set, do not receive the access information of access device, show not find the online access device of coupling.So, step 101 will be gone to, continually look for.Furthermore, it is possible to continually look for by the way of periodic broadcast access device accesses mark.
But it is not limited to this, if not finding the online access device of coupling in the certain time after broadcast, access can also be changed identify, then broadcast the access after change and identify, find accessing after whether existing in network and changing and identify the online access device matched.
Step 103: when step 102 judges the online access device searching out coupling, it may be judged whether only look for an online access device matched.If so, step 104 is performed;Otherwise, step 105 is performed.
If step 102 judges to have searched out the online access device matched, namely obtains the broadcasted access information accessing access device corresponding to mark, then judge the number of the online access device searched out.
Step 104: when only looking for the online access device that matches, using the online access device that searches out as target access device.Then, step 106 is performed.
If only finding an online access device matched, then directly using this online access device as target access device.
Step 105: if step 103 judges to search out the online access device of not only one, namely search out multiple online access device matched, now, select the access device that online access device medium priority is the highest as target access device.Then, step 106 is performed.
As previously mentioned with respect to described in the technology of the present invention route, access device is previously stored with the priority characterizing its connective stability, and priority is the highest, and connective stability is the strongest.And, after access device is reached the standard grade, access the contents such as mark, access information in declaration while, also can declare its priority.Thin client device, after searching out multiple online access device matched, will read the priority of each online access device, and therefrom chooses the highest access device of priority level as target access device.
For example, in one family network, household electrical appliances/home equipment all achieves intelligent interconnection, and some equipment had both run bus finger daemon, also ran terminal node, and this kind equipment is access device.And some equipment only runs terminal node, this kind equipment is thin client device.
Wherein, the equipment as access device mainly comprises router, mobile phone, panel computer, TV, computer, intelligent watch, intelligent glasses etc..Additionally, gate inhibition and monitoring system, intelligent refrigerator, intelligent air condition, intelligent washing machine etc. are likely to run bus finger daemon, thus can also use as access device.Different access devices, according to the state that its long operational time is short, is divided into following several different classification.
Persistently run class:
This kind equipment persistently can run in home network, such as router, gate inhibition and monitoring system, some intelligent refrigerator.Especially router, is responsible for the foundation of home network, and its operation is inseparable with network, it may be said that simply by the presence of home network, router is just in running status.
The priority of this kind of access device uses keyword persistent to identify, and is that limit priority is other.
Longtime running class:
Though this kind equipment can not persistently run, but can ensure that the longtime running of regular period, such as Android phone, panel computer, wrist-watch, glasses etc., its bus finger daemon can be followed device systems for a long time and be run on backstage.
The priority of such access device uses keyword longtime to identify, and priority level is only second to persistent.
Short-term operation class:
This kind equipment is only opened needs when, closes, such as TV, computer, air-conditioning, washing machine etc. after running a period of time.
The priority of such access device uses keyword period to identify, and its this priority level is only second to longtime.
Run class temporarily
The iOS device, only APP such as this kind equipment such as iphone, ipad are foreground when, and its bus finger daemon is just available.
Thus, the priority of such access device, as the priority of lowest level, uses keyword temporary to identify.
If searching out multiple online access device matched, reading the priority of each online access device, screening according to priority.Specifically:
Search whether to there is the online access device that priority is persistent.If having, then using this online access device as target access device.If there is the online access device that multiple priority are persistent, then can randomly select one as target access device.
Without the online access device that priority is persistent, search whether to there is the online access device that priority is longtime.If having, then using this online access device as target access device.If there is the online access device that multiple priority are longtime, then can randomly select one as target access device.
Without the online access device that priority is longtime, search whether to there is the online access device that priority is period.If having, then using this online access device as target access device.Same, if there is the online access device that multiple priority are period, then can randomly select one as target access device.
Without the online access device that priority is period, illustrate that the priority of online access device is temporary, then using this online access device as target access device.Same, if there is the online access device that multiple priority are temporary, randomly select one as target access device.
Step 106: be attached according to the access information of target access device.
Access information is including, but not limited to information such as the address of access device, interfaces.Thin client device can be connected with access device according to access information.
This embodiment is by previously generating corresponding priority to access device according to its state such as operation time and store, thus provide and a kind of select mechanism so that thin client device can prioritizing selection connective stability is high from the online access device of coupling access device be attached.And then, it is possible at utmost guarantee that thin client device obtains the most stable network and connects, it is to avoid frequent change access device and the problem connecting difference that causes, and the access device that stability is high can be made full use of, improve high-quality resource utilization rate.
Refer to Fig. 2, the figure shows the flow chart of thin client device of the present invention and second embodiment of method of attachment of access device.
Comprise the steps: as in figure 2 it is shown, this embodiment realizes the process that thin client device is connected with access device
Step 201: thin client device sends and comprises access device access mark and the broadcast of priority, finds the online access device of coupling in a network.
Similar with above-mentioned first embodiment step 101, thin client device if desired access network, the broadcast accessing mark comprising known access device will be sent.And unlike first embodiment step 101, the broadcast that thin client device sends not only includes the access mark of access device, also include the priority of access device to be connected, that specify.Wherein, the acquisition of the priority of access device, implication, arrange and use the description being referred to first embodiment.
And, if thin client device sends broadcast first, the priority preferably broadcasted is highest level priority.Such as, in four priority described in above-mentioned first embodiment, the priority sent first is persistent.
Step 202: judge whether to find the online access device of coupling.If so, step 207 is performed;If it is not, perform step 203.
The online access device of coupling, is to refer to an access mark and the most identical online access device of priority.Can by online access device declared access mark and content that priority and thin client device are broadcasted contrasts one by one, it is judged that whether online access device is the online access device of coupling.If it is, perform the connection procedure of step 207.Otherwise, follow-up lookup processing procedure is continued executing with.
Step 203: if step 202 judges not find the online access device of coupling, determine whether whether the setting time arrives.If not arriving, going to step 201, continually looking for;Otherwise, step 204 is performed.
Affecting connection speed for avoiding resting on the specific access device of lookup for a long time, this embodiment is that each search procedure is provided with a setting time.Having not timed out if set, can continue waiting for and searching whether the online access device matched.Otherwise, subsequent treatment is performed.
Step 204: if step 203 judges that the setting time arrives, then judge whether the priority that thin client device is broadcasted is lowest level priority.If so, step 206 is performed;If it has not, perform step 205.
Step 205: if step 204 judges that the priority that thin client device is broadcasted is not the priority of lowest level, then the priority of broadcast is reduced to a low rank, using other for low one-level priority as new broadcast priority.Then, go to step 201, send and comprise access device access mark and the broadcast of a low level priorities, continue to find in a network and can mate this access mark and the online access device of a low level priorities.
Still as a example by four priority described in first embodiment, if the priority that current thin client device is broadcasted is highest level priority persistent, then priority is reduced a rank, become longtime.Then, send to comprise and access mark and the broadcast of priority longtime, whether have in Network Search priority as longtime, access the online access device that mark also matches.
Step 206: if step 204 judges that the priority that thin client device is broadcasted is the priority of lowest level, as for temporary, then priority is changed into the priority of highest level, then step 201 is gone to, send and comprise access device access mark and the broadcast of highest level priority, continue to find the online access device that can mate this access mark and highest level priority in a network.Thus, open the searching of a new round.
Or, while change priority, also can also change and access mark, then broadcast the access mark after changing and priority, find the online access device that access identifies and priority matches whether existed in network and after change.
Step 207: after the online access device of coupling is found in step 202 judgement, using this online access device as target access device.
If there is there being multiple online access device matched, one can be randomly selected as target access device.
Step 208: be attached according to the access information of target access device.
Access information is including, but not limited to information such as the address of access device, interfaces.Thin client device can be connected with access device according to access information.
In this second embodiment, thin client device is i.e. assigned priority when sending broadcast, and preferably find the online access device matched successively from high to Low order according to priority, it also is able at utmost guarantee that thin client device obtains the most stable network and connects, the problem connecting difference avoiding frequently change access device and cause, and the access device that stability is high can be made full use of, improve high-quality resource utilization rate.
Refer to the present invention shown in Fig. 3 to Fig. 5 and there is the structured flowchart of thin client device and the system of access device.Wherein, Fig. 3 is the structured flowchart of this system, Fig. 4 and Fig. 5 is the structured flowchart of two embodiments of device in Fig. 3 respectively.
Shown in the structured flowchart of one embodiment of system with thin client device and access device as shown in Figure 3, the system of this embodiment includes a thin client device 31 and n access device 331,332 ..., 33n.Wherein, each access device is respectively provided with the priority characterizing its connective stability, and this priority generates according to the state of access device and storage the most corresponding with access device.Preferably, priority generated according to the operation time of access device.Additionally, system also includes device 32, send broadcast for thin client device 31 and find online access device, select the other online access device of high priority according to the priority of online access device.And, thin client device 31 is attached with by the other online access device of the high priority selected by device 32.
Wherein, device 32 can be the third party device being separately provided relative to thin client device 31 and each access device, it is also possible to be the device mixed mutually with thin client device 31 and each access device.This device 32 specifically can use the structure of Fig. 4 or Fig. 5 to realize.
Each equipment of this system runs relevant software programs, realizes the connection of thin client device 1 and access device according to the method flow of Fig. 1 or Fig. 2 embodiment.Produced good effect sees the description of Fig. 1 or Fig. 2 embodiment of the method.
One embodiment of device 32 as illustrated in FIG. 4, device 32 includes:
The broadcast transmission unit 321 comprising the broadcast that access device accesses mark is sent for thin client device 31;
For finding the searching unit 322 with the broadcasted online access device accessing mark in a network;
For choosing find that unit 322 searches out multiple, there is the broadcasted online access device medium priority the accessing mark the highest access device selection unit 323 as target access device.
Thin client device is by according to selecting the access information of target access device determined by unit 323 to be attached with target access device.
Additionally, the device 32 of this embodiment can also include:
For controlling when finding unit 322 and being not found and have the broadcasted online access device accessing mark, broadcast transmission unit 321 periodic broadcast is former to be accessed mark or controls the control unit 324 accessing mark after broadcast transmission unit 321 sends change.
Each parts of the device 32 of this embodiment cooperate by running software program, realize the connection of thin client device 31 and access device according to the method flow of Fig. 1 embodiment.Produced good effect sees the description of Fig. 1 embodiment of the method.
Meaning shown in Figure 5, the device 32 in Fig. 3 can also use following structure to realize.Specifically, device 32 includes:
The broadcast transmission unit 325 comprising the broadcast that access device accesses mark and priority is sent for thin client device 31;
Broadcasted mark and the online access device of priority is accessed and using the online access device that searches out as the searching unit 326 of target access device for finding in a network to have.
Thin client device 31 will be attached with target access device according to the access information of target access device determined by searching unit 326.
Additionally, the device 32 of this embodiment can also include:
Priority is changed to low level this low-level priority is reached broadcast transmission unit 325 changing unit 327 for thin client device 31;And
For be not found within the setting time comprise lowest level priority and access mark online access device time control broadcast transmission unit 325 again sends contain up to level priorities and access mark broadcast or transmission contain up to level priorities and changing unit 327 change after access identify control unit 328.
Each parts of the device 32 of this embodiment cooperate by running software program, realize the connection of thin client device 31 and access device according to the method flow of Fig. 2 embodiment.Produced good effect sees the description of Fig. 2 embodiment of the method.
Above example is only in order to illustrate technical scheme, rather than is limited;Although the present invention being described in detail with reference to previous embodiment, for the person of ordinary skill of the art, still the technical scheme described in previous embodiment can be modified, or wherein portion of techniques feature is carried out equivalent;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of claimed technical solution of the invention.