Multi-screen interaction method and device and server
Technical Field
The invention relates to the field of internet, in particular to a multi-screen interaction method, a multi-screen interaction device and a server.
Background
With the continuous development of science and technology, an individual may have electronic products such as a mobile phone, a computer, a television, a pad and the like at the same time. Based on the sharing purpose, the prior art can project the content displayed on the display screen of the mobile phone to a television or a computer screen. The screen projection is, as the name implies, what is displayed on the display screen of the terminal which is actively shared, what is displayed on the screen of the terminal which is subject to sharing, and the nature of the screen projection is also the operation of the terminal which is actively shared, and the content displayed on the screen of the terminal which is subject to sharing is only one mapping of the screen of the terminal which is actively shared. In other words, the screen of the terminal receiving the sharing is only used as one display device of the terminal actively receiving the sharing, and the terminal receiving the sharing cannot operate the displayed interface. For example, a video played by a browser on a mobile phone is projected onto a television, the mobile phone operates the playing or pausing of the video, and the television can only display the playing or pausing state of the video, but cannot control the playing or pausing of the video.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a multi-screen interaction method, a multi-screen interaction device and a multi-screen interaction server, and at least solves the technical problem that a terminal receiving sharing cannot operate contents shared by an actively-shared terminal.
According to an aspect of the embodiments of the present invention, there is provided a multi-screen interaction method, including: the method comprises the steps that a first client side obtains first data of a second client side, wherein the first data are used for indicating the second client side to execute a first operation; the first client performs a first operation indicated by the first data.
According to another aspect of the embodiments of the present invention, there is also provided a multi-screen interaction method, including: acquiring first data of a second client; the server forwards the first data to the first client so as to enable the first client to execute the first operation indicated by the first data.
According to another aspect of the embodiments of the present invention, there is also provided a multi-screen interaction apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first data sent to a first client by a second client, and the first data is used for indicating the second client to execute a first operation; an execution unit to execute the first operation indicated by the first data.
According to another aspect of the embodiments of the present invention, there is also provided a server, including: the data acquisition unit is used for acquiring first data of a second client; and the forwarding unit is used for forwarding the first data to the first client so as to enable the first client to execute the first operation indicated by the first data.
In the embodiment of the invention, a first client acquires first data of a second client, wherein the first data is used for indicating the second client to execute a first operation; the first client executes the first operation indicated by the first data, each client belongs to the terminal where the client is located, and when receiving the content shared by another client, the first client can also control the content through the terminal where the client is located.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a block diagram of a hardware environment according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of multi-screen interaction according to embodiment 1 of the present invention;
fig. 3 is a flowchart of a method of multi-screen interaction according to embodiment 2 of the present invention;
FIG. 4 is a schematic diagram of a client and server bi-directional link, according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the same link pool where links for the same account are stored on the server, according to an embodiment of the invention;
FIG. 6 is a schematic diagram of links for different accounts being stored in the same link pool on a server, according to an embodiment of the invention;
FIG. 7 is a schematic diagram of an apparatus for multi-screen interaction according to an embodiment of the invention;
fig. 8 is a schematic diagram of a server according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
There is also provided, in accordance with an embodiment of the present invention, an embodiment of a method for multi-screen interaction, including the steps illustrated in the flowchart of the figure, which may be implemented in a computer system such as a set of computer-executable instructions, and although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Optionally, in this embodiment, the multi-screen interaction method may be applied to a hardware environment formed by the terminal (including the terminal 1022, the terminal 1024, and the terminal 1026) and the server 104 shown in fig. 1. As shown in fig. 1, the terminal is connected to the server 104 through a network, and a client is disposed on the terminal, where the network includes but is not limited to: the terminal can be a mobile phone terminal, or a PC terminal, a notebook terminal, a tablet computer terminal or a television terminal. The server 104 described above includes a link pool that stores communication links of clients on a plurality of terminals.
The main operating principles of the hardware environment system shown in fig. 1 are: the respective communication links of the terminal 1022 (mobile phone), the terminal 1024 (computer), and the terminal 1026 (television) are stored in the same link pool of the server 104, and when any one of the three terminals transmits data to the server 104, the server can forward the received data to the other two terminals. For example, the terminal 1022 performs the first operation and sends the first data to the server 104, the server 104 forwards the first data to the terminal 1024 and the terminal 1026, and the terminal 1024 and the terminal 1026 also perform the first operation after receiving the first data, similarly, the terminal 1024 may also send the second data generated by the second operation performed by the terminal 1024 to the server 104, and the server 104 sends the second data to the terminal 1022 and the terminal 1026 and then performs the second operation, so that the three terminals may control other terminals to perform the same action when implementing their own actions.
It should be noted that the actions performed by the terminal described herein may be understood as actions performed by clients provided on the terminal, and the clients provided on a plurality of terminals are the same client. The server 104 may be a device provided in a terminal, and may realize the function of the server.
In the above hardware environment, the present application provides a multi-screen interaction method as shown in fig. 2, which can be executed in a client on a certain terminal. Fig. 2 is a flowchart of a multi-screen interaction method according to embodiment 1 of the present invention. As shown in the figure, the multi-screen interaction method includes the following steps:
step S202, the first client obtains first data of the second client, where the first data is used to instruct the second client to execute a first operation.
In step S204, the first client executes a first operation indicated by the first data.
The first client may be a client set on any one terminal in the hardware environment shown in fig. 1, and the first client and the second client are on different terminals and belong to the same client. The first client and the second client may perform the same function, for example, a browser installed on a mobile phone, a computer, and a television.
The first data may be data corresponding to an action performed by the second client, for example, data corresponding to an action of opening a web page, data corresponding to an action of inputting search content in the search field, or the like. The first data is received by the first client, and the first client executes the first operation indicated by the first data, so that the first client and the second client execute the same action, and the same content is displayed on different clients and the same action is executed.
Optionally, the first data may be forwarded by the server to the first client. The server may be a device provided on a certain terminal, and is capable of storing and forwarding data.
Compared with the screen projection (the projection of the other terminal is displayed on one terminal and the projected content cannot be controlled) in the prior art, the client sides on the two terminals respectively execute the same action to achieve the purpose that the content displayed on the two terminals is the same, each client side belongs to the terminal where the client side is located, the client sides can also control the terminal where the client side is located while receiving the content shared by the other client side, and the two client sides are essentially controlled respectively.
Meanwhile, the client can be independently controlled without depending on other clients, so that each client can be controlled according to the characteristics of the terminal where the client is located, and convenience in controlling the client is improved.
For example, when playing a video with a tv-version video player, there is a mobile phone or pad around the user, and it is very easy to play the video on the mobile phone/pad, input the video name, and select a video to play. It is quite difficult to operate a television version of the video player via a television remote control. However, by using the method provided by this embodiment, the video can be searched on the mobile phone or pad, the playing of the video can be controlled, the video can be played on the television, or the pause or the continuous playing of the video on the television can be controlled by using the television remote controller.
For example, a computer is used for browsing pages, but the sliding operation of the mobile phone is more convenient, and at this time, the mobile phone is equivalent to a touch screen of the computer. When searching is needed, keywords are input by using a computer. The search result can be browsed by sliding the mobile phone. Because the sliding on the mobile phone also acts on the computer, the search result on the computer moves along with the sliding on the mobile phone, and therefore the search result can be browsed from the computer. By adopting multi-screen interaction, the convenience of the large screen and input of a computer can be integrated with the usability of mobile phone/pad operation, and the convenience of operation is improved.
For example, the first client is a video player on a television, the second client is a video player on a mobile phone, and communication links of the video player on the television and the video player on the mobile phone are stored in the same link pool of the server. After the video player on the mobile phone executes the action of playing the video A (namely the first operation), the video is played. The video player on the mobile phone generates the action of playing the A video into first data and sends a first instruction to the server. The server forwards the first data received by the communication link of the video player on the mobile phone to other communication links in the same link pool, wherein one communication link is the communication link of the video player on the television, so that the video player on the television can receive the first data. And the video player on the television acquires the action of playing the video A corresponding to the first data, and then plays the video of the video player on the television.
Optionally, the first client performing the first operation indicated by the first data includes: the first client analyzes the execution code and the execution object from the first data, wherein the operation performed on the execution object by using the execution code is a first operation; the first client operates on the execution object by using the execution code.
The execution code is a unified execution code that can be recognized by each client, each execution code corresponds to an action, the execution object can be an object acted by the action corresponding to the execution code, and when the execution code operates on the execution object, a first operation is obtained, that is, the first operation includes the action corresponding to the execution code and the object corresponding to the execution object. Then, the client calls the execution code to perform the operation on the execution object, and the first operation is realized.
For example, in the above example, the first client is a video player on a television and the second client is a video player on a cell phone. And the video player on the mobile phone generates first data according to the 'playing A video'. After the video player on the television acquires the first data, the execution code is analyzed from the first data to be 'played', the execution object is 'A video', and then the video player on the television executes playing operation on the A video.
The first client can execute corresponding first operation according to the first data sent by the second client, and the first client can also execute corresponding action according to the instruction received by the first client from the terminal. For example, a video player on a television receives a "pause" signal from a remote control to pause playing a video.
That is to say, the first client may perform the same operation according to the first data sent by the second client, and may also perform its own control independently without being controlled by the second client, and the first client and the second client may also perform independent control while displaying the same content, thereby improving flexibility of control of the first client and the second client.
Optionally, before the first client acquires the first data of the second client, the method further includes: the method comprises the steps that a first client judges whether a first instruction and a second instruction are received, wherein the first instruction is used for indicating that the first client is allowed to send second data to a second client, the second instruction is used for indicating that the first client is not allowed to send the second data to the second client, and the second data is used for indicating that the first client executes a second operation; if the first client judges that the first instruction is received, monitoring first data and second operation executed by the first client, wherein under the condition that the second operation is monitored, generating second data and sending the second data to the second client so that the second client executes the second operation; and if the first client judges that the second instruction is received, monitoring first data sent by the second client.
The first instruction and the second instruction may be a function on the first client, for example, the first instruction is screen sharing and the second instruction is following browsing. When a first instruction of a first client is triggered, the first client can not only receive first data of a second client to execute a first operation, but also can send a second operation executed by the first client to the second client, so that the second client is controlled to execute the second operation; when the second instruction of the first client is triggered, the first client can only respond to the first data sent by the second client to execute the first operation, and the first client does not send the second data to the second client even if the first client executes the second operation and does not control the second client to execute the second operation.
For example, in winter or the like, it is necessary to browse news using a browser or a news application (first client), but it is not desirable to control the first client by hand because the weather is too cold. At this time, the user can start the following browsing function of the first client to follow the friend for browsing. That is, what content is presented by the second client of the friend and what action is performed, and the corresponding content is presented on the first client and the corresponding action is performed. The friend is a friend in the first client, requests the second client for follow-up browsing, and receives first data of the second client under the condition that the second client agrees.
In the process of following browsing, the first client only receives the first data of the second client, and executes the first operation corresponding to the first data. It should be noted that, no matter whether following browsing or screen sharing, the first client only receives the first operation and does not obtain the execution result after executing the first operation from the second client, which is equivalent to that each client independently executes its own logic to indicate that the received instruction is obtained from another client instead of the terminal where the client is located. For example, when the first operation is open www.aaaa.com, the first client requests www.aaaa.com content from the server of www.aaaa.com instead of obtaining www.aaaa.com content from the second client.
Because the first client can execute the first operation corresponding to the first data sent by the second client and can also execute the second operation executed by the terminal where the first client is located to control the first client, when the second operation is monitored, the second data is generated and sent to the second client, so that the second client also executes the second operation. On the basis, the action executed by the first client, the action executed by the second client and the actions executed by the first client and the second client respectively do not cause the confusion of the display contents on the two clients, the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and meanwhile, the normal display and operation of the two clients can be ensured.
Optionally, in the case that the second operation is monitored, generating the second data and sending the second data to the second client includes: the first client acquires an execution code and an execution object of the second operation; the first client encapsulates the execution code and the execution object into second data, wherein the execution code can be executed by the second client, and the execution object can be operated by the second client through the execution code.
For example, after the video player (i.e., the first client) on the mobile phone performs the action of "playing a video" (i.e., the second operation), the video player on the mobile phone converts the action of "playing" into an execution code (e.g., 0001), converts the "a video" into an execution object (e.g., the name of the a video), encapsulates the action of "playing" and the "a video" into second data, and sends the second data to the second client.
The process of generating the second data by the second client is similar to the process of generating the first data by the first client, and the first client and the second client adopt the same execution code and corresponding action. The process of obtaining the second operation from the second data after the second client receives the second data is also similar to the process of obtaining the first operation from the first data by the first client.
Optionally, the first client performing the first operation indicated by the first data includes: the first client executes at least one operation indicated by the first data, including: open window, open page, scroll page, enter text, change focus, play, and pause.
The second operation performed by the first client may also be any one or more of the first operations described above. Opening a window, opening a web page, scrolling a page, etc. may be used in a browser (a first client or a second client), playing and pausing may be applied in a video player, and actions corresponding to other applications may also be performed as a first operation in the corresponding application, which is not listed here.
If the first operation is complex, not only the focus needs to be changed, but also characters need to be input, and selection needs to be executed, then the first client splits the first operation into a combination of multiple actions, and executes the multiple actions in sequence, thereby completing the complete first operation.
In a specific example, the multi-screen interaction method can also be used for pushing advertisements. For example, the second client performs the action of opening the advertisement a (i.e., the first operation), and then the server sends the action of opening the advertisement a to the first client, and the first client also performs the action of opening the advertisement a, thereby implementing the pushing of the advertisement.
Through the embodiment, the two clients on the two terminals can execute the action executed by the other side and can also receive the control of the terminal where the client is located, so that the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and the technical effect that the terminal receiving sharing can operate the content shared by the terminal actively sharing is obtained.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the invention further provides a multi-screen interaction method. The multi-screen interaction method is executed on a server, and as shown in fig. 3, the method includes:
step S302, obtain the first data of the second client.
Step S304, forwarding the first data to the first client, so that the first client executes a first operation indicated by the first data, where the first data is used to indicate the second client to execute the first operation. The first client may be a client set on any one terminal in the hardware environment shown in fig. 1, and the first client and the second client are on different terminals and belong to the same client. The first client and the second client may perform the same function, for example, a browser installed on a mobile phone, a computer, and a television. Optionally, the first data is forwarded by the server from the second client to the first client.
As shown in fig. 4, each client (computer, mobile phone, tablet and television) establishes a bidirectional link (i.e., link a, link B, link C and link D) with the server, that is, each client may send data to the server or receive data sent by the server, and each client in fig. 4 may be used as a first client or a second client. The server receives the first data in the link of any one client and forwards the first data to the client corresponding to other links.
The first data may be data corresponding to an action performed by the second client, for example, data corresponding to an action of opening a web page, data corresponding to an action of inputting search content in the search field, or the like. Through the forwarding of the server, the first data is received by the first client, and the first client executes the first operation indicated by the first data, so that the first client and the second client execute the same action, the same content is displayed on different clients, and the same action is executed.
Compared with the screen projection (the projection of the other terminal is displayed on one terminal and the projected content cannot be controlled) in the prior art, the client sides on the two terminals respectively execute the same action to achieve the purpose that the content displayed on the two terminals is the same, each client side belongs to the terminal where the client side is located, the client sides can also control the terminal where the client side is located while receiving the content shared by the other client side, and the two client sides are essentially controlled respectively.
Optionally, the server forwarding the first data to the first client includes: the server stores a first communication link of a first client and a second communication link of at least one second client in the same link pool; the server forwards the data received through one second communication link to the first communication link and the second communication links of other second clients in the at least one second client, wherein the data comprises the first data.
As shown in fig. 5, the server stores the four links (i.e., link a, link B, link C, and link D) shown in fig. 4 in the same link pool, after the computer executes an operation (i.e., a first operation) on the browser (i.e., a first client), the computer translates the executed first operation into an execution code and sends the execution object (i.e., generates first data) to the server through a first communication link (i.e., link a), the server sends the received first data to the browser on the mobile phone, the browser on the tablet, and the browser on the television (i.e., a second client and other second clients) through three second communication links (i.e., link B, link C, and link D), and the browser that obtains the first data translates the first data into the execution code and parameters to execute the first operation. Links placed in the same link pool may all be subordinate to the same login account user 1.
When the server forwards the first data, the server may also carry other data, for example, advertisements pushed to the browser on the mobile phone, the browser on the tablet, and the browser on the television, and the advertisements pushed by the server are loaded while the browser on the mobile phone, the browser on the tablet, and the browser on the television execute the first operation.
Optionally, the server stores the first communication link of the first client and the second communication link of the at least one second client in the same link pool, including: the server judges whether prompt information sent by the first client is received or not, wherein the prompt information is used for prompting the first client to receive a first instruction or a second instruction, the first instruction is used for indicating that the first client is allowed to send second data to at least one second client, the second instruction is used for indicating that the first client is not allowed to send the second data to the at least one second client, and the second data is used for indicating that the first client executes a second operation; and after judging that the prompt message is received, the server stores the first communication link of the first client and the second communication link of at least one second client in the same link pool.
The first instruction and the second instruction may be a function on the first client, for example, the first instruction is screen sharing and the second instruction is following browsing. When a first instruction of a first client is triggered, the first client can not only receive first data of a second client to execute a first operation, but also can send a second operation executed by the first client to the second client, so that the second client is controlled to execute the second operation; when the second instruction of the first client is triggered, the first client can only respond to the first data sent by the second client to execute the first operation, and the first client does not send the second data to the second client even if the first client executes the second operation and does not control the second client to execute the second operation.
For example, in winter or the like, it is necessary to browse news using a browser or a news application (first client), but it is not desirable to control the first client by hand because the weather is too cold. At this time, the user can start the following browsing function of the first client to follow the friend for browsing. That is, what content is presented by the second client of the friend and what action is performed, and the corresponding content is presented on the first client and the corresponding action is performed. The friend is a friend in the first client, requests the second client for follow-up browsing, and receives first data of the second client under the condition that the second client agrees.
In the process of following browsing, the first client only receives the first data of the second client, and executes the first operation corresponding to the first data. It should be noted that, no matter whether following browsing or screen sharing, the first client only receives the first operation and does not obtain the execution result after executing the first operation from the second client, which is equivalent to that each client independently executes its own logic to indicate that the received instruction is obtained from another client instead of the terminal where the client is located. For example, when the first operation is open www.aaaa.com, the first client requests www.aaaa.com content from the server of www.aaaa.com instead of obtaining www.aaaa.com content from the second client.
Because the first client can execute the first operation corresponding to the first data sent by the second client and can also execute the second operation executed by the terminal where the first client is located to control the first client, when the second operation is monitored, the second data is generated and sent to the second client, so that the second client also executes the second operation. On the basis, the action executed by the first client, the action executed by the second client and the actions executed by the first client and the second client respectively do not cause the confusion of the display contents on the two clients, the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and meanwhile, the normal display and operation of the two clients can be ensured.
Optionally, the first client and the second client corresponding to the communication links stored in the same link pool belong to the same or different accounts.
In the example shown in fig. 5, the clients corresponding to the links in the same link pool belong to the same account, that is, if a user logs in from the same account on multiple terminals, the links established by multiple clients and the server are stored in the same link pool.
In the example shown in fig. 6, a client requesting to log in to account 1 (i.e., user1) follows the content displayed on the client viewing another log in account 2 (i.e., user2), and user1 logging in to the browser on the computer performs an operation (i.e., a first operation) on the browser, and the browser on the computer translates the first operation into an execution code and an execution object (i.e., first data), and then sends the first operation to the server via link a.
The link pool of the server not only stores link A, but also stores link E, link F and link G of the client belonging to login account 2(user2), wherein link E corresponds to a computer browser of user2, link F corresponds to a mobile phone browser of user2, and link G corresponds to a television browser of user 2. That is, the clients corresponding to the links in the same link pool belong to different accounts, that is, the links established between the clients logged in by using different accounts and the server are stored in the same link pool by the server. The different accounts may be in a friend relationship, specifically, when the client that logs in the account 1 requests to follow and browse the content displayed on the client that logs in the account 2, the account 2 may be a friend of the account 1 on the client, and after the client that logs in the account 1 sends a follow-up request, the server stores the link established between the client that records the account 1 and the server and the link established between the client that logs in the account 2 and the server in the same link pool. Based on this, the client who logs in to the account 2 can also realize the operation that the client who logs in to the account 1 executed the client who logs in to the account 2.
Through the embodiment, the two clients on the two terminals can execute the action executed by the other side and can also receive the control of the terminal where the client is located, so that the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and the technical effect that the terminal receiving sharing can operate the content shared by the terminal actively sharing is obtained.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 3
According to an embodiment of the present invention, an embodiment of a multi-screen interaction apparatus is further provided, and the apparatus may perform the multi-screen interaction method of embodiment 1. As shown in fig. 7, the apparatus for multi-screen interaction is provided with a first client, and the apparatus includes: an acquisition unit 70 and an execution unit 72.
The device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first data sent by a second client to a first client, and the first data is used for indicating the second client to execute a first operation.
And the execution unit is used for acquiring a first operation indicated by the first data and executing the acquired first operation, wherein the first data is forwarded to the first client from the second client by the server, and the first client and the second client are the same client arranged on different equipment terminals.
The first client may be a client set on any one terminal in the hardware environment shown in fig. 1, and the first client and the second client are on different terminals and belong to the same client. The first client and the second client may perform the same function, for example, a browser installed on a mobile phone, a computer, and a television.
The first data may be data corresponding to an action performed by the second client, for example, data corresponding to an action of opening a web page, data corresponding to an action of inputting search content in the search field, or the like. Through the forwarding of the server, the first data is received by the first client, and the first client acquires the first operation indicated by the first data and executes the first operation, so that the first client and the second client execute the same action, the same content is displayed on different clients, and the same action is executed.
Compared with the screen projection (the projection of the other terminal is displayed on one terminal and the projected content cannot be controlled) in the prior art, the client sides on the two terminals respectively execute the same action to achieve the purpose that the content displayed on the two terminals is the same, each client side belongs to the terminal where the client side is located, the client sides can also control the terminal where the client side is located while receiving the content shared by the other client side, and the two client sides are essentially controlled respectively.
Meanwhile, the client can be independently controlled without depending on other clients, so that each client can be controlled according to the characteristics of the terminal where the client is located, and convenience in controlling the client is improved.
For example, when playing a video with a tv-version video player, there is a mobile phone or pad around the user, and it is very easy to play the video on the mobile phone/pad, input the video name, and select a video to play. It is quite difficult to operate a television version of the video player via a television remote control. However, with the device provided by this embodiment, it is possible to search for a video on a mobile phone or a pad, control the playing of the video, play the video on a television, or control the pause or continue playing of the video on the television by using a television remote controller.
For example, a computer is used for browsing pages, but the sliding operation of the mobile phone is more convenient, and at this time, the mobile phone is equivalent to a touch screen of the computer. When searching is needed, keywords are input by using a computer. The search result can be browsed by sliding the mobile phone. Because the sliding on the mobile phone also acts on the computer, the search result on the computer moves along with the sliding on the mobile phone, and therefore the search result can be browsed from the computer. By adopting multi-screen interaction, the convenience of the large screen and input of a computer can be integrated with the usability of mobile phone/pad operation, and the convenience of operation is improved.
For example, the first client is a video player on a television, the second client is a video player on a mobile phone, and communication links of the video player on the television and the video player on the mobile phone are stored in the same link pool of the server. After the video player on the mobile phone executes the action of playing the video A (namely the first operation), the video is played. The video player on the mobile phone generates the action of playing the A video into first data and sends a first instruction to the server. The server forwards the first data received by the communication link of the video player on the mobile phone to other communication links in the same link pool, wherein one communication link is the communication link of the video player on the television, so that the video player on the television can receive the first data. And the video player on the television acquires the action of playing the video A corresponding to the first data, and then plays the video of the video player on the television.
Optionally, the execution unit includes: the analysis module is used for analyzing the execution code and the execution object from the first data, wherein the operation performed on the execution object by using the execution code is a first operation; and the operation module is used for operating the execution object by utilizing the execution code.
The execution code is a unified execution code that can be recognized by each client, each execution code corresponds to an action, the execution object can be an object acted by the action corresponding to the execution code, and when the execution code operates on the execution object, a first operation is obtained, that is, the first operation includes the action corresponding to the execution code and the object corresponding to the execution object. Then, the client calls the execution code to perform the operation on the execution object, and the first operation is realized.
For example, in the above example, the first client is a video player on a television and the second client is a video player on a cell phone. And the video player on the mobile phone generates first data according to the 'playing A video'. After the video player on the television acquires the first data, the execution code is analyzed from the first data to be 'played', the execution object is 'A video', and then the video player on the television executes playing operation on the A video.
The first client can execute corresponding first operation according to the first data sent by the second client, and the first client can also execute corresponding action according to the instruction received by the first client from the terminal. For example, a video player on a television receives a "pause" signal from a remote control to pause playing a video.
That is to say, the first client may perform the same operation according to the first data sent by the second client, and may also perform its own control independently without being controlled by the second client, and the first client and the second client may also perform independent control while displaying the same content, thereby improving flexibility of control of the first client and the second client.
Example 4
According to an embodiment of the present invention, an embodiment of a server is further provided, and the server may execute the multi-screen interaction method of embodiment 2. As shown in fig. 8, the apparatus for multi-screen interaction is provided with a first client, and the apparatus includes: a data acquisition unit 80 and a forwarding unit 82.
The data obtaining unit 80 is configured to obtain first data of a second client.
The forwarding unit 82 is configured to forward first data to the first client, so that the first client obtains a first operation indicated by the first data, and executes the obtained first operation, where the first data is used to indicate that the second client performs the first operation, and the first data is forwarded from the second client to the first client by the server, and the first client and the second client are the same client disposed on different device terminals.
The first client may be a client set on any one terminal in the hardware environment shown in fig. 1, and the first client and the second client are on different terminals and belong to the same client. The first client and the second client may perform the same function, for example, a browser installed on a mobile phone, a computer, and a television.
As shown in fig. 4, each client (computer, mobile phone, tablet and television) establishes a bidirectional link (i.e., link a, link B, link C and link D) with the server, that is, each client may send data to the server or receive data sent by the server, and each client in fig. 4 may be used as a first client or a second client. The server receives the first data in the link of any one client and forwards the first data to the client corresponding to other links.
The first data may be data corresponding to an action performed by the second client, for example, data corresponding to an action of opening a web page, data corresponding to an action of inputting search content in the search field, or the like. Through the forwarding of the server, the first data is received by the first client, and the first client acquires the first operation indicated by the first data and executes the first operation, so that the first client and the second client execute the same action, the same content is displayed on different clients, and the same action is executed.
Compared with the screen projection (the projection of the other terminal is displayed on one terminal and the projected content cannot be controlled) in the prior art, the client sides on the two terminals respectively execute the same action to achieve the purpose that the content displayed on the two terminals is the same, each client side belongs to the terminal where the client side is located, the client sides can also control the terminal where the client side is located while receiving the content shared by the other client side, and the two client sides are essentially controlled respectively.
Optionally, the forwarding unit includes: the storage module is used for storing a first communication link of a first client and a second communication link of at least one second client in the same link pool; and the forwarding module is used for forwarding the data received through one second communication link to the first communication link and second communication links of other second clients in at least one second client, wherein the received data comprises the first data.
As shown in fig. 5, the server stores the four links (i.e., link a, link B, link C, and link D) shown in fig. 4 in the same link pool, after the computer executes an operation (i.e., a first operation) on the browser (i.e., a first client), the computer translates the executed first operation into an execution code and sends the execution object (i.e., generates first data) to the server through a first communication link (i.e., link a), the server sends the received first data to the browser on the mobile phone, the browser on the tablet, and the browser on the television (i.e., a second client and other second clients) through three second communication links (i.e., link B, link C, and link D), and the browser that obtains the first data translates the first data into the execution code and parameters to execute the first operation.
When the server forwards the first data, the server may also carry other data, for example, advertisements pushed to the browser on the mobile phone, the browser on the tablet, and the browser on the television, and the advertisements pushed by the server are loaded while the browser on the mobile phone, the browser on the tablet, and the browser on the television execute the first operation.
Optionally, the storage module comprises: the judging submodule is used for judging whether prompt information sent by a first client side is received or not, the prompt information is used for prompting the first client side to receive a first instruction or a second instruction, the first instruction is used for indicating that the first client side is allowed to send second data to at least one second client side, the second instruction is used for indicating that the first client side is not allowed to send the second data to the at least one second client side, and the second data is used for indicating that the first client side executes a second operation; and the storage submodule is used for storing the first communication link of the first client and the second communication link of at least one second client in the same link pool after judging that the prompt message is received.
The first instruction and the second instruction may be a function on the first client, for example, the first instruction is screen sharing and the second instruction is following browsing. When a first instruction of a first client is triggered, the first client can not only receive first data of a second client to execute a first operation, but also can send a second operation executed by the first client to the second client, so that the second client is controlled to execute the second operation; when the second instruction of the first client is triggered, the first client can only respond to the first data sent by the second client to execute the first operation, and the first client does not send the second data to the second client even if the first client executes the second operation and does not control the second client to execute the second operation.
For example, in winter or the like, it is necessary to browse news using a browser or a news application (first client), but it is not desirable to control the first client by hand because the weather is too cold. At this time, the user can start the following browsing function of the first client to follow the friend for browsing. That is, what content is presented by the second client of the friend and what action is performed, and the corresponding content is presented on the first client and the corresponding action is performed. The friend is a friend in the first client, requests the second client for follow-up browsing, and receives first data of the second client under the condition that the second client agrees.
In the process of following browsing, the first client only receives the first data of the second client, and executes the first operation corresponding to the first data. It should be noted that, no matter whether following browsing or screen sharing, the first client only receives the first operation and does not obtain the execution result after executing the first operation from the second client, which is equivalent to that each client independently executes its own logic to indicate that the received instruction is obtained from another client instead of the terminal where the client is located. For example, when the first operation is open www.aaaa.com, the first client requests www.aaaa.com content from the server of www.aaaa.com instead of obtaining www.aaaa.com content from the second client.
Because the first client can execute the first operation corresponding to the first data sent by the second client and can also execute the second operation executed by the terminal where the first client is located to control the first client, when the second operation is monitored, the second data is generated and sent to the second client, so that the second client also executes the second operation. On the basis, the action executed by the first client, the action executed by the second client and the actions executed by the first client and the second client respectively do not cause the confusion of the display contents on the two clients, the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and meanwhile, the normal display and operation of the two clients can be ensured.
Optionally, the first client and the second client corresponding to the communication links stored in the same link pool belong to the same or different accounts.
In the example shown in fig. 5, the clients corresponding to the links in the same link pool belong to the same account, that is, if a user logs in from the same account on multiple terminals, the links established by multiple clients and the server are stored in the same link pool.
In the example shown in fig. 6, a client requesting to log in to account 1 (i.e., user1) follows the content displayed on the client viewing another log in account 2 (i.e., user2), and user1 logging in to the browser on the computer performs an operation (i.e., a first operation) on the browser, and the browser on the computer translates the first operation into an execution code and an execution object (i.e., first data), and then sends the first operation to the server via link a.
The link pool of the server not only stores link A, but also stores link E, link F and link G of the client belonging to login account 2(user2), wherein link E corresponds to a computer browser of user2, link F corresponds to a mobile phone browser of user2, and link G corresponds to a television browser of user 2. That is, the clients corresponding to the links in the same link pool belong to different accounts, that is, the links established between the clients logged in by using different accounts and the server are stored in the same link pool by the server. The different accounts may be in a friend relationship, specifically, when the client that logs in the account 1 requests to follow and browse the content displayed on the client that logs in the account 2, the account 2 may be a friend of the account 1 on the client, and after the client that logs in the account 1 sends a follow-up request, the server stores the link established between the client that records the account 1 and the server and the link established between the client that logs in the account 2 and the server in the same link pool. Based on this, the client who logs in to the account 2 can also realize the operation that the client who logs in to the account 1 executed the client who logs in to the account 2.
Through the embodiment, the two clients on the two terminals can execute the action executed by the other side and can also receive the control of the terminal where the client is located, so that the technical problem that the terminal receiving sharing cannot operate the content shared by the terminal actively sharing is solved, and the technical effect that the terminal receiving sharing can operate the content shared by the terminal actively sharing is obtained.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.