Detailed description of the invention
For making the object, 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.
Seeing Fig. 1, for the method indicative flowchart of mirror image synchronization between controlled device of the present invention and remote controller with touch screen, it comprises the following steps:
Step 101, sets up wireless connections between remote controller with touch screen and controlled device.
Increasing synchronizing web pages application option in the menu of remote controller with touch screen, when realizing synchronizing web pages between controlled device and remote controller with touch screen, user can carry out catalogue selection, synchronous applications of entering the Web page.
After synchronous applications of entering the Web page, remote controller with touch screen and controlled device carry out wireless connections, specifically, can carry out short-distance wireless (wifi, wirelessfidelity) connection or bluetooth connection etc.;If setting up bluetooth to connect, being then respectively provided with bluetooth at remote controller with touch screen with controlled device and be connected unit, data mutual between remote controller with touch screen and controlled device are all based on Bluetooth protocol, connect unit by bluetooth and are transmitted and receive;Set up wifi with controlled device at remote controller with touch screen to be connected or bluetooth is connected as what those skilled in the art easily realized, the most too much repeat here.
Step 102, remote controller with touch screen receives the web page address that user is inputted by the touch screen of this remote controller with touch screen, obtains web page contents according to web page address from network side and shows;And web page address is sent to controlled device.
The resolution that shows of web page contents is consulted the most in advance, so that the ratio of width to height of web page contents that controlled device shows with remote controller with touch screen is identical between remote controller with touch screen and controlled device.Specifically, before this step, also include: controlled device is calculated the ratio of width to height by the resolution of display, is sent to remote controller with touch screen;By the ratio of width to height, remote controller with touch screen determines that self carries out the resolution that web page contents shows.
Step 103, controlled device is obtained web page contents by the web page address received from network side, is shown by display.
Then, remote controller with touch screen current display page can be operated by user, and including the link clicked in current display page, the most currently displaying link about " physical culture " " news " etc., described click can be to click or double-click;And current display page is carried out slide etc..Correspondingly, after step 103, the method also includes:
Remote controller with touch screen receives the external event that current page is operated by user by the touch screen of this remote controller with touch screen, external event determine the page operation instruction of correspondence, currently displaying web page contents is performed corresponding operating;And page operation instruction is sent to controlled device;Controlled device is performed corresponding operating by page operation instruction to currently displaying web page contents.
Described external event for example, clicks on event, correspondingly, the instruction of described page operation is that the page comprising link identification obtains request, described controlled device is performed corresponding operating by page operation instruction to currently displaying web page contents and includes: controlled device is obtained, by the page, the link identification asking to comprise and determines webpage link address corresponding in current web page content, obtained web page contents by webpage link address from network side, shown by display.
For another example, described external event is slip event, and correspondingly, the instruction of described page operation is the page slip request comprising sliding position parameter, and described sliding position parameter is slip origin coordinates relative value and slip end coordinate relative value;Described controlled device is performed corresponding operating by page operation instruction to currently displaying web page contents and includes:
Controlled device, by the slip origin coordinates relative value comprised in page slip request and slip end coordinate relative value, 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, currently displaying web page contents is carried out slide.
After controlled device performs to instruct from the page operation of remote controller with touch screen, also can be finished reporting to remote controller with touch screen instruction to remote controller with touch screen feedback response message;Meanwhile, the hashed value of currently displaying content page also can be fed back to remote controller with touch screen to verify by controlled device, specifically:
Controlled device calculates hashed value according to currently displaying content of pages, and hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, calculate hashed value according to the content of pages that self is currently displaying, the hashed value of the hashed value calculated with reception is compared, if it is different, then again page operation instruction is sent to controlled device.
Illustrating the method for mirror image synchronization between controlled device of the present invention and remote controller with touch screen with the example of Fig. 2 below, it comprises the following steps:
Step 201, sets up wireless connections between remote controller with touch screen and controlled device.
Step 202, controlled device is calculated the ratio of width to height by the resolution of display, is sent to remote controller with touch screen.
Resolution includes pixels across value and longitudinal pixel value, by pixels across value divided by longitudinal pixel value, obtains the ratio of width to height.
If controlled device is Set Top Box, the most described display is television indicator.
Step 203, by the ratio of width to height, remote controller with touch screen determines that self carries out the resolution that web page contents shows.
Step 204, remote controller with touch screen receives the web page address that user is inputted by touch screen, web page address obtain web page contents from network side and show;And web page address is sent to controlled device.
Step 205, controlled device is obtained web page contents by the web page address received from network side, is shown by display, and to remote controller with touch screen feedback response message, complete to report to remote controller with touch screen web displaying.
In the present invention, in remote controller with touch screen and controlled device, realize a browser kernel respectively, each use browser kernel to carry out web analysis, layout calculating etc., web page contents is rendered on the screen of respective equipment.
After controlled device display web page contents, hashed value can be calculated according to currently displaying content of pages, hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, calculate hashed value according to the content of pages that self is currently displaying, the hashed value of the hashed value calculated with reception is compared, if it is different, then web page address is resend to controlled device.
When calculating hashed value, specifically, SHA1 algorithm can be used to be calculated hashed value, described page auxiliary information such as cookie state etc. according to currently displaying page info and page auxiliary information etc..
Step 206, remote controller with touch screen receives the click event that current page is operated by user by touch screen, determines that the page comprising link identification obtains request, by the chained address corresponding to link identification, obtains web page contents from network side and shows;And the page is obtained request be sent to controlled device.
Multiple link is had on web page contents, the link about " physical culture " " news " etc. as shown on webpage, user can click on certain link by touch screen, the corresponding unique link identification in each chained address, and the page comprising link identification acquisition request is sent to controlled device.
Step 207, controlled device is obtained, by the page, the link identification asking to comprise and determines webpage link address corresponding in current web page content, web page contents is obtained from network side by webpage link address, shown by display, and to remote controller with touch screen feedback response message, complete to report to remote controller with touch screen web displaying.
Owing in browser kernel, acquisition has the mapping relations in current page content between each link identification and chained address, after the browser kernel of controlled device receives page acquisition request, the page is obtained request process, the chained address corresponding by link identification inquiry, and then, obtained web page contents by webpage link address from network side again, shown by display.
Controlled device is obtained web page contents by webpage link address from network side, after being shown by display, also can calculate hashed value according to currently displaying content of pages, hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, calculate hashed value according to the content of pages that self is currently displaying, the hashed value of the hashed value calculated with reception is compared, if it is different, then again send the page to controlled device to obtain request.
Step 208, remote controller with touch screen receives the slip event that current page is operated by user by touch screen, determines that the page comprising sliding position parameter slides and asks, currently displaying web page contents carries out display of sliding;And instruction of being slided by the page is sent to controlled device.
Slip event comprises slip origin coordinates absolute value and slip end coordinate absolute value, and by slip origin coordinates absolute value and slip end coordinate absolute value, remote controller with touch screen just can carry out display of sliding to currently displaying web page contents.
Described sliding position parameter is slip origin coordinates relative value and slip end coordinate relative value.The ratio of the coordinate relative value of certain point, i.e. this lateral coordinates absolute value and display screen transverse width on screen, and the ratio of this longitudinal coordinate absolute value height longitudinal with display screen.
Step 209, controlled device, by the slip origin coordinates relative value comprised in page slip request and slip end coordinate relative value, 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, currently displaying web page contents is carried out slip to show, and to remote controller with touch screen feedback response message, complete to report to the slip of remote controller with touch screen webpage.
After knowing slip origin coordinates relative value and slip end coordinate relative value, slip origin coordinates relative value it is multiplied by display screen transverse width, just the slip origin coordinates absolute value of available corresponding display;It is multiplied by display screen longitudinally wide, just the slip end coordinate absolute value of available corresponding display by slip state pause judgments relative value.Then, by slip origin coordinates absolute value and slip end coordinate absolute value, controlled device just can carry out display of sliding to currently displaying web page contents.
After controlled device carries out slip display to currently displaying web page contents, also can calculate hashed value according to currently displaying content of pages, hashed value is sent to remote controller with touch screen;
After remote controller with touch screen receives hashed value, calculate hashed value according to the content of pages that self is currently displaying, the hashed value of the hashed value calculated with reception is compared, if it is different, then again send page slip request to controlled device.
In the present invention, setting up wireless connections in advance between remote controller with touch screen and controlled device, then, when needed, user inputs web page address by the touch screen 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 shows;And web page address is sent to controlled device carries out acquisition and the display of web page contents.Thus, it is achieved on remote controller with touch screen with controlled device, carry out the simultaneous display of content of pages.
Seeing Fig. 3, for the system of mirror image synchronization between controlled device of the present invention and remote controller with touch screen, it includes remote controller with touch screen and controlled device;
Described remote controller with touch screen, is used for setting up wireless connections between controlled device, receives the web page address that user is inputted by the touch screen of this remote controller with touch screen, obtains web page contents according to web page address from network side and shows;And web page address is sent to controlled device;
Described controlled device, for setting up wireless link with remote controller with touch screen, and is obtained web page contents by the web page address received from network side, is shown by display.
See Fig. 4, for the system structure schematic diagram example of mirror image synchronization between controlled device of the present invention and remote controller with touch screen, wherein, described remote controller with touch screen includes the first connection establishment unit, contact screen information acquiring unit and the first browser kernel unit, and described controlled device includes the second connection establishment unit and the second browser kernel unit;
Described first connection establishment unit, is used for setting up wireless connections between described second connection establishment unit;And receive the web page address that described first browser kernel unit sends, it is sent to described second connection establishment unit;
Described contact screen information acquiring unit, for receiving the web page address that user is inputted by the touch screen of this remote controller with touch screen, sends described first browser kernel unit to;
Described first browser kernel unit, shows for being obtained web page contents by the web page address received from network side, and the web page address of reception is sent to described first connection establishment unit;
Described second connection establishment unit, for receiving the web page address that described first connection establishment unit sends, sends described second browser kernel unit to;
Described second browser kernel unit, for receiving the web page address that described second connection establishment unit sends, is obtained web page contents by the web page address received from network side, is shown by display.
Alternatively, described contact screen information acquiring unit, it is further used for receiving the external event that current page is operated by the touch screen of this remote controller with touch screen by user, external event is sent to described first browser kernel unit;
Described first browser kernel unit, for being determined the page operation instruction of correspondence by external event, performs corresponding operating to currently displaying web page contents;And page operation instruction is sent to described first connection establishment unit;
Described first connection establishment unit, is sent to described second connection establishment unit for the page operation of reception being instructed;
Described second connection establishment unit, for receiving the page operation instruction that described first connection establishment unit sends, sends described second browser kernel unit to;
Described second browser kernel unit, for receiving the page operation instruction that described second connection establishment unit sends, is performed corresponding operating by page operation instruction to currently displaying web page contents.
Alternatively, described second browser kernel unit, it is additionally operable to, after currently displaying web page contents being performed corresponding operating by page operation instruction, calculate hashed value according to currently displaying content of pages, hashed value is sent to described second connection establishment unit;
Described second connection establishment unit, is additionally operable to the hashed value of reception is sent to described first connection establishment unit;
Described first connection establishment unit, is additionally operable to the hashed value of reception is sent to described first browser kernel unit;
Described first browser kernel unit, it is additionally operable to receive hashed value, calculates hashed value according to the content of pages that self is currently displaying, the hashed value of the hashed value calculated with reception is compared, if it is different, then again send page operation instruction to described first connection establishment unit.
Remote controller with touch screen of the present invention for example, intelligent remote controller, mobile phone, personal digital assistant (PDA, PersonalDigitalAssistant) etc.;Described controlled device for example, Set Top Box, Intelligent television terminal etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. done, within should be included in the scope of protection of the invention.