CN108848083B - Method and system for multi-screen interaction of webpage version - Google Patents

Method and system for multi-screen interaction of webpage version Download PDF

Info

Publication number
CN108848083B
CN108848083B CN201810564684.6A CN201810564684A CN108848083B CN 108848083 B CN108848083 B CN 108848083B CN 201810564684 A CN201810564684 A CN 201810564684A CN 108848083 B CN108848083 B CN 108848083B
Authority
CN
China
Prior art keywords
message
webpage
webpage end
group
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810564684.6A
Other languages
Chinese (zh)
Other versions
CN108848083A (en
Inventor
王莹
张斯亮
牛庆德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tianyuan Innovation Technology Co ltd
Original Assignee
Beijing Tianyuan Innovation Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tianyuan Innovation Technology Co ltd filed Critical Beijing Tianyuan Innovation Technology Co ltd
Priority to CN201810564684.6A priority Critical patent/CN108848083B/en
Publication of CN108848083A publication Critical patent/CN108848083A/en
Application granted granted Critical
Publication of CN108848083B publication Critical patent/CN108848083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a system for multi-screen interaction of a webpage version, wherein the method comprises the following steps: receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result. According to the method and the system, multi-screen interaction can be realized by utilizing the core node and the webpage end, excessive software and hardware support is not needed, the realization of the multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of the multi-screen interaction are reduced, and therefore the human resources for the multi-screen interaction development and maintenance are saved.

Description

Method and system for multi-screen interaction of webpage version
Technical Field
The invention relates to the technical field of communication, in particular to a method and a system for multi-screen interaction of a webpage version.
Background
The current internet technology relates to all industries, and with diversification of industry requirements, front-end visualization modes are increasingly looked at by public institutions and scientific research institutions, and for some standardized demonstration reports, multi-screen interaction is often needed to complete demonstration.
The multi-screen interaction is a technique which is emerging at times, and is simply the screen of several devices, and the devices can be connected and converted with each other through special connecting devices. For example, a movie on a mobile phone can be played on a television, pictures on a tablet can be shared on the television, and the content of a computer can be projected on the television.
However, in the prior art, when multi-screen interaction is implemented, not only hardware support but also application software support of a mobile phone terminal, a multi-screen interaction box and a smart television terminal are required. For common third-party users or individual users, the development of multi-screen interaction is difficult to realize, and the difficulty of later maintenance is high.
In view of the above, it is desirable to provide a multi-screen interaction method and system, which simplify the implementation of multi-screen interaction and reduce the development difficulty and maintenance difficulty of multi-screen interaction.
Disclosure of Invention
The invention provides a method and a system for multi-screen interaction of a webpage version, aiming at overcoming the problem of high difficulty in development and maintenance of multi-screen interaction in the prior art.
In one aspect, the invention provides a method for multi-screen interaction of a webpage version, which comprises the following steps:
s1, receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to the identification information of the first webpage end;
s2, receiving a target message sent by the first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type;
and S3, determining the message type of the target message, and when the message type is the in-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group, so that the second webpage end in the first group analyzes the message body and displays the analysis result.
Preferably, the step S3 further includes:
and when the message type is the global message, the target message is distributed to all second webpage ends, so that all second webpage ends analyze the message body and display the analysis result.
Preferably, the step S2 is followed by:
and caching the target message to a storage device.
Preferably, the message header further includes a message life cycle;
correspondingly, after the caching the target message to the storage device, the method further includes: when the message lifecycle is reached, the target message is purged from the storage device.
Preferably, the step S3 is followed by:
receiving a connection request of a third webpage end, and determining a second group to which the third webpage end belongs according to identification information of the third webpage end;
in the message life cycle, when the message type is in-group message and the second group is the same as the first group, the target message is distributed to the third webpage end; and when the message type is a global message, the target message is distributed to the third webpage end.
Preferably, the first webpage end, the second webpage end and the third webpage end contain socket controls.
In one aspect, the present invention provides a multi-screen interaction system for web pages, comprising:
the webpage end connection module is used for receiving a connection request of a first webpage end and determining a first group to which the first webpage end belongs according to the identification information of the first webpage end;
the message receiving module is used for receiving a target message sent by the first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type;
and the message distribution module is used for determining the message type of the target message, and distributing the target message to a second webpage end in the first group when the message type is the in-group message and the first group comprises at least one second webpage end, so that the second webpage end in the first group analyzes the message body and displays the analysis result.
Preferably, the message distribution module is further configured to:
and when the message type is the global message, the target message is distributed to all second webpage ends, so that all second webpage ends analyze the message body and display the analysis result.
In one aspect, the present invention provides a device for a method for multi-screen interaction of a web page version, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor being capable of performing any of the methods described above when invoked by the processor.
In one aspect, the invention provides a non-transitory computer readable storage medium storing computer instructions that cause a computer to perform any of the methods described above.
The invention provides a multi-screen interaction method and a multi-screen interaction system for webpage versions, wherein a core node receives a connection request of a first webpage end and determines a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result. According to the method and the system, the multiple webpage ends are connected with the core node, multi-screen interaction is realized in a message distribution mode through the core node, and multi-screen interaction can be realized by utilizing the core node and the webpage ends without excessive software and hardware support, so that the realization of multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of multi-screen interaction are reduced, and therefore the human resources for multi-screen interaction development and maintenance are saved.
Drawings
Fig. 1 is a schematic overall flow chart of a method for multi-screen interaction of a web page version according to an embodiment of the present invention;
fig. 2 is a schematic overall structure diagram of a multi-screen interaction system for web pages according to an embodiment of the present invention;
fig. 3 is a schematic structural framework diagram of an apparatus of a multi-screen interaction method for web pages according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
It should be noted that, in order to implement multi-screen interaction, the present invention communicatively connects a plurality of web page terminals with a core node, and implements multi-screen interaction of the plurality of web page terminals by using the core node. The multiple web page ends comprise a first web page end and a second web page end, the first web page end is a producer of the message, the second web page end is a consumer of the message, namely, the multi-screen interactive content is distributed to the second web page end by the first web page end in the form of the message through the core node.
Based on the above principle, the embodiment provides a method for multi-screen interaction of a webpage version, and an execution main body of the method is a core node.
Fig. 1 is a schematic overall flow chart of a method for multi-screen interaction of a web page version according to an embodiment of the present invention, and as shown in fig. 1, the present invention provides a method for multi-screen interaction of a web page version, including:
s1, receiving a connection request of the first webpage end, and determining a first group to which the first webpage end belongs according to the identification information of the first webpage end;
specifically, the first web page sends a connection request to the core node, and the first web page may send a join instruction to the core node to request to establish a connection with the core node. The core node receives a connection request of the first webpage end, and determines a first group to which the first webpage end belongs according to the identification information of the first webpage end. The identification information may be a user ID, so that a plurality of web page sides corresponding to the same user ID may be divided into the same group. For example, if the user a opens multiple web browsers, the multiple web browsers will be divided into the same group by the core node.
S2, receiving a target message sent by the first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type;
specifically, after the first webpage end is in communication connection with the core node, the first webpage end serves as a message producer, the contents of multi-screen interaction are combined into a target message according to a preset message protocol, after the target message is generated, the first webpage end sends the target message to the core node, and finally the core node receives the target message sent by the first webpage end. The analysis result of the target message is the content of the multi-screen interaction, and the target message generated according to the preset message protocol comprises a message header and a message body, wherein the message header comprises a message type.
And S3, determining the message type of the target message, and when the message type is the message in the group and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group, so that the second webpage end in the first group analyzes the message body and displays the analysis result.
Specifically, after receiving the target message, the core node extracts a message type from a message header of the target message, that is, determines the message type of the target message. When the message type is the message in the group and the first group comprises at least one second webpage end, the target message is sent to the second webpage end in the first group to which the target message belongs by the first webpage end. Therefore, the core node distributes the target message to the second webpage end in the first group.
In this embodiment, the first web page is used as a producer of the message, and the other web pages connected to the core node are used as the second web page, which is a consumer of the message. The number of the second web page ends in the first group may be multiple, and when the first group includes multiple second web page ends, the core node distributes the target message to all the second web page ends in the first group. And after receiving the target message, the second webpage terminal analyzes the message body of the target message and displays the analysis result on the screen of the second webpage terminal. Therefore, multi-screen interaction of the first webpage end and the second webpage end is achieved.
It should be noted that after the first web page end and the second web page end are connected to the core node, both the first web page end and the second web page end need to send heartbeat packets to the core node according to a preset frequency, so that the core node determines the online states of the first web page end and the second web page end.
In order to better understand the technical solution of the present invention, the following examples are specifically described:
for example, when there are 6 netpages currently under A, B, C, D, E and F that need to perform multi-screen interaction, both A, B, C, D, E and F need to be in communication connection with the core node first, where A, B, C are netpages opened by user a, and D, E, F are netpages opened by users b, c, and d, respectively. On the basis, when the core node receives the connection requests of the 6 web pages, A, B, C will be divided into the same group. Therefore, when the webpage end a needs to perform multi-screen interaction with other webpage ends, a is the first webpage end, and the other webpage ends B, C, D, E and F connected with the core node are both the second webpage ends, the first webpage end a sends the content of multi-screen interaction to the core node in a message form, and the core node determines the message type of the target message after receiving the target message sent by the first webpage end a. When the message type is the intra-group message, the core node distributes the target message to second webpage ends B and C which belong to the same group with the first webpage end A, and the second webpage ends B and C analyze the message body in the target message and display the analysis result after receiving the target message. Therefore, A, B, C multi-screen interaction of 3 webpage ends is realized.
The invention provides a multi-screen interaction method for webpage versions, which comprises the steps that a core node receives a connection request of a first webpage end, and a first group to which the first webpage end belongs is determined according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result. According to the method, the multiple webpage ends are connected with the core node, multi-screen interaction is realized in a message distribution mode through the core node, and multi-screen interaction can be realized by utilizing the core node and the webpage ends without excessive software and hardware support, so that the realization of multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of multi-screen interaction are reduced, and therefore the human resources for multi-screen interaction development and maintenance are saved.
Based on any of the above embodiments, a method for web page version multi-screen interaction is provided, where step S3 further includes: and when the message type is the global message, distributing the target message to all the second webpage ends so that all the second webpage ends analyze the message body and display the analysis result.
Specifically, after receiving the target message, the core node extracts a message type from a message header of the target message, that is, determines the message type of the target message. And when the message type is the global message, the target message is sent to all second webpage ends connected with the core node by the first webpage end. Therefore, the core node distributes the target message to the second webpage end in the first group and the second webpage end outside the first group, namely, the target message is distributed to all the second webpage ends connected with the core node. And after all the second webpage ends receive the target message, analyzing the message body of the target message, and displaying an analysis result on a screen of each second webpage end. Therefore, multi-screen interaction of the first webpage end and the second webpage end is achieved.
To illustrate with the above example, if the message type after the core node receives the target message sent by the first web page end a is the global message, the core node distributes the target message to all the second web page ends B, C, D, E and F connected to the core node, and after receiving the target message, the second web page ends B, C, D, E and F parse the message body in the target message and display the parsing result.
When the message type of the target message sent by the first webpage end is the global message, the target message is distributed to all second webpage ends, so that all second webpage ends analyze the message body and display the analysis result. According to the method, the multiple webpage ends are connected with the core node, multi-screen interaction is realized in a message distribution mode through the core node, and multi-screen interaction can be realized by utilizing the core node and the webpage ends without excessive software and hardware support, so that the realization of multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of multi-screen interaction are reduced, and therefore the human resources for multi-screen interaction development and maintenance are saved.
Based on any of the above embodiments, there is provided a method for multi-screen interaction of web pages, where the step S2 further includes: and caching the target message to a storage device.
Specifically, after receiving the target message sent by the first webpage, the core node needs to cache the target message to the storage device. On the basis, when the core node receives the target message sent by the first webpage end at the next moment, the target message received at the current moment is stored in the storage device as a history target message. Therefore, the historical target message can be stored, and the subsequent calling of the historical target message is facilitated.
According to the multi-screen interaction method for the webpage version, provided by the invention, after the core node receives the target message sent by the first webpage end, the target message is cached to the storage device, so that the storage of the historical target message is effectively realized, and the subsequent calling of the historical target message is facilitated.
Based on any one of the embodiments, a method for multi-screen interaction of a webpage version is provided, wherein a message header further comprises a message life cycle;
correspondingly, caching the target message to the storage device further comprises: when the message lifecycle is reached, the target message is purged from the storage device.
Specifically, a target message sent by the first web page to the core node is generated according to a preset message protocol, the target message includes a message header and a message body, and the message header includes a message type. In this embodiment, the message header further includes a message lifetime, and the target message is valid only within the message lifetime. On the basis, after the core node receives the target message and caches the target message to the storage device, after a certain time, when the message life cycle of the target message is reached, the core node clears the target message from the storage device.
According to the multi-screen interaction method for the webpage version, the message header of the target message received by the core node also comprises the message life cycle, and after the core node caches the target message to the storage device, the core node clears the target message from the storage device when the message life cycle of the target message is reached, so that the effectiveness of the target message in the message life cycle is ensured, meanwhile, the target message reaching the message life cycle can be cleared, the storage space of the storage device is saved, and the storage burden of the storage device is effectively reduced.
Based on any of the above embodiments, there is provided a method for multi-screen interaction of web pages, where the step S3 further includes: receiving a connection request of a third webpage end, and determining a second group to which the third webpage end belongs according to identification information of the third webpage end; in the message life cycle, when the message type is in-group message and the second group is the same as the first group, the target message is distributed to a third webpage end; and when the message type is the global message, the target message is distributed to the third webpage end.
It should be noted that, in any of the embodiments, the first web page and the second web page are both web pages that establish communication connection with the core node at the current time, and the web page that does not establish communication connection with the core node at the current time is set as the third web page.
On the basis, after the multi-screen interaction between the first webpage end and the second webpage end is realized, if the multi-screen interaction is also required to be realized by the third webpage end, the third webpage end needs to send a connection request to the core node, the core node receives the connection request of the third webpage end, and the second group to which the third webpage end belongs is determined according to the identification information of the third webpage end. The second group may be the same as or different from the first group, and on the basis of multi-screen interaction between 6 netpages of the netpage terminals A, B, C, D, E and F, the netpage terminals A, B and C are both netpages opened by the user a, the netpage terminal a is a first netpage terminal, the netpage terminals B and C are second netpage terminals belonging to the same group as the first netpage terminal a, and D, E and F are second netpage terminals outside the group. A subsequent webpage end G requests to establish communication connection with the core node, and if the webpage end G is also a webpage end opened by the user A, a second group to which the webpage end G belongs is the same as a first group to which the webpage ends A, B and C belong; if the web page end G is the web page end opened by the user b, the second group to which the web page end G belongs is different from the first group to which the web page ends A, B and C belong.
On the basis, after the third webpage end establishes communication connection with the core node, if the third webpage end is within the message life cycle of the target message, the target message is still stored in the storage device. When the message type of the target message is intra-group message and the second group is the same as the first group, the core node takes out the target message from the storage device and distributes the target message to a third webpage end; and when the message type of the target message is the intra-group message and the second group is different from the first group, the core node does not distribute the target message to the third webpage end. In addition, when the message type of the target message is the global message, the core node directly distributes the target message to the third webpage end. Therefore, the historical target message can be adaptively distributed to a third webpage end which establishes connection with the core node subsequently.
The invention provides a multi-screen interaction method for webpage versions, which is characterized in that after a first webpage end and a second webpage end realize multi-screen interaction, a core node receives a connection request of a third webpage end, and a second group to which the third webpage end belongs is determined according to identification information of the third webpage end; in the message life cycle, when the message type is in-group message and the second group is the same as the first group, the target message is distributed to a third webpage end; and when the message type is the global message, the target message is distributed to the third webpage end. Therefore, the historical target message can be adaptively distributed to a third webpage end which is connected with the core node subsequently, and message playback of the historical target message is effectively realized.
Based on any one of the above embodiments, a method for multi-screen interaction of web pages is provided, where a first web page side, a second web page side, and a third web page side include socket controls.
Specifically, in this embodiment, socket controls are embedded in the first webpage end, the second webpage end, and the third webpage end, where the socket controls refer to a js code and a js file, and include functions such as onInit, onSend, onMessage, and onEnd that a user implements. On the basis, the first webpage end, the second webpage end and the third webpage end are connected with the core node through the socket control, the message is sent, the message is received, the connection with the core node is disconnected, and the like, so that the system structures of the first webpage end, the second webpage end and the third webpage end are simplified.
According to the multi-screen interaction method for the webpage version, the first webpage end, the second webpage end and the third webpage end comprise socket controls, and through the socket controls, operations of establishing connection with a core node, sending messages, receiving messages, disconnecting the connection with the core node and the like are performed, so that the system structures of the first webpage end, the second webpage end and the third webpage end are simplified, and the multi-screen interaction is facilitated to be simplified.
Fig. 2 is a schematic overall structure diagram of a multi-screen interaction system for web pages, according to an embodiment of the present invention, as shown in fig. 2, the present invention provides a multi-screen interaction system for web pages, where the system is applied to a core node, and includes:
the webpage end connection module 1 is used for receiving a connection request of a first webpage end and determining a first group to which the first webpage end belongs according to identification information of the first webpage end;
specifically, the first web page sends a connection request to the core node, and the first web page may send a join instruction to the core node to request to establish a connection with the core node. The core node receives a connection request of the first webpage end by using the webpage end connection module 1, and determines a first group to which the first webpage end belongs according to the identification information of the first webpage end. The identification information may be a user ID, so that a plurality of web page sides corresponding to the same user ID may be divided into the same group. For example, if the user a opens multiple web browsers, the multiple web browsers will be divided into the same group by the core node.
The message receiving module 2 is used for receiving a target message sent by the first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type;
specifically, after the first webpage end is in communication connection with the core node, the first webpage end serves as a message producer, the content of multi-screen interaction is combined into a target message according to a preset message protocol, after the target message is generated, the first webpage end sends the target message to the core node, and finally the core node receives the target message sent by the first webpage end through the message receiving module 2. The analysis result of the target message is the content of the multi-screen interaction, and the target message generated according to the preset message protocol comprises a message header and a message body, wherein the message header comprises a message type.
And the message distribution module 3 is configured to determine a message type of the target message, and when the message type is an intra-group message and the first group includes at least one second web page, distribute the target message to a second web page in the first group, so that the second web page in the first group analyzes the message body and displays an analysis result.
Specifically, after receiving the target message, the core node extracts the message type from the message header of the target message by using the message distribution module 3, that is, determines the message type of the target message. When the message type is the message in the group and the first group comprises at least one second webpage end, the target message is sent to the second webpage end in the first group to which the target message belongs by the first webpage end. Therefore, the core node distributes the target message to the second webpage end in the first group by using the message distribution module 3.
In this embodiment, the first web page is used as a producer of the message, and the other web pages connected to the core node are used as the second web page, which is a consumer of the message. The number of the second web page ends in the first group may be multiple, and when the first group includes multiple second web page ends, the core node distributes the target message to all the second web page ends in the first group by using the message distribution module 3. And after receiving the target message, the second webpage terminal analyzes the message body of the target message and displays the analysis result on the screen of the second webpage terminal. Therefore, multi-screen interaction of the first webpage end and the second webpage end is achieved.
It should be noted that after the first web page end and the second web page end are connected to the core node, both the first web page end and the second web page end need to send heartbeat packets to the core node according to a preset frequency, so that the core node determines the online states of the first web page end and the second web page end.
In addition, for convenience of understanding the technical solution of the present embodiment, reference may be made to the above description in the corresponding method embodiment, which is not repeated herein.
The invention provides a multi-screen interaction system for webpage versions, wherein a core node receives a connection request of a first webpage end by utilizing a webpage end connection module, and determines a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end by using a message receiving module, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message by using a message distribution module, and distributing the target message to a second webpage end in the first group when the message type is the in-group message and the first group comprises at least one second webpage end, so that the second webpage end in the first group analyzes the message body and displays the analysis result. According to the system, the multiple webpage ends are connected with the core node, multi-screen interaction is realized in a message distribution mode through the core node, multi-screen interaction can be realized by utilizing the core node and the webpage ends, excessive software and hardware support is not needed, the realization of multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of multi-screen interaction are reduced, and therefore the human resources for multi-screen interaction development and maintenance are saved.
Based on any of the above embodiments, a system for multi-screen interaction of a web page version is provided, and the message distribution module 3 is further configured to: and when the message type is the global message, distributing the target message to all the second webpage ends so that all the second webpage ends analyze the message body and display the analysis result.
Specifically, after receiving the target message by using the message receiving module 2, the core node extracts a message type from a message header of the target message by using the message distributing module 3, that is, determines the message type of the target message. And when the message type is the global message, the target message is sent to all second webpage ends connected with the core node by the first webpage end. Therefore, the core node uses the message distribution module 3 to distribute the target message to the second web page end in the first group and the second web page end outside the first group, that is, the target message is distributed to all the second web page ends connected with the core node. And after all the second webpage ends receive the target message, analyzing the message body of the target message, and displaying an analysis result on a screen of each second webpage end. Therefore, multi-screen interaction of the first webpage end and the second webpage end is achieved.
According to the multi-screen interaction system for the webpage version, provided by the invention, when the message type of the target message sent by the first webpage end is the global message, the target message is distributed to all the second webpage ends by using the message distribution module, so that all the second webpage ends analyze the message body and display the analysis result. According to the system, the multiple webpage ends are connected with the core node, multi-screen interaction is realized in a message distribution mode through the core node, multi-screen interaction can be realized by utilizing the core node and the webpage ends, excessive software and hardware support is not needed, the realization of multi-screen interaction is simplified to a certain extent, the development difficulty and the maintenance difficulty of multi-screen interaction are reduced, and therefore the human resources for multi-screen interaction development and maintenance are saved.
Fig. 3 is a block diagram illustrating a structure of a device of a web page version multi-screen interaction method according to an embodiment of the present application. Referring to fig. 3, the device of the web page version multi-screen interaction method includes: a processor (processor)31, a memory (memory)32, and a bus 33; wherein, the processor 31 and the memory 32 complete the communication with each other through the bus 33; the processor 31 is configured to call program instructions in the memory 32 to perform the methods provided by the above-mentioned method embodiments, for example, including: receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to identification information of the first webpage end; receiving a target message sent by a first webpage end, wherein the target message comprises a message header and a message body, and the message header comprises a message type; and determining the message type of the target message, and when the message type is the intra-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group so that the second webpage end in the first group analyzes the message body and displays the analysis result.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the device and the like of the web page version multi-screen interaction method are merely illustrative, where the units illustrated as the separate components may or may not be physically separate, and the components displayed as the units may or may not be physical units, that is, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method for multi-screen interaction of a webpage version is characterized by comprising the following steps:
s1, receiving a connection request of a first webpage end, and determining a first group to which the first webpage end belongs according to the identification information of the first webpage end;
s2, receiving the target message sent by the first webpage end, and caching the target message to a storage device; the target message comprises a message header and a message body, wherein the message header comprises a message type and a message life cycle;
s3, determining the message type of the target message, and when the message type is in-group message and the first group comprises at least one second webpage end, distributing the target message to the second webpage end in the first group, so that the second webpage end in the first group analyzes the message body and displays the analysis result; when the message type is a global message, the target message is distributed to all second webpage ends, so that all second webpage ends analyze the message body and display an analysis result;
s4, receiving a connection request of a third webpage end, and determining a second group to which the third webpage end belongs according to the identification information of the third webpage end;
in the message life cycle, when the message type is in-group message and the second group is the same as the first group, taking out the target message from the storage device and distributing the target message to the third webpage end; and when the message type is a global message, taking out the target message from the storage equipment and distributing the target message to the third webpage end.
2. The method of claim 1, wherein caching the target message to a storage device further comprises: when the message lifecycle is reached, the target message is purged from the storage device.
3. The method of claim 1, wherein the first and second web sites and the third web site contain socket controls.
4. The utility model provides a multi-screen interactive system of webpage version which characterized in that includes:
the webpage end connection module is used for receiving a connection request of a first webpage end and determining a first group to which the first webpage end belongs according to the identification information of the first webpage end; the server is also used for receiving a connection request of a third webpage end and determining a second group to which the third webpage end belongs according to the identification information of the third webpage end;
the message receiving module is used for receiving the target message sent by the first webpage end and caching the target message to a storage device; the target message comprises a message header and a message body, wherein the message header comprises a message type and a message life cycle;
the message distribution module is used for determining the message type of the target message, and distributing the target message to a second webpage end in the first group when the message type is the in-group message and the first group comprises at least one second webpage end, so that the second webpage end in the first group analyzes the message body and displays the analysis result; when the message type is a global message, the target message is distributed to all second webpage ends, so that all second webpage ends analyze the message body and display an analysis result; the server is further used for taking out the target message from the storage device and distributing the target message to the third webpage end when the message type is in-group message and the second group is the same as the first group in the message life cycle; and when the message type is a global message, taking out the target message from the storage equipment and distributing the target message to the third webpage end.
5. The equipment of the method for multi-screen interaction of the webpage version is characterized by comprising the following steps:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 3.
6. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 3.
CN201810564684.6A 2018-06-04 2018-06-04 Method and system for multi-screen interaction of webpage version Active CN108848083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810564684.6A CN108848083B (en) 2018-06-04 2018-06-04 Method and system for multi-screen interaction of webpage version

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810564684.6A CN108848083B (en) 2018-06-04 2018-06-04 Method and system for multi-screen interaction of webpage version

Publications (2)

Publication Number Publication Date
CN108848083A CN108848083A (en) 2018-11-20
CN108848083B true CN108848083B (en) 2021-01-12

Family

ID=64210140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810564684.6A Active CN108848083B (en) 2018-06-04 2018-06-04 Method and system for multi-screen interaction of webpage version

Country Status (1)

Country Link
CN (1) CN108848083B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379125A (en) * 2013-07-02 2013-10-30 李达航 Multi-screen interaction method based on social network
CN103826155A (en) * 2014-02-28 2014-05-28 深圳市同洲电子股份有限公司 Multi-screen interaction method, server, terminal and system
CN105868001A (en) * 2015-01-21 2016-08-17 ***通信集团公司 Multi-screen interaction operation realization method, equipment and system
WO2016196690A1 (en) * 2015-06-01 2016-12-08 Miller Benjamin Aaron Rights management and syndication of content

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683122A (en) * 2015-02-12 2015-06-03 北京集奥聚合科技有限公司 Multi-screen-linkage-based information transmitting method and system
CN105094737B (en) * 2015-08-07 2018-07-31 北京橙鑫数据科技有限公司 multimedia information display method and device
CN106572383A (en) * 2015-10-12 2017-04-19 中国科学院声学研究所 Video switching method and system based on multi-screen interaction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379125A (en) * 2013-07-02 2013-10-30 李达航 Multi-screen interaction method based on social network
CN103826155A (en) * 2014-02-28 2014-05-28 深圳市同洲电子股份有限公司 Multi-screen interaction method, server, terminal and system
CN105868001A (en) * 2015-01-21 2016-08-17 ***通信集团公司 Multi-screen interaction operation realization method, equipment and system
WO2016196690A1 (en) * 2015-06-01 2016-12-08 Miller Benjamin Aaron Rights management and syndication of content

Also Published As

Publication number Publication date
CN108848083A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN103442126A (en) Mobile phone communication method and system based on cloud service
CN105554430A (en) Video call method, system and device
CN112631910A (en) Front-end testing method and device, computer equipment and storage medium
CN103618701A (en) Method and browser for performing webgame interaction
CN113784049B (en) Camera calling method of android system virtual machine, electronic equipment and storage medium
EP4113985A1 (en) Multimedia conference data processing method and apparatus, and electronic device
CN110446114A (en) Multimedia data processing device, method, electronic equipment and storage medium
CN108965932A (en) A kind of even wheat window methods of exhibiting and device
JP2023537767A (en) Image processing method and apparatus, and computer-readable storage medium
CN105487640A (en) Image pre-loading and caching method of Android watch
CN115103320B (en) Message transmission method and device, electronic equipment and storage medium
CN113435989A (en) Financial data processing method and device
CN113377312A (en) Same-screen interaction method and device, computer equipment and computer readable storage medium
CN111859210B (en) Image processing method, device, equipment and storage medium
CN107517188A (en) A kind of data processing method and device based on Android system
CN103581707A (en) Double-screen interactive processing method and device
CN108334322B (en) Data request method and system of MVC framework
CN108848083B (en) Method and system for multi-screen interaction of webpage version
CN103118055A (en) Method and device for multi-media access
CN113055348A (en) Cross-platform data request method and device and electronic equipment
CN114071382B (en) Message sending method and device
CN111935316B (en) Method and device for acquiring front-end equipment catalog
CN109309859A (en) Direct broadcasting room method for showing interface, framework and correlation technique, device and equipment
CN110740337B (en) Live broadcast method and device, electronic equipment and storage medium
CN113836455A (en) Special effect rendering method, device, equipment, storage medium and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant