CN103248562B - A kind of method of device map, control terminal and controlled terminal - Google Patents

A kind of method of device map, control terminal and controlled terminal Download PDF

Info

Publication number
CN103248562B
CN103248562B CN201310152255.5A CN201310152255A CN103248562B CN 103248562 B CN103248562 B CN 103248562B CN 201310152255 A CN201310152255 A CN 201310152255A CN 103248562 B CN103248562 B CN 103248562B
Authority
CN
China
Prior art keywords
terminal
message
data
rcp
controlled
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
CN201310152255.5A
Other languages
Chinese (zh)
Other versions
CN103248562A (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201310152255.5A priority Critical patent/CN103248562B/en
Publication of CN103248562A publication Critical patent/CN103248562A/en
Application granted granted Critical
Publication of CN103248562B publication Critical patent/CN103248562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention is applicable to the communications field, it is provided that a kind of method of device map, controls terminal and is controlled terminal.The method includes: is controlled terminal and sends device enumeration request message to controlling terminal by RCP data message;Controlled the response message that terminal receives the device type list comprising support of control terminal transmission;Controlled terminal and generated the virtual unit corresponding with the device type in the device type list supported according to the device type list supported;Controlled terminal and sent device data request message to controlling terminal by RCP data message;The response message of the device data generated by the equipment to be mapped comprising control terminal controlling terminal reception control terminal transmission;Controlled terminal and device data is supplied to virtual unit, then be supplied to upper layer application by virtual unit.The present invention can be controlled terminal used as oneself equipment own by the equipment of this mapping by certain device map controlled in terminal to controlling in terminal, and therefore the method has versatility.

Description

A kind of method of device map, control terminal and controlled terminal
Technical field
The invention belongs to the communications field, particularly relate to a kind of method of device map, control terminal and controlled Terminal.
Background technology
Video game is a kind of interactive multimedia for entertaining, it is common that instigate electricity consumption to regard as display The electronic game played, game generally can utilize the game paddle being connected to TV to manipulate, wherein TV Being controlled terminal, game paddle is to control terminal.Game paddle would generally comprise multiple button and stick, Each button and stick can be endowed specific function, by pressing these buttons or rotating stick, Operator can control the image on telescreen.
But, video game needs special game paddle (i.e. controlling terminal) to use, and does not has Versatility.
Summary of the invention
A kind of method that the technical problem to be solved is to provide device map, it is intended to solve TV Game needs special control terminal to use, the problem without versatility.
First aspect, it is provided that a kind of method of device map, described method includes:
Controlled terminal and sent device enumeration request message to control by remote control protocol RCP data message Terminal processed, obtains with request and controls the device type list that terminal is supported;
Controlled terminal and received the device type comprising support that control terminal is sent by RCP data message The response message of list;
Controlled terminal and generated the device type list with described support according to the device type list of described support In virtual unit corresponding to device type, so that device map that terminal supports will be controlled to by control terminal;
Controlled terminal and sent device data request message to controlling terminal by RCP data message;
By control terminal receive control terminal by RCP data message send comprise control terminal wait reflect The response message of the device data that jet device generates;
Controlled terminal and described device data is supplied to described virtual unit, then provided by described virtual unit To upper layer application.
Second aspect, it is provided that a kind of terminal that controlled, described controlled terminal and is included that RCP data message sends Module, RCP data message receiver module and processor, wherein,
Described RCP data message sending module sends equipment piece by remote control protocol RCP data message Lift and ask message to controlling terminal, obtain, with request, the device type list that control terminal is supported;
Described RCP data message receiver module receives and controls terminal by comprising that RCP data message sends The response message of the device type list supported;
Described processor generates the device type list with described support according to the device type list of described support In virtual unit corresponding to device type, so that device map that terminal supports will be controlled to by control terminal;
Described RCP data message sending module by RCP data message send device data request message to Control terminal;
Described RCP data message receiver module receives and controls terminal by comprising that RCP data message sends Control the response message of the device data of the equipment to be mapped generation of terminal;
Described device data is supplied to described virtual unit by described processor, then is provided by described virtual unit To upper layer application.
The third aspect, it is provided that a kind of method of device map, described method includes:
Control terminal and receive the device enumeration request message sent by RCP data message by control terminal;
Control terminal and obtain the device type list supported;
Control terminal and will comprise the response message of the device type list of described support by RCP data message It is sent to be controlled terminal, with by being controlled the terminal device type list generation according to described support with described Virtual unit corresponding to device type in the device type list supported, will control the equipment that terminal is supported It is mapped to and is controlled terminal;
Control terminal and receive the device data request message sent by RCP data message by control terminal;
Control terminal and obtain the device data of the equipment to be mapped generation controlling terminal;
Control terminal and by RCP data message, the response message comprising described device data is sent to controlled Terminal processed, to be supplied to described virtual unit by being controlled terminal, then by described virtual by described device data Equipment is supplied to upper layer application.
Fourth aspect, it is provided that a kind of control terminal, described control terminal include RCP data message sending module, RCP data message receiver module and processor, wherein,
Described RCP data message receiver module receives and is controlled terminal by setting that RCP data message sends Standby enumeration request message;
Described processor obtains the device type list supported;
Described RCP data message sending module will comprise the equipment class of described support by RCP data message The response message of type list is sent to be controlled terminal, with by being controlled the terminal equipment class according to described support Type list generates the virtual unit corresponding with the device type in the device type list of described support, controlling The device map that terminal processed is supported is to being controlled terminal;
Described RCP data message receiver module receives and is controlled terminal by setting that RCP data message sends Standby data request information;
Described processor obtains and controls the device data that the equipment to be mapped of terminal generates;
Described RCP data message sending module will comprise the sound of described device data by RCP data message Message is answered to be sent to be controlled terminal, described device data to be supplied to described virtual set by being controlled terminal Standby, then it is supplied to upper layer application by described virtual unit.
In the present invention, owing to being controlled terminal reception control terminal by comprising that RCP data message sends After the response message of the device type list of described support, controlled the terminal device type according to described support List generates the virtual unit corresponding with the device type in the device type list of described support, with by control The device map that terminal is supported is to being controlled terminal;Controlled terminal and received control terminal by RCP datagram After the response message comprising described device data that literary composition sends, controlled terminal and described device data is supplied to Described virtual unit, then it is supplied to upper layer application by described virtual unit.Therefore can be by certain in control terminal Individual device map, to being controlled in terminal, is controlled terminal using the equipment of this mapping as oneself equipment own Using, therefore the method for this device map has versatility, unrelated with the upper layer application being controlled terminal, And interface is unified, conveniently calls, there is good autgmentability, setting of the various possible increase of suitable solution terminal Standby.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for the device map that the embodiment of the present invention one provides.
Fig. 2 is the flow chart of the method for the device map that the embodiment of the present invention two provides.
Fig. 3 is the functional block diagram by control terminal that the embodiment of the present invention three provides.
Fig. 4 is the functional block diagram of the control terminal that the embodiment of the present invention four provides.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and beneficial effect clearer, below in conjunction with accompanying drawing And embodiment, the present invention is further elaborated.Should be appreciated that described herein being embodied as Example only in order to explain the present invention, is not intended to limit the present invention.
In order to technical solutions according to the invention are described, illustrate below by specific embodiment.
The specific embodiment of the invention relates to controlling terminal and being controlled terminal, wherein controls terminal and has to be mapped Equipment, for being sent to be controlled terminal by the device data that equipment to be mapped generates;Controlled terminal to be used for The device map to be mapped of terminal will be controlled to being controlled in terminal.
Embodiment one:
Referring to Fig. 1, the method for the device map that the embodiment of the present invention one provides comprises the following steps:
S101, by control terminal by remote control protocol (Remote Control Protocol, RCP) number Sending device enumeration according to message asks message to controlling terminal, obtains with request and controls the equipment that terminal is supported List of types;
In the embodiment of the present invention one, control the device type supported of terminal include touch screen, audio frequency apparatus, The information input equipments such as vibrator, sensor, GPS.
S102, control terminal are received the device enumeration request sent by RCP data message by control terminal and disappear After breath, control terminal and obtain the device type list supported;
S103, control terminal will comprise the response of the device type list of described support by RCP data message Message is sent to be controlled terminal;
S104, controlled terminal and receive and control terminal and comprise described support by what RCP data message sent After the response message of device type list, controlled terminal according to the device type list of described support generate with The virtual unit that device type in the device type list of described support is corresponding, will control what terminal was supported Device map is to being controlled terminal;
S105, by control terminal by RCP data message send device data request message to control terminal;
S106, control terminal are received the device data request sent by RCP data message by control terminal and disappear After breath, control terminal and obtain the device data of the equipment to be mapped generation controlling terminal;
The response message comprising described device data is sent to by S107, control terminal by RCP data message Controlled terminal;
S108, by control terminal receive control terminal comprise described number of devices by what RCP data message sent According to response message after, controlled terminal and described device data be supplied to described virtual unit, then by described Virtual unit is supplied to upper layer application;
In the embodiment of the present invention one, RCP data message includes RCP header and RCP data, and RCP reports Head includes type of message, command type and data length, and type of message includes request message and response message, Command type includes device enumeration order, device parameter order and device data order, and described device enumeration please Seeking the type of message in message is request message, and command type is device enumeration order, described in comprise described The type of message of the response message of the device type list held is in response to message, and command type is device enumeration life Order, the type of message in described device data request message is request message, and command type is device parameter life Order, described in comprise described device data the type of message of response message be in response to message, command type is to set Standby data command.
In the embodiment of the present invention one, after S108, described method can also comprise the following steps:
After being made to be finished virtual unit by the upper layer application controlling terminal, controlled virtual described in terminal log-down setting Standby;
Controlled terminal by RCP data message to the request message controlling terminal transmission revoked apparatus;
Control terminal and receive the request being controlled the described revoked apparatus that terminal is sent by RCP data message After message, nullify the equipment supported and map to by control terminal, and by RCP data message to being controlled Terminal returns the response message of deregistration.
In the embodiment of the present invention one, sent out by RCP data message owing to controlling terminal reception control terminal After the response message of device type list comprising described support sent, controlled terminal according to described support Device type list generates the virtual unit corresponding with the device type in the device type list of described support, With the device map by controlling terminal support to being controlled terminal;Controlled terminal reception control terminal to pass through After the response message comprising described device data that RCP data message sends, controlled terminal by described equipment Data are supplied to described virtual unit, then are supplied to upper layer application by described virtual unit.Therefore can will control Certain device map in terminal, to being controlled in terminal, is controlled terminal using the equipment of this mapping as oneself Equipment itself uses, and therefore the method for this device map has versatility, and is controlled the upper of terminal Layer application is unrelated, and interface is unified, conveniently calls, has good autgmentability, and suitable solution terminal is various The equipment that may increase.
Embodiment two:
Referring to Fig. 2, the method for the device map that the embodiment of the present invention two provides is in the embodiment of the present invention one Increase following steps before S101 in the method for the device map provided:
S201, control terminal send broadcast request by RCP data message to the terminal that controlled of global field net Message, described broadcast request message is used for searching suitably by control terminal;
S202, the described broadcast request sent by RCP data message by control terminal reception control terminal are disappeared After breath, send response message by RCP data message to controlling terminal;
S203, control after terminal receives and controlled the response message that terminal is sent by RCP data message, to lead to Crossing RCP data message and sent certification solicited message to controlling terminal, request controls to connect;
S204, the certification solicited message sent by RCP data message by control terminal reception control terminal After, described certification solicited message is authenticated, by RCP data message to controlling terminal after certification success Send response message.
In the embodiment of the present invention two, S203 particularly as follows:
Control after terminal receives and controlled the response message that terminal is sent by RCP data message, stochastic generation First data X, use the first shared key Ks to be encrypted the first data X, will after encryption the The unique identifier of one data X and control terminal sends certification by RCP data message to by control terminal Solicited message, described first shared key Ks is to control terminal and controlled the key that terminal is shared;Described Type of message in certification solicited message is request message, and command type is authentication command, RCP data portion Dividing front 4 bytes is to control the unique identifier of terminal, and remaining part is shared key.
In the embodiment of the present invention two, S204 particularly as follows:
Controlled after terminal receives and control the certification solicited message that terminal is sent by RCP data message, use The first data X after encryption are decrypted and obtain the first data X by the first shared key Ks, then make Being encrypted the first data X+D by the first shared key Ks, wherein D is for controlling terminal and being controlled eventually The fixed value of end agreement;Meanwhile, stochastic generation the second data Y, use the first shared key Ks to second Data Y are encrypted, by the second data Y after encryption, the first data X+D after encryption and quilt The unique identifier controlling terminal sends response message by RCP data message to controlling terminal;Described response Type of message in message is in response to message, and command type is authentication command, 4 bytes before RCP data division For being controlled the unique identifier of terminal, rear 4 bytes are the first data X+D after encryption, last 4 words Joint is the second data Y after encryption.
In the embodiment of the present invention two, after S204, described method is further comprising the steps of:
S205, control after terminal receives and controlled the response message that terminal is sent by RCP data message, to make By the first shared key Ks, the first data X+D after the second data Y after encryption and encryption are carried out Deciphering, calculates the value of first data X+ the second data Y, then re-uses the first shared key Ks to meter The result calculated is encrypted;
S206, control terminal will encryption after calculating result by RCP data message to by control terminal send out Send request message;Type of message in described solicited message is request message, and command type is authentication command, Before RCP data division, 4 bytes are to control the unique identifier of terminal, and rear 4 bytes are the first number after encryption Value according to X+ the second data Y.
S207, controlled after terminal receives and control the request message that terminal is sent by RCP data message, to make Being decrypted data by the first shared key Ks, then checking result of calculation is the most correct, if calculating knot Fruit is correct, then stochastic generation the second shared key Ka, and it is close to use the first shared key Ks to share second Key Ka is encrypted;
S208, controlled terminal and by the second shared key Ka after encryption and controlled unique mark of terminal Know symbol and send response message, wherein, described second shared key by RCP data message to controlling terminal Ka is to control terminal and controlled the key talked with for this that terminal is shared;Report in described response message Literary composition type is in response to message, and command type is authentication command, and before RCP data division, 4 bytes are to be controlled eventually The unique identifier of end, rear 4 bytes are the second shared key Ka of encryption.
After S208, the RCP data division of all RCP data messages is all through the second shared key Ka is encrypted.
In the embodiment of the present invention two, described in the method for the device map of the embodiment of the present invention one offer Control terminal and receive the request message being controlled the described revoked apparatus that terminal is sent by RCP data message After, nullify the equipment supported and map to by control terminal, and by RCP data message to being controlled terminal Following steps are also increased after the step of the response message returning deregistration:
After S209, control terminal complete being controlled the operation of terminal, control terminal by RCP data message Solicited message is exited to being controlled terminal transmission;
S2010: after being controlled to exit solicited message described in terminal reception, clear up corresponding resource, and pass through RCP data message sends response message to controlling terminal.
In the embodiment of the present invention two, the concrete form of RCP data message can be as shown in table 1:
RCP header RCP data
Table 1
Wherein, RCP header format can be as shown in table 2:
Table 2
The meaning of each field is as follows:
The version of Ver:RCP;
Type: type of message, can be divided into 2 classes, including:
A, request message, macrodefinition is: REQUEST;
B, response message, macrodefinition is: REPLY;
Cmd: command type, can be divided into 4 classes, including:
A, authentication command
B, device enumeration order
C, device parameter order
D, device data order
ErrorCode: type of error, can be divided into 2 classes, including:
A, order run succeeded, and macrodefinition is: OK;
B, order perform mistake, and macrodefinition is: ERROR;
Length: data length, does not include header;
Digest: to whole data message calculate verification and.
Wherein, the message of RCP data message is divided into four types:
TYPE_AUTH: message identifying.
When being authenticated, the first character joint of data field will be as AUTH_PHASE, and labelling is current The authentication phase carried out.Subsequent byte, according to the description in certification mutual stage, is entered by the data in corresponding stage Row is filled.
TYPE_DEV_LIST: device enumeration message.
When carrying out device enumeration, the list of devices of return wraps in data field and lists each equipment successively. By character between each two facility information ' 0 ' separate.
TYPE_DEV_PARA: device parameter message.
When carrying out device parameter request, the data message of return is in data segment first character feast-brand mark bright equipment class Type, byte behind is according to the device parameter data structure pad device parameter specified.
TYPE_DEV_DATA: device data message.
When returning equipment data, the data message of return in the data segment bright device type of first character feast-brand mark, Byte behind is filled according to the device data data structure specified.
RCP data field:
Data length:
RCP determines the length of data field by the Length field of header, meanwhile, in each data Afterbody all can fill the ’ 0 ' character of not more than 8 bytes, to guarantee the integral multiple that data length is 8.
2. data check:
After the content of data segment is the most ready, it will the Digest field of header is set to full 0, Then verifying whole data message, algorithm verifies and consistent with IP.
3. data form:
If without specified otherwise, all data forms are all binary data, direct corresponding each item data structure. The syllable sequence of each item data structure all uses network bytes sequence.
4. data encryption:
In authentication phase, the data field of RCP is plaintext transmission.But after certification success, RCP's The key using certification to consult out is encrypted, to guarantee safety by all data interactions.
In the embodiment of the present invention two, due to certification success after, the RCP of all RCP data messages Data division all passes through the second shared key Ka consulting out and is encrypted, and is therefore possible to prevent network to detect Listen, Replay Attack, password are guessed, follow the tracks of address attack etc., thus ensure that control terminal and controlled Communication security between terminal.
Embodiment three:
Referring to Fig. 3, the terminal that controlled that the embodiment of the present invention three provides includes: RCP data message sends Module 11, RCP data message receiver module 12 and processor 13, wherein,
RCP data message sending module 11 sends device enumeration by remote control protocol RCP data message Request message is given and is controlled terminal, obtains with request and controls the device type list that terminal is supported;
RCP data message receiver module 12 receive control terminal by RCP data message send comprise prop up The response message of the device type list held;
Processor 13 generates the device type list with described support according to the device type list of described support In virtual unit corresponding to device type, so that device map that terminal supports will be controlled to by control terminal;
RCP data message sending module 11 sends device data request message to control by RCP data message Terminal processed;
RCP data message receiver module 12 receives control terminal and comprises control by what RCP data message sent The response message of the device data that the equipment to be mapped of terminal processed generates;
Described device data is supplied to described virtual unit by processor 13, then is supplied to by described virtual unit Upper layer application.
In the embodiment of the present invention three, described device data is supplied to described virtual unit by described processor 13, After being supplied to upper layer application by described virtual unit again, also include:
After being made to be finished virtual unit by the upper layer application controlling terminal, described virtual set nullified by processor 13 Standby;
RCP data message sending module 11 sends revoked apparatus by RCP data message to controlling terminal Request message, maps to by control terminal with the equipment supported by control terminal log-down.
In the embodiment of the present invention three, described RCP data message sending module 11 is by remote control protocol RCP Before data message transmission device enumeration request message is to controlling terminal, also include:
RCP data message receiver module 12 is received and controls terminal and looked into by being used for of sending of RCP data message Look for and suitably controlled terminal broadcast request message;
RCP data message sending module 11 sends response message by RCP data message to controlling terminal;
RCP data message receiver module 12 receives control terminal please by the certification that RCP data message sends Seek information;
Described certification solicited message is authenticated by processor 13, and after certification success, RCP data message sends Module 11 sends response message by RCP data message to controlling terminal.
In the embodiment of the present invention three, described certification solicited message is authenticated by described processor 13, and certification becomes After merit, RCP data message sending module 11 sends response message tool by RCP data message to controlling terminal Body is:
The certification solicited message that the control terminal received is sent by RCP data message, processor 13 use the first shared key Ks to be decrypted the first data X after encryption obtains the first data X, Then using the first shared key Ks to be encrypted the first data X+D, wherein D is for controlling terminal and quilt Control the fixed value of terminal agreement;Meanwhile, stochastic generation the second data Y, use the first shared key Ks Second data Y are encrypted, RCP data message sending module 11 will encryption after the second data Y, The first data X+D after encryption and controlled the unique identifier of terminal by RCP data message to control Terminal processed sends response message, and wherein said certification solicited message comprises the first data X after encryption and control The unique identifier of terminal processed, described first shared key Ks is to control terminal and shared by controlling terminal Key;
In the embodiment of the present invention three, described certification solicited message is authenticated by described processor 13, and certification becomes After merit RCP data message sending module 11 by RCP data message to control terminal send response message it After, also include:
The request that RCP data message receiver module 12 reception control terminal is sent by RCP data message disappears Breath;Wherein, described request message comprises the result of the calculating after encryption, the result of the calculating after described encryption Refer to that controlling terminal uses the first shared key Ks to the after the second data Y after encryption and encryption One data X+D are decrypted, and calculate the value of first data X+ the second data Y, then re-use first Shared key Ks the result calculated is encrypted after the result of calculating;
Processor 13 uses the first shared key Ks to be decrypted data, and then whether checking result of calculation Correctly, if result of calculation is correct, then stochastic generation the second shared key Ka, and use the first shared key Second shared key Ka is encrypted by Ks;
RCP data message sending module 11 is by the second shared key Ka after encryption and is controlled terminal Unique identifier sends response message, afterwards, all RCP numbers by RCP data message to controlling terminal All being encrypted through the second shared key Ka according to the RCP data division of message, wherein, described second altogether Enjoying key Ka is to control terminal and controlled the key talked with for this that terminal is shared.
In the embodiment of the present invention three, RCP data message includes RCP header and RCP data, and RCP reports Head includes type of message, command type and data length, and type of message includes request message and response message, Command type includes device enumeration order, device parameter order and device data order, and described device enumeration please Seeking the type of message in message is request message, and command type is device enumeration order, described in comprise described The type of message of the response message of the device type list held is in response to message, and command type is device enumeration life Order, the type of message in described device data request message is request message, and command type is device parameter life Order, described in comprise described device data the type of message of response message be in response to message, command type is to set Standby data command.
In the embodiment of the present invention three, control owing to being received by the RCP data message receiver module controlling terminal After the response message of device type list comprising described support that terminal is sent by RCP data message, quilt The processor controlling terminal generates the device type row with described support according to the device type list of described support The virtual unit that device type in table is corresponding, will control device map that terminal supports to by control terminal; Received by the RCP data message receiver module controlling terminal and control what terminal was sent by RCP data message After comprising the response message of described device data, by the processor controlling terminal, described device data is supplied to Described virtual unit, then it is supplied to upper layer application by described virtual unit.Therefore can be by certain in control terminal Individual device map, to being controlled in terminal, is controlled terminal using the equipment of this mapping as oneself equipment own Using, therefore the method for this device map has versatility, unrelated with the upper layer application being controlled terminal, And interface is unified, conveniently calls, there is good autgmentability, setting of the various possible increase of suitable solution terminal Standby.And owing to, after certification success, the RCP data division of all RCP data messages all passes through negotiation The second shared key Ka out is encrypted, and is therefore possible to prevent network intercepting, Replay Attack, password Word conjecture, tracking address attack etc., thus ensure that the communication security controlling terminal and being controlled between terminal.
Embodiment four:
Referring to Fig. 4, the control terminal that the embodiment of the present invention four provides includes: RCP data message sends mould Block 21, RCP data message receiver module 22 and processor 23, wherein,
RCP data message receiver module 22 receives and is controlled the equipment that terminal is sent by RCP data message Enumeration request message;
Processor 23 obtains the device type list supported;
RCP data message sending module 21 will comprise the device type of described support by RCP data message The response message of list is sent to be controlled terminal, with by being controlled the terminal device type according to described support List generates the virtual unit corresponding with the device type in the device type list of described support, with by control The device map that terminal is supported is to being controlled terminal;
RCP data message receiver module 22 receives and is controlled the equipment that terminal is sent by RCP data message Data request information;
Processor 23 obtains and controls the device data that the equipment to be mapped of terminal generates;
RCP data message sending module 21 will comprise the response of described device data by RCP data message Message is sent to be controlled terminal, described device data is supplied to described virtual unit by by control terminal, It is supplied to upper layer application again by described virtual unit.
In the embodiment of the present invention four, described RCP data message sending module 21 is by RCP data message It is sent to be controlled terminal by the response message comprising described device data, to be set described by by control terminal Standby data are supplied to described virtual unit, then after being supplied to upper layer application by described virtual unit, also include:
RCP data message receiver module 22 receives and is controlled the cancellation that terminal is sent by RCP data message The request message of equipment;
Processor 23 is nullified the equipment supported and is mapped to by control terminal;
RCP data message sending module 21 returns deregistration by RCP data message to by control terminal Response message.
In the embodiment of the present invention four, described RCP data message receiver module 22 receives and is led to by control terminal Before crossing the device enumeration request message that RCP data message sends, also include:
RCP data message sending module 21 is sent out to the terminal that controlled of global field net by RCP data message Broadcast request message, described broadcast request message is sent to be used for searching suitably by control terminal;
RCP data message receiver module 22 receives and is controlled the response that terminal is sent by RCP data message Message;
RCP data message sending module 21 is asked to being controlled terminal transmission certification by RCP data message Information, request controls to connect, and to be authenticated described certification solicited message by by control terminal, certification becomes Response message is sent by RCP data message to controlling terminal after merit.
In the embodiment of the present invention four, described RCP data message sending module 21 is by RCP data message To by control terminal send certification solicited message, request control connect particularly as follows:
Processor 23 stochastic generation the first data X, use the first shared key Ks to carry out the first data X Encryption, RCP data message sending module 21 is by the first data X after encryption and controls the unique of terminal Identifier sends certification solicited message, described first shared key by RCP data message to by control terminal Ks is to control terminal and controlled the key that terminal is shared.
In the embodiment of the present invention four, described by control terminal described certification solicited message is authenticated, recognize After demonstrate,proving successfully by RCP data message after controlling terminal transmission response message, also include:
RCP data message receiver module 22 receives and is controlled the response that terminal is sent by RCP data message After message, after processor 23 uses the first shared key Ks to the second data Y after encryption and encryption The first data X+D be decrypted, calculate the value of first data X+ the second data Y, then re-use The result calculated is encrypted by the first shared key Ks;
The result of the calculating after encryption is passed through RCP data message to quilt by RCP data message sending module 21 Control terminal and send request message, to generate the second shared key Ka by being controlled terminal, wherein, described the Two shared keys Ka are to control terminal and controlled the key talked with for this that terminal is shared.
In the embodiment of the present invention four, RCP data message includes RCP header and RCP data, and RCP reports Head includes type of message, command type and data length, and type of message includes request message and response message, Command type includes device enumeration order, device parameter order and device data order, and described device enumeration please Seeking the type of message in message is request message, and command type is device enumeration order, described in comprise described The type of message of the response message of the device type list held is in response to message, and command type is device enumeration life Order, the type of message in described device data request message is request message, and command type is device parameter life Order, described in comprise described device data the type of message of response message be in response to message, command type is to set Standby data command.
In the embodiment of the present invention four, pass through RCP owing to controlling the RCP data message sending module of terminal The response message of the device type list comprising described support is sent to be controlled terminal by data message, with by Controlled terminal to generate in the device type list with described support according to the device type list of described support The virtual unit that device type is corresponding, with the device map by controlling terminal support to being controlled terminal;Control The RCP data message sending module of terminal will comprise the response of described device data by RCP data message Message is sent to be controlled terminal, described device data is supplied to described virtual unit by by control terminal, It is supplied to upper layer application again by described virtual unit.Therefore can be by certain device map in control terminal to quilt Control in terminal, controlled terminal and the equipment of this mapping is used, therefore as oneself equipment own The method of this device map has versatility, unrelated with the upper layer application being controlled terminal, and interface is unified, Conveniently call, there is good autgmentability, the various equipment that may increase of suitable solution terminal.And due to After certification success, the RCP data division of all RCP data messages all passes through consult out second altogether Enjoy key Ka to be encrypted, be therefore possible to prevent the conjecture of network intercepting, Replay Attack, password, follow the tracks of Address attack etc., thus ensure that the communication security controlling terminal and being controlled between terminal.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is Can instruct relevant hardware by program to complete, described program can be stored in a computer-readable Taking in storage medium, described storage medium, such as ROM/RAM, disk, CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this Any amendment, equivalent and the improvement etc. made within bright spirit and principle, should be included in the present invention Protection domain within.

Claims (10)

1. the method for a device map, it is characterised in that described method includes:
Controlled terminal and sent device enumeration request message to control by remote control protocol RCP data message Terminal processed, obtains with request and controls the device type list that terminal is supported;
Controlled terminal and received the device type comprising support that control terminal is sent by RCP data message The response message of list;
Controlled terminal and generated the device type list with described support according to the device type list of described support In virtual unit corresponding to device type, so that device map that terminal supports will be controlled to by control terminal;
Controlled terminal and sent device data request message to controlling terminal by RCP data message;
By control terminal receive control terminal by RCP data message send comprise control terminal wait reflect The response message of the device data that jet device generates;
Controlled terminal and described device data is supplied to described virtual unit, then provided by described virtual unit To upper layer application;
Wherein, described RCP data message includes RCP header and RCP data, and RCP header includes message Type, command type and data length, type of message includes request message and response message, command type bag Include device enumeration order, device parameter order and device data order.
2. the method for claim 1, it is characterised in that described by control terminal by described number of devices According to being supplied to described virtual unit, then after being supplied to upper layer application by described virtual unit, described method is also Including:
After being made to be finished virtual unit by the upper layer application controlling terminal, controlled virtual described in terminal log-down setting Standby;
By control terminal by RCP data message to control terminal send revoked apparatus request message, with by The equipment that control terminal log-down is supported maps to by control terminal.
3. the method for claim 1, it is characterised in that the described terminal that controlled is by remotely controlling Before agreement RCP data message transmission device enumeration request message is to controlling terminal, described method also includes:
By control terminal receive control terminal by RCP data message send the most controlled for searching Terminal broadcast processed request message;
Controlled terminal and sent response message by RCP data message to controlling terminal;
Controlled terminal and received the certification solicited message that control terminal is sent by RCP data message;
Controlled terminal described certification solicited message is authenticated, by RCP data message after certification success Response message is sent to controlling terminal.
4. method as claimed in claim 3, it is characterised in that described controlled terminal please to described certification Information is asked to be authenticated, concrete to controlling terminal transmission response message by RCP data message after certification success For:
The certification solicited message sent by RCP data message for the control terminal received, is controlled eventually The first data X after encryption are decrypted and obtain the first data X by end use the first shared key Ks, Then using the first shared key Ks to be encrypted the first data X+D, wherein D is for controlling terminal and quilt Control the fixed value of terminal agreement;Meanwhile, stochastic generation the second data Y, use the first shared key Ks Second data Y are encrypted, by the second data Y after encryption, the first data X+D after encryption Response message is sent by RCP data message to controlling terminal, wherein with by the unique identifier controlling terminal Described certification solicited message comprises the first data X after encryption and controls the unique identifier of terminal, described First shared key Ks is to control terminal and controlled the key that terminal is shared;
Described controlled terminal and described certification solicited message is authenticated, by RCP data after certification success Message is after controlling terminal transmission response message, and described method also includes:
Controlled terminal and received the request message that control terminal is sent by RCP data message;Wherein, described Request message comprises the result of the calculating after encryption, and the result of the calculating after described encryption refers to that controlling terminal makes By the first shared key Ks, the first data X+D after the second data Y after encryption and encryption are carried out Deciphering, calculates the value of first data X+ the second data Y, then re-uses the first shared key Ks to meter The result calculated be encrypted after the result of calculating;
Being controlled terminal uses the first shared key Ks to be decrypted data, and then checking result of calculation is No correctly, if result of calculation is correct, then stochastic generation the second shared key Ka, and use the first shared key Second shared key Ka is encrypted by Ks;
Controlled the terminal unique identifier by the second shared key Ka after encryption with by control terminal to lead to Cross RCP data message and send response message, afterwards, the RCP of all RCP data messages to controlling terminal Data division is all encrypted through the second shared key Ka, and wherein, described second shared key Ka is control Terminal processed and the key for this talked with shared by controlling terminal.
5. one kind by control terminal, it is characterised in that described by control terminal include that RCP data message is sent out Send module, RCP data message receiver module and processor, wherein,
Described RCP data message sending module sends equipment piece by remote control protocol RCP data message Lift and ask message to controlling terminal, obtain, with request, the device type list that control terminal is supported;
Described RCP data message receiver module receives and controls terminal by comprising that RCP data message sends The response message of the device type list supported;
Described processor generates the device type list with described support according to the device type list of described support In virtual unit corresponding to device type, so that device map that terminal supports will be controlled to by control terminal;
Described RCP data message sending module by RCP data message send device data request message to Control terminal;
Described RCP data message receiver module receives and controls terminal by comprising that RCP data message sends Control the response message of the device data of the equipment to be mapped generation of terminal;
Described device data is supplied to described virtual unit by described processor, then is provided by described virtual unit To upper layer application;
Wherein, described RCP data message includes RCP header and RCP data, and RCP header includes message Type, command type and data length, type of message includes request message and response message, command type bag Include device enumeration order, device parameter order and device data order.
6. the method for a device map, it is characterised in that described method includes:
Control terminal and receive the device enumeration request message sent by RCP data message by control terminal;
Control terminal and obtain the device type list supported;
Control terminal and will comprise the response message of the device type list of described support by RCP data message It is sent to be controlled terminal, with by being controlled the terminal device type list generation according to described support with described Virtual unit corresponding to device type in the device type list supported, will control the equipment that terminal is supported It is mapped to and is controlled terminal;
Control terminal and receive the device data request message sent by RCP data message by control terminal;
Control terminal and obtain the device data of the equipment to be mapped generation controlling terminal;
Control terminal and by RCP data message, the response message comprising described device data is sent to controlled Terminal processed, to be supplied to described virtual unit by being controlled terminal, then by described virtual by described device data Equipment is supplied to upper layer application;
Wherein, described RCP data message includes RCP header and RCP data, and RCP header includes message Type, command type and data length, type of message includes request message and response message, command type bag Include device enumeration order, device parameter order and device data order.
7. method as claimed in claim 6, it is characterised in that described control terminal passes through RCP data The response message comprising described device data is sent to be controlled terminal by message, with by being controlled terminal by institute State device data and be supplied to described virtual unit, then after being supplied to upper layer application by described virtual unit, institute Method of stating also includes:
Control terminal and receive the request message being controlled the revoked apparatus that terminal is sent by RCP data message;
The equipment that control terminal log-down is supported maps to by control terminal;
Control terminal by RCP data message to being controlled the response message of terminal return deregistration.
8. method as claimed in claim 6, it is characterised in that described control terminal receives and controlled terminal By before the device enumeration request message that RCP data message sends, described method also includes:
Control terminal and send broadcast request message by RCP data message to the terminal that controlled of global field net, Described broadcast request message is used for searching suitably by control terminal;
Control terminal and receive the response message sent by RCP data message by control terminal;
Controlling terminal and sent certification solicited message by RCP data message to controlling terminal, request controls even Connect, described certification solicited message is authenticated by by control terminal, by RCP data after certification success Message sends response message to controlling terminal.
9. method as claimed in claim 8, it is characterised in that described control terminal passes through RCP data Message to by control terminal send certification solicited message, request control connect particularly as follows:
Control terminal stochastic generation the first data X, use the first shared key Ks that the first data X are carried out Encryption, will encryption after the first data X and control terminal unique identifier by RCP data message to Being controlled terminal and send certification solicited message, described first shared key Ks is to control terminal and controlled eventually The key that end is shared;
Described controlled terminal and described certification solicited message is authenticated, by RCP data after certification success Message is after controlling terminal transmission response message, and described method also includes:
Control after terminal receives and controlled the response message that terminal is sent by RCP data message, use first The first data X+D after the second data Y after encryption and encryption are decrypted by shared key Ks, Wherein D is to control terminal and controlled the fixed value of terminal agreement;Calculate first data X+ the second data The value of Y, then re-uses the first shared key Ks and is encrypted the result calculated;
Control terminal will encryption after calculating result by RCP data message to by control terminal send please Seek message, to be generated the second shared key Ka, wherein, described second shared key Ka by by control terminal It is to control terminal and controlled the key talked with for this that terminal is shared.
10. one kind controls terminal, it is characterised in that described control terminal includes that RCP data message sends mould Block, RCP data message receiver module and processor, wherein,
Described RCP data message receiver module receives and is controlled terminal by setting that RCP data message sends Standby enumeration request message;
Described processor obtains the device type list supported;
Described RCP data message sending module will comprise the equipment class of described support by RCP data message The response message of type list is sent to be controlled terminal, with by being controlled the terminal equipment class according to described support Type list generates the virtual unit corresponding with the device type in the device type list of described support, controlling The device map that terminal processed is supported is to being controlled terminal;
Described RCP data message receiver module receives and is controlled terminal by setting that RCP data message sends Standby data request information;
Described processor obtains and controls the device data that the equipment to be mapped of terminal generates;
Described RCP data message sending module will comprise the sound of described device data by RCP data message Message is answered to be sent to be controlled terminal, described device data to be supplied to described virtual set by being controlled terminal Standby, then it is supplied to upper layer application by described virtual unit;
Wherein, described RCP data message includes RCP header and RCP data, and RCP header includes message Type, command type and data length, type of message includes request message and response message, command type bag Include device enumeration order, device parameter order and device data order.
CN201310152255.5A 2013-04-27 2013-04-27 A kind of method of device map, control terminal and controlled terminal Active CN103248562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310152255.5A CN103248562B (en) 2013-04-27 2013-04-27 A kind of method of device map, control terminal and controlled terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310152255.5A CN103248562B (en) 2013-04-27 2013-04-27 A kind of method of device map, control terminal and controlled terminal

Publications (2)

Publication Number Publication Date
CN103248562A CN103248562A (en) 2013-08-14
CN103248562B true CN103248562B (en) 2016-08-17

Family

ID=48927791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310152255.5A Active CN103248562B (en) 2013-04-27 2013-04-27 A kind of method of device map, control terminal and controlled terminal

Country Status (1)

Country Link
CN (1) CN103248562B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741464B (en) * 2020-07-22 2021-04-09 深圳Tcl新技术有限公司 Device connection method, master control device, controlled device, control system and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7634263B2 (en) * 2006-01-30 2009-12-15 Apple Inc. Remote control of electronic devices
CN101674110A (en) * 2009-10-21 2010-03-17 中兴通讯股份有限公司 Method for implementing desktop sharing and control of mobile terminals and mobile terminal
CN102880416B (en) * 2012-08-31 2015-02-11 广东欧珀移动通信有限公司 Remote control unlocking method for mobile equipment in remote control protocol (RCP) communication process
CN102890609B (en) * 2012-09-12 2016-03-30 广东欧珀移动通信有限公司 A kind of mobile terminal selects the method for webpage in RCP communication process
CN103024011B (en) * 2012-12-03 2016-03-02 广东欧珀移动通信有限公司 A kind of method and system of control MHL playback equipment

Also Published As

Publication number Publication date
CN103248562A (en) 2013-08-14

Similar Documents

Publication Publication Date Title
WO2018176781A1 (en) Information sending method, information receiving method, apparatus, and system
CN111193695B (en) Encryption method and device for third party account login and storage medium
CN109600223B (en) Verification method, activation method, device, equipment and storage medium
CN106453330B (en) A kind of identity authentication method and system
WO2018014723A1 (en) Key management method, apparatus, device and system
US20100332845A1 (en) Information processing server, information processing apparatus, and information processing method
CN104836664B (en) A kind of methods, devices and systems executing business processing
US9635018B2 (en) User identity verification method and system, password protection apparatus and storage medium
US20150319173A1 (en) Co-verification method, two dimensional code generation method, and device and system therefor
CN104980397B (en) Instant communicating method, system and terminal
CN109756758A (en) Live-broadcast control method and device
EP4054221A1 (en) Key agreement method and electronic device
CN106845177A (en) Cipher management method and system
CN112533202B (en) Identity authentication method and device
CN104954126B (en) Sensitive operation verification method, device and system
CN104393994B (en) Audio data secure transmission method, system and terminal
CN104768153B (en) Send, receive the method and its wifi terminals of network configuration information
US20180115558A1 (en) Fast multicast messaging encryption and authentication
CN112968971A (en) Method and device for establishing session connection, electronic equipment and readable storage medium
CN107154935A (en) service request method and device
CN103281354B (en) A kind of method of remote multi-media control, control terminal and by control terminal
CN108848413A (en) Anti-replay-attack system, method, apparatus and the storage medium of video
CN109525666A (en) A kind of data back up method and mobile terminal
CN106534877A (en) Method and device for sending media stream
CN103248562B (en) A kind of method of device map, control terminal and controlled terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Shennalu Industrial Science and Technology Park building 24, South 1 layer, 3-5 layer, 1-4 layer 28 North Building

Applicant after: TP-LINK Technologies Co., Ltd.

Address before: 2, 1-6 floor, South District, Pingshan Industrial Zone, Taoyuan street, Nanshan District, Guangdong, Shenzhen 518055, China

Applicant before: Shenzhen TP-Link Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SHENZHEN TP-LINK TECHNOLOGY CO., LTD. TO: TP-LINK TECHNOLOGIES CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant