Background technique
Allseen is one kind based on point-to-point between the equipment of C/S (Client/Server, client/server) framework
The frame of communication.Allseen is made of Bus Daemon (bus finger daemon or bus service) and terminal node.Here end
End node is understood that, as an application program, application program needs to be registered on Bus Daemon, and Bus Daemon is responsible for
The functions such as message routing and service discovery between terminal node.As shown in Figure 1, there are three equipment, equipment 1,2 and 3.Each set
It is standby all to run an Allseen Bus Daemon, on Bus Daemon on the device 1 connection (or to register) two
A application program, the Bus Daemon in equipment 2 are connected to an application program, are connected to two on the Bus Daemon of equipment 3
A application program.After equipment starting, the Bus Daemon of 3 equipment will will do it broadcast, the application that will be connected on oneself
The relevant information of program is broadcasted.
Application program can be client, be also possible to service, or support client and service simultaneously.Here client
End refers to the application component with control function, and service refers to and provides the application component of service for client.It lifts
For example, equipment 1 is mobile phone, operates above Appx;Appx is client, can complete the control carried out to TV.Equipment 2
For TV, Appz is operated above;Appz is service, provides the interface of control TV for client, such client can
It is controlled with the service team TV for calling Appz to provide.
Bus Daemon is responsible for the routing of the message between terminal node, the functions such as service discovery.Terminal node, which refers to, to be based on
The application program of Allseen is required connect to after starting on Bus Daemon, and terminal node is provided that service, then to Bus
Daemon registers a service name, is broadcasted by Bus Daemon.If Service name can be passed through as client
Claim come the service of searching, and completes specified function by far call signal.
Allseen point-to-point communication is by far call agreement (RPC, Remote Procedure Call
Then Protocol) initiator to complete, therefore communicate needs to obtain service and the interface of recipient in advance, generates agency
Object is to complete far call.The initiator of communication can obtain service and the interface of recipient by query service.
The server-side of Allseen is generally formed by servicing (Service), completes specific service logic, such as intelligent refrigerator
Provided refrigerator service, a service may include multiple interfaces, and interface is for stating specific sub-services/subfunction point
Class, interface may include the far call of multiple methods (Method) for function, also may include multiple attributes, signal etc..
The service of Allseen server-side is generally disposed by service provider in advance, and in the process of running, interface method etc. is all
It can not change.The service interface of Allseen dynamically cannot be loaded or be generated, and can only be disposed in advance and be formed fixed code.
Therefore, existing Allseen network cannot support the access of non-Allseen equipment.But it is deposited in Allseen network at present
The demand into Allseen network is accessed in the equipment of some non-Allseen.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method of non-Allseen equipment access Allseen network, with
And Allseen equipment and non-Allseen equipment, non-Allseen equipment cannot be supported to solve prior art Allseen network
The problem of access.
In order to solve the above technical problems, on the one hand, the present invention provides a kind of non-Allseen equipment access Allseen network
Method, comprising:
The first Allseen equipment in Allseen network sends access message to non-Allseen equipment connected to it,
The communication protocol in the access message including: the first Allseen equipment support is Allseen, supports agent identification, with
And the file format that the capacity of equipment of the parsing non-Allseen equipment uses;
The first Allseen equipment receives the registration request that the non-Allseen equipment is sent, according to from the file
The capacity of equipment of the non-Allseen equipment parsed in format, newly-generated one for describing the non-Allseen equipment
Allseen service interface, and the information of the Allseen service interface described in Allseen Web broadcast, the information are at least wrapped
It includes: the title of the Allseen service interface, object path and for indicating that the Allseen service interface is that non-Allseen is set
Standby mark.
Further, the first Allseen equipment receives the 2nd Allseen equipment in Allseen network and sends calling
After the control message of the newly-generated Allseen service interface for describing the non-Allseen equipment, the control message is turned
It changes into after the non-Allseen equipment corresponds to capacity of equipment described in the registration request, is sent to the non-Allseen
Equipment executes respective action by the non-Allseen equipment.
Further, Allseen communication protocol is used between the first Allseen equipment and the non-Allseen equipment
Except communication protocol communicated.
On the other hand, the present invention also provides a kind of methods of non-Allseen equipment access Allseen network, comprising:
Non- Allseen equipment receives the access that the first Allseen equipment connected to it in Allseen network is sent to it
Message;The communication protocol in the access message including: the first Allseen equipment support is Allseen, supports agency's mark
Know, and parses the file format that the capacity of equipment of the non-Allseen equipment uses;
The non-Allseen equipment sends registration request to the first Allseen equipment, and institute is wherein used in registration request
File format is stated to describe the capacity of equipment that the non-Allseen equipment is supported;
The non-Allseen equipment receives the message that succeeds in registration that the first Allseen equipment is sent to it.
Further, the non-Allseen equipment receives the control message that the first Allseen equipment is sent to it, and holds
Row movement corresponding with the control message;It wherein, include the non-Allseen equipment in the control message in the registration
Capacity of equipment is corresponded to described in request.
Further, Allseen communication protocol is used between the non-Allseen equipment and the first Allseen equipment
Except communication protocol communicated.
In another aspect, the present invention also provides a kind of Allseen equipment, comprising:
Transmission unit is arranged in the first Allseen equipment in Allseen network, is used for connected to it non-
Allseen equipment sends access message, includes: the communication protocol that the first Allseen equipment is supported in the access message
For Allseen, agent identification is supported, and parse the file format that the capacity of equipment of the non-Allseen equipment uses;
Processing unit is arranged in the first Allseen equipment in Allseen network, for receiving the non-Allseen
The registration request that equipment is sent, it is newborn according to the capacity of equipment of the non-Allseen equipment parsed from the file format
At one for describing the Allseen service interface of the non-Allseen equipment, and described in the Allseen Web broadcast
The information of Allseen service interface, the information include at least: the title of the Allseen service interface, object path and being used for
Indicate that the Allseen service interface is the mark of non-Allseen equipment.
Further, the processing unit is also used to:
The first Allseen equipment receives the 2nd Allseen equipment in Allseen network and sends the newly-generated use of calling
After describing the control message of Allseen service interface of the non-Allseen equipment, the control message is converted into described
After non-Allseen equipment corresponds to capacity of equipment described in the registration request, it is sent to the non-Allseen equipment, by
The non-Allseen equipment executes respective action.
Further, Allseen communication protocol is used between the first Allseen equipment and the non-Allseen equipment
Except communication protocol communicated.
In another aspect, the present invention also provides a kind of non-Allseen equipment, comprising:
Receiving unit, the access being sent to it for receiving the first Allseen equipment connected to it in Allseen network
Message;The communication protocol in the access message including: the first Allseen equipment support is Allseen, supports agency's mark
Know, and parses the file format that the capacity of equipment of the non-Allseen equipment uses;
Registering unit, for sending registration request to the first Allseen equipment, wherein with the text in registration request
Part format describes the capacity of equipment that the non-Allseen equipment is supported;Wherein, the first Allseen equipment is to described
The message that succeeds in registration that non-Allseen equipment is sent is received by the receiving unit.
Further, the receiving unit is also used to:
The control message that the first Allseen equipment is sent to it is received, is executed corresponding with the control message dynamic
Make;It wherein, include that the non-Allseen equipment corresponds to equipment energy described in the registration request in the control message
Power.
Further, Allseen communication protocol is used between the non-Allseen equipment and the first Allseen equipment
Except communication protocol communicated.The present invention has the beneficial effect that:
The service of non-Allseen equipment of the present invention by Allseen facility registration in Alljoy network newly, to realize
Non- Allseen equipment is communicated with Allseen equipment;The interconnection solved between Allseen equipment and non-Allseen equipment is mutual
It is logical.
Specific embodiment
Below in conjunction with attached drawing and embodiment, the present invention will be described in further detail.It should be appreciated that described herein
Specific embodiment be only used to explain the present invention, limit the present invention.
As shown in Fig. 2, the present embodiments relate to the methods of non-Allseen equipment access Allseen network, comprising:
The first Allseen equipment in step S101, Allseen network is sent to non-Allseen equipment connected to it
Message is accessed, the communication protocol in the access message including: the first Allseen equipment support is Allseen, supports generation
Reason mark, and parse the file format that the capacity of equipment of the non-Allseen equipment uses;
In this step, Allseen equipment refers in Allseen network to be carried out by Allseen communication protocol each other
The equipment of communication;Non- Allseen equipment, which refers to, does not support Allseen communication protocol that can not be directly accessed setting for Allseen network
It is standby.
First Allseen equipment with other Allseen equipment utilization Allseen communication protocols in Allseen network
It while communication, is also possible to be communicated with other non-Allseen equipment, the first Allseen equipment and non-Allseen
It is communicated between equipment by the proprietary protocol of the two agreement.When the first Allseen equipment wishes to connect non-Allseen equipment
Enter into Allseen network, alternatively, when non-Allseen equipment is desired access in Allseen network, the first Allseen equipment
Access message can be sent or broadcasted to non-Allseen equipment, tell how non-Allseen equipment is registered.
Step S102, the first Allseen equipment receives the registration request that non-Allseen equipment is sent, according to the file
Format therefrom parses the capacity of equipment of non-Allseen equipment, and newly-generated one for describing non-Allseen equipment
Allseen service interface, and in the information of Allseen Web broadcast Allseen service interface;Information includes at least: should
The title of Allseen service interface, object path and for indicating that the Allseen service interface is non-Allseen equipment
Mark.First Allseen equipment is generated for describing the Allseen service interface of non-Allseen equipment, and broadcasts the interface
Information is that is, accessed Allseen network for the non-Allseen equipment, other Allseen equipment in Allseen network
Control can be called to it.
In this step, non-Allseen equipment sends registration request to the first Allseen equipment according to access message, and first
Allseen equipment completes the registration of non-Allseen equipment, and after succeeding in registration, broadcast message is sent in Allseen network, is accused
Know others Allseen equipment in Allseen network, the newly-generated Allseen service for describing non-Allseen equipment connects
The title and object path of mouth and the Allseen service interface.
Others Allseen equipment in Allseen network, for example, being wished after the 2nd Allseen equipment receives broadcast message
It hopes and controls non-Allseen equipment, then call the first Allseen equipment by the remote method call of Alljyon communication protocol
On non-Allseen equipment.First Allseen equipment receives the control that the 2nd Allseen equipment in Allseen network is sent
After message, control message is converted into the correspondence capacity of equipment that non-Allseen equipment describes in the registration request, is sent to non-
Allseen equipment executes respective action by non-Allseen equipment.
In the present embodiment, the first Allseen equipment is mainly to play the function of agency and conversion, realizes Allseen by it
Conversion between communication protocol and proprietary protocol (communication protocol between the first Allseen equipment and non-Allseen equipment), it is non-
Allseen equipment is accessed in Allseen network by the first Allseen equipment.
Below with reference to Fig. 3,4, provides a specific example and be described in detail.
In Allseen network shown in Fig. 3, Allseen equipment includes Allseen refrigerator, Allseen mobile phone,
Allseen washing machine and Allseen TV, Allseen TV also supports other interconnection agreements here, can be with air-conditioning
(non-Allseen equipment) is communicated.In this scene, Allseen equipment can not be communicated with air-conditioning, say by
Mobile phone application is unable to control the function of air-conditioning.Therefore the present embodiment technical solution solve be how to allow Allseen equipment with it is non-
It is communicated between Allseen equipment.
Concrete implementation scheme is as shown in Figure 4.Equipment A and equipment B supports Allseen communication protocol, belongs to Allseen and sets
It is standby;And equipment C is non-Allseen equipment.It can be communicated by other any proprietary protocols between equipment B and equipment C.Mesh
Before, it realizes that equipment A controls equipment C, specifically includes:
Step 1: equipment B broadcasts access message by proprietary protocol, and access message includes the communication protocols that equipment B is supported
View supports agent identification and capacity of equipment descriptor format, format as follows:
The communication protocol of support: Allseen;
It supports agent identification: agency being supported (to indicate that equipment B can be realized between two kinds of different agreements as an agency
Translation and conversion);
Capacity of equipment descriptor format: the ability which kind of format to parse non-Allseen equipment by is indicated.It is used in this example
XML (Extensible Markup Language, extensible markup language) mode indicates that equipment B supports the solution of XML file
Analysis, i.e. equipment C can describe the capacity of equipment of oneself with the form of XML.
Step 2: after equipment C receives the access message of equipment B broadcast, discovering device B supports Allseen communication protocol, and
And support agency's (Allseen network can be linked by equipment B), and equipment B supports the parsing of XML file.Equipment C
Allseen network is added, be by equipment B as agency, therefore registration message is sent to equipment B, it is taken in the registration message
The capacity of equipment supported with oneself describes the capacity of equipment oneself supported with the format of XML Schema.For example,
As follows.
Device name: Airconditioner;
Capacity of equipment:
Onoff (indicates switch);
Tempmodify (indicates that temperature is adjusted);
Modeset (intermediate scheme setting);
Device attribute:
Currenttemp (Current Temperatures);
Currentmode (present mode);
Note: the communication of equipment B and equipment C are carried out by non-Allseen agreement.
Step 3: after equipment B receives the registration request, checking whether the capacity of equipment of the xml format can be resolved, such as
Fruit cannot be resolved, then the message of registration failure is sent to equipment C;If can be resolved, regenerate one it is new
Allseen service interface is for describing equipment C.Shown in specific as follows:
Step 4: after equipment B has created the service interface, the message to succeed in registration is sent to equipment C.
Step 5: equipment B sends to Allseen network and broadcasts the message, and broadcasts the newly-increased service interface and the service
The well known title and object path of interface;Wherein well know name is org.Allseen.AirCondtioner,
For identifying the service, and object path is then to indicate how to be addressed to each method and attribute.
Step 6: after equipment A has received the broadcast message, if to control equipment C, the remote parties of Alljyon can be passed through
Method is called newly-generated for describing the Allseen service interface of non-Allseen equipment, and then realization calling on equipment B to call
The service of equipment C.
Step 7: after receiving the remote call service of equipment A transmission on equipment B, by this method conversion forming apparatus C note
Ability description when volume in xml, and it is sent to equipment C.
Step 8: equipment C executes corresponding movement.
For example for step 6~step 8, equipment A has invoked onoff () method/function, then on device B will
The onoff described in xml when onoff () the conversion forming apparatus C in Allseen service interface can be registered, is sent to equipment
C, equipment C execute the movement for closing or opening air-conditioning.
As shown in figure 5, the embodiment of the present invention further relates to a kind of Allseen equipment for realizing the above method, comprising:
Transmission unit is arranged in the first Allseen equipment in Allseen network, is used for connected to it non-
Allseen equipment sends access message, includes: the communication protocol that the first Allseen equipment is supported in the access message
For Allseen, agent identification is supported, and parse the file format that the capacity of equipment of the non-Allseen equipment uses;
Processing unit is arranged in the first Allseen equipment in Allseen network, for receiving the non-Allseen
The registration request that equipment is sent, it is newborn according to the capacity of equipment of the non-Allseen equipment parsed from the file format
At one for describing the Allseen service interface of the non-Allseen equipment, and described in the Allseen Web broadcast
The information of Allseen service interface, the information include at least: the title of the Allseen service interface, object path and being used for
Indicate that the Allseen service interface is the mark of non-Allseen equipment.
Wherein, processing unit is also used to:
The first Allseen equipment receives the 2nd Allseen equipment in Allseen network and sends the newly-generated use of calling
After describing the control message of Allseen service interface of the non-Allseen equipment, the control message is converted into described
After non-Allseen equipment corresponds to capacity of equipment described in the registration request, it is sent to the non-Allseen equipment, by
The non-Allseen equipment executes respective action.
Using the communication protocols except Allseen communication protocol between first Allseen equipment and the non-Allseen equipment
View is communicated.
As shown in fig. 6, the embodiment of the present invention further relates to a kind of non-Allseen equipment for realizing the above method, comprising:
Receiving unit, the access being sent to it for receiving the first Allseen equipment connected to it in Allseen network
Message;The communication protocol in the access message including: the first Allseen equipment support is Allseen, supports agency's mark
Know, and parses the file format that the capacity of equipment of the non-Allseen equipment uses;
Registering unit, for sending registration request to the first Allseen equipment, wherein with the text in registration request
Part format describes the capacity of equipment that the non-Allseen equipment is supported;Wherein, the first Allseen equipment is to described
The message that succeeds in registration that non-Allseen equipment is sent is received by the receiving unit.
Wherein, receiving unit is also used to:
The control message that the first Allseen equipment is sent to it is received, is executed corresponding with the control message dynamic
Make;It wherein, include that the non-Allseen equipment corresponds to equipment energy described in the registration request in the control message
Power.
Between non-Allseen equipment and the first Allseen equipment using the communication protocol except Allseen communication protocol into
Row communication.
As can be seen from the above-described embodiment, the present invention passes through new non-of Allseen facility registration in Alljoy network
The service of Allseen equipment communicates to realize non-Allseen equipment with Allseen equipment;Solve Allseen equipment with
Interconnecting between non-Allseen equipment.
Although for illustrative purposes, the preferred embodiment of the present invention has been disclosed, those skilled in the art will recognize
It is various improve, increase and replace be also it is possible, therefore, the scope of the present invention should be not limited to the above embodiments.