Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
Referring to Fig. 1, be the method indicative flowchart that mirror image between controlled device of the present invention and remote controller with touch screen is synchronizeed, it comprises the following steps:
Step 101, set up wireless connections between remote controller with touch screen and controlled device.
Increase webpage synchronous applications option in the menu of remote controller with touch screen, when realizing that between controlled device and remote controller with touch screen, webpage is synchronizeed, the user can carry out catalogue selection, the synchronous applications of entering the Web page.
After the synchronous applications of entering the Web page, remote controller with touch screen and controlled device carry out wireless connections, particularly, can carry out short-distance wireless (wifi, wireless fidelity) connection or bluetooth connection etc.; Connect if set up bluetooth, at remote controller with touch screen and controlled device, the bluetooth linkage unit is set respectively, data mutual between remote controller with touch screen and controlled device, all based on Bluetooth protocol, are carried out sending and receiving by the bluetooth linkage unit; Set up that wifi is connected or bluetooth is connected to that those skilled in the art easily realize at remote controller with touch screen and controlled device, exceed and repeat here.
Step 102, remote controller with touch screen receives the user by the web page address of the touch-screen input of this remote controller with touch screen, obtains web page contents according to web page address from network side and is shown; And web page address is sent to controlled device.
Also consult in advance the resolution that web page contents shows between remote controller with touch screen and controlled device, so that the ratio of width to height of the web page contents that controlled device shows with remote controller with touch screen is identical.Particularly, before this step, also comprise: controlled device calculates the ratio of width to height by the resolution of display, sends to remote controller with touch screen; Remote controller with touch screen is determined and self is carried out the resolution of web page contents demonstration by the ratio of width to height.
Step 103, controlled device obtains web page contents by the web page address received from network side, by display, is shown.
Then, the user can be operated the remote controller with touch screen current display page, comprises the link of clicking in current display page, and such as the link about " physical culture " " news " etc. of current demonstration, described click can be clicks or double-click; And current display page is carried out to slide etc.Correspondingly, after step 103, the method also comprises:
Remote controller with touch screen receives the user and passes through the external event of the touch-screen of this remote controller with touch screen to the current page operation, by external event, determines corresponding page operation instruction, and the web page contents of current demonstration is carried out to corresponding operating; And the page operation instruction is sent to controlled device; Controlled device is carried out corresponding operating by the page operation instruction to the web page contents of current demonstration.
Described external event is for example click event, correspondingly, described page operation instruction is that the page that comprises link identification obtains request, described controlled device is carried out corresponding operating by the page operation instruction to the web page contents of current demonstration and comprised: the link identification that controlled device is comprised by the page request of obtaining is determined webpage link address corresponding in the current web page content, obtain web page contents by webpage link address from network side, shown by display.
For another example, described external event is slip event, and correspondingly, described page operation instruction is the page slip request that comprises the sliding position parameter, and described sliding position parameter is slip origin coordinates relative value and slip end coordinate relative value; Described controlled device is carried out corresponding operating by the page operation instruction to the web page contents of current demonstration and is comprised:
Controlled device, by the slip origin coordinates relative value and the slip end coordinate relative value that comprise in page slip request, is converted to slip origin coordinates absolute value and the slip end coordinate absolute value of corresponding display; By slip origin coordinates absolute value and slip end coordinate absolute value, the web page contents of current demonstration is carried out to slide.
After controlled device is carried out the page operation instruction from remote controller with touch screen, also can be to the remote controller with touch screen feedback response message, with the remote controller with touch screen instruction of announcement, be finished; Simultaneously, controlled device also can feed back to the hashed value of the content page of current demonstration remote controller with touch screen to carry out verification, particularly:
Controlled device calculates hashed value according to the content of pages of current demonstration, and hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, according to the content of pages of self current demonstration, calculate hashed value, the hashed value that calculates and the hashed value of reception are compared, if different, again the page operation instruction is sent to controlled device.
The method of below with the example of Fig. 2, mirror image between controlled device of the present invention and remote controller with touch screen being synchronizeed describes, and it comprises the following steps:
Step 201, set up wireless connections between remote controller with touch screen and controlled device.
Step 202, controlled device calculates the ratio of width to height by the resolution of display, sends to remote controller with touch screen.
Resolution comprises pixels across value and vertical pixel value, and the pixels across value, divided by vertical pixel value, is obtained to the ratio of width to height.
If controlled device is Set Top Box, described display is television indicator.
Step 203, remote controller with touch screen is determined and self is carried out the resolution of web page contents demonstration by the ratio of width to height.
Step 204, remote controller with touch screen receives the web page address that the user inputs by touch-screen, obtains web page contents by web page address from network side and is shown; And web page address is sent to controlled device.
Step 205, controlled device obtains web page contents by the web page address received from network side, by display, shown, and to the remote controller with touch screen feedback response message, complete with the remote controller with touch screen web displaying of announcement.
In the present invention, realize respectively a browser kernel in remote controller with touch screen and controlled device, use separately browser kernel to carry out webpage parsing, layout calculating etc., web page contents is rendered on the screen of equipment separately.
After controlled device display web page content, can calculate hashed value according to the content of pages of current demonstration, hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, according to the content of pages of self current demonstration, calculate hashed value, the hashed value that calculates and the hashed value of reception are compared, if different, web page address is resend to controlled device.
While calculating hashed value, particularly, can use the SHA1 algorithm to calculate hashed value according to the page info of current demonstration and page supplementary etc., described page supplementary be as the cookie state etc.
Step 206, remote controller with touch screen receives the click event that the user operates current page by touch-screen, determines that the page that comprises link identification obtains request, by the chained address corresponding to link identification, obtains web page contents from network side and is shown; And the page request of obtaining is sent to controlled device.
A plurality of links are arranged on web page contents, as the link about " physical culture " " news " etc. shown on webpage, the user can click certain link by touch-screen, the link identification that each chained address is corresponding unique, and the page request of obtaining that will comprise link identification sends to controlled device.
Step 207, the link identification that controlled device is comprised by the page request of obtaining is determined webpage link address corresponding in the current web page content, obtain web page contents by webpage link address from network side, by display, shown, and to the remote controller with touch screen feedback response message, complete with the remote controller with touch screen web displaying of announcement.
Owing to obtaining the mapping relations between each link identification and chained address in the current page content in browser kernel, after the browser kernel reception page of controlled device obtains request, to the page, the request of obtaining is processed, inquire about corresponding chained address by link identification, and then, obtain web page contents by webpage link address from network side again, shown by display.
Controlled device obtains web page contents by webpage link address from network side, after being shown by display, also can calculate hashed value according to the content of pages of current demonstration, and hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, according to the content of pages of self current demonstration, calculate hashed value, the hashed value calculated is compared with the hashed value of reception, if different, again to the controlled device transmission page, obtain request.
Step 208, remote controller with touch screen receive the user by touch-screen the slip event to the current page operation, determine the page that comprises the sliding position parameter request of sliding, to the demonstration of sliding of the web page contents of current demonstration; And the page instruction of sliding is sent to controlled device.
Slip event comprises slip origin coordinates absolute value and slip end coordinate absolute value, by slip origin coordinates absolute value and slip end coordinate absolute value, and the remote controller with touch screen demonstration of just can sliding to the web page contents of current demonstration.
Described sliding position parameter is slip origin coordinates relative value and slip end coordinate relative value.The coordinate relative value of certain point on screen, i.e. the ratio of this lateral coordinates absolute value and display screen transverse width, and this along slope coordinate absolute value and display screen be the ratio of height vertically.
Step 209, controlled device, by the slip origin coordinates relative value and the slip end coordinate relative value that comprise in page slip request, is converted to slip origin coordinates absolute value and the slip end coordinate absolute value of corresponding display; By slip origin coordinates absolute value and slip end coordinate absolute value, to the demonstration of sliding of the web page contents of current demonstration, and to the remote controller with touch screen feedback response message, with the remote controller with touch screen webpage of announcement, slide complete.
After knowing slip origin coordinates relative value and slip end coordinate relative value, by slip origin coordinates relative value, be multiplied by the display screen transverse width, just can obtain the slip origin coordinates absolute value of corresponding display; Be multiplied by the vertical width of display screen by the initial end relative value of sliding, just can obtain the slip end coordinate absolute value of corresponding display.Then, by slip origin coordinates absolute value and slip end coordinate absolute value, the controlled device demonstration of just can sliding to the web page contents of current demonstration.
Controlled device also can calculate hashed value according to the content of pages of current demonstration after the web page contents of current demonstration is slided and shows, hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, according to the content of pages of self current demonstration, calculate hashed value, the hashed value calculated is compared with the hashed value of reception, if different, again to controlled device, send the page and slide and ask.
In the present invention, set up wireless connections in advance between remote controller with touch screen and controlled device, then, when needed, the user is by the touch-screen input web page address of this remote controller with touch screen, and remote controller with touch screen obtains web page contents according to web page address from network side and shown; And send to controlled device carry out obtaining of web page contents and show web page address.Thereby, realize carrying out the simultaneous display of content of pages on remote controller with touch screen and controlled device.
Referring to Fig. 3, be the system that mirror image between controlled device of the present invention and remote controller with touch screen is synchronizeed, it comprises remote controller with touch screen and controlled device;
Described remote controller with touch screen, for and controlled device between set up wireless connections, receive the user by the web page address of the touch-screen input of this remote controller with touch screen, obtain web page contents according to web page address from network side and shown; And web page address is sent to controlled device;
Described controlled device, for remote controller with touch screen, setting up wireless link, and obtain web page contents by the web page address received from network side, by display, shown.
Referring to Fig. 4, the system configuration schematic diagram example of synchronizeing for mirror image between controlled device of the present invention and remote controller with touch screen, wherein, described remote controller with touch screen comprises that the first connection sets up unit, contact screen information acquiring unit and the first browser kernel unit, and described controlled device comprises that the second connection sets up unit and the second browser kernel unit;
Described first connects and to set up unit, for described second, being connected to set up between unit and setting up wireless connections; And receive the web page address that described the first browser kernel unit sends, send to described the second connection to set up unit;
Described contact screen information acquiring unit, for receiving the user by the web page address of the touch-screen input of this remote controller with touch screen, send described the first browser kernel unit to;
Described the first browser kernel unit, obtain web page contents for the web page address by receiving from network side and shown, and send to described the first connection to set up unit the web page address of reception;
Unit is set up in described the second connection, for receiving described first, connects the web page address of setting up the unit transmission, sends described the second browser kernel unit to;
Described the second browser kernel unit, connect for receiving described second the web page address of setting up the unit transmission, by the web page address received, from network side, obtains web page contents, by display, shown.
Alternatively, described contact screen information acquiring unit, be further used for receiving the user and pass through the external event of the touch-screen of this remote controller with touch screen to the current page operation, sends external event to described the first browser kernel unit;
Described the first browser kernel unit, for determined corresponding page operation instruction by external event, carry out corresponding operating to the web page contents of current demonstration; And send to described the first connection to set up unit the page operation instruction;
Unit is set up in described the first connection, for the page operation instruction by reception, sends to described the second connection to set up unit;
Unit is set up in described the second connection, for receiving described first, connects the page operation instruction of setting up the unit transmission, sends described the second browser kernel unit to;
Described the second browser kernel unit, connect the page operation instruction of setting up the unit transmission for receiving described second, by the page operation instruction, the web page contents of current demonstration carried out to corresponding operating.
Alternatively, described the second browser kernel unit, also, for after by the page operation instruction, the web page contents of current demonstration being carried out to corresponding operating, calculate hashed value according to the content of pages of current demonstration, sends to described the second connection to set up unit hashed value;
Unit is set up in described the second connection, also for the hashed value by reception, sends to described the first connection to set up unit;
Unit is set up in described the first connection, also for the hashed value by reception, sends to described the first browser kernel unit;
Described the first browser kernel unit, also for receiving hashed value, calculate hashed value according to the content of pages of self current demonstration, the hashed value that calculates and the hashed value of reception are compared, if different, again to described first, connect and set up the instruction of unit transmission page operation.
Remote controller with touch screen of the present invention is for example intelligent remote controller, mobile phone, personal digital assistant (PDA, Personal Digital Assistant) etc.; Described controlled device is such as being Set Top Box, Intelligent television terminal etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.