Disclosure of Invention
In view of this, the present application provides a page migration method, which is applied to a terminal, and when the terminal is a recipient of page migration, the method includes:
judging whether the browser opens a receiving interface or not;
when the browser opens a receiving interface, sending a page receiving request to a server; wherein the page receiving request carries a page migration identifier;
and receiving page migration data sent by a server aiming at the page receiving request, and displaying the page migration data on the receiving interface.
Optionally, the receiving, by the server, the page migration data sent by the page receiving request includes:
acquiring a user identification graph input by a user, and sending the user identification graph to a server; wherein the user identification graphic is pre-displayed on the page migration sender device;
and receiving page migration data which is sent by the server and reported by the page migration sender equipment when the server judges that the user identification graph is matched with the page identification graph displayed on the page migration sender equipment.
Optionally, when the terminal is a page migration sender, the method includes:
judging whether a page migration instruction initiated by a user is received;
when a page migration instruction initiated by a user is received, reporting page migration data to a server; the page migration data carries page information currently displayed by a browser and the page migration identification code; the page information comprises the website of the current page and the state information of the display content in the page.
Optionally, the method further includes:
receiving a user identification graph sent by the server side, and displaying the user identification graph on a preset interface; the server side receives a plurality of page receiving requests, and page migration identification codes in the page receiving requests and page migration identification codes in the page migration data are sent at the same time.
Optionally, the page migration identifier includes a WI-FI identifier.
The application also provides a page migration method applied to the server, and the method comprises the following steps:
receiving a page receiving request sent by a first terminal; the page request carries a page migration identification code of the first terminal;
matching the page migration identification code of the first terminal with a locally stored page migration identification code;
and when the page migration identification code of the first terminal is matched with any locally stored page migration identification code, sending page migration data corresponding to the any page migration identification code to the first terminal, so that the first terminal displays the page migration data in a receiving interface of a local browser.
Optionally, before the matching the page migration identifier of the first terminal with the locally stored page migration identifier, the method further includes:
receiving page migration data reported by a second terminal, and locally storing the page migration data; and the page migration data carries a page migration identification code of the second terminal.
Optionally, when the page migration identifier of the first terminal is matched with any locally stored page migration identifier, sending the page migration data corresponding to the any page migration identifier to the first terminal includes:
when the page migration identification code of the first terminal is matched with any locally stored page migration identification code, judging whether a plurality of page receiving requests with the same page migration identification codes as the any page migration identification code are received or not;
if so, sending a user identification graph to the second terminal, and displaying the user identification graph on a preset interface by the second terminal; when a user identification pattern sent by the first terminal is received and the user identification pattern sent by the first terminal is matched with a user identification pattern sent to the second terminal, page migration data corresponding to any page migration identification code is sent to the first terminal;
and if not, directly sending the page migration data corresponding to any page migration identification code to the first terminal.
The application further provides a page migration apparatus, which is applied to a terminal, and when the terminal is a receiver of the page migration, the apparatus includes:
the first judgment module is used for judging whether the browser opens a receiving interface;
the first sending module is used for sending a page receiving request to the server side when the browser opens a receiving interface; wherein the page receiving request carries a page migration identifier;
and the first receiving module is used for receiving page migration data sent by the server aiming at the page receiving request and displaying the page migration data on the receiving interface.
Optionally, the first receiving module is specifically configured to:
acquiring a user identification graph input by a user, and sending the user identification graph to a server; wherein the user identification graphic is pre-displayed on the page migration sender device;
and receiving page migration data which is sent by the server and reported by the page migration sender equipment when the server judges that the user identification graph is matched with the page identification graph displayed on the page migration sender equipment.
Optionally, when the terminal is a page migration sender, the apparatus includes:
the second judgment module is used for judging whether a page migration instruction initiated by a user is received or not;
the reporting module is used for reporting page migration data to the server side when receiving a page migration instruction initiated by a user; the page migration data carries page information currently displayed by a browser and the page migration identification code; the page information comprises the website of the current page and the state information of the display content in the page.
Optionally, the apparatus further comprises:
the display module is used for receiving the user identification graph sent by the server and displaying the user identification graph on a preset interface; the server side receives a plurality of page receiving requests, and the page migration identification codes in the page receiving requests and the page migration identification codes in the page migration data are sent simultaneously
Optionally, the page migration identifier includes a WI-FI identifier.
The present application further provides a page migration apparatus, which is applied to a server, the apparatus includes:
the second receiving module is used for receiving a page receiving request sent by the first terminal; the page request carries a page migration identification code of the first terminal;
the matching module is used for matching the page migration identification code of the first terminal with a locally stored page migration identification code;
and the second sending module is used for sending the page migration data corresponding to any page migration identification code to the first terminal when the page migration identification code of the first terminal is matched with any locally stored page migration identification code, so that the first terminal displays the page migration data in a receiving interface of a local browser.
Optionally, the apparatus further comprises:
the storage module is used for receiving page migration data reported by a second terminal and locally storing the page migration data before the page migration identification code of the first terminal is matched with the locally stored page migration identification code; and the page migration data carries a page migration identification code of the second terminal.
Optionally, the second sending module is specifically configured to:
when the page migration identification code of the first terminal is matched with any locally stored page migration identification code, judging whether a plurality of page receiving requests with the same page migration identification codes as the any page migration identification code are received or not;
if so, sending a user identification graph to the second terminal, and displaying the user identification graph on a preset interface by the second terminal; when a user identification pattern sent by the first terminal is received and the user identification pattern sent by the first terminal is matched with a user identification pattern sent to the second terminal, page migration data corresponding to any page migration identification code is sent to the first terminal;
and if not, directly sending the page migration data corresponding to any page migration identification code to the first terminal.
According to the method and the device, when a browser opens a receiving interface, a page migration receiving request carrying a page migration identification code is sent to a server through page migration receiver equipment, after the server receives the page receiving request, the page migration identification code in the page receiving request is matched with the page migration identification code in locally stored page migration data, when the corresponding page migration data are matched, the page migration data are sent to a page migration receiver, and the page migration data are displayed on a receiving page through page migration receiving. In the application, the user does not need to perform complex operation in the whole page migration process, and the browser can automatically load the page migration data for the user, so that the whole page migration process is smoother, and the user experience can be improved.
Detailed Description
In the prior art, the following methods are mainly used to implement page migration, for example, a page browsed by a user on a PC is migrated to a mobile phone as an example to be described:
firstly, a two-dimensional code can be generated on a webpage, when a user wants to migrate a currently browsed webpage from a PC (personal computer) end to a mobile phone end, the two-dimensional code can be scanned by a code scanning tool installed on the mobile phone to analyze the two-dimensional code, and then the webpage migration is completed according to the analyzed website. Or, a short code may be generated on the web page, and when the user wishes to migrate the currently browsed web page from the PC to the mobile phone, the user may input the short code in the receiving interface of the mobile phone to receive the address to complete the page migration.
Secondly, after the mobile phone end opens the receiving interface, the mobile phone is used for knocking a space key of the keyboard to transmit a receiving signal to the PC; meanwhile, the mobile phone end obtains a sound signal by knocking the keyboard, then matches the receiving time of the sound signal with the receiving time of the sound signal, and if the receiving time of the sound signal is matched with the receiving time of the sound signal, starts to transmit data to finish page migration.
Thirdly, a plug-in can be installed on a browser of the PC end, then a client is installed on the mobile phone end, then the plug-in and the client are simultaneously logged in by using the same account at two ends, and after the log-in is successful, the plug-in on the browser and the client installed on the mobile phone end synchronize data mutually to complete page migration.
However, in the above solutions, when the page migration is implemented, the user is required to perform a series of operations to complete the page migration, for example, for the first solution, the user is required to manually scan the two-dimensional code or manually input the short code; for the second scheme, the user needs to manually tap the keyboard of the PC; for the third scheme, the user can start to synchronize data only after manually logging in the plug-in on the browser and the client of the mobile phone. Therefore, in the prior art, when the page is migrated, the implementation is complex, and the user experience is greatly influenced.
In view of this, the present application provides a page migration method, where a page migration receiver device sends a page receiving request carrying a page migration identifier to a server when a browser has opened a receiving interface, and after receiving the page receiving request, a server matches the page migration identifier in the page receiving request with a page migration identifier in locally stored page migration data, and when the corresponding page migration data is matched, sends the page migration data to a page migration receiver, and the page migration data is displayed on a receiving page by receiving the page migration. In the application, the user does not need to perform complex operation in the whole page migration process, and the browser can automatically load the page migration data for the user, so that the whole page migration process is smoother, and the user experience can be improved.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 1, fig. 1 is a page migration method according to an embodiment of the present application, where an execution subject of the method may be a terminal and a server; the terminal may include a first terminal (hereinafter, referred to as a first terminal) as a page migration receiver and a second terminal (hereinafter, referred to as a second terminal) as a page migration sender; the terminal and the service end are mutually matched, and the following steps are executed:
step 101, a first terminal judges whether a browser opens a receiving interface;
102, when the browser opens a receiving interface, a first terminal sends a page receiving request to a server; wherein the page receiving request carries a page migration identifier;
103, a server receives a page receiving request sent by a first terminal, and matches a page migration identification code in the page receiving request with a locally stored page migration identification code;
step 104, when the page migration identification code is matched with any locally stored page migration identification code, sending page migration data corresponding to the page migration identification code to the first terminal;
and 105, displaying the page migration data on the receiving interface by the first terminal.
In this embodiment, the server may be a server, a server cluster, or a cloud platform; the first terminal and the second terminal can be PC terminals, tablet computers or mobile phone terminals. When the first terminal and the second terminal are under the coverage of the same WI-FI network, the page migration identifier may be a WI-FI identifier. The WI-FI identification code can be an identification code capable of uniquely identifying a local WI-FI network when the WI-FI identification code is realized; for example, it may be the MAC address of the local wireless router. Of course, when the first terminal and the second terminal are under the coverage of the same WI-FI network, the page migration identifier may also be an identifier that can uniquely identify the first terminal or the second terminal.
The following describes the present solution in detail by taking an example that the first terminal is a PC terminal (hereinafter referred to as PC), the second terminal is a mobile phone terminal (hereinafter referred to as mobile phone), and the first terminal and the second terminal are covered by the same WI-FI network.
In this embodiment, a function button "switch to the mobile phone" may be preset on a default interface of the PC browser, and a user may initiate a process of migrating a page being browsed on the PC browser to the mobile phone by operating the function button. Similarly, a function button for "switching to PC" may also be preset on the default interface of the mobile phone browser, and the user may initiate a process of migrating a page being browsed on the mobile phone browser to the PC by operating the function button.
Referring to fig. 2, an implementation process of migrating a page from a PC to a mobile phone is described in detail below with reference to an embodiment.
On the PC side, after the PC is successfully accessed into the local WI-FI network, the identification code of the WI-FI network can be acquired and cached in the PC browser for subsequent use. When a user browses a webpage through a PC browser, if the user wants to migrate a currently browsed page to a mobile phone to continue browsing, the user can initiate page migration by opening the function button of 'switch to PC'.
When the user opens the function button for switching to the PC, a page migration instruction can be triggered to be sent to the browser background, and after the browser receives the page migration instruction, the browser can begin to report page migration data to the server.
In implementation, the page migration data reported by the PC browser to the server may include an identification code of a local WI-FI network that has been cached in the browser, a website of a page currently browsed by the user, and state information of currently displayed content in the page, for example, the state information of the currently displayed content in the page may include a position of a text or a picture being displayed in the page in the current page, or a playing progress of a network video that is currently played in the page, and the like.
After the server receives the page migration data reported by the PC, the page migration data and the corresponding relationship between the page migration data and the identification code of the WI-FI network can be stored locally, so that the subsequent fee inquiry is facilitated.
With reference to fig. 2, on the mobile phone side, after the mobile phone successfully accesses the local WI-FI network, the identification code of the WI-FI network may also be obtained and cached in the mobile phone browser for subsequent use. After a user initiates page migration at a PC end, a receiving interface for receiving page migration data can be opened on a mobile phone browser. The receiving interface may be a special interface predefined in the mobile phone browser for receiving the page migration data, or a blank interface newly created in the mobile phone browser. When a user opens a receiving interface on a mobile phone browser, a receiving page opening instruction can be triggered to be sent to a mobile phone browser background, and after the mobile phone browser receives the page opening instruction, a page receiving request carrying a local WI-FI identification code can be sent to a server side immediately.
When the mobile phone browser sends a page receiving request to the server, the page receiving request can be sent in a polling mode. For example, after the user opens the receiving interface, the mobile phone browser may send the page receiving request to the server periodically in the background to request the page migration data.
After the server receives the page receiving request from the mobile phone browser, the server locally stores the page migration data reported by different PCs and the corresponding relationship between the page migration data and the WI-FI identification codes, so that the server can sequentially match the WI-FI identification codes in the page receiving request with the WI-FI identification codes stored locally, and if the WI-FI identification codes identical to the WI-FI identification codes in the page receiving request are locally matched, the corresponding relationship can be immediately inquired, and the page migration data corresponding to the matched WI-FI identification codes are sent to the mobile phone. Through the matching of the WI-FI identification codes, the server side can accurately push the page migration data reported in the same WI-FI network to a page migration receiver in the WI-FI network.
However, in practical applications, since there may be multiple mobile phones under the coverage of the same WI-FI network, when different users (e.g., different family members) use the mobile phones to browse a web page under the coverage of the same WI-FI network, the server may receive multiple page receiving requests carrying the same WI-FI identifier as the locally matched WI-FI identifier, and for this case, before sending the page migration data corresponding to the matched WI-FI identifier, the server may determine whether the page migration data corresponding to the matched WI-FI identifier is requested by multiple users by determining whether multiple page receiving requests carrying the same WI-FI identifier as the matched WI-FI identifier are received.
If the server judges that only one page receiving request with the same carried WI-FI identification code as the matched WI-FI identification code is received, the page migration data is only requested by a unique user at the moment, and the server side can directly send the page migration data to the mobile phone of the user and display the page migration data on a receiving interface of a mobile phone browser.
Of course, if the server determines that a page receiving request that a plurality of carried WI-FI identifiers are the same as the matched WI-FI identifiers is received, the page migration data is requested by a plurality of users, in order to accurately distinguish the receiver users of the page migration, the server may send a user identification pattern to the PC, and the PC may display the user identification pattern on the browser after receiving the user identification pattern.
At this time, the user of the receiving party of the page migration may input a user identification figure with the same shape on the mobile phone according to the user identification figure displayed on the PC, for example, the user identification figure may be a gesture figure, and at this time, the user may draw a same gesture figure on the browser of the mobile phone according to the gesture figure displayed on the PC. After the user input is completed, the mobile phone browser can acquire the user identification graph input by the user, and then send the user identification graph to the server.
After receiving the user identification pattern sent by the mobile phone browser, the server side can judge the consistency of the user identification pattern and the user identification pattern sent to the PC, and if the user identification pattern and the user identification pattern are not consistent, the server side can prompt the user to input the user identification pattern again. If the two are consistent, the user can be determined to be a receiver user of the local page migration, and then the server side can send the page migration data to the mobile phone of the user and display the page migration data on a receiving interface of a mobile phone browser.
Of course, in addition to the above-described method of outputting the user identification graph to the user to distinguish the recipient users of the current page migration, in practical applications, the recipient users of the current page migration may also be distinguished by other implementation manners, and detailed descriptions thereof are omitted in this embodiment.
In practical applications, the specific implementation process of migrating the page from the mobile phone to the PC or migrating the page between different mobile phones is the same as that of the above embodiment, and a person skilled in the art may implement the implementation process of the above embodiment by taking the implementation process of the above embodiment as a reference, and details are not described in this application.
It can be known from the above description that, please send a page receiving request carrying a page migration identification code to a server through a page migration receiver device when a browser has opened a receiving interface, after receiving the page receiving request, a server matches the page migration identification code in the page receiving request with a page migration identification code in locally stored page migration data, and when the corresponding page migration data is matched, sends the page migration data to a page migration receiver, and the page migration data is displayed on the receiving page through the reception of the page migration.
In the application, the user does not need to perform complex operation in the whole page migration process, and the browser can automatically load the page migration data for the user, so that the whole page migration process is smoother, and the user experience can be improved.
Corresponding to the method embodiment, the application also provides an embodiment of the device.
Referring to fig. 3, the present application provides a page migration apparatus 30 applied to a terminal. Referring to fig. 4, a hardware architecture related to a terminal for carrying the page migration apparatus 30 generally includes a CPU, a memory, a non-volatile memory, a network interface, an internal bus, and the like; in the case of software implementation, the page migration apparatus 30 can be generally understood as a computer program loaded in a memory, and a logic apparatus formed by combining software and hardware after being executed by a CPU. When the terminal is a recipient of page migration, the apparatus 30 may include:
a first judging module 301, configured to judge whether a receiving interface is opened by a browser;
a first sending module 302, configured to send a page receiving request to a server when the browser opens a receiving interface; wherein the page receiving request carries a page migration identifier;
the first receiving module 303 is configured to receive page migration data sent by the server according to the page receiving request, and display the page migration data on the receiving interface.
In this embodiment, the first receiving module 303 is specifically configured to:
acquiring a user identification graph input by a user, and sending the user identification graph to a server; wherein the user identification graphic is pre-displayed on the page migration sender device;
and receiving page migration data which is sent by the server and reported by the page migration sender equipment when the server judges that the user identification graph is matched with the page identification graph displayed on the page migration sender equipment.
In this embodiment, when the terminal is a sender of page migration, the apparatus 30 may include:
a second judging module 304, configured to judge whether a page migration instruction initiated by a user is received;
the reporting module 305 is configured to report page migration data to a server when a page migration instruction initiated by a user is received; the page migration data carries page information currently displayed by a browser and the page migration identification code; the page information comprises the website of the current page and the state information of the display content in the page.
In this embodiment, when the terminal is a sender of page migration, the apparatus 30 may further include:
the display module 306 is configured to receive the user identification pattern sent by the server, and display the user identification pattern on a preset interface; the server side receives a plurality of page receiving requests, and page migration identification codes in the page receiving requests and page migration identification codes in the page migration data are sent at the same time.
Referring to fig. 5, the present application provides a page migration apparatus 50 applied to a server. Referring to fig. 6, a hardware architecture related to a server carrying the page migration apparatus 50 generally includes a CPU, a memory, a non-volatile memory, a network interface, an internal bus, and the like; taking a software implementation as an example, the page migration apparatus 50 may be generally understood as a computer program loaded in a memory, and the apparatus 50 may include, through a logic apparatus formed by a combination of software and hardware after being executed by a CPU:
a second receiving module 501, configured to receive a page receiving request sent by a first terminal; the page request carries a page migration identification code of the first terminal;
a matching module 502, configured to match the page migration identifier of the first terminal with a locally stored page migration identifier;
a second sending module 503, configured to send, when the page migration identifier of the first terminal matches any locally stored page migration identifier, page migration data corresponding to the any page migration identifier to the first terminal, so that the first terminal displays the page migration data in a receiving interface of a local browser.
In this embodiment, the apparatus 50 may further include:
a storage module 504, configured to receive page migration data reported by a second terminal before the page migration identifier of the first terminal is matched with a locally stored page migration identifier, and locally store the page migration data; and the page migration data carries a page migration identification code of the second terminal.
In this embodiment, the second sending module 503 is specifically configured to:
when the page migration identification code of the first terminal is matched with any locally stored page migration identification code, judging whether a plurality of page receiving requests with the same page migration identification codes as the any page migration identification code are received or not;
if so, sending a user identification graph to the second terminal, and displaying the user identification graph on a preset interface by the second terminal; when a user identification pattern sent by the first terminal is received and the user identification pattern sent by the first terminal is matched with a user identification pattern sent to the second terminal, page migration data corresponding to any page migration identification code is sent to the first terminal;
and if not, directly sending the page migration data corresponding to any page migration identification code to the first terminal.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.