CN103716281B - control method, electronic device and server - Google Patents

control method, electronic device and server Download PDF

Info

Publication number
CN103716281B
CN103716281B CN201210370846.5A CN201210370846A CN103716281B CN 103716281 B CN103716281 B CN 103716281B CN 201210370846 A CN201210370846 A CN 201210370846A CN 103716281 B CN103716281 B CN 103716281B
Authority
CN
China
Prior art keywords
equipment
slave unit
mark
xmpp
lan
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210370846.5A
Other languages
Chinese (zh)
Other versions
CN103716281A (en
Inventor
于辰涛
李栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201210370846.5A priority Critical patent/CN103716281B/en
Publication of CN103716281A publication Critical patent/CN103716281A/en
Application granted granted Critical
Publication of CN103716281B publication Critical patent/CN103716281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a control method based on an extensible messaging and presence protocol XMPP, an electronic device and a server. The method comprises the steps that notification information sent from a XMPP server is received; the notification information instructs the XMPP server to select a first electronic device in a first local area network as a main device, and selects a number of other electronic devices in the first local area network as slave devices; the registration request of joining an autonomous network from each slave device is received; the registration request from each slave device is responded; a second identifier is distributed to each slave device, and the second identifier of each slave device is registered for the XMPP server, wherein the second identifier is only used for communication in the autonomous network; and according to the second identifier of each slave device, the communication of each slave device is controlled.

Description

Control method, electronic equipment and server
Technical field
The present invention relates to the field of electronic equipment, more particularly it relates to a kind of be based on scalable message and attend Control method, the electronic equipment of agreement (The Extensible Messaging and Presence Protocol, XMPP) And server.
Background technology
At present, personal user has increasing high-performance mobile end product, such as smart mobile phone, panel computer (PAD), ultrabook, intelligent television(TV)And PC(PC).These feature-rich equipment, with very strong calculating energy While power, it may have increasing memory space, the ability of seamless access WiFi and 3G/4G networks.These equipment Also gradually it is adapted to different application scenarios, such as smart mobile phone is adapted to mobile environment, and PC is adapted to the matchmaker under home environment Body center, TV is applied to media broadcast data management, and PAD is applied to e-book and mobile media is consumed, and ultrabook is applied to house Occupy office and normal office demand.
On the other hand, under XMPP, the communication between equipment must all be forwarded using service end.All devices In order to uniquely characterize, it is necessary to have a unique mark, this mark has to log on service end, to allow other equipment to find And communicated with local device.For example, Fig. 1 shows the equipment connection under XMPP.In the case, pass through between equipment Server is attached.
As shown in figure 1, between devices cooperating when, in order to simplify the operation of user, device discovery procedure needs clothes Business device end is assisted, and solves the problems, such as that equipment room finds.After equipment finds mutually, for the transmission between lifting means Efficiency and reduce high in the clouds data traffic, it is necessary to the transmission of data and the transmission of equipment room message are tried one's best by peer-to-peer network Carry out.This is a problem for typical P2P network communications, and existing XMPP is had been able to very well by Jingle protocol extensions Holding equipment between end-to-end data transfer.
But, the communication architecture of serverless backup is not supported in itself due to XMPP, if by equipment interaction all Be converted to after the message communication process of XMPP terminal rooms, this whole needs the framework that server end is supported, can both increase clothes The expense at business device end, also due to the network traffic hours stand-by period for increasing equipment room operation more long.When the multiple of user sets It is standby to be all located at when under a LAN environment, so completely by the scheme of high in the clouds transfer can bring ease for use it is notable under Drop.
If XMPP to be expanded to the framework of serverless backup, can cause operation result cannot being serviced end know, lead Cause equipment and miscellaneous equipment under autonomous environment cannot synchronous regime problem.
Accordingly, it would be desirable to a kind of new XMPP Extended Protocols, after solution equipment sets up autonomous networkses, the redirection of device identification Found in order to other equipment with buffering and state synchronized, while can also be assisted without server end, can between devices very Good carries out efficient data transfer and message communication.
The content of the invention
According to one embodiment of present invention, there is provided a kind of controlling party based on scalable message and Presence Protoco XMPP Method, is applied in the first electronic equipment, and methods described includes:
The announcement information sent from XMPP server is received, the announcement information indicates the XMPP server in the first local Selection first electronic equipment is used as main equipment in net, and selects multiple other electronic equipments in first LAN Used as slave unit, and the announcement information includes the autonomy that first electronic equipment and the multiple other electronic equipments are formed The network identity of network, wherein, each electronic equipment will be registered in described for the first of unique identification equipment of itself the mark In XMPP server;
Receive the registration request of the addition autonomous networkses from each slave unit;
In response to the registration request from each slave unit, to the mark of each slave unit distribution second and to the XMPP Second mark of server registers each slave units, second mark is only used for the communication in the autonomous networkses;And
The second mark according to each slave unit, controls the communication of each slave unit.
According to another embodiment of the present invention, there is provided a kind of controlling party based on scalable message and Presence Protoco XMPP Method, is applied in the first electronic equipment, and methods described includes:
The request for creating autonomous networkses is sent to XMPP server;
The announcement information that reception sends as the response to the request from XMPP server, the announcement information indicates described XMPP server selects first electronic equipment as main equipment in the first LAN, and the announcement information is including described The network identity of the autonomous networkses that the first electronic equipment is created, wherein, first electronic equipment will be used for unique identification itself and set The first standby mark is registered in the XMPP server;
Receive the registration request of the addition autonomous networkses from slave unit;
In response to the registration request from slave unit, serviced to the mark of each slave unit distribution second and to the XMPP Device registers the second mark of each slave unit, and second mark is only used for the communication in the autonomous networkses;And
The second mark according to each slave unit, controls the communication of each slave unit.
According to another embodiment of the present invention, there is provided a kind of controlling party based on scalable message and Presence Protoco XMPP Method, is applied in XMPP server, and methods described includes:
It is determined that whether multiple electronic equipments are in the LAN of identical first;
In the multiple electronic equipments having determined in the first LAN, determine that the first electronics sets according to predetermined condition It is standby as main equipment, and determine multiple other electronic equipments as slave unit;
The first autonomous networkses formed to first electronic equipment and the multiple other electronic equipments distribute the first net Network is identified;
The announcement information for indicating to determine result is sent to first electronic equipment and described other electronic equipments, this leads to Know that information indicates the XMPP server that first electronic equipment is selected in the first LAN as main equipment, and select Multiple other electronic equipments in first LAN are used as slave unit, and the announcement information sets including first electronics The first network mark of the first autonomous networkses that standby and the multiple other electronic equipments are formed;
Register the main equipment and the slave unit the first mark of each, described first identify it is right for uniquely identifying The electronic equipment answered, and the identification information that redirects of each slave unit is registered, the identification information that redirects includes institute State the second mark that the network identity of the first autonomous networkses, the first of the slave unit identify, slave unit is distributed to by main equipment With main equipment first is identified, and the second mark of the slave unit is only used for including main equipment and slave unit described first certainly Control the communication in network.
According to another embodiment of the present invention, there is provided a kind of electronic equipment, including:
First receiving unit, is configured to receive the announcement information sent from XMPP server, and the announcement information indicates described XMPP server selects first electronic equipment as main equipment in the first LAN, and selects first LAN Interior multiple other electronic equipments as slave unit, and the announcement information include first electronic equipment and it is the multiple its The network identity of the autonomous networkses that his electronic equipment is formed, wherein, each electronic equipment will be used for unique identification equipment of itself First mark be registered in the XMPP server;
Second receiving unit, is configured to receive the registration request of the addition autonomous networkses from each slave unit;
Allocation unit, is configured in response to the registration request from each slave unit, is marked to each slave unit distribution second Know and register the second of each slave unit to the XMPP server and identify, second mark is only used for the autonomous networkses Interior communication;And
Control unit, is configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
According to another embodiment of the present invention, there is provided a kind of electronic equipment, including:
Transmitting element, is configured to send the request for creating autonomous networkses to scalable message and Presence Protoco XMPP services Device;
First receiving unit, is configured to receive the announcement information sent from XMPP server as the response to the request, The announcement information indicates the XMPP server that first electronic equipment is selected in the first LAN as main equipment, and The announcement information includes the network identity of the autonomous networkses that first electronic equipment is created, wherein, first electronic equipment will The first mark for unique identification equipment of itself is registered in the XMPP server;
Second receiving unit, is configured to receive the registration request of the addition autonomous networkses from slave unit;
Allocation unit, is configured in response to the registration request from slave unit, to the mark of each slave unit distribution second simultaneously And to the XMPP server register each slave unit second mark, it is described second mark be only used in the autonomous networkses Communication;And
Control unit, is configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
According to another embodiment of the present invention, there is provided a kind of server, including:
Whether determining unit, be configured to determine multiple electronic equipments in the LAN of identical first;
Select unit, is configured in the multiple electronic equipments having determined in the first LAN, according to predetermined bar Part determines the first electronic equipment as main equipment, and determines multiple other electronic equipments as slave unit;
Network identity allocation unit, is configured to what first electronic equipment and the multiple other electronic equipments were formed First autonomous networkses distribution first network mark;
Notification unit, be configured to will indicate determine result announcement information be sent to first electronic equipment and it is described its Its electronic equipment;
Registration unit, is configured to register the main equipment and the slave unit the first mark of each, first mark For uniquely identifying corresponding electronic equipment, and the identification information that redirects of each slave unit is registered, it is described again fixed Distributed to network identity of the identification information including first autonomous networkses, the first mark of the slave unit, by main equipment Slave unit second mark and main equipment first mark, the slave unit second mark be only used for including main equipment and from Communication in first autonomous networkses of equipment.
Therefore, by the control method based on XMPP according to embodiments of the present invention, electronic equipment and server, energy After enough solution equipment sets up autonomous networkses, the redirection of device identification and buffering find and state synchronized in order to other equipment Problem, in addition, can also be assisted without server end, carries out efficient data transfer and message communication well between devices.
Brief description of the drawings
Fig. 1 is to show the equipment connection diagram based on XMPP according to prior art;
Fig. 2 is to show the equipment connection diagram based on XMPP according to a first embodiment of the present invention;
Fig. 3 is to show the controlling party based on XMPP for being applied to electronic equipment end according to a first embodiment of the present invention The flow chart of method;
Fig. 4 is the block diagram for showing electronic equipment according to a first embodiment of the present invention;
Fig. 5 is to show the equipment connection diagram based on XMPP according to a second embodiment of the present invention;
Fig. 6 is to show the controlling party based on XMPP for being applied to electronic equipment end according to a second embodiment of the present invention The flow chart of method;
Fig. 7 is the block diagram for showing electronic equipment according to a second embodiment of the present invention;
Fig. 8 is to show the control based on XMPP for being applied to XMPP server end according to a third embodiment of the present invention The flow chart of method;And
Fig. 9 is the block diagram for showing server according to a fourth embodiment of the present invention.
Specific embodiment
Hereinafter, by preferred embodiments of the present invention will be described in detail with reference to the annexed drawings.
<First embodiment>
Below, will use environments to describe the first embodiment of the present invention with home network.In first embodiment of the invention In, it is assumed that there are three equipment of compatible XMPP, i.e. XMPP equipment 1, XMPP equipment 2 and XMPP equipment 3.Assuming that XMPP Equipment 1 is PAD, and it passes through such as Wifi(Wireless network)Radio connection be connected to network, XMPP equipment 2 is desk-top The wired connection mode of machine, its radio connection for passing through such as Wifi and such as internet is connected to network, and XMPP equipment 3 is intelligent television, and its wired connection mode for passing through such as internet is connected to network.It should be noted that being Description is simple, merely illustrates three XMPP equipment, but can according to actual needs use the equipment of two or four or more.
In equipment connection in the prior art shown in Fig. 1, XMPP equipment 1, XMPP equipment 2 and XMPP equipment 3 are all connected It is required for by service to the mutual message communication and data transfer between long-range XMPP server, and XMPP equipment 1-3 The forwarding of device, therefore, XMPP equipment 1-3 is registered with corresponding unique mark, such as DeviceID_1@in the server Domain/resource, DeviceID_2@domain/resource and DeviceID_3@domain/resource.XMPP sets Standby 1-3 passes through the unique mark login service device, to allow miscellaneous equipment to find and be communicated with local device.Wherein, Domain indicates XMPP server domain.
Fig. 2 is to show the equipment connection diagram based on XMPP according to a first embodiment of the present invention.With shown in Fig. 1 Prior art in it is different, in embodiments of the present invention, server determines XMPP equipment 2 as master from three XMPP equipment 1-3 Equipment, XMPP equipment 1 and 3 is slave unit.Then, XMPP server transfers control to XMPP equipment 2.Then, XMPP sets Standby 1-3 can constitute autonomous networkses, and in the autonomous networkses, the communication between equipment no longer passes through server, but by conduct The XMPP equipment 2 of main equipment is controlled, for example, XMPP equipment 2 and XMPP equipment 1 or XMPP equipment 3 are using directly end To end communication, the communication between XMPP equipment 1 and 3 is route by XMPP equipment 2.By this way, as slave unit XMPP equipment 1 and 3 connects whole system by the XMPP equipment 2 as main equipment, therefore slave unit no longer needs to safeguard kimonos The connection of business device.In addition, because XMPP equipment 1-3 forms autonomous networkses, and master-slave equipment is led to using directly end-to-end Via main equipment route communication between news and slave unit, and the intervention of server is no longer needed, so greatly reduce system Bandwidth.
On the other hand, the communication of the equipment outside XMPP equipment 1 and 3 and the autonomous networkses is also by XMPP equipment 2 and clothes Business device is route.In this way, XMPP equipment 2 assume responsibility for the part work of XMPP server, reduce as slave unit Communication between XMPP equipment 1 and 3 and XMPP server, can also so substantially reduce system bandwidth.
Below, with reference to Fig. 3 description according to a first embodiment of the present invention be applied to electronic equipment end based on XMPP Control method flow chart.In this example, it is assumed that the electronic equipment is the PC as main equipment XMPP equipment 2.
Before description control method according to a first embodiment of the present invention, first in the network environment based on XMPP Operation flow be briefly described.
Whole operation flow is divided into three steps:
1. autonomous networkses ask flow
The flow supports that XMPP equipment completes two business demands in LAN.
A) main equipment that XMPP equipment is registered as in the LAN to XMPP server in LAN is supported.
Registration message needs to carry necessary authentication information, facility information and the network information.
XMPP server returns to the unique mark of autonomous networkses, is added as follow-up other equipment, exits autonomous networkses Mark.One LAN can have one or more autonomous networkses, and different autonomous networkses have each different network identities.
That is, in the network environment based on XMPP, an equipment can ask to register to XMPP server It is the main equipment in LAN, that is to say, that oneself set up an autonomous networkses.
B) support that XMPP equipment initiates autonomous networkses request to XMPP server in LAN, and obtain main equipment information.
Request message needs to carry necessary authentication information, facility information and the network information.
XMPP server returns to current all main equipment information in the LAN, and each main equipment application autonomous net Network is identified.
That is, can have multiple autonomous networkses in a LAN, different autonomous networkses are made a distinction by unique ID. One equipment can obtain all main equipment information and corresponding autonomous net being currently located in LAN from XMPP server Network ID, and as needed to the transmission addition request of desired main equipment, to turn into the slave unit of the autonomous networkses.
2. with interior redirection registering flow path
The flow supports the RT register traffic demand between XMPP main equipments and slave unit in LAN.
A) support to initiate redirection registration request in LAN from XMPP equipment to XMPP main equipments.
Registration request needs to carry the unique mark of necessary authentication information, facility information and autonomous networkses.
XMPP main equipments corresponding with autonomous networkses unique mark can distribute a new JID to the slave unit, and the JID should Should be main equipment user id such as id domain/redirectid, wherein id, domain is XMPP server domain, redirectid For the redirection for distributing to slave unit identifies, different slave units have different redirectid.
B) support that XMPP main equipments initiate to redirect registration request to XMPP server in LAN.
Registration request needs to carry necessary authentication information, slave unit information, the new JID of slave unit and autonomous networkses only One mark.
After XMPP server receives registration request, the routing configuration of slave unit can be changed, it is follow-up it is all be sent to this from The message of equipment will all be sent to the new JID of slave unit, and be route by main equipment.
3. data communication flow
The flow supports that XMPP main equipments, as proxy server, act on behalf of all XMPP slave units in LAN in LAN Message send and receive.
A) XMPP main equipments safeguard the presence states of itself.
B) in XMPP main equipments Maintain LAN slave unit presence states, when any slave unit presence states When changing, slave unit notifies main equipment, and the state is issued by main equipment.
C) XMPP main equipments agency sends slave unit message, and the XMPP outgoing messages of any slave unit are all sent to XMPP master Equipment, and transmission is acted on behalf of by main equipment.
I. when XMPP message destination address is LAN external address, then XMPP main equipments act on behalf of the message, are sent to simultaneously Forwarded by XMPP server or processed.
Ii. when XMPP message destination address is other slave units in LAN, then XMPP main equipments are directly forwarded the message to Other slave units in LAN, are no longer processed by XMPP server.
D) XMPP main equipments agency receives slave unit message, and any XMPP message for being sent to slave unit all can be by XMPP Main equipment is received and forwarded to slave unit.
Specifically, as shown in figure 3, the described method comprises the following steps:
Step S101:The announcement information sent from XMPP server is received, the announcement information indicates the XMPP server First electronic equipment is selected in the first LAN as main equipment, and select in first LAN it is multiple its Its electronic equipment is used as slave unit, and the announcement information includes first electronic equipment and the multiple other electronic equipments The network identity of the autonomous networkses of formation, wherein, each electronic equipment is by for the first of unique identification equipment of itself the mark It is registered in the XMPP server.
In this step, in the first LAN including XMPP equipment 1-3, connect as the PC of main equipment XMPP equipment 2 The notification message sent from server is received, the notification message indicates server that XMPP equipment 2 is selected in XMPP equipment 1-3 Used as main equipment, and XMPP equipment 1 and 3 is used as slave unit.Additionally, the announcement information includes XMPP equipment 2 and XMPP equipment 1 The network identity of the autonomous networkses formed with 3.XMPP equipment 1 and 3 also receives the notification message from server.
In addition, as already described above, XMPP equipment 1-3 has registered the first mark of oneself in the server Know, i.e. DeviceID_1@domain/resource, DeviceID_2@domain/resource and DeviceID_3@ domain/resource。
In addition, it should be noted which equipment server can select as main equipment according to device attribute.Example Such as, the device attribute can be including device type, device identification, equipment power supply mode, device network connected mode etc..
Specifically, in the present embodiment, because there is wired connection as the internetwork connection mode of the PC of XMPP equipment 3 With wireless connection two ways, so server selects PC as main equipment accordingly.
Certain server selects the mode not limited to this of main equipment, and in another embodiment, server can be according to equipment Process performance, memory capacity etc. come to determine which equipment be main equipment.
Step S102:Receive the registration request of the addition autonomous networkses from each slave unit.
In this step, because XMPP equipment 1-3 has received notification message from server, XMPP equipment 2 is indicated It is main equipment, and XMPP equipment 1 and 3 is slave unit, so XMPP equipment 1 and 3 will set up autonomy centered on XMPP equipment 2 Network.Therefore, XMPP equipment 1 and 3 sends registration request to XMPP equipment 2.XMPP equipment 2 receives what XMPP equipment 1 and 3 sent Registration request.
Step S103:In response to the registration request from each slave unit, to the mark of each slave unit distribution second and Register the second mark of each slave unit to XMPP server, second mark is only used for including main equipment and slave unit Communication in the autonomous networkses.
In this step, XMPP equipment 2 gives XMPP equipment 1 and 3 each point in response to the registration request of XMPP equipment 1 and 3 With the second mark, for example, DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid, institute State the second mark and be only used for leading in the autonomous networkses including main equipment XMPP equipment 2 and slave unit XMPP equipment 1 and 3 Letter, that is to say, that in the autonomous networkses including main equipment XMPP equipment 2 and slave unit XMPP equipment 1 and 3, slave unit All message of XMPP equipment 1 are all routed directly to DeviceID_1@domain/redirectid, and slave unit XMPP sets Standby 3 all message are all routed directly to DeviceID_3@domain/redirectid.Additionally, XMPP equipment 2 takes to XMPP Business device registration slave unit XMPP equipment 1 and 3 each the second mark DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid.In addition, XMPP equipment 2 itself also register slave unit XMPP equipment 1 and 3 each Second mark DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid.
Step S104:The second mark according to each slave unit, controls the communication of each slave unit.
In this step, main equipment XMPP equipment 2 can be according to the second mark of each of slave unit XMPP equipment 1 and 3 DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid, control slave unit XMPP equipment 1 and 3 communications of each.
Specifically, formed in main equipment XMPP equipment 2 and slave unit XMPP equipment 1 and 3 and be with main equipment XMPP equipment 2 After the autonomous networkses at center, server is played a part of in the part of main equipment XMPP equipment 2.
In one embodiment, main equipment can be carried out directly according to the second of each slave unit the mark with each slave unit The end-to-end communication for connecing.For example, main equipment XMPP equipment 2 is according to the second mark of each of slave unit XMPP equipment 1 and 3 DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid, set with slave unit XMPP respectively Each of standby 1 and 3 carries out direct end-to-end communication.
In another embodiment, main equipment XMPP equipment 2 can be according to the second of each slave unit the mark, and route is from setting Two-way communication between standby.For example, the communication between slave unit XMPP equipment 1 and 3, can be according to the oneself second mark DeviceID_1@domain/redirectid and DeviceID_3@domain/redirectid, by main equipment XMPP equipment 2 are route.
In another embodiment, main equipment XMPP equipment 2 can be according to the first of each slave unit the mark and the second mark The corresponding relation of knowledge, via the XMPP server, route each slave unit with the autonomous networkses and/or first local The two-way communication between equipment outside net.
Specifically, when the equipment outside the autonomous networkses(It is for example in first LAN but be not belonging to the autonomous net The equipment of network, not shown in Fig. 2), or when the equipment outside first LAN is by the slave unit in the autonomous networkses The first mark, when being communicated with the slave unit in the autonomous networkses, the main equipment is according to requested slave unit for request Identification information is redirected, via between the external equipment that the XMPP server route requested slave unit and makes requests on Two-way communication, wherein the identification information that redirects is registered in the XMPP server, and including the slave unit First mark and second mark and main equipment first mark, the main equipment according to the first of the slave unit mark and The corresponding relation of the second mark determines the requested slave unit in the autonomous networkses.
For example, when the equipment outside the autonomous networkses(It is not shown)When desiring access to slave unit XMPP equipment 1, the autonomous networkses In the server register first mark of the outer equipment according further to slave unit XMPP equipment 1(That is, DeviceID_1@ domain/resource), access slave XMPP equipment 1 is asked by server.Server is receiving the access request When, first mark and the second corresponding relation for identifying of the slave unit XMPP equipment 1 according to registration will be to first marks The access request of the corresponding slave unit XMPP equipment 1 of DeviceID_1@domain/resource, repositioning be to this second The access request of the corresponding slave unit XMPP equipment 1 of mark DeviceID_1@domain/redirectid, and this is accessed Request is routed to main equipment XMPP equipment 2, and by main equipment XMPP equipment 2 according to the second mark DeviceID_1@ Domain/redirectid, slave unit XMPP equipment 1 is routed to by access request.That is, first mark and the second mark Know and correspond to identical slave unit XMPP equipment 1, and slave unit XMPP equipment 1 is original first identifies for safeguarding outside Device relationships, and new second of slave unit XMPP equipment 1 is identified for practical communication.
It should be noted that main equipment to slave unit distribution second when identifying, second mark is also sent to service Device to be registered in the server.That is, for slave unit, registration being also needed in the server and redirecting mark Information, it includes the network identity of the autonomous networkses, the first mark of slave unit, the second mark of slave unit and main equipment First mark.This redirects identification information and indicates the first of the slave unit to identify and the second corresponding relation for identifying, and Which main equipment is the slave unit belong to.Server redirects identification information according to this, can determine that each slave unit belongs to In which main equipment, and determine second mark of the slave unit in autonomous networkses.Additionally, server exists according to the slave unit The second mark in its autonomous networks, can be by the control of main equipment so that slave unit is carried out with the equipment outside autonomous networkses Communication.
In another embodiment, when the equipment outside the autonomous networkses is by the main equipment in first LAN First mark, request is with the main equipment in first LAN when communicate, the main equipment via the XMPP server and The external equipment for making requests on is communicated.For example, when the equipment outside the autonomous networkses desires access to main equipment XMPP equipment 2 When, the equipment outside the autonomous networkses is identified according to register in the server the first of main equipment XMPP equipment 2(That is, DeviceID_2@domain/resource), browse master XMPP equipment 2 is asked by server.In one embodiment In, the related resource of the related resource of the main equipment and discovery can be published to the XMPP server by main equipment, with Just external equipment is able to access that these resources.For example, can be by local resource as the PC of main equipment(For example, video content, figure As content, using etc.)It is published to server so that external equipment will appreciate that the resource stored on PC, such that it is able to be visited Ask.In another embodiment, can be by slave unit as the PC of main equipment(Such as TV)The resource of middle storage(For example, TV programme Deng)It is published to server so that external equipment will appreciate that the resource stored on TV, such that it is able to conduct interviews.
In one embodiment, main equipment can also be identified and server communication according to the first of the main equipment, so as to Safeguard and indicate attending for the main equipment(Presence)With log in attend message.That is, main equipment according to itself First mark and server communication so that server will appreciate that the state of main equipment, that is to say, that main equipment being attended and steps on That records attends message.
In another embodiment, when change occurs in the slave unit in the autonomous networkses, for example, new slave unit is opened Machine adds the autonomous networkses or the shutdown of original slave unit to be exited from the autonomous networkses, all slave units of main equipment update instruction Attend and log in attend message, and send it to all slave units in autonomous networkses.For example, when the intelligence of user Mobile phone(Assuming that the first of the smart mobile phone is designated DeviceID_4@domain/resource)When adding the autonomous networkses, make For the PC of main equipment identifies DeviceID_4 domain/redirectid to smart mobile phone distribution second.Then, PC will refer to Show slave unit 1(PAD)With slave unit 3(TV)The presence information of active state is currently in, is updated to indicate slave unit 1(PAD)、 Slave unit 3(TV)With slave unit 4(Smart mobile phone)It is currently in the presence information of active state.Then, the presence information is sent out Give slave unit 1(PAD), slave unit 3(TV)With slave unit 4(Smart mobile phone)So that the slave unit 1 in autonomous networkses(PAD)、 Slave unit 3(TV)With slave unit 4(Smart mobile phone)Mutual presence status is will appreciate that, so as to access in the autonomous networkses Miscellaneous equipment.
Additionally, when change occurs in the slave unit in the autonomous networkses, this can also be attended message and sent by main equipment To server so that server can update attends message, so that the equipment outside the autonomous networkses will appreciate that the autonomous networkses Interior equipment such that it is able to correctly access each equipment being active.
Additionally, when the main equipment is switched to the second LAN, if currently there is ongoing communication task, etc. The second LAN is switched to after the communication task terminates.Alternately, prompting user forces to switch over, and according to user Operation, pressure switches to the second LAN.
For example, it is assumed that using smart mobile phone as main equipment when, if user holds smart mobile phone and is gone to from a room Another room, then may be switched to second LAN in another room from first LAN in original room.Now, if Serve as the communication that the smart mobile phone of main equipment is being route between two slave units in the first LAN, then this can be waited to lead to Trust after business terminates and be switched to the second LAN.Or, can prompt the user whether to need pressure to be cut with display reminding information Change, if user's selection forces switching, pressure to switch to the second LAN.If switching is not forced in user's selection, can be with The communication task is waited to be switched to the second LAN after terminating.
Fig. 4 is the block diagram for showing electronic equipment according to a second embodiment of the present invention.The electronic equipment can be any Electronic equipment, if the electronic equipment there is network-connectivity, with unified XMPPID, and the electronic equipment can be transported Row Web Service(Network service)Carry out the related resource of distribution apparatus, and other resources that can be will be seen that are published to Conducted interviews for other electronic equipments in XMPP server.The example of such electronic equipment includes but is not limited to PC, PAD, intelligence Energy mobile phone, intelligent television, personal digital assistant etc..
Electronic equipment 200 according to a second embodiment of the present invention includes:
First receiving unit 201, is configured to receive the announcement information sent from XMPP server, and the announcement information indicates institute State XMPP server and first electronic equipment is selected in the first LAN as main equipment, and select first local Multiple other electronic equipments in net are used as slave unit, and the announcement information includes first electronic equipment and the multiple The network identity of the autonomous networkses that other electronic equipments are formed, wherein, each electronic equipment will be used for unique identification itself and set The first standby mark is registered in the XMPP server;
Second receiving unit 202, is configured to receive the registration request of the addition autonomous networkses from each slave unit;
Allocation unit 203, is configured in response to the registration request from each slave unit, to each slave unit distribution second Identify and register the second of each slave unit to the XMPP server and identify, second mark is only used for the autonomous net Communication in network;And
Control unit 204, is configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
Preferably, described control unit 204 is further configured to:
The second mark according to each slave unit, direct end-to-end communication is carried out with each slave unit;
The second mark according to each slave unit, the two-way communication between route slave unit in the autonomous networkses;With And
The corresponding relation of the first mark and the second mark according to each slave unit, via the XMPP server, route The two-way communication between equipment outside each slave unit and first LAN.
Preferably, the electronic equipment also includes communication unit 205, is configured to when the autonomous networkses and/or described the In the first mark that equipment outside one LAN passes through the main equipment in first LAN, request and first LAN Main equipment communicate when, communicated with the external equipment for making requests on via the XMPP server.
Preferably, the communication unit 205 is also configured as when outside the autonomous networkses and/or first LAN Equipment pass through the slave unit in first LAN first mark, request with first LAN in slave unit lead to During letter, identification information is redirected according to requested slave unit, it is requested from setting via XMPP server route It is standby with the two-way communication between the external equipment for making requests on, wherein the identification information that redirects is registered in the XMPP clothes Business device in, and the network identity including the autonomous networkses, the slave unit first mark and second mark and master set The first standby mark, described control unit 204 determines according to the corresponding relation of the first of the slave unit the mark and the second mark Requested slave unit in first LAN.
Preferably, the communication unit is also configured as the phase by the related resource of the main equipment 200 and discovery Close resource and be published to the XMPP server, so that external equipment is able to access that these resources.
Preferably, the electronic equipment can also include attending maintenance unit 206, be configured to the according to the main equipment One mark and server communication, so as to safeguard indicate the main equipment attend and log in attend message.
Preferably, the maintenance unit 206 of attending is also configured as when the slave unit appearance in first LAN During change, slave unit described in update instruction attend and log in first attend message, and send it to the first game All slave units in the net of domain.
Preferably, the maintenance unit 206 of attending is also configured as when the slave unit appearance in first LAN During change, slave unit described in update instruction attend and log in first attend message, and send it to server.
Preferably, described control unit 204 is also configured as when the main equipment is switched to the second LAN, if Currently there is ongoing communication task, then wait the communication task to be switched to the second LAN after terminating;Or prompting user Pressure is switched over, and is operated according to user, and pressure switches to the second LAN.
Therefore, control method according to a first embodiment of the present invention and electronic equipment, the electronic equipment energy as main equipment Enough effects for partly serving as server after autonomous networkses are set up, can solve the problem that the redirection of device identification and buffer in order to it His equipment finds the problem with state synchronized, in addition, can also be assisted without server end, carries out well between devices efficiently Data transfer and message communication.
<Second embodiment>
Below, the second embodiment of the present invention will be described with reference to Fig. 5-7.Fig. 5 is to show according to a second embodiment of the present invention The equipment connection diagram based on XMPP, Fig. 6 be show according to a second embodiment of the present invention be applied to electronic equipment The flow chart of the control method based on XMPP at end, Fig. 7 is to show electronic equipment according to a second embodiment of the present invention Block diagram.
As shown in figure 5, the such situation of second embodiment of the present invention description, real first in XMPP network environments Apply example XMPP equipment 1-3 formed the first autonomous networkses in the case of, the request of emerging XMPP equipment 4 create second from Network is controlled, and the request of XMPP equipment 5 and 6 adds the second autonomous networkses.
As shown in fig. 6, method 600 according to a second embodiment of the present invention is comprised the following steps:
Step S301:The request for creating autonomous networkses is sent to XMPP server.
In this step, XMPP equipment 4 sends the request for creating autonomous networkses to XMPP server.The request can be carried Necessary authentication information, facility information and network information etc..
Step S302:The announcement information that reception sends as the response to the request from XMPP server, the announcement information Indicate the XMPP server that first electronic equipment is selected in the first LAN as main equipment, and the announcement information The network identity of the autonomous networkses created including first electronic equipment, wherein, first electronic equipment will be used for unique knowledge First mark of other equipment of itself is registered in the XMPP server.
In this step, XMPP equipment 4 receives the response notification message that XMPP server sends, and the announcement information indicates institute State XMPP server and XMPP equipment 4 is selected in the first LAN as the second main equipment, and the announcement information is including described The network identity of the second autonomous networkses that XMPP equipment 4 is created, wherein, XMPP equipment 4 is by for unique identification equipment of itself First mark is registered in the XMPP server.
Step S303:Receive the registration request of the addition autonomous networkses from slave unit.
In this step, the registration for adding second autonomous networkses that the reception XMPP of XMPP equipment 4 equipment 5 and 6 sends please Ask.
Step S304:In response to the registration request from slave unit, to the mark of each slave unit distribution second and to institute The second mark that XMPP server registers each slave unit is stated, second mark is only used for the communication in the autonomous networkses.
Step S305:The second mark according to each slave unit, controls the communication of each slave unit.
Step S303 to S305 and step S102 to S 104 in first embodiment is essentially identical, its is omitted herein detailed Description.
As shown in fig. 7, electronic equipment 400 according to a second embodiment of the present invention includes:
401 transmitting elements, are configured to send the request for creating autonomous networkses to scalable message and Presence Protoco XMPP clothes Business device;
402 first receiving units, are configured to receive the notice letter sent from XMPP server as the response to the request Breath, the announcement information indicates the XMPP server that first electronic equipment is selected in the first LAN as main equipment, And the announcement information includes the network identity of the autonomous networkses that first electronic equipment is created, wherein, first electronics sets It is standby to be registered in the XMPP server for the first of unique identification equipment of itself the mark;
403 second receiving units, are configured to receive the registration request of the addition autonomous networkses from slave unit;
404 allocation units, are configured in response to the registration request from slave unit, are identified to each slave unit distribution second And the second mark of each slave unit is registered to the XMPP server, second mark is only used in the autonomous networkses Communication;And
405 control units, are configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
Additionally, the electronic equipment 400 according to second embodiment also includes communication unit 406 and attends maintenance unit 407, its With the communication unit 105 in the first above-mentioned electronic equipment 100 and to attend maintenance unit 106 essentially identical, omit herein It is described in detail.
It should be noted that two autonomous networkses are merely illustrated in second embodiment, but in the XMPP network environments There may be the autonomous networkses of three or more.
Therefore, control method according to a second embodiment of the present invention and electronic equipment, have had one in a local network In the case of autonomous networkses, another electronic equipment also can request that and create new autonomous networkses, and the electronics as main equipment sets The standby effect that can partly serve as server after autonomous networkses are set up, can solve the problem that device identification redirection and buffering so as to The problem with state synchronized is found in other equipment, in addition, can also be assisted without server end, is carried out well between devices Efficient data transfer and message communication.
<3rd embodiment>
Fig. 8 is to show the control method based on XMPP for being applied to server end according to a third embodiment of the present invention Flow chart.
A kind of control method based on XMPP according to a third embodiment of the present invention, is applied in XMPP server, Methods described 500 includes:
Step S501:It is determined that whether multiple electronic equipments are in the LAN of identical first.
In this step, environmental perception module is deployed with advance on each electronic equipment, for recording environmental information.XMPP Whether the information that server is passed back according to the environmental perception module of each equipment, determines each equipment in identical network, example Such as the LAN of Wifi/BT.
Alternately, the routing server IP address and MAC Address of such as LAN based on each equipment;Periphery is wireless The SSID of LAN(Title)、MAC(The hardware identifier of wireless network card)Address and IP network address address;Created by electronic equipment It is interim(ADhoc)Radio network information etc., it is determined that determining each equipment whether in identical network.
Step S502:In the multiple electronic equipments having determined in the first LAN, determined according to predetermined condition First electronic equipment determines multiple other electronic equipments as slave unit as main equipment.
In this step, which equipment server can select as main equipment according to device attribute.For example, the equipment Attribute can include device type, device identification, equipment power supply mode, equipment radio connection, the disposal ability of equipment, set Standby use time etc..
Additionally, if it find that then starting competition process in the presence of multiple main equipments in LAN.Main equipment competition is taken by XMPP Business device end is arbitrated, and arbitration rules include internetwork connection mode(It is wired to be better than wide area network 3G better than WLAN WiFi), Power management(Directly power supply is better than battery, if being all battery, sees remaining use time), the network bandwidth(Network speed is high It is more excellent)Deng.
Step S503:To the first autonomous networkses point that first electronic equipment and the multiple other electronic equipments are formed With first network mark.
In this step, the first autonomous networkses distribution first network mark for being formed to XMPP equipment 1-3, the mark is used for Uniquely determine first autonomous networkses.
Step S504:The announcement information for indicating to determine result is sent to first electronic equipment and described other electronics Equipment, the announcement information indicates the XMPP server to select first electronic equipment to be set as master in the first LAN It is standby, and multiple other electronic equipments in first LAN are selected as slave unit, and the announcement information includes institute State the first network mark of the first autonomous networkses that the first electronic equipment and the multiple other electronic equipments are formed.
In this step, server generation announcement information, and announcement information is notified to main equipment and slave unit.Example Such as, as previously described, server selects XMPP equipment 2 in the first LAN including XMPP equipment 1-3(PC)As Main equipment, and send a notification message to XMPP equipment 2(PC), notification message instruction server is in XMPP equipment 1-3 Middle selection XMPP equipment 2 is used as main equipment, and XMPP equipment 1 and 3 is used as slave unit.Server also sends the notification message To XMPP equipment 1 and 3, and notify that XMPP equipment 1 and 3 switches to XMPP equipment 2(PC)Slave unit.Additionally, the notice is believed Breath includes the first network mark of the first autonomous networkses that the XMPP equipment 1-3 is formed.
Step S505:The main equipment and the slave unit the first mark of each is registered, described first identifies for only The corresponding electronic equipment of one ground identification, and the identification information that redirects of each slave unit is registered, it is described to redirect mark Information includes the network identity of first autonomous networkses, the first mark of the slave unit, distributes to slave unit by main equipment The second mark and main equipment the first mark, the second mark of the slave unit is only used for including main equipment and slave unit Communication in first autonomous networkses.
In this step, main equipment described in server registers and the slave unit the first mark of each, set for safeguarding It is standby with LAN outside equipment communication.Additionally, server registers each slave units redirects identification information, it is described again Orientation mark packet includes the network identity of first autonomous networkses, the first mark of the slave unit, is distributed by main equipment First mark of the second mark and main equipment to slave unit, the second mark of the slave unit be only used for including main equipment and Communication in first LAN of slave unit.Identification information is redirected by the slave unit, can be by external equipment For the access request that the access request of the first mark of slave unit is converted to the second mark, so that by the route of main equipment, Communicated with slave unit.
It should be noted that server then select main equipment and by the control right transfer of slave unit to main equipment after, will Disconnected with slave unit, and only with main equipment connection communication.Therefore, this can substantially reduce system bandwidth.
Additionally, in the case of having there are the first autonomous networkses in the first LAN, may also respond to described first The request of the autonomous networkses of establishment second that the second electronic equipment in multiple electronic equipments in LAN sends, determines described Two electronic equipments distribute the second network identity as the second main equipment to new the second autonomous networkses for creating.
In one embodiment, it is assumed that the emerging request of XMPP equipment 4 creates the second autonomous networkses, and XMPP equipment 5 and 6 requests add the second autonomous networkses.Whether XMPP server detection XMPP equipment 4 meets the condition as main equipment, in this way It is no with network-connectivity etc..If detection finds that XMPP equipment 4 meets condition, can determine that XMPP equipment 4 is second Main equipment, and the second autonomous networkses created to it distribute the second network identity.
Then, XMPP server registers the first mark of the XMPP equipment 4, and registers each slave unit XMPP equipment 5 and 6 redirect identification information, described redirect network identity, institute of the identification information including second autonomous networkses The first of slave unit is stated to identify, distribute to the second mark of slave unit and the first mark of the main equipment by main equipment, it is described Second mark of slave unit is only used for the communication in second autonomous networkses.
Additionally, main equipment may be failed due to a variety of causes(Such as shut down, power-off, network failure), therefore, in main equipment Failure exceedes after predetermined amount of time, and each slave unit voluntarily recovers the connection with server.Then, server is connected from recovery One is reselected in slave unit as main equipment.The selection mode is identical with the mode of previously described selection main equipment.This Afterwards, server will indicate the announcement information for determining result to be sent to all other equipment in first LAN.Then, its Its equipment constitutes autonomous networkses centered on the main equipment of new selection.
Therefore, the control method based on XMPP for being applied to server end according to a third embodiment of the present invention, clothes Business device can solve the redirection of device identification and buffer to be found in order to other equipment and shape according to the second of slave unit the mark The synchronous problem of state, in addition, the communication lines in the LAN of the not responsible main equipment of server and slave unit composition are by so that significantly Reduce system bandwidth.
Fig. 9 is the block diagram for showing server according to a third embodiment of the present invention.
Server 600 according to a third embodiment of the present invention includes:
Whether determining unit 601, be configured to determine multiple electronic equipments in the LAN of identical first;
Select unit 602, is configured in the multiple electronic equipments having determined in the first LAN, according to predetermined Condition determines the first electronic equipment as main equipment, and determines multiple other electronic equipments as slave unit;
Network identity allocation unit 603, is configured to first electronic equipment and the multiple other electronic equipment shapes Into the first autonomous networkses distribution first network mark.
Notification unit 604, is configured to for the announcement information for indicating to determine result to be sent to first electronic equipment and institute State other electronic equipments;
Registration unit 605, is configured to register the main equipment and the slave unit the first mark of each, first mark Know for uniquely identifying corresponding electronic equipment, and register the identification information that redirects of each slave unit, it is described again Orientation mark packet includes the network identity of first autonomous networkses, the first mark of the slave unit, is distributed by main equipment First mark of the second mark and main equipment to slave unit, the second mark of the slave unit be only used for including main equipment and Communication in first autonomous networkses of slave unit.
Preferably, the determining unit 601 according to the multiple electronic equipment including device type, device identification, set Available electrically, the disposal ability of equipment radio connection, equipment, the attribute of the use time of equipment determine main equipment.
Additionally, when there is multiple master device candidates, net of the determining unit 601 according to multiple master device candidates Network connected mode, power management and the network bandwidth arbitrate an electronic equipment as main equipment.
Additionally, the select unit 602 may also respond in the multiple electronic equipments in first LAN The request of the autonomous networkses of establishment second that two electronic equipments send, determines second electronic equipment as the second main equipment, and And distribute the second network identity to new the second autonomous networkses for creating.
The registration unit 605 registers the first mark of the main equipment, and described first identifies for uniquely identifying often Individual electronic equipment, and the identification information that redirects of each slave unit is registered, the identification information that redirects is including described The network identity of the second autonomous networkses, the slave unit first mark, distributed to by main equipment slave unit second mark and First mark of the main equipment, the second mark of the slave unit is only used for the communication in second autonomous networkses.
Additionally, after master malfunction exceedes predetermined amount of time, the determining unit 601 can be from recovery and server Contact slave unit in reselect one as main equipment.The other notification unit 603 will can indicate to determine result Announcement information be sent to all devices in first LAN.
Therefore, server according to a third embodiment of the present invention, the XMPP server can be according to the second of slave unit Mark solves the problems, such as that the redirection of device identification and buffering find and state synchronized in order to other equipment, in addition, server Communication lines in the LAN of not responsible main equipment and slave unit composition are by so as to greatly reduce system bandwidth.
It should be noted that above embodiment is intended merely as example, the invention is not restricted to such example, but can To carry out various change.
It should be noted that in this manual, term " including ", "comprising" or its any other variant be intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including the key element.
Finally, in addition it is also necessary to explanation, a series of above-mentioned treatment are not only included with order described here in temporal sequence The treatment of execution, and including parallel or respectively, rather than the treatment for performing in chronological order.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by Software adds the mode of required hardware platform to realize, naturally it is also possible to all implemented by hardware.Based on such understanding, What technical scheme contributed to background technology can be embodied in the form of software product in whole or in part, The computer software product can be stored in storage medium, such as ROM(Read-only storage)/RAM(Random access memory), magnetic Dish, CD etc., including some instructions are used to so that a computer equipment(Can be personal computer, server, or network Equipment etc.)Perform the method described in some parts of each embodiment of the invention or embodiment.
The present invention is described in detail above, specific case used herein is to principle of the invention and embodiment party Formula is set forth, and the explanation of above example is only intended to help and understands the method for the present invention and its core concept;Meanwhile, it is right In those of ordinary skill in the art, according to thought of the invention, change is had in specific embodiments and applications Part, in sum, this specification content should not be construed as limiting the invention.

Claims (28)

1. a kind of control method based on scalable message and Presence Protoco XMPP, is applied in the first electronic equipment, the side Method includes:
The announcement information sent from XMPP server is received, the announcement information indicates the XMPP server in the first LAN First electronic equipment is selected as main equipment, and selects multiple other the electronic equipment conducts in first LAN Slave unit, and the announcement information includes the autonomous networkses that first electronic equipment and the multiple other electronic equipments are formed Network identity, wherein, each electronic equipment will be used for unique identification equipment of itself first mark be registered in the XMPP In server;
Receive the registration request of the addition autonomous networkses from each slave unit;
In response to the registration request from each slave unit, serviced to the mark of each slave unit distribution second and to the XMPP Device registers the second mark of each slave unit, and second mark is only used for the communication in the autonomous networkses;And
The second mark according to each slave unit, controls the communication of each slave unit.
2. the method for claim 1, wherein according to each slave unit second identifies, controls the communication of each slave unit Including:
The second mark according to each slave unit, direct end-to-end communication is carried out with each slave unit;Or/and
The second mark according to each slave unit, the two-way communication between route slave unit in autonomous networkses;Or/and
The corresponding relation of the first mark and the second mark according to each slave unit, via the XMPP server, route each The two-way communication between equipment outside slave unit and the autonomous networkses and/or first LAN.
3. the method for claim 1, also includes:
When the equipment outside the autonomous networkses and/or first LAN by the main equipment first mark, request with When the main equipment communicates, the main equipment is communicated via the XMPP server with the external equipment for making requests on.
4. the method for claim 1, also includes:
When the equipment outside the autonomous networkses and/or first LAN is by first of the slave unit in the autonomous networkses Mark, when request communicates with the slave unit in the autonomous networkses, the main equipment is according to the again fixed of requested slave unit To identification information, via two-way between the external equipment that the XMPP server route requested slave unit and makes requests on Communication,
The wherein described identification information that redirects is registered in the XMPP server, and including the network of the autonomous networkses Mark, the slave unit first mark and second mark and main equipment first mark, the main equipment according to from First mark of equipment and the corresponding relation of the second mark determine the requested slave unit in the autonomous networkses.
5. the method for claim 1, also includes:
The related resource of the related resource of the main equipment and discovery is published to the XMPP server, so as to external equipment It is able to access that these resources.
6. the method for claim 1, also includes:
The first mark and server communication according to the main equipment, attending and logging in for the main equipment is indicated to safeguard Attend message.
7. the method for claim 1, also includes:
When there is change in the slave unit in the autonomous networkses, attending for slave unit described in update instruction and first going out for logging in Seat message, and send it to all slave units in the autonomous networkses.
8. the method for claim 1, also includes:
When there is change in the slave unit in the autonomous networkses, attending for slave unit described in update instruction and first going out for logging in Seat message, and send it to server.
9. the method for claim 1, also includes:
When the main equipment is switched to the second LAN, if currently there is ongoing communication task, the communication is waited Task is switched to the second LAN after terminating;Or
Prompting user forces to switch over, and is operated according to user, and pressure switches to the second LAN.
10. a kind of control method based on scalable message and Presence Protoco XMPP, is applied in the first electronic equipment, the side Method includes:
The request for creating autonomous networkses is sent to XMPP server;
The announcement information that reception sends as the response to the request from XMPP server, the announcement information indicates the XMPP clothes Business device selects first electronic equipment as main equipment in the first LAN, and the announcement information includes the described first electricity The network identity of the autonomous networkses that sub- equipment is created, wherein, first electronic equipment is by for the of unique identification equipment of itself One mark is registered in the XMPP server;
Receive the registration request of the addition autonomous networkses from slave unit;
In response to the registration request from slave unit, stepped on to the mark of each slave unit distribution second and to the XMPP server Remember the second mark of each slave unit, second mark is only used for the communication in the autonomous networkses;And
The second mark according to each slave unit, controls the communication of each slave unit.
A kind of 11. control methods based on scalable message and Presence Protoco XMPP, are applied in XMPP server, methods described Including:
It is determined that whether multiple electronic equipments are in the LAN of identical first;
In the multiple electronic equipments having determined in the first LAN, determine that the first electronic equipment is made according to predetermined condition It is main equipment, and determines multiple other electronic equipments as slave unit;
The first autonomous networkses formed to first electronic equipment and the multiple other electronic equipments distribute first network mark Know;
The announcement information for indicating to determine result is sent to first electronic equipment and the multiple other electronic equipments, this leads to Know that information indicates the XMPP server that first electronic equipment is selected in the first LAN as main equipment, and select Multiple other electronic equipments in first LAN are used as slave unit, and the announcement information sets including first electronics The first network mark of the first autonomous networkses that standby and the multiple other electronic equipments are formed;And
Register the main equipment and the slave unit the first mark of each, described first identify it is corresponding for uniquely identifying Electronic equipment, and register the identification information that redirects of each slave unit, the identification information that redirects includes described the The network identity of one autonomous networkses, the first mark of the slave unit, the second mark that slave unit is distributed to by main equipment and master First mark of equipment, the second mark of the slave unit is only used in the described first autonomous net including main equipment and slave unit Communication in network.
12. methods as claimed in claim 11, wherein methods described also includes:
In response to the autonomous net of establishment second that the second electronic equipment in the multiple electronic equipments in first LAN sends The request of network, determines second electronic equipment as the second main equipment, and to new the second autonomous networkses distribution for creating the Two network identities;
The first mark of second main equipment is registered, and registers each slave unit in second autonomous networkses again Orientation identification information, the network identity for redirecting identification information including second autonomous networkses, the slave unit First mark, distributed to by the second main equipment slave unit second mark and second main equipment first mark, it is described from Second mark of equipment is only used for the communication in second autonomous networkses.
13. methods as claimed in claim 11, wherein including device type, equipment mark according to the multiple electronic equipment Knowledge, the attribute of equipment power supply mode, equipment radio connection, the disposal ability of equipment, the use time of equipment determine that master sets It is standby, and
When there is multiple master device candidates, internetwork connection mode, power management according to multiple master device candidates An electronic equipment is arbitrated as main equipment with the network bandwidth.
14. methods as claimed in claim 13, also include:
Master malfunction exceed predetermined amount of time after, the XMPP server from recover and the XMPP server contact Slave unit in reselect one as main equipment, and
The announcement information for determining result will be indicated to be sent to all devices in first LAN.
15. a kind of electronic equipment, including:
First receiving unit, is configured to receive the announcement information sent from XMPP server, and the announcement information indicates the XMPP Server selects the electronic equipment as main equipment in the first LAN, and selects the multiple in first LAN Other electronic equipments are used as slave unit, and the announcement information includes the electronic equipment and the multiple other electronic equipment shapes Into autonomous networkses network identity, wherein, each electronic equipment will be used for unique identification equipment of itself first mark step on Note is in the XMPP server;
Second receiving unit, is configured to receive the registration request of the addition autonomous networkses from each slave unit;
Allocation unit, is configured in response to the registration request from each slave unit, to the mark of each slave unit distribution second simultaneously And to the XMPP server register each slave unit second mark, it is described second mark be only used in the autonomous networkses Communication;And
Control unit, is configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
16. electronic equipments as claimed in claim 15, wherein described control unit is further configured to:
The second mark according to each slave unit, direct end-to-end communication is carried out with each slave unit;Or/and
The second mark according to each slave unit, the two-way communication between route slave unit in autonomous networkses;Or/and
The corresponding relation of the first mark and the second mark according to each slave unit, via the XMPP server, route each The two-way communication between equipment outside slave unit and the autonomous networkses and/or first LAN.
17. electronic equipments as claimed in claim 15, also including communication unit, be configured to when the autonomous networkses and/it is described In the first mark that equipment outside first LAN passes through the main equipment in first LAN, request and the autonomous networkses Main equipment communicate when, communicated with the external equipment for making requests on via the XMPP server.
18. electronic equipments as claimed in claim 15, also including communication unit, be configured to when the autonomous networkses and/it is described Equipment outside first LAN passes through the first mark of the slave unit in the autonomous networkses, in request and the autonomous networkses When slave unit communicates, identification information is redirected according to requested slave unit, asked via XMPP server route Two-way communication between the slave unit asked and the external equipment for making requests on,
The wherein described identification information that redirects is registered in the XMPP server, and the including the slave unit first mark Know the first mark with the second mark and main equipment, described control unit is marked according to the first of the slave unit the mark and second The corresponding relation of knowledge determines the requested slave unit in the autonomous networkses.
19. electronic equipments as claimed in claim 15, also including communication unit, are configured to the related resource of the main equipment And the related resource for finding is published to the XMPP server, so that external equipment is able to access that these resources.
20. electronic equipments as claimed in claim 15, also including attending maintenance unit, are configured to according to the main equipment One mark and server communication, so as to safeguard indicate the main equipment attend and log in attend message.
21. electronic equipments as claimed in claim 15, also including attending maintenance unit, are configured to when in the autonomous networkses When there is change in slave unit, slave unit described in update instruction attend and log in first attend message, and send it to All slave units in the autonomous networkses.
22. electronic equipments as claimed in claim 15, also including attending maintenance unit, are configured to when in the autonomous networkses When there is change in slave unit, slave unit described in update instruction attend and log in first attend message, and send it to The XMPP server.
23. electronic equipments as claimed in claim 15, wherein described control unit is further configured to:
When the main equipment is switched to the second LAN, if currently there is ongoing communication task, the communication is waited Task is switched to the second LAN after terminating;Or
Prompting user forces to switch over, and is operated according to user, and pressure switches to the second LAN.
24. a kind of electronic equipment, including:
Transmitting element, is configured to send the request for creating autonomous networkses to scalable message and Presence Protoco XMPP server;
First receiving unit, is configured to receive the announcement information sent from XMPP server as the response to the request, and this leads to Know that information indicates the XMPP server that the first electronic equipment is selected in the first LAN as main equipment, and the notice is believed Breath includes the network identity of the autonomous networkses that first electronic equipment is created, wherein, first electronic equipment will be used for uniquely First mark of identification equipment of itself is registered in the XMPP server;
Second receiving unit, is configured to receive the registration request of the addition autonomous networkses from slave unit;
Allocation unit, is configured in response to the registration request from slave unit, to each slave unit distribution second mark and to The XMPP server registers the second mark of each slave unit, and second mark is only used for logical in the autonomous networkses Letter;And
Control unit, is configured to, according to the second of each slave unit the mark, control the communication of each slave unit.
A kind of 25. XMPP servers, including:
Whether determining unit, be configured to determine multiple electronic equipments in the LAN of identical first;
Select unit, is configured in the multiple electronic equipments having determined in the first LAN, true according to predetermined condition Fixed first electronic equipment determines multiple other electronic equipments as slave unit as main equipment;
Network identity allocation unit, is configured to first electronic equipment and the multiple other electronic equipments are formed first Autonomous networkses distribution first network mark;
Notification unit, is configured to that the announcement information for determining result will be indicated to be sent to first electronic equipment and described other electricity Sub- equipment;And
Registration unit, is configured to register the main equipment and the slave unit the first mark of each, and described first identifies and be used for Uniquely identify corresponding electronic equipment, and register the identification information that redirects of each slave unit, it is described to redirect mark The network identity of knowledge information including first autonomous networkses, the first mark of the slave unit, distributed to from setting by main equipment The second standby mark and the first mark of main equipment, the second mark of the slave unit are only used for including main equipment and slave unit First autonomous networkses in communication.
26. servers as claimed in claim 25, wherein
The wound that the select unit sends in response to the second electronic equipment in the multiple electronic equipments in first LAN The request of the second autonomous networkses is built, second electronic equipment is determined as the second main equipment, and to second for newly creating certainly Control the network identity of network allocation second;
The registration unit registers the first mark of second main equipment, and register each slave unit redirect mark Information, the network identity for redirecting identification information including second autonomous networkses, the first mark of the slave unit, The second mark of slave unit and the first mark of second main equipment are distributed to by second main equipment, the slave unit Second mark is only used for the communication in second autonomous networkses.
27. servers as claimed in claim 25, wherein the determining unit according to the multiple electronic equipment including setting Standby type, device identification, equipment power supply mode, equipment radio connection, the disposal ability of equipment, the use time of equipment Attribute determines main equipment, and
When there is multiple master device candidates, internetwork connection mode, power management according to multiple master device candidates An electronic equipment is arbitrated as main equipment with the network bandwidth.
28. servers as claimed in claim 27, wherein, after master malfunction exceedes predetermined amount of time, the determination Unit reselects one as main equipment from the slave unit of recovery and the contact of server, and
The notification unit will indicate the announcement information for determining result to be sent to all devices in first LAN.
CN201210370846.5A 2012-09-28 2012-09-28 control method, electronic device and server Active CN103716281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210370846.5A CN103716281B (en) 2012-09-28 2012-09-28 control method, electronic device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210370846.5A CN103716281B (en) 2012-09-28 2012-09-28 control method, electronic device and server

Publications (2)

Publication Number Publication Date
CN103716281A CN103716281A (en) 2014-04-09
CN103716281B true CN103716281B (en) 2017-05-24

Family

ID=50408870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210370846.5A Active CN103716281B (en) 2012-09-28 2012-09-28 control method, electronic device and server

Country Status (1)

Country Link
CN (1) CN103716281B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105629744A (en) * 2015-04-30 2016-06-01 宇龙计算机通信科技(深圳)有限公司 Control method of smart home, control system, terminal and smart home system
CN106570021A (en) * 2015-10-10 2017-04-19 阿里巴巴集团控股有限公司 Database connection establishment method and device
WO2017133491A1 (en) * 2016-02-04 2017-08-10 Boe Technology Group Co., Ltd. Update file download method, device, and system
CN105739322A (en) * 2016-05-05 2016-07-06 杭州古北电子科技有限公司 Intelligent engine system and intelligent household system
CN107071701B (en) * 2017-03-13 2019-12-27 广州视源电子科技股份有限公司 Method for discovering target Bluetooth slave device by Bluetooth slave device and Bluetooth slave device
CN108990107B (en) * 2017-06-02 2021-06-22 华为技术有限公司 Data transmission method and equipment
CN107995690B (en) * 2017-10-27 2023-04-18 欧普照明股份有限公司 Master-slave working mode control method and device
CN110740287B (en) * 2018-07-20 2021-07-20 视联动力信息技术股份有限公司 Data processing method and device for autonomous network
CN112398664B (en) * 2019-08-13 2023-08-08 中兴通讯股份有限公司 Main device selection method, device management method, electronic device and storage medium
CN112272196A (en) * 2020-03-09 2021-01-26 上海曼恒数字技术股份有限公司 Method and system for removing server by system
CN113535463A (en) * 2020-04-14 2021-10-22 华为技术有限公司 Data recovery method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481122A (en) * 2002-11-06 2004-03-10 联想(北京)有限公司 Method for controlling and managing electrical appliances in household network
CN1578245A (en) * 2003-07-07 2005-02-09 Lg电子株式会社 Control system and method for home network system
CN1799242A (en) * 2003-05-30 2006-07-05 Lg电子株式会社 Home network system
WO2008087374A2 (en) * 2007-01-17 2008-07-24 Electric Pocket Limited SYSTEM AND METHOD FOR REMOTELY ACCESSING UNIVERSAL PLUG AND PLAY (UPnP) NETWORKS
CN202421859U (en) * 2011-12-27 2012-09-05 上海下一代广播电视网应用实验室有限公司 Safe real-time remote smart multimedia home system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481122A (en) * 2002-11-06 2004-03-10 联想(北京)有限公司 Method for controlling and managing electrical appliances in household network
CN1799242A (en) * 2003-05-30 2006-07-05 Lg电子株式会社 Home network system
CN1578245A (en) * 2003-07-07 2005-02-09 Lg电子株式会社 Control system and method for home network system
WO2008087374A2 (en) * 2007-01-17 2008-07-24 Electric Pocket Limited SYSTEM AND METHOD FOR REMOTELY ACCESSING UNIVERSAL PLUG AND PLAY (UPnP) NETWORKS
CN202421859U (en) * 2011-12-27 2012-09-05 上海下一代广播电视网应用实验室有限公司 Safe real-time remote smart multimedia home system

Also Published As

Publication number Publication date
CN103716281A (en) 2014-04-09

Similar Documents

Publication Publication Date Title
CN103716281B (en) control method, electronic device and server
US10051527B2 (en) Systems and methods for evolved packet core cluster and session handling
JP4068094B2 (en) Method for realizing dynamic network configuration and resource sharing between devices
CN103503540B (en) The system and method for end-to-end communication in cellular communication system
JP5048684B2 (en) Selective service update method for communication network
US9191133B2 (en) Multimedia data distribution system and operating method thereof
EP1542409A1 (en) Protocol for multi-hop ad-hoc networks
CN100484034C (en) Method and system for access user by virtual router redundance protocol
JP2005526450A6 (en) Method for realizing dynamic network configuration and resource sharing between devices
CN105245632B (en) A kind of different segment inter-host communication method in SDN network
CA2802164C (en) Method and apparatus for handling peers with dynamic ip connectivity status in peer-to-peer networks
US10652730B2 (en) Traffic-aware group reformation in a multi-group P2P network
CN102263704A (en) Topology construction method and device supporting layer 2 interconnection of data centers
KR101995546B1 (en) Method and apparatus for discovering wireless devices
US20060075100A1 (en) System, device, software and method for providing enhanced UPnP support on devices
CN104509073A (en) Discovering ip multicast group memberships in software defined networks
CN106341468B (en) Remote awakening method, device and system of intelligent equipment
CN101801002A (en) Control and service separated WLAN framework and configuration method thereof
JP2014526090A (en) Device discovery method and content download method
CN102045374B (en) Implementation method and system supporting capability of actively pushing data messages
WO2023124480A1 (en) Route advertisement method and apparatus, device, and storage medium
CN109561340A (en) Multimedia service processing method, equipment, multimedia service group and storage medium
JP2004320741A (en) Apparatus and method for connecting independent networks
CN102710527A (en) Switch and management server supporting flexible expansion of services
CN106331202A (en) Dynamic host configuration protocol (DHCP) server management method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant