Embodiment
At first, introduce the system configuration of digital home network.
Digital home network is made up of net control terminal, mobile control terminal and a plurality of communication module transmission and reception apparatus, sees Fig. 1.The effect of various piece is as follows:
1, net control terminal
The definition of net control terminal is: a kind of simple, intelligent, standardized, whole home network interface unit flexibly, it can receive communication signal from different external networks, transmits the various device that signal is given household internal by home network.Net control terminal is the core that the home information system structure is connected with network, has the burden that this part can reduce system's other parts, is realizing that the internal control interconnected, local area network (LAN) with wide area network all can play a leading role.Net control terminal possesses two major functions: (1) is connected to household internal as all outside Access Networks and the household internal network is connected to outside a kind of physical interface; (2) make residential customer can obtain the various home services platform of (comprising existing service and the following service that may occur).
The characteristics of net control terminal are: support the Internet function of multi-protocols and good Web performance, data communication between the inner various device of network enabled, real-time Transmission multi-medium data, multimedia interaction operation and plug and play, have abundant user interface and figure controlled function, can allow the user operate easily and intuitively and control every application, can also clear display and lively graphical interfaces.
The function of net control terminal is: by Internet network control message household electrical appliances, also can carry out tame electric control by local computer.Can realize the management of household internal various device, and remote monitoring, various intelligent managements: the self diagnosis of Long-distance Control, remote inquiry, centralized management and monitoring, household safe defence, fault, self feed back, remote maintenance, home energy source management or the like.
The mode of operation of net control terminal is: after the user steps on the Internet network, open the home control network interface, according to each household electrical appliances option that shows on the interface, enter some families electric control interface, control this household electrical appliances.
The net control terminal of native system has following characteristics:
(1) net control terminal has provided man-machine interface clearly, can enter the control options interface of any electrical equipment, controls all controlled function of each household electrical appliances, operates very simply, and is that the user comes into plain view.
(2) net control terminal also has the function of the various household electrical appliances of management, join in the domestic network system as new household electrical appliances, net control terminal has the increase option, can add new equipment by adding the device file of being formulated by the DEVICEFILE agreement.Net control terminal also has deletion can not use the function of device option.
(3) communication module that net control terminal and each household electrical appliances had can carry out exchanges data by wireless communication mode, has improved the versatility of itself.Communications protocol between net control terminal and each communication module is digital home network (DHN) communications protocol standard.
2, mobile control terminal
The definition of mobile control terminal is: a kind of simple, intelligent, standardized, whole family main logic unit flexibly, it can receive communication signals by various wireless communication modes, and transmits the various device that signal is given household internal.Mobile control terminal is the core that the home information system structure moves control, has this part and can make each part of control more flexible, reduces the burden of system's other parts, is realizing that the management of portable control and household internal all can play a leading role.Mobile control terminal should possess two major functions: (1) as the centralized control of all household's IT application household electrical appliances, simultaneously will with the mutual communication of household internal net control terminal, to reach the consistent purpose of control; (2) make residential customer can obtain the various home services platform of (comprising existing service and the following service that may occur).
The characteristics of mobile control terminal are: the function of supporting wireless telecommunications, support data communication, real-time transmission data information, the man-machine interactive operation between the household internal various device and have abundant user interface and figure controlled function, can allow the user operate easily and intuitively and control every application, can also clear display and graphical interfaces accurately.
The effect of mobile control terminal is by the mode of wireless telecommunications existing information household electrical appliances in the present family to be carried out centralized control.
In the present family if household electrical appliances are carried out the words of remote control, want the corresponding remote controller of household electrical appliances, a lot of people are obscured each remote controller, to such an extent as to when controlling an electrical equipment mutually, which goes to differentiate is the remote controller of these household electrical appliances, and does not have display interface clearly.
The mobile control terminal of native system has following characteristics:
(1) mobile control terminal has a man-machine interface clearly, can show the electrical equipment that family is all by the screen on it, by the button on the mobile control terminal keyboard, can enter the control options interface of any electrical equipment, all controlled function that comprise these household electrical appliances in the control options interface, selecting each controlled function option can control this function of these household electrical appliances, operate very simply, and is that the user comes into plain view.
(2) mobile control terminal is to carry out communication by wireless communication modes, can not be subjected to the restriction of barrier, can control each home appliance that moves on the control terminal in coverage, and control is more reliable.
(3) mobile control terminal also has the function of the various household electrical appliances of management, join in the domestic network system as new household electrical appliances, mobile control terminal has the increase option, can add new equipment by adding the device file of being formulated by the DEVICEFILE agreement.Mobile control terminal also has deletion can not use the function of device option.
(4) communication module that mobile control terminal and each household electrical appliances had can carry out exchanges data by wireless communication mode, and the communications protocol between mobile control terminal and each communication module is digital home network (DHN) network communication protocol standard.
3, communication module
The definition of communication module is: a kind of simple, intelligent, standardized, communication interface unit of whole family information household electrical appliances flexibly, it can receive communication signal from different communication modes, transmits signal to the control terminal in the family by different communication modes.Communication module is the communication core of each control terminal of information household appliances in the home information system structure.Communication module should possess two major functions: (1) is as the interface of all information household appliances Acessing in home network networks; (2) be written into the relevant information of the information household appliances that connect.
The characteristics of communication module are: data communication, real-time Transmission volume data information, plug and play between inner each equipment of network enabled, function such as communication is quick can allow the user operate easily and intuitively and controls each information household appliances.
The function of communication module is: can realize the management of household internal various device, and remote monitoring, various intelligent managements: the self diagnosis of Long-distance Control, remote inquiry, centralized management and monitoring, household safe defence, fault, self feed back, remote maintenance, home energy source management or the like.
A communication module is set in each information household appliances equipment, this communication module is wired and wireless communication mode, it mainly acts on is by using digital home network (DHN) communications protocol standard and net control terminal and mobile control terminal to carry out exchanges data, realize that with this household electrical appliances that this equipment is connected control, transmission meets the device file of DEVICEFILE protocol specification when increasing equipment.
Introduce digital home network (DHN) protocol architecture below.
The target of digital home network (Digital Home Network) communications protocol standard is to allow to follow between each application layer of standard to carry out mutual operation.In order to realize interoperability, must each application layer corresponding application must move with same protocol stack, each protocol stack all is to meet digital home network (DHN) communications protocol standard.But not all application program all must all meet digital home network (DHN) communications protocol standard, but application program is only utilized some part in the protocol stack, and some the additional vertical protocol subset in the protocol stack is used to support main service of using exactly.
It is as shown in the table that the interoperability of digital home network (DHN) communications protocol standard is used the complete protocol stack of supporting:
????APPL |
????NETL |
????PHYL |
APPL: application layer (Application Layer);
NETL: network layer (Network Layer);
PHYL: physical layer (Physical Layer).
Wherein the structure of physical layer is as shown in the table:
???????????????LLML |
????WCFL | ????LCFL |
????WPL | ????LPL |
LPL: wired physical layer (Line Physical Layer)
LCFL: wired connection adaptation layer (Line Connector Fit Layer)
WPL: radio physical layer (Wireless Physical Layer)
WCFL: wireless connections adaptation layer (Wireless Connector Fit Layer)
LLML: Logical Link Management layer (Logic Linker Manager layer)
Wherein the structure of network layer is as shown in the table:
??NCAL | ??RCAL | ??OCAL |
??NCIL | ??RCIL | ??OCIL |
RCIL: mobile terminal control interface layer (Remove Control Interface Layer)
OCIL: other control interface layers (Others Control Interface Layer)
NCAL: network terminal Control Network layer (Network Control Application Layer)
RCAL: mobile terminal Control Network layer (Remote Control Application Layer)
OCAL: other Control Network layers (Others Control Application Layer)
At first introduce the structure of physical layer below:
The structure of physical layer is as follows: LPL: wired physical layer (Line Physical Layer); LCFL: wired connection adaptation layer (Line Connector Fit Layer); WPL: radio physical layer (Wireless Physical Layer); WCFL: wireless connections adaptation layer (Wireless Connector Fit Layer); LLML: Logical Link Management layer (LogicLinker Manager layer).
Wired physical layer:
Digital home network (DHN) wire communication can be any wire communication mode, as RS232 communication modes, RS485 communication modes, LAN fieldbus mode or the like.
Adopt the RS-485 serial bus standard, the baud rate that is adopted under this communication modes is 9.6Kbps, and communication distance can reach 1.5 kilometers, is adapted at family wired communication, and its working method is a half-duplex mode.
Radio physical layer:
The working frequency points of native system wireless telecommunications is 868 ~ 870MHz, and the operating frequency range of whole wireless telecommunications is on the ISM band of 850 ~ 950MHz frequency range or 2.4GHz.The parameters of digital home network (DHN) wireless telecommunications is different with forming module according to different communication needs.
The wireless connections adaptation layer:
It is the basic adaptive communication part that is used for setting up the wireless telecommunications architecture, set up different adaptive communications protocol according to different physical layers, connect physical layer and Logical Link Management layer, realize two-layer transfer of data, finish wireless receiving and transmission task, and, the data message that obtains is carried out analyzing and processing according to the communications protocol of wireless connections adaptation layer, give the Logical Link Management layer with the active data message transmission.
The communication format of wireless connections adaptation layer:
When defining grouping and message in the wireless connections adaptation layer, coding should be followed following form:
The protocol architecture of wireless connections adaptation layer is as shown in the table:
Type | Length (figure place) |
Preceding bit code | ????159 |
Payload | ????128~800 |
Preceding bit code:
Its total length is 159bits, comprises guide's sign indicating number respectively, position, synchronous code, space code etc. are set, and is mainly used in the transmission channel of setting up wireless telecommunications in the wireless connections adaptation layer.
Type | Length (figure place) |
Guide's sign indicating number | ????154 |
The position is set | ????1 |
Sync bit | ????3 |
Gap digit | ????1 |
(1) length of guide's sign indicating number is 154bits, is a series of signals clocklike, is used to set up radio communication chain circuit.
(2) be provided with the position length be 1bit, be used to distinguish guide's sign indicating number and synchronous code, help setting up synchronous code.
(3) length of synchronous code is 3bits, is used for the synchronous effect of wireless telecommunications.
(4) length of gap digit is 1bit, is used to distinguish synchronous code and identification code, helps receiving data.
Payload:
Length is 128~800bits, comprising the length of identification code and actual information data, the various control commands that will obtain, status command, various valid data information etc., is the desired valid data information of Logical Link Management layer.
The rule of the reception/transmission of wireless connections adaptation layer:
In order to support the reception and the transmission of wireless telecommunications (WCOM), defined following rule respectively:
Receive rule:
As shown in Figure 2, when the wireless connections adaptation layer receives, be to search guide's sign indicating number earlier, guide's sign indicating number is a series of signals clocklike, can receive by certain pattern and detect this signal, after having looked into guide's sign indicating number, begin to wait for synchronous code, synchronous code has been the sign indicating number of communication synchronous effect then, check three synchronous code altogether, after the synchronous code inspection is errorless, wait for a gap digit, the back of gap digit begins to receive normal data exactly, gap digit what closely follow later is exactly identification code, payload and verification and, and receive these data, after receiving by certain length, these data are put into preposition, so that the subsequent treatment of Logical Link Management layer.
Send rule:
As shown in Figure 3, when the wireless connections adaptation layer sends, be to send guide's sign indicating number of 154 earlier, guide's sign indicating number is a series of signals clocklike, can send this signal by certain pattern, after sending guide's sign indicating number, begin to send 1 the position is set, the position is set prepares for sending synchronous code, send the position is set after, send synchronous code, synchronous code is the sign indicating number as the communication synchronous effect, send three synchronous code altogether, after the synchronous code transmission finishes, send a gap digit again, the effect of gap digit is to isolate sync bit and normal data, after the isolation position sends and finishes, begin to send normal data, normal data comprise identification code, payload and verification and, these data all are put into a preposition, and in sequence, certain length sends.
The Logical Link Management layer:
The main effect of Logical Link Management layer is that the data message that obtains from the connection adaptation layer is judged and processing, as acknowledgement frame ACK function, processing data information function, retransmitting function, if data are correct, then data analyzed, and be transferred to the control interface layer.The data that obtain from the control interface layer are analyzed and handled, send the connection adaptation layer to.
The communication format of Logical Link Management layer be divided into identification code, valid data information and verification and, as shown in the table:
The payload structure of Logical Link Management layer is as shown in the table:
Type | Length (figure place) |
Identification code | ????112 |
Valid data | ????0~672 |
Verification and | ????16 |
1, the length of identification code is 112bits, is used to define the various information of this data set, and the information of master unit being sent from the unit is differentiated.
2, valid data information is 0 ~ 672bits, is the valid data information that application layer will obtain, comprising the desired parameters of application layer, every configuration information.
3, verification and be 16bits, this correctness of data frame of verification.
Identification code is mainly used in the various active data information of these frame data of identification in the Logical Link Management layer, and judges its validity, and the total length position 112bits of identification code comprises number of words radix-minus-one complement, number of words, destination address, source address, frame number etc. respectively.The identification code form of Logical Link Management layer is:
Following table is the identification code form shfft of Logical Link Management layer:
Type | Length (byte number) |
The number of words radix-minus-one complement | ????1 |
Number of words | ????1 |
Destination address | ????4 |
Source address | ????4 |
Frame number | ????2 |
(1) number of words radix-minus-one complement and number of words are 1 Byte respectively, are used to notify the total number of word of identification code and payload.
(2) destination address is 4 Bytes, is the address of the data set target that will arrive.Each communication unit with transmission-receiving function all has one 32 ID number, and its value has uniqueness in all over products with this standard production, in the data communication just with the sign of this ID as addressing.Be used to the broadcast transmission of major control equipment (MCE) armamentarium in net when complete " 1 " ID number.
(3) source address is 4 Bytes, is the address that data set sets out.
(4) frame number is the sequence number of 2 these data sets of Bytes, is used for the queue order of data set.One of effect of frame number is the different transfer of data of sign: the numerical value of frame number increases progressively in transmission continuously, if a frame number with previous identical, represents that then this frame is a retransmission frame.Frame number is used to identify the order of segment data when segmentation transmits mass data (as wireless downloading device description file DEVICEFILE).Most of control command datas can both be contained in the frame, and this moment, frame number played the effect of sign different command.No matter data are that segmentation transmits or once transmitted, and receiving terminal all should be compared current frame number with the previous frame number of preservation, comprise new data or retransmission data to judge this frame.
Aforementioned valid data information comprises it being the valid data information that application layer will obtain, comprising the desired parameters of application layer, every configuration information.Its form is formulated by the desired information format of application layer, and the information format that the different application layer is formulated is not quite similar.
The transmission correctness of this data set is differentiated in aforementioned verification and be the check code of control word and valid data information.Verification and be the word verification and, i.e. the check code that the data of identification code and payload are obtained by the word addition.
The major function of Logical Link Management layer comprises: acknowledgement frame ACK function; The processing data information function; Retransmitting function.
Acknowledgement frame ACK function: after receiving element receives a data set, then send an ack msg bag immediately, confirm that with this link of data communication is a path, and the notice transmitting element is waited for feedback information to the transmitting element that sends this data set.The form of the packet of ACK acknowledgement frame is identical with the form of normal communication frame, also comprise preceding bit code, identification code, payload, verification and, wherein payload is one group of self-defining data message, can be the identical data of certain-length, but must be different from other valid data.
The processing data information function comprises: to the processing capacity of receiving data information, to sending the processing capacity of data message.
Processing capacity to receiving data information: (as shown in Figure 4)
After the connection adaptation layer receives one group of data, after being put into whole data on the preposition, send to one on the Logical Link Management layer signal that finishes of receiving data information, after the Logical Link Management layer detects this signal, just call this group data, and these group data are carried out analyzing and processing, at first the radix-minus-one complement of number of words and number of words is differentiated, as ineligible, then be left intact, continue the data message of waiting for that reception is new.
After eligible, compare with the ID address of this unit to receiving destination address.As different with the ID address of this unit, then these group data are not the data messages to this group, then are not correspondingly processed, and continue the data message of waiting for that reception is new.
As identical with the ID address of this unit, then carrying out the ID address number of the correlation unit that source address (promptly sending the ID address of master unit) and this unit had compares, do not comprise this ID address as this unit, then be not correspondingly processed, continue the data message of waiting for that reception is new.
If this unit comprises this ID address, show that then these group data are the data messages to this unit, next step detects frame number, as identical with the frame number of previous frame, then show the requirement retransmitting function, as different with the frame number of previous frame, the data message that then shows a new frame, take out the control word content, and call the correctness that verification and function are differentiated the entire frame content of this frame, verification and function are word verifications that the data message of identification code of receiving and payload is obtained by the word addition one by one and with the verification of receiving with compare, as verification and incorrect, then be not correspondingly processed, continue the data message of waiting for that reception is new.
As verification and correct, then take out control word, control word is effectively analyzed, data and payload after analyzing are put together, be set to preposition, and send the signal that is ready to transmit for the control interface layer, so that the control interface layer carries out next step transfer of data.
To sending the processing capacity of data message:
The Control Network layer sends information to the Logical Link Management layer, and when the signal of the end of transmission of receiving the Control Network layer, the Logical Link Management layer is obtained data message to preposition, and information comprises control word and payload.The Logical Link Management layer is packed to data, at first obtain the number of words of data, insert the radix-minus-one complement of number of words, in destination address, put into the ID address of the communication unit that will send, in source address, put into the ID address of this unit, in frame number, put into the frame number of this frame, put into the control word that transfer of data sends in the position of control word, in the position of payload, put into the payload that the Control Network layer sends, calling verification and function, calculate verification and, be put into verification and the position on, the data of forming a frame like this are put on the preposition, and give the connection adaptation layer signal that has been ready to send Frame.
Retransmitting function: when this unit detects this frame and gets frame number and equate with the previous frame equal sign, show that the information that receiving element was received the last time detects incorrect, require transmitting element to send the data message of a previous frame again, thereby call retransmitting function, take out data from the precalculated position that the last time sent, and its packing is put into preposition, and gives and connect signal that has been ready to send Frame of adaptation layer.
Network layer:
The structure of network layer is as follows: NCIL: network terminal control interface layer (Network Control Interface Layer); RCIL: mobile terminal control interface layer (Remove Control Interface Layer); OCIL: other control interface layers (Others Control Interface Layer); NCAL: network terminal Control Network layer (Network ControlApplication Layer); RCAL: mobile terminal Control Network layer (Remote Control Application Layer); OCAL: other Control Network layers (Others Control Application Layer).
The control interface layer:
The control interface layer is to from the Logical Link Management layer analysis with handle resulting valid data information and handle and analyze by corresponding, is transformed into the useful data that network layer wants to obtain and is transferred to each network layer.
The agreement of control interface layer is that the data that the Control Network layer is wanted to obtain are carried out corresponding data transaction, convert the receptible data mode of corresponding Control Network layer to, promptly control word and the valid data that the Logical Link Management layer is given are packed, and are transferred to the Control Network layer again.According to different Control Network layers different data transaction protocol specifications is arranged.The purpose of control interface layer is at set up a complete communication path between Logical Link Management layer and heterogeneous networks layer equipment.
The Control Network layer:
The Control Network layer comprises network terminal Control Network layer, mobile terminal Control Network layer, other Control Network layers etc., network terminal Control Network layer is to be based upon on the network terminal control interface layer, mobile terminal Control Network layer is to be based upon on the control interface layer of mobile terminal, and other Control Network layers are to set up on the corresponding separately network terminal control interface layer.
Network layer is after the data that receive the transmission of control interface layer, handle accordingly and react according to the data message in control word and the valid data, when having any data message, network layer wants to transmit, then valid data are transferred to the control interface layer, the control interface layer carries out data transaction again to valid data, and resulting control word and valid data are transferred out.
Application layer:
Application layer be all users towards the general designation of application program, formulate different application layers according to different network layers, application layer is the concentrated reflection that whole system exchanges with the user.Application layer is reacted accordingly to each action of each user, and carries out information exchange with network layer, promptly order is sent to the return information of network layer and reception network layer.
Application layer is handled accordingly and is reacted according to effective information after receiving the data of Control Network layer transmission, shows corresponding user interfaces.Want to transmit when application layer has any data message, then valid data are transferred to the Control Network layer, the Control Network layer carries out data transaction again to valid data, and resulting control word and valid data are transferred out.
The function of net control terminal and flow process:
Net control terminal is controlled communicating terminal as one of the intelligent appliance online in system, major function is that intelligent appliance and Internet network are coupled together, net control terminal can be a gateway that meets the wireless telecommunications of digital network family communications protocol standard, can carry out exchanges data with communication module.
When the user logins the Internet network, keying in the IP address of this net control terminal on Internet on the web browser, just can connect this net control terminal, and enter the control picture of a digital home network, this picture has presented all household electrical appliances in the family of current network control terminal place, click the icon of the household electrical appliances that will control mutually, can enter the control interface of these household electrical appliances.
All control options that shown these household electrical appliances on the control interface, click wants to carry out the option of corresponding control, the application layer program of net control terminal obtains its pairing control command and actual parameter from the control option of being clicked, again these valid data are carried out the data transaction of network terminal Control Network layer, be transferred to mobile terminal control interface layer again, after mobile terminal control interface layer receives the data that network terminal Control Network layer transmits, the control command and the actual parameter that obtain are transferred to the Logical Link Management layer, the Logical Link Management layer is packed according to digital home network communications protocol standard to these data again, be transferred to the wireless connections adaptation layer, the wireless connections adaptation layer meets the packing of this adaptation layer protocol again to this Frame, by corresponding physical layer this data frame transfer is gone out.
The communication module of all household electrical appliances that this net control terminal is controlled all receives this Frame, be transferred to the connection adaptation layer, connecting adaptation layer unpacks to this Frame, obtain payload, payload is transferred to the Logical Link Management layer again, and the Logical Link Management layer is unpacked to this payload, and judge its correctness and validity, as correctly, then controlled order and valid data information are transferred to them the control interface layer of these household electrical appliances again.As incorrect, then these data do not handled, and do not entered the ACK function.Wait for that net control terminal sends retransmit frames.Network controller is because of obtaining the ACK acknowledgement frame, and enters retransmitting function.
The control interface layer of these household electrical appliances carries out data transaction to resulting control command and valid data, be transferred to the Control Network layer of these household electrical appliances, be transferred to application layer again, the corresponding control command and the actual parameter of controlled these household electrical appliances of application layer thus, these household electrical appliances are carried out corresponding action according to these data messages, after this action is finished, return to the corresponding feedback information of net control terminal, feedback information has been indicated the current state of household electrical appliances up till now.
If network controller does not obtain corresponding feedback information behind a period of time interval, then enter retransmitting function, ask for the feedback information of control this time.
After net control terminal receives feedback information, upgrade the socket of these household electrical appliances, show the running status that these household electrical appliances are current.
This process is that net control terminal is under the situation that meets digital home network communications protocol standard, the once complete communication process that carries out, net control terminal is unique at whole home network ID identifier, so that be different from other home network control terminal, avoid producing and disturbs.
The function of mobile control terminal and flow process:
Mobile control terminal is controlled communicating terminal as one of the intelligent appliance online in system, major function is to carry out communication by wireless mode and intelligent appliance, mobile control terminal can be a remote terminal that meets digital network family communications protocol standard, can carry out exchanges data with communication module.
When the user opened mobile control terminal power supply, the user interface of mobile control terminal will show, and has shown current all household electrical appliances in the family of mobile control terminal place on the user interface.When showing when user interface, mobile network's terminal can be sent a group polling order, and the current state of all intelligent appliances in the requester network is one by one received the state parameter that refers to each household electrical appliances behind the return information.Select the household electrical appliances chart that to control on the user interface, can enter the control interface of these household electrical appliances.
All control options that shown these household electrical appliances on the control interface, selection wants to carry out the option of corresponding control, the application layer program of mobile control terminal obtains its pairing control command and actual parameter from selected control option, again these valid data are carried out the data transaction of mobile terminal Control Network layer, be transferred to mobile terminal control interface layer again, after mobile terminal control interface layer receives the data that mobile terminal Control Network layer transmits, the control command and the actual parameter that obtain are transferred to the Logical Link Management layer, the Logical Link Management layer is packed according to digital home network communications protocol standard to these data again, be transferred to the wireless connections adaptation layer, connect adaptation layer meets this adaptation layer protocol again to this Frame packing, this data frame transfer is gone out by corresponding physical layer.
The communication module of all household electrical appliances that this net control terminal is controlled all receives this Frame, be transferred to the connection adaptation layer, connecting adaptation layer unpacks to this Frame, obtain payload, payload is transferred to the Logical Link Management layer again, and the Logical Link Management layer is unpacked to this payload, and judge its correctness and validity, as correctly, then controlled order and valid data information are transferred to them the control interface layer of these household electrical appliances again.As incorrect, then these data do not handled, and do not entered the ACK function.Wait for that net control terminal sends retransmit frames.Network controller is because of obtaining the ACK acknowledgement frame, and enters retransmitting function.
The control interface layer of these household electrical appliances carries out data transaction to resulting control command and valid data, be transferred to the program of the Control Network layer of these household electrical appliances, be transferred to application layer again, the corresponding control command and the actual parameter of controlled these household electrical appliances of application layer thus, these household electrical appliances are carried out corresponding action according to these data messages, after this action is finished, return to the corresponding feedback information of mobile control terminal, feedback information has been indicated the current state of household electrical appliances up till now.
If mobile controller does not obtain corresponding feedback information behind a period of time interval, then enter retransmitting function, ask for the feedback information of control this time.
After mobile control terminal receives feedback information, upgrade the user interface of these household electrical appliances, show the running status that these household electrical appliances are current.
This process be mobile control terminal under the situation that meets digital home network communications protocol standard, the once complete communication process that carries out.Mobile subscriber terminal has the unique identification id number of oneself, so that be different from other home network control terminal, avoid producing and disturbs.
In order to keep the versatility of mobile control terminal and net control terminal, and make system have the ability of adding new equipment, adopted the data structure that is called as device description file (DeviceFile) to describe home appliance.This device description file (DeviceFile) is called for short device file or " DeviceFile " at this.Every station information home appliance is all preserved the device file of a description self function and order, when new equipment joins in the system, after home appliance receives the device file request command that mobile control terminal or net control terminal send, self device file is sent to mobile control terminal or net control terminal.The device file of in store each electric equipment in mobile control terminal or the net control terminal, mobile control terminal comes which electric equipment is arranged in the display system according to device file, demonstrate certain equipment and have which function, can also control equipment simultaneously, and device file also provides the function of inquiry and display device state.
It all is to obtain in the slave unit file that the control command of icon that mobile control terminal is shown and literal, difference in functionality and state return yard information.In order to adapt to different information household appliances, device file keep general in, also to guarantee completely, can satisfy the multiple demand that the distinct device state shows.In addition, in order to reduce the memory spending of electric equipment, mobile control terminal and net control terminal, satisfy device file and make the requirement of transmitting between information household appliances and mobile control terminal or the net control terminal in wireless or wired mode, device file also should be simple as much as possible.Therefore device file has been taken all factors into consideration versatility, completeness and terseness in design.
The producer's information that has not only comprised equipment in device file has also comprised the order that operation is described, each operation is corresponding of equipment, the state of equipment has been returned information such as code structure.Therefore not only can have those functions by understanding equipment by device file, send order and realize a certain function, and can return the current state of the equipment that obtains the sign indicating number, and show in patterned mode from state.Just make mobile control terminal and net control terminal break away from dependence by device file just, thereby shown intellectuality, personalization and the hommization of device file equipment
For equipment vendors, the visual tool software that can utilize us to provide generates device file.Device file is kept in the memory of equipment.When the user increases a new equipment, once add operation as long as on mobile control terminal and net control terminal, carry out, just can realize control to new equipment.
System requirements is described:
In whole digital family network system, each information household appliances should have the space of oneself to store the device file of itself, in net control terminal and mobile control terminal, to there be enough spaces to store the device file of each information household appliances in the current digital home network, so that can control all information household appliances in this digital home network.
In digital family network system, the approach of transmission equipment file has two kinds: wired mode and wireless mode.Net control terminal and mobile control terminal be by carrying out communication between the communication module of this dual mode and each information household appliances, and device file is transferred to each control terminal by the form of digital home network host-host protocol.
After net control terminal and mobile control terminal receive the device file of some information household appliances, it is analyzed accordingly and handles, generate the control information of these information household appliances, these information household appliances are carried out control corresponding by wireless mode and wired mode.
Therefore, in digital family network system, to there be the communication module of a control terminal and information household appliances to carry out mutual communication at least, realizes the centralized management and the centralized control of digital family network system by wired mode and wireless mode.
The communication format of digital home network:
When in digital home network, having increased a new information household appliances equipment, each control terminal in the current digital home network is if control this information household appliances equipment, the device file of must be earlier from then on obtaining this information household appliances equipment in the information household appliances equipment, it is analyzed and handles, obtain corresponding control information and data message, this device description file must meet the device description protocol specification of device file, could be accepted by each control terminal, and be construed to the data message of wanting.
Device file is a kind of information form file that this cellular system is described, its content mainly comprises the descriptor of the major control function of system, the descriptor of system control language, the descriptor of system mode, and these descriptors converge in the stationary storage unit of device file that a form document is stored in each information household appliances equipment.
When control terminal is wanted this descriptor, will send an information frame of wanting device file to home appliance, this information frame must meet the communication format of the above digital family network system.
The interpolation of information household appliances device file:
In digital family network system, when net control terminal or mobile control terminal when the information household appliances equipment that increases newly is wanted the device file of these information household appliances, send the information frame that a frame is asked for device file by top communication format, the content of this information frame is:
A content of information frame is length radix-minus-one complement and length, increases the unique ID number of information household appliances newly, and next the unique ID number of control terminal is:
(1) if frame number is 0000 data, order data into FFFF, what amount of information the device file of then indicating always have.
(2) if frame number is not to be 0000 data, order data, a certain data message in the device file of then indicating into FFFF.
After this home appliance receives this information frame of first type, its equipment frame number (ID number) that carries out being sent is stored, as the unique identifier of the network of oneself, because the flag bit of the hardware information of the information household appliances equipment that increases newly lock itself is opened, after frame number that receives this equipment and storage, just close the flag bit of hardware information lock, then by the unique ID number of control terminal that this information frame comprises, the aggregate data frame that sends a device file is to this control terminal, and store the ID identifier of this control terminal, represent that this control terminal can control this home appliance.
Receive the Frame of the device file informational capacity that these information household appliances return when control terminal after, send second kind of information frame then, because the data volume of device file is big, and it is accurate in order to guarantee to transmit, control terminal is in the transmission course of device file, by the data total amount device file is divided into several packets by certain transmitted data amount, according to frame number not in the same way information household appliances otherwise with the section data message, receive the information frame of this type that control terminal sends when information household appliances after, judge that according to frame number control terminal wants information to be positioned at the position of device file stationary storage unit, and the information of this element taken out, be put into preposition, and send to control terminal by communication module.When control terminal is received information household appliances signal transmitted Frame, judge errorless after, effective content stores of this information frame is arrived fixing position, want the content of next frame again, after all devices file transfer finishes, deposit the device file of these whole information household appliances in a memory cell of control terminal, control terminal carries out Treatment Analysis to the device file of these information household appliances, demonstrates icon, title and the various parameter of these information household appliances on display interface.
In information frame transmission course at device file, control terminal is checked the data that this information household appliances transmission comes, if incorrect words, just the frame number by last time retransmits, after the number of times that retransmits surpasses certain number of times, just think this device transmission failure.To information household appliances set again, transmit again.
The deletion of information household appliances device file:
When information household appliances can not use or not want with the control of a certain control terminal, need on this control terminal, delete the device file of these information household appliances, select the deletion option on the control terminal, in the menu bar of deletion, find the Show Options of these information household appliances, it is carried out deletion action, after control terminal receives this delete command, find the memory location of the device file of these information household appliances in the memory cell, its all data are deleted.And the update displayed interface, no longer show icon, title and the various parameter of these information household appliances.
In order to realize that in home network different communication subnets are interconnected, use network transmission protocol NTP (NetworkTransport Protocal) to provide and do not have the insecure datagram transmission of connection end to end.It provides burst and recombination function, and finishes and seek the footpath with the difference that the network address UDS of unified distribution has shielded bottom physical communication medium.
NTP datagram format (long measure: byte) as shown in the table.12?????????????????0--242
Wherein the form of header region is as shown in the table.0????????4????????8???????????????????16???????????????????24?????25?????????????31
Version number | Protocol type | Length overall | Original newspaper number | Sign | The sheet skew |
Sink device UDS |
Source device UDS |
Version number: indicate notebook data and report employed NTP version number.NTP version number is 0 at present.
Protocol type: the protocol type that adopt notebook data newspaper data field.
Length overall: the length overall of this NTP datagram (is unit with the byte).Because the length overall territory is 8 bytes, so the maximum length of a NTP datagram is 254 bytes.
For different communication subnets is interconnected, what at first will solve is the network identity that will have the overall situation unified.DHN is that each equipment and the gateway in the whole network all distributes a unique fixing identifier, determines the NTP address with this, and the difference of shielding physical layer, is called " unified Equipment Serial Number (UDS) ".
UDS can accomplish that by the coordinated allocation of a unified standardization body overall situation is unique.
UDS length is 4 bytes, its structure such as following table (length: the position): 3 10 19
Version number | Trading company of factory | Device number |
Wherein version number value is 0 at present.
Trading company of factory is distributed unitedly by standardization body.
Device number is made by oneself by each manufacturer.
In addition, every complete 1 UDS (being 0XFFFF) represents in DHN all devices broadcast transmission in the net.
NTP is equivalent to network layer protocol in home network, its datagram can be transmitted in different physical mediums, therefore will adapt to the frame structure of different physical layers.
The network data newspaper has two kinds of methods by the transmission of physical frame: datagram encapsulation and datagram burst.The former requires datagram length to be not more than physical frame data field lengths all on the transmission path.Obviously, this kind method is difficult to be suitable in native system.
NTP datagram burst: every kind of physical network technology all has the MTU MTU (Maximum Transfer Unit) by its hardware decision, the physical frame length of the maximum that can transmit.In order to make the NTP datagram can be by the physical frames transmission of different sizes, Network Time Protocol provides burst mechanism, is about to a bigger original datagram and is divided into some less parts (sheet) and transmits respectively.
Figure below has shown that NTP original datagram that a data field size is 96 bytes is the situation of burst in the physical network of 52 bytes at MTU:
Header (12 byte) | Data 1 (40 byte) | Data 2 (40 byte) | Data 3 (16 byte) |
(a) the data field size is the NTP original datagram of 96 bytes
Head 1 (12 byte) | Data 1 (40 byte) |
(b) sheet 1 (skew 0)
Head 2 (12 byte) | Data 2 (40 byte) |
(c) sheet 2 (skew 20)
Head 3 (12 byte) | Data 3 (16 byte) |
(d) sheet 3 (skew 40)
The head of each burst are copy from original NTP datagram substantially among the figure, and the new datagrams after having only " sign " and " sheet skew " territory according to burst is rewritten.The side-play amount of each sheet is unit according to the NTP standard with 2 bytes.
Certainly, as the burst that carries out at information source machine place inverse process, stay of two nights machine will be recombinated according to its information of carrying after receiving each sheet.
The NTP datagram is not only carried out burst at information source machine place, because home network is made up of different physical subnets, therefore still has again the possibility of burst at the intersection (gateway) of two kinds of different physical subnets.But datagram is in case by burst, just transmits as data independently, may quilt before arriving the stay of two nights machine burst once more, but never recombinate.
Gateway protocol had not been simplified in gateway stores and reorganization in the middle of the strategy of above-mentioned burst and reorganization required, had alleviated its burden.
Have with burst and the relevant territory of reorganization in the NTP datagram: original newspaper number, sign, sheet skew.
" original newspaper number " is the identifier that the information source machine is given the original datagram before the burst not.Stay of two nights machine judges according to original newspaper number and information source ID which original datagram this sheet belongs to, so that reorganization.During burst, original newspaper number must not add with revising and copies in each new head.The production method of original newspaper number is to keep a global counter in the information source machine, new original datagram of every generation, and counter adds 1, and this value is distributed to this new datagrams.
" sign " length is one, represents that when its value is 0 sheet is not intact, and promptly this original datagram also has subsequent sheet to be passed; When being 1, its value represents that this film is last a slice of an original datagram.In a single day stay of two nights machine receives the sheet of " sign " set, and its " sheet skew " adds that this leaf length promptly is the original datagram length overall.Compare by length sum and the original datagram length that each has been arrived sheet, just whether notebook data reports each sheet here as can be known.
The side-play amount of " sheet skew " expression this film data in the original datagram data field is unit with 2 bytes.
NTP uses the UDS of unified distribution to shield the difference of bottom physical medium, makes the end-to-end transmission of crossing between different physical subnets become possibility.
The footpath notion of seeking in packet switching system refers to seek the process that will divide into groups from information source machine biography toward the transmission path of stay of two nights machine.The DHN structure is as shown below, is divided into each different physical subnets, links to each other indirectly by gateway between each subnet, links to each other with Ethernet between each gateway.
As Figure 15, equipment D1 will send out data to D5, physically must be through the forwarding of gateway 1 and gateway 3.Present problem is, D1 only knows the UDS of D5, has not both known the physical address of D5, does not also know its residing subnet, how does it send?
In addition, will send out data to D2, but D1 also only knows the UDS of D2 as D1, how about does D1 send even if they in same subnet, have physical connection each other?
Network Time Protocol will solve the above problems.
In DHN, the identity of each equipment has two kinds of big types: general website and gateway.The former receives only the NTP datagram of issuing oneself, and the latter is not to being also will handle to the datagram of oneself.Gateway has the resource that general main frame does not have, comprise disposal ability stronger, to the network information solve more, and with the physical connection of other gateway, these all make it play crucial effects seeking in the process of footpath of whole NTP datagram.The NTP layer is undertaken the task of shielding physics network details, and a kind of footpath mechanism of seeking that is independent of physical network is provided.As above figure, DHN seeks the footpath process and divides the footpath of directly seeking between footpath and gateway sought indirectly in the physical subnets network alternately to form.
Known to us, the logical path on the DHN is actual to be connected to form by a section actual physics, a NTP datagram be sent to stay of two nights machine, only need know that the physical address NSA (Next StationAddress) of next website gets final product.For this reason, set equipment location protocol DLP (Device Locate Protol) among the NTP and solved this problem.
Website will send the datagram of a known UDS among the DHN, if it does not know NSA, then sends a DLP datagram to online DLP server, " NSA of the datagram that existing purpose UDS is XXXX why? " answered in request such problem.After obtaining answer, the NSA that this website utilization obtains sends its NTP datagram.
Transmit leg in the said process may not be the information source machine, and the recipient also may not be a stay of two nights machine, and they can be the gateways of transmitting in the middle of carrying out.So-called " DLP server " then must be gateway.General website among the DHN is known to such an extent that be seldom to the information (as the other side's physical address, subnet situation) in the net, and gateway is then known more.But gateway neither omniscient, and this will introduce the notion of " autonomous subnet ".
In DHN, we say that a physical subnets is autonomous, be to say parsing (i.e. mapping) problem that can finish inner UDS and physical address at it, and need not its people bother about, but that it may be understood to external world is less.
The network address in the general networking and the address resolution between physical address have form and non-forms mode.But not forms mode is divided into direct mapping and dynamic binding again.Combine form and dynamic binding dual mode among the DHN.
When a facility registration was gone into a physical subnets, it will register its UDS and physical address on its gateway, oneself write down UDS and physical address on the gateway simultaneously.Like this, gateway just has the UDS and the physical address of armamentarium in this physical subnets, and sets up the form mapping.
When an equipment was not known the NSA of stay of two nights machine in the subnet, it sent the DLP datagram to its DLP server (gateway) and carries out dynamic binding.
And when stay of two nights machine was in this physical subnets, gateway can provide its NSA by the form mapping, otherwise gateway also will oneself carry out its NSA of dynamic binding analysis request again.If the dynamic binding of gateway can obtain the result, then it will send out DLP response data newspaper to former request machine, but the NSA that provides is oneself, wait to receive after the NTP datagram that the result with own dynamic binding mails to the next stop with this datagram again.
The DLP datagram is encapsulated in the NTP datagram and sends, and what " protocol type " territory of NTP datagram represented when value is 3 that its data field carries is the DLP datagram.
The concrete form of DLP datagram is as follows: (length: byte) 1 0--XXXX
When the logo area value is 0X5A5A, the NSA of stay of two nights UDS in the expression request analysis NTP datagram.This moment, return results district content was unimportant, and length can be zero.
When the logo area value is 0XA5A5, the physical address of next website of stay of two nights UDS in the expression request-reply NTP datagram.This moment, return results district content was the NSA that provides.
What deserves to be mentioned is, send that it should also be the part of Network Time Protocol,, do not have its NTP can't operate as normal because it is NTP and physical layer interface service though the DLP datagram is encapsulated in the NTP datagram.
The structure of all things considered DHN is made up of each subnet (various physical medium) and backbone network (Ethernet) physically, and gateway is to connect between subnet and the intermediary between the subnet trunk, and a gateway can connect several subnets simultaneously.
The main body of processing behavior is divided into general website and gateway; Handle to as if the NTP datagram; The source of NTP datagram can be divided into from subnet with from trunk; The content of NTP datagram can be divided into general data and DLP message.The concrete principle that datagram is handled is:
1. general website receives only the NTP datagram (no matter being general data or DLP message) of issuing oneself.When it does not know how to send the NTP datagram on physical layer, send out the DLP request to its gateway, and the NSA that gateway returns is sent its NTP datagram as the target physical address.
2. gateway is when receiving DLP when request of sending from its a subnet inside, and as can find the pairing physical site of its purpose UDS in this subnet, then gateway returns the physical address of this website to DLP as NSA and replys; Otherwise return the physical address of gateway oneself.
3. gateway is when receiving from the General N TP datagram that sends its a subnet inside, and as can find the pairing physical site of its purpose UDS in arbitrary subnet of self-management, then gateway is forwarded to this website with the datagram that receives; Otherwise gateway will be resolved its NSA in trunk online broadcast DLP message request.
4. gateway is when receiving the DLP request of sending from backbone network, and as can find the pairing physical site of its purpose UDS in arbitrary subnet of self-management, then gateway returns oneself physical address to DLP as NSA and replys; Otherwise abandon this DLP request message.
5. gateway is when receiving from General N TP datagram that backbone network is sent, and as can find the pairing physical site of its purpose UDS in arbitrary subnet of self-management, then gateway is forwarded to this website with the datagram that receives; Otherwise abandon this NTP datagram.
Just illustrate the process that the NTP datagram is sought the footpath and transmitted below.
The process that transmits in the subnet:
Will send out the NTP datagram to D2 as D1 among the figure, it does not know its NSA, and will have following process this moment:
1, D1 will be with the UDS of D2 as purpose UDS, is that the destination address of physical frame sends DLP request msg newspaper with the physical address of the Home Network gateway (gateway 1) of oneself record.
2, gateway 1 receives that DLP request msg newspaper finds the physical address of D2 and issue D1 in the mode that DLP replys according to the form of oneself.
3, the D1 NTP datagram that obtains behind the DLP reply data newspaper result is sent oneself as the target physical address is to D2.
The process that transmits between subnet:
Will send out the NTP datagram to D5 as D1 among the figure, it does not know its NSA, and will have following process this moment:
1.D1 will be with the UDS of D5 as purpose UDS, be that the destination address of physical frame sends DLP request msg newspaper with the physical address of the Home Network gateway (gateway 1) of oneself record.
2. gateway 1 is received physical address that can not check D5 after the DLP request msg is reported in the form of oneself, and then gateway 1 is that NSA returns DLP reply data newspaper with the physical address of oneself.
3.D1 the NTP datagram that obtains behind the DLP reply data newspaper NSA is sent oneself as the target physical address is to gateway 1.
4. after gateway 1 was received the NTP datagram of the D1 that sends internally, because its UDS is not oneself, this was not again a DLP datagram, therefore needs it to transmit.Then gateway 1 will the mode with broadcasting send DLP request msg newspaper on the Ethernet that connects external network.
5. gateway 2 and gateway 3 are all received DLP request msg newspaper, but have only gateway 3 just to find the physical address of D5 in oneself form, therefore have only gateway 3 to report to 1 DLP reply data of gateway, and are NSA with the physical address of gateway 3.
6. the gateway 1 NTP datagram that obtains behind the DLP reply data newspaper NSA is sent oneself as the target physical address is to gateway 3.
7. after gateway 3 is received the NTP datagram of the gateway 1 that sends from the outside, find the physical address of D5 and the result is sent this NTP datagram to D5 as the target physical address according to the form of oneself.
Certainly, said process can be simplified, and each website can be set up some buffering areas, and the dynamic binding that carried out of record next time if any same request, can directly take out the result and pick up speed greatly from buffering area.
For a general website, it be as long as the result who obtains dynamic binding from its gateway can carry out the transmission of physical layer, and on earth in which subnet, problems such as forwarding are wanted in the centre as for its stay of two nights machine, it need not be concerned about that without exception these are all handled by gateway.