CN112887299B - Online interaction method and device, electronic equipment and storage medium - Google Patents

Online interaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112887299B
CN112887299B CN202110087920.1A CN202110087920A CN112887299B CN 112887299 B CN112887299 B CN 112887299B CN 202110087920 A CN202110087920 A CN 202110087920A CN 112887299 B CN112887299 B CN 112887299B
Authority
CN
China
Prior art keywords
interaction
client
authentication token
identity authentication
communication connection
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
CN202110087920.1A
Other languages
Chinese (zh)
Other versions
CN112887299A (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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110087920.1A priority Critical patent/CN112887299B/en
Publication of CN112887299A publication Critical patent/CN112887299A/en
Application granted granted Critical
Publication of CN112887299B publication Critical patent/CN112887299B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8126Monomedia components thereof involving additional data, e.g. news, sports, stocks, weather forecasts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8126Monomedia components thereof involving additional data, e.g. news, sports, stocks, weather forecasts
    • H04N21/8133Monomedia components thereof involving additional data, e.g. news, sports, stocks, weather forecasts specifically related to the content, e.g. biography of the actors in a movie, detailed information about an article seen in a video program
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of smart cities, and provides an online interaction method, an online interaction device, electronic equipment and a storage medium, wherein the method comprises the following steps: establishing a TCP long connection of a first communication connection with a screen display device, and generating a two-dimensional code picture carrying a first identity authentication token; when the second identity authentication token in the second communication connection request of each client is valid, establishing TCP long connection of the second communication connection; receiving an interaction starting instruction sent by screen display equipment through a TCP long connection of a first communication connection and sending the interaction starting instruction to a plurality of clients; and receiving interactive data reported by each client through the TCP long connection of the second communication connection, and displaying the interactive data on a screen of the screen display equipment. According to the invention, the interaction starting instruction is sent and the interaction data is received through the long connection of the TCP, so that the problem of time difference when the client receives the interaction starting instruction and reports the interaction data is solved, and the efficiency of online interaction is improved.

Description

Online interaction method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of smart cities, in particular to an online interaction method, an online interaction device, electronic equipment and a storage medium.
Background
The traditional meeting place large screen interaction system is generally based on an http protocol, after a user opens an interaction page by using a mobile phone, an inventor finds that due to the fact that the http is in a stateless protocol, a mobile phone end can only use a timing polling mode to perform data interaction with a background server, polling time intervals are not good, server end resources are wasted if the time intervals are set too short, if the time intervals are set too long, time delay of receiving server end data by the user is prolonged, a uniform meeting place program arrangement effect cannot be achieved, online interaction efficiency is low, and accuracy of obtained interaction data is low.
Disclosure of Invention
In view of the above, there is a need for an online interaction method, an online interaction device, an electronic device, and a storage medium, which can send an interaction start instruction and receive interaction data through a long TCP connection, avoid a problem of time difference when a client receives the interaction start instruction and reports the interaction data, and improve online interaction efficiency.
A first aspect of the present invention provides an online interaction method, including:
responding to a first communication connection establishing request received from a screen display device, establishing a TCP long connection of a first communication connection between the screen display device and the screen display device, and generating a two-dimensional code picture carrying a first identity authentication token;
responding to a plurality of second communication connection establishing requests received from a plurality of clients, and verifying whether a second identity authentication token in the second communication connection establishing request of each client is valid, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display device by each client;
when the second identity authentication token in the second communication connection request of each client is determined to be valid, establishing a TCP long connection of the second communication connection with each client;
receiving an interaction starting instruction sent by the screen display equipment through a TCP long connection of the first communication connection, and sending the interaction starting instruction to the plurality of clients;
and receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
Optionally, the displaying the plurality of interactive data on the screen of the screen display device includes:
identifying interaction types corresponding to the plurality of interaction data;
when the interaction type corresponding to the plurality of interaction data is a first interaction type, identifying the client equipment identifier of each interaction data;
determining a display identifier of each interactive data according to the client equipment identifier of each interactive data;
and displaying the plurality of interactive data on a screen of the screen display equipment according to a preset display rule and the display identification of each interactive data.
Optionally, the method further includes:
when the interaction type corresponding to the plurality of interaction data is a second interaction type, classifying a plurality of clients corresponding to the plurality of interaction data to obtain a plurality of interaction groups;
calculating target interaction data of each interaction group according to a preset calculation rule, and determining a display identifier of the target interaction data of each interaction group according to the target interaction data of each interaction group;
and displaying the target interaction data of the interaction groups on a screen of the screen display equipment according to a preset display rule and a display identifier of each target interaction data of each interaction group.
Optionally, after the displaying the plurality of interactive data on the screen of the screen display device, the method further includes:
receiving a lottery drawing request sent by the screen display equipment, and analyzing the lottery drawing request to determine lottery drawing rules;
and determining a winning client according to the lottery drawing rule, and displaying the winning client on a screen of the screen display equipment according to a preset display rule.
Optionally, the client determining a prize according to the lottery rule includes:
analyzing the lottery drawing rule to obtain the weight of each client;
determining a winning probability interval of each client according to the weight of each client;
judging whether the interaction data of each client exists in the winning probability interval range of the same client;
when the interactive data of each client is determined to be in the winning probability interval range of the same client, determining each client as a winning client; or
And when the interaction data of each client does not exist in the winning probability interval range of the same client, determining that each client is not the winning client.
Optionally, after the TCP long connection of the second communication connection with each client is established, the method further includes:
receiving a barrage sending request sent by a client;
analyzing the bullet screen sending request to obtain a message header and a message body of the bullet screen;
converting the message header into a message header in msg format, and dividing the message body by using/n line-change separators to obtain a divided message body;
and generating target bullet screen information according to the message header in the msg format and the segmented message body, and displaying the target bullet screen information on a screen of the screen display equipment.
Optionally, the verifying whether the second identity authentication token in the second communication connection request of each client is valid includes:
acquiring a device identifier of each client;
searching whether an identity authentication token matched with the second identity authentication token exists in a first identity authentication token database according to the equipment identification of each client;
when the identity authentication token matched with the second identity authentication token is found in the first identity authentication token database, determining that the second identity authentication token is valid; or
And when the identity authentication token matched with the second identity authentication token does not exist in the first identity authentication token database, determining that the second identity authentication token is invalid.
A second aspect of the invention provides an online interaction device, comprising:
the first establishing module is used for responding to a first communication connection establishing request received from the screen display equipment, establishing a TCP long connection of a first communication connection between the screen display equipment and the first establishing module, and generating a two-dimensional code picture carrying a first identity authentication token;
the verification module is used for responding to a plurality of second communication connection establishing requests received from a plurality of clients and verifying whether a second identity authentication token in the second communication connection establishing requests of each client is valid or not, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display equipment by each client;
a second establishing module, configured to establish a TCP long connection for the second communication connection with each client when it is determined that the second identity authentication token in the second communication connection request of each client is valid;
the sending module is used for receiving an interaction starting instruction sent by the screen display equipment through a TCP long connection of the first communication connection and sending the interaction starting instruction to the plurality of clients;
and the display module is used for receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
A third aspect of the invention provides an electronic device comprising a processor and a memory, the processor being configured to implement the online interaction method when executing a computer program stored in the memory.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the online interaction method.
In summary, the online interaction method, the apparatus, the electronic device and the storage medium of the present invention may be applied to the fields of smart government affairs, smart medical treatment, smart law, smart community, smart finance, smart life and the like in smart city construction, and promote the development of smart city construction, on one hand, by receiving an interaction start instruction sent by the screen display device through the TCP long connection of the first communication connection, and sending the interaction start instruction to the plurality of clients, since the interaction start instruction is sent through the TCP long connection of the first communication connection, the plurality of clients may receive the interaction start instruction at the same time, thereby avoiding a time difference problem when each client receives the interaction start instruction, and improving the efficiency of online interaction; on the other hand, whether the client scanning the two-dimensional code picture is the client participating in the online interaction is determined by verifying whether the second identity authentication token is valid, and when the second identity authentication token is valid, the client is determined to be the client participating in the online interaction, so that the safety of the data of the client participating in the online interaction is improved; and finally, receiving a plurality of interactive data reported by the plurality of clients through the long TCP connection corresponding to the second communication connection, and displaying the plurality of interactive data on a screen of the screen display device.
Drawings
Fig. 1 is a flowchart of an online interaction method according to an embodiment of the present invention.
Fig. 2 is a structural diagram of an online interaction device according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example one
Fig. 1 is a flowchart of an online interaction method according to an embodiment of the present invention.
In this embodiment, the online interaction method may be applied to an electronic device, and for an electronic device that needs to perform online interaction, the online interaction function provided by the method of the present invention may be directly integrated on the electronic device, or may be run in the electronic device in the form of a Software Development Kit (SKD).
As shown in fig. 1, the online interaction method specifically includes the following steps, and the order of the steps in the flowchart may be changed, and some steps may be omitted according to different requirements.
S11, responding to a request for establishing a first communication connection received from a screen display device, establishing a TCP long connection of the first communication connection between the screen display device and the screen display device, and generating a two-dimensional code picture carrying a first identity authentication token and an interactive link address.
In this embodiment, during online interaction, a TCP long connection of a first communication connection needs to be established between the screen display device and the server, and specifically, the TCP connection of the first communication connection only needs one round trip interaction when data transmission is performed between the screen display device and the server, so that the data transmission speed is increased, the polling time interval is shortened, and performance loss caused by creation and release of a short connection is effectively avoided.
In this embodiment, the two-dimensional code picture is displayed on the screen display device, and specifically, the screen display device may be a computer, a television or other screen display device with a display screen panel.
Optionally, the establishing, in response to a request for establishing a first communication connection received from a screen display device, a TCP long connection of the first communication connection with the screen display device, and generating a two-dimensional code picture carrying a first identity authentication token and an interactive link address includes:
analyzing the message of the first communication request to obtain message information carried by the message;
acquiring handshake information from the message information, and establishing a TCP long connection of a first communication connection with the screen display equipment according to the handshake information;
randomly generating a character string with a preset digit number by using a random generator to serve as a first identity authentication token;
acquiring a link address of an interactive customized page corresponding to the interaction from the message information;
generating a link by splicing the identity authentication token and the link address of the interactive customized page through URL parameters;
and converting the link into a two-dimensional code picture through a two-dimensional code generator.
In this embodiment, a message in a first communication request is analyzed to obtain message information, handshake information is obtained from the message information, a TCP long connection of a first communication connection is established with the screen display device according to the handshake information, a random generator is used to randomly generate a preset digit string as a first identity authentication token, a link address of an interactive customized page corresponding to an interaction is obtained from the message information, a two-dimensional code picture is generated according to the identity authentication token and the link address of the interactive customized page, when each client scans the two-dimensional code picture, the browser page of the link address of the interactive customized page is jumped to, and online interaction with the screen display device can be performed through the browser page.
In the embodiment, in the process of generating the two-dimensional code, the random generator is used for randomly generating the character string with the preset digit as the first identity authentication token to verify whether the client is the client of the online interaction, so that the safety of the online interaction is improved.
And S12, responding to a plurality of second communication connection establishing requests received from a plurality of clients, and verifying whether a second identity authentication token in the second communication connection establishing request of each client is valid, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display device by each client.
In this embodiment, when the plurality of clients send the plurality of second communication connection requests by scanning the two-dimensional code pictures on the screen display device, and each client generates a second identity authentication token in the scanning process, it is verified whether each second identity authentication token is valid.
Optionally, the verifying whether the second authentication token in the second communication connection request of each client is valid includes:
acquiring a device identifier of each client;
searching whether an identity authentication token matched with the second identity authentication token exists in a first identity authentication token database according to the equipment identification of each client;
when the identity authentication token matched with the second identity authentication token is found in the first identity authentication token database, determining that the second identity authentication token is valid; or
And when the identity authentication token matched with the second identity authentication token does not exist in the first identity authentication token database, determining that the second identity authentication token is invalid.
In this embodiment, the device identifiers of the clients are different, whether the second identity authentication token exists is searched in the first identity authentication token database through the device identifier of each client, and when it is determined that the identity authentication token matched with the second identity authentication token exists in the first identity authentication token database, the client for the device identifier of the client is determined to be the client participating in the online interaction, and it is determined that the second identity authentication token is valid.
In this embodiment, whether the client that scans the two-dimensional code picture is the client that participates in the online interaction is determined by verifying whether the second identity authentication token is valid, and when the second identity authentication token is valid, the client is determined to be the client that participates in the online interaction, so that the security of the client data that participates in the online interaction is improved.
And S13, when the second identity authentication token in the second communication connection request of each client is determined to be valid, establishing a TCP long connection of the second communication connection with each client.
In this embodiment, the identity authentication token in each second communication connection request is used to identify the identity of each client, when it is determined that the identity authentication token in each second communication connection request is valid, it is determined that the client that sends the second communication connection request passes the identity authentication, the server may establish a TCP long connection for the second communication connection with the multiple clients, and after the server may establish the TCP long connection for the second communication connection with the multiple clients, the server transmits data to the multiple clients at the same time, and only one interaction is needed during data transmission, which shortens polling time, and the multiple clients may receive the data transmitted by the server at the same time, thereby effectively avoiding performance loss caused by creation and release of a short connection.
Further, after establishing a TCP long connection for the second communication connection with each client, the method further comprises:
receiving a barrage sending request sent by a client;
analyzing the bullet screen sending request to obtain a message header and a message body of the bullet screen;
converting the message header into a message header in msg format, and dividing the message body by using/n line-change separators to obtain a divided message body;
and generating target bullet screen information according to the message header in the msg format and the segmented message body, and displaying the target bullet screen information on a screen of the screen display equipment.
In this embodiment, after a message of a bullet screen sending request sent by a client arrives at a server, the server parses the bullet screen sending request to obtain a message header and a message body, converts the message header into a message header in msg format, and divides the message body by using a \ n delimiter to obtain a divided message body, specifically, target bullet screen information is generated according to the message header in msg format and the divided message body, and the target bullet screen information is displayed on a screen of a screen display device.
In this embodiment, the format of the message header adopted by the target barrage information pushed by the server to the screen display panel is as follows: the format of the [ msg ] is adopted, the message body is divided by using the \ n line feed character, the network bandwidth resource is effectively saved, 20-50% of the bandwidth resource is saved compared with a json round-trip interaction mode, and the efficiency of online interaction is improved.
And S14, receiving an interaction starting instruction sent by the screen display device through the long TCP connection of the first communication connection, and sending the interaction starting instruction to the plurality of clients.
In this embodiment, when online interaction is performed, the interaction start instruction is sent by the control end of the screen display device, when the control end of the screen display device is received and the interaction start instruction is sent to the server, the server sends the interaction start instruction to the plurality of clients at the same time, because the interaction start instruction is sent through the long TCP connection of the first communication connection, the plurality of clients can receive the interaction start instruction at the same time, the problem of time difference when each client receives the interaction start instruction is avoided, and the efficiency of online interaction is improved.
And S15, receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the interactive data on the screen of the screen display device.
In this embodiment, when the plurality of clients receive the interaction start instruction, each client triggers an interaction program to perform interaction data calculation according to the start instruction, and reports the calculated interaction data to the server through a long TCP connection corresponding to the second communication connection, so that the transmission efficiency of the interaction data is improved.
In this embodiment, the server receives the interactive data reported by each client, and sends the interactive data reported by each client to the screen of the screen display device for display, each client can visually confirm the interactive data, and the interactive data is obtained by activating an online counting program for recording by a browser when the client receives an interaction start instruction, so that the security of the online interactive data is improved.
Optionally, the displaying the plurality of interactive data on the screen of the screen display device includes:
identifying interaction types corresponding to the plurality of interaction data;
when the interaction type corresponding to the plurality of interaction data is a first interaction type, identifying the client equipment identifier of each interaction data;
determining a display identifier of each interactive data according to the client equipment identifier of each interactive data;
and displaying the plurality of interactive data on a screen of the screen display equipment according to a preset display rule and the display identification of each interactive data.
In this embodiment, the display identifier of each client may be preset, for example, may be set as a horse, or may be set according to the preference of each client.
In this embodiment, the first interaction type is that each client participates in online interaction for an individual.
Further, the method further comprises:
when the interaction type corresponding to the plurality of interaction data is a second interaction type, classifying a plurality of clients corresponding to the plurality of interaction data to obtain a plurality of interaction groups;
calculating target interaction data of each interaction group according to a preset calculation rule, and determining a display identifier of the target interaction data of each interaction group according to the target interaction data of each interaction group;
and displaying the target interaction data of the interaction groups on a screen of the screen display equipment according to a preset display rule and a display identifier of each target interaction data of each interaction group.
In this embodiment, the second interaction type is a team participation interaction, and includes a plurality of interaction groups, each interaction group includes a plurality of clients, target interaction data of each group is displayed on the screen of the screen display device, specifically, a calculation rule can be preset, target interaction data corresponding to each interaction group is calculated according to a preset calculation rule, the target interaction data is displayed on the screen of the screen display device, a phenomenon that contradiction occurs between interaction group members due to the fact that the interaction data of each member in the interaction group is displayed on the screen is avoided, and flexibility of online interaction is improved.
Illustratively, when online interaction is carried out, a full-field online horse racing game is introduced in an interaction link, an online interaction instruction is initiated by a control end of the screen display device, a meeting place screen display device displays two-dimensional codes participating in online interaction, clients participating in online interaction scan the two-dimensional codes displayed on a screen of the screen display device and then enter a preparation stage, the clients participating in online interaction are synchronously displayed on the screen of the screen display device, display marks of all the clients are determined, for example, the clients are abstracted into a horse racing for display, after a TCP long connection of a second communication connection is established between each client and the server, the control end of the screen display device sends an interaction start instruction to the server, and the server simultaneously sends the interaction start instruction to each client through the TCP long connection of the second communication connection of each client, when the client receives an interaction starting instruction, online interaction is carried out according to online interaction rules, for example, if the online interaction rules control horse racing which is controlled by the client in a shaking and shaking mode, the faster the horse racing is, the faster the horse racing runs, in the shaking process, a browser of the client activates an online counting program to carry out shaking data recording, the recorded shaking data is reported to the server, the server sends the shaking data to a screen of screen display equipment, the shaking data are displayed at different track positions according to preset display rules, and real-time ranking display is carried out when the interaction is finished, so that online interaction atmosphere is effectively activated, and the online interaction efficiency is improved.
In other embodiments, teams can be set to participate in online interaction, and one team controls one horse race together, so that the diversity of online interaction is improved.
Further, after the presenting the plurality of interactive data on the screen of the screen display device, the method further comprises:
receiving a lottery drawing request sent by the screen display equipment, and analyzing the lottery drawing request to determine lottery drawing rules;
and determining winning clients according to the lottery rule, and displaying the winning clients on a screen of the screen display equipment according to a preset display rule.
In this embodiment, the display rules of the clients winning a prize can be preset, for example, the clients winning a prize at different levels can be displayed by using different display rules, for example, the clients winning a prize can be displayed by using star patterns of different numbers and different shapes, and by displaying the clients winning a prize on the screen of the screen display device according to the preset display rules, each client can visually determine whether the client wins the prize, so that the display efficiency of the clients winning a prize is improved, and the online interaction efficiency is further improved.
Further, the client determining a prize according to the lottery rule includes:
analyzing the lottery drawing rule to obtain the weight of each client;
determining a winning probability interval of each client according to the weight of each client;
judging whether the interaction data of each client exists in the winning probability interval range of the same client;
when the interactive data of each client is determined to be in the winning probability interval range of the same client, determining each client as a winning client; or alternatively
And when the interactive data of each client does not exist in the range of the winning probability interval of the same client, determining that each client is not the winning client.
In this embodiment, the lottery rule includes the weight of each client, and a winning probability interval range is generated for each client according to the weight of each client, so as to determine whether the interaction data of each client falls into the winning probability interval range corresponding to the same client, and determine whether the client wins a prize according to the determination result, thereby improving the diversity of online interaction.
Illustratively, a lottery link is added in an online interaction link, and lottery is performed according to an algorithm for setting winning probability according to the weight of each client, specifically: setting a winning probability interval for each client according to the weight of each client, wherein, for example, Zhang III: 1-10, lie four: 11-100, king five: 101-.
In summary, the online interaction method of the embodiment may be applied to the fields of smart government affairs, smart medical treatment, smart law, smart community, smart finance, smart life and the like in smart city construction, and promote the development of smart city construction, and by responding to the request for establishing the first communication connection received from the screen display device, establish a long TCP connection for the first communication connection with the screen display device, and generate a two-dimensional code picture carrying the first identity authentication token; responding to a plurality of second communication connection establishing requests received from a plurality of clients, and verifying whether a second identity authentication token in the second communication connection establishing request of each client is valid, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display device by each client; when the second identity authentication token in the second communication connection request of each client is determined to be valid, establishing a TCP long connection of the second communication connection with each client; receiving an interaction starting instruction sent by the screen display equipment through a TCP long connection of the first communication connection, and sending the interaction starting instruction to the plurality of clients; and receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
In this embodiment, on one hand, by receiving an interaction start instruction sent by the screen display device through the TCP long connection of the first communication connection and sending the interaction start instruction to the plurality of clients, because the interaction start instruction is sent through the TCP long connection of the first communication connection, the plurality of clients can receive the interaction start instruction at the same time, thereby avoiding a time difference problem when each client receives the interaction start instruction and improving the efficiency of online interaction; on the other hand, whether the client scanning the two-dimensional code picture is the client participating in the online interaction is determined by verifying whether the second identity authentication token is valid, and when the second identity authentication token is valid, the client is determined to be the client participating in the online interaction, so that the data security of the client participating in the online interaction is improved; and finally, receiving a plurality of interactive data reported by the plurality of clients through the long TCP connection corresponding to the second communication connection, and displaying the plurality of interactive data on a screen of the screen display device.
Example two
Fig. 2 is a structural diagram of an online interaction device according to a second embodiment of the present invention.
In some embodiments, the online interaction device 20 may include a plurality of functional modules composed of program code segments. The program codes of the program segments in the online interaction device 20 can be stored in the memory of the electronic device and executed by the at least one processor to perform the functions of online interaction (described in detail in fig. 1).
In this embodiment, the online interaction device 20 may be divided into a plurality of functional modules according to the functions performed by the online interaction device. The functional module may include: a first establishing module 201, a verifying module 202, a second establishing module 203, a sending module 204, a showing module 205, a classifying module 206 and a determining module 207. The module referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The first establishing module 201 is configured to, in response to a request for establishing a first communication connection received from a screen display device, establish a TCP long connection of the first communication connection with the screen display device, and generate a two-dimensional code picture carrying a first identity authentication token and an interactive link address.
In this embodiment, when performing online interaction, a long TCP connection of a first communication connection needs to be established between the screen display device and the server, and specifically, the TCP connection of the first communication connection only needs one round trip interaction when performing data transmission between the screen display device and the server, so that the polling time interval is shortened while the data transmission speed is increased, and performance loss caused by creation and release of a short connection is effectively avoided.
In this embodiment, the two-dimensional code image is displayed on the screen display device, and specifically, the screen display device may be a computer, a television, or other screen display device with a display screen panel.
Optionally, the establishing module 201, in response to a request for establishing a first communication connection received from a screen display device, establishes a TCP long connection of the first communication connection with the screen display device, and generates a two-dimensional code picture carrying a first identity authentication token and an interactive link address, including:
analyzing the message of the first communication request to obtain message information carried by the message;
acquiring handshake information from the message information, and establishing a TCP long connection of a first communication connection with the screen display equipment according to the handshake information;
randomly generating a character string with a preset digit number as a first identity authentication token by using a random generator;
acquiring a link address of an interactive customized page corresponding to the interaction from the message information;
generating a link by splicing the identity authentication token and the link address of the interactive customized page through URL parameters;
and converting the link into a two-dimensional code picture through a two-dimensional code generator.
In this embodiment, a message in a first communication request is analyzed to obtain message information, handshake information is obtained from the message information, a TCP long connection of a first communication connection is established with the screen display device according to the handshake information, a random generator is used to randomly generate a preset digit string as a first identity authentication token, a link address of an interactive customized page corresponding to an interaction is obtained from the message information, a two-dimensional code picture is generated according to the identity authentication token and the link address of the interactive customized page, when each client scans the two-dimensional code picture, the browser page of the link address of the interactive customized page is jumped to, and online interaction with the screen display device can be performed through the browser page.
In the embodiment, in the process of generating the two-dimensional code, the random generator is used for randomly generating the character string with the preset digit as the first identity authentication token to verify whether the client is the client of the online interaction, so that the safety of the online interaction is improved.
The verification module 202 is configured to verify whether a second identity authentication token in the second communication connection request of each client is valid in response to a plurality of second communication connection establishment requests received from the plurality of clients, where the second identity authentication token is obtained by scanning, by each client, a two-dimensional code picture displayed on a screen of the screen display device.
In this embodiment, when the plurality of clients send a plurality of second communication connection requests by scanning the two-dimensional code pictures on the screen display device, and each client generates a second identity authentication token in the scanning process, it is verified whether each second identity authentication token is valid.
Optionally, the verifying module 202 verifies whether the second authentication token in the second communication connection request of each client is valid includes:
acquiring a device identifier of each client;
searching whether an identity authentication token matched with the second identity authentication token exists in a first identity authentication token database according to the equipment identification of each client;
when the identity authentication token matched with the second identity authentication token is found in the first identity authentication token database, determining that the second identity authentication token is valid; or
And when the identity authentication token matched with the second identity authentication token does not exist in the first identity authentication token database, determining that the second identity authentication token is invalid.
In this embodiment, the device identifiers of the clients are different, whether the second identity authentication token exists is searched in the first identity authentication token database through the device identifier of each client, and when it is determined that the identity authentication token matched with the second identity authentication token exists in the first identity authentication token database, the client for the device identifier of the client is determined to be the client participating in the online interaction, and it is determined that the second identity authentication token is valid.
In this embodiment, whether the client that scans the two-dimensional code picture is the client that participates in the online interaction is determined by verifying whether the second identity authentication token is valid, and when the second identity authentication token is valid, the client is determined to be the client that participates in the online interaction, so that the security of the client data that participates in the online interaction is improved.
A second establishing module 203, configured to establish a TCP long connection with the second communication connection of each client when it is determined that the second authentication token in the second communication connection request of each client is valid.
In this embodiment, the identity authentication token in each second communication connection request is used to identify the identity of each client, when it is determined that the identity authentication token in each second communication connection request is valid, it is determined that the identity authentication of the client that sends the second communication connection request passes, the server may establish a TCP long connection for the second communication connection with the plurality of clients, after the server may establish the TCP long connection for the second communication connection with the plurality of clients, the server transmits data to the plurality of clients at the same time, and only one interaction is required during data transmission, which shortens polling time, and the plurality of clients may receive the data transmitted by the server at the same time, thereby effectively avoiding performance loss caused by the creation and release of short connections.
Further, after the second establishing module 203 establishes a TCP long connection of the second communication connection with each client, the method further includes:
receiving a barrage sending request sent by a client;
analyzing the bullet screen sending request to obtain a message header and a message body of the bullet screen;
converting the message header into a message header in msg format, and dividing the message body by using/n line-change separators to obtain a divided message body;
and generating target bullet screen information according to the message header in the msg format and the segmented message body, and displaying the target bullet screen information on a screen of the screen display equipment.
In this embodiment, after a message of a bullet screen sending request sent by a client arrives at a server, the server parses the bullet screen sending request to obtain a message header and a message body, converts the message header into a message header in msg format, and segments the message body by using a \ n separator to obtain a segmented message body, specifically, target bullet screen information is generated according to the message header in msg format and the segmented message body, and the target bullet screen information is displayed on a screen of the screen display device.
In this embodiment, the format of the message header adopted by the target barrage information pushed by the server to the screen display panel is as follows: the format of the [ msg ] is adopted, the message body is divided by using the \ n line feed character, the network bandwidth resource is effectively saved, 20-50% of the bandwidth resource is saved compared with a json round-trip interaction mode, and the efficiency of online interaction is improved.
A sending module 204, configured to receive an interaction start instruction sent by the screen display device through a TCP long connection of the first communication connection, and send the interaction start instruction to the multiple clients.
In this embodiment, when online interaction is performed, the interaction start instruction is sent by the control end of the screen display device, and when the interaction start instruction is sent to the server by the control end of the screen display device, the server sends the interaction start instruction to the plurality of clients at the same time.
The display module 205 is configured to receive the interactive data reported by each client through the TCP long connection of the corresponding second communication connection, obtain a plurality of interactive data, and display the plurality of interactive data on the screen of the screen display device.
In this embodiment, when the plurality of clients receive the interaction start instruction, each client triggers an interaction program to perform interaction data calculation according to the start instruction, and reports the calculated interaction data to the server through a long TCP connection corresponding to the second communication connection, so that the transmission efficiency of the interaction data is improved.
In this embodiment, the server receives the interactive data reported by each client, and sends the interactive data reported by each client to the screen of the screen display device for display, each client can visually confirm the interactive data, and the interactive data is obtained by the client activating an online counting program to record when receiving an interaction start instruction, so that the security of the online interactive data is improved.
Optionally, the presenting module 205 presents the plurality of interactive data on the screen of the screen display device includes:
identifying interaction types corresponding to the plurality of interaction data;
when the interaction type corresponding to the plurality of interaction data is a first interaction type, identifying the client equipment identifier of each interaction data;
determining a display identifier of each interactive data according to the client equipment identifier of each interactive data;
and displaying the plurality of interactive data on a screen of the screen display equipment according to a preset display rule and the display identification of each interactive data.
In this embodiment, the display identifier of each client may be preset, for example, may be set as a horse, or may be set according to the preference of each client.
In this embodiment, the first interaction type is that each client participates in online interaction for an individual.
Further, the classifying module 206 is configured to classify the multiple clients corresponding to the multiple interactive data to obtain multiple interactive groups when the interaction type corresponding to the multiple interactive data is the second interaction type.
The determining module 207 is configured to calculate target interaction data of each interaction group according to a preset calculation rule, and determine a display identifier of the target interaction data of each interaction group according to the target interaction data of each interaction group.
The display module 205 is further configured to display, according to a preset display rule, the multiple target interaction data of the multiple interaction groups on the screen of the screen display device according to the display identifier of each target interaction data of each interaction group.
In this embodiment, the second interaction type is that a team participates in an interaction, and includes a plurality of interaction groups, and each interaction group includes a plurality of clients, what is displayed on the screen of the screen display device is target interaction data of each group, and specifically, a calculation rule can be preset, target interaction data corresponding to each interaction group is calculated according to a preset calculation rule, and the target interaction data is displayed on the screen of the screen display device, so that a phenomenon that contradiction occurs between interaction group members due to the fact that the interaction data of each member in the interaction group is displayed on the screen is avoided, and flexibility of online interaction is improved.
Illustratively, when online interaction is carried out, a full-field participation online horse racing game is introduced in an interaction link, an online interaction instruction is initiated by a control end of the screen display device, the meeting place screen display device displays a participation online interaction two-dimensional code, a client participating in the online interaction scans the two-dimensional code displayed on a screen of the screen display device and then enters a preparation stage, the client participating in the online interaction is synchronously displayed on the screen of the screen display device, a display identifier of each client is determined, for example, the client is abstracted into a horse racing for display, after a TCP long connection of a second communication connection is established between each client and the server, the control end of the screen display device sends an interaction start instruction to the server, and the server simultaneously sends the interaction start instruction to each client through the TCP long connection of the second communication connection of each client, when the client receives an interaction starting instruction, online interaction is carried out according to online interaction rules, for example, if the online interaction rules control horse racing which is controlled by the client in a shaking and shaking mode, the faster the horse racing is, the faster the horse racing runs, in the shaking process, a browser of the client activates an online counting program to carry out shaking data recording, the recorded shaking data is reported to the server, the server sends the shaking data to a screen of screen display equipment, the shaking data are displayed at different track positions according to preset display rules, and real-time ranking display is carried out when the interaction is finished, so that online interaction atmosphere is effectively activated, and the online interaction efficiency is improved.
In other embodiments, teams can be set to participate in online interaction, and one team controls one horse race together, so that the diversity of online interaction is improved.
Further, after the plurality of interactive data are displayed on the screen of the screen display device, receiving a lottery drawing request sent by the screen display device, and analyzing the lottery drawing request to determine lottery drawing rules; and determining winning clients according to the lottery rule, and displaying the winning clients on a screen of the screen display equipment according to a preset display rule.
In this embodiment, the display rules of the clients winning a prize can be preset, for example, the clients winning a prize at different levels can be displayed by using different display rules, for example, the clients winning a prize can be displayed by using star patterns of different numbers and different shapes, and by displaying the clients winning a prize on the screen of the screen display device according to the preset display rules, each client can visually determine whether the client wins the prize, so that the display efficiency of the clients winning a prize is improved, and the online interaction efficiency is further improved.
Further, the client determining a prize according to the lottery rule includes:
analyzing the lottery drawing rule to obtain the weight of each client;
determining a winning probability interval of each client according to the weight of each client;
judging whether the interaction data of each client exists in the winning probability interval range of the same client;
when the interactive data of each client is determined to be in the winning probability interval range of the same client, determining each client as a winning client; or
And when the interactive data of each client does not exist in the winning probability interval range of the same client, determining that each client is not the winning client.
In this embodiment, the lottery rule includes the weight of each client, and a winning probability interval range is generated for each client according to the weight of each client, so as to determine whether the interaction data of each client falls into the winning probability interval range corresponding to the same client, and determine whether the client wins a prize according to the determination result, thereby improving the diversity of online interactions.
Illustratively, a lottery link is added in an online interaction link, and lottery is performed according to an algorithm for setting winning probability according to the weight of each client, specifically: setting a winning probability interval for each client according to the weight of each client, wherein, for example, Zhang III: 1-10, lie four: 11-100, king five: 101-.
In summary, the online interaction device of the present embodiment may be applied to the fields of smart government affairs, smart medical treatment, smart law, smart community, smart finance, smart life, and the like in smart city construction, and promote the development of smart city construction, and by responding to the request for establishing the first communication connection received from the screen display device, establish a TCP long connection with the first communication connection between the screen display device and generate a two-dimensional code picture carrying the first identity authentication token; responding to a plurality of second communication connection establishing requests received from a plurality of clients, and verifying whether a second identity authentication token in the second communication connection establishing request of each client is valid, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display device by each client; when the second identity authentication token in the second communication connection request of each client is determined to be valid, establishing a TCP long connection of the second communication connection with each client; receiving an interaction starting instruction sent by the screen display equipment through a long TCP connection of the first communication connection, and sending the interaction starting instruction to the plurality of clients; and receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
In this embodiment, on one hand, by receiving an interaction start instruction sent by the screen display device through the TCP long connection of the first communication connection and sending the interaction start instruction to the plurality of clients, because the interaction start instruction is sent through the TCP long connection of the first communication connection, the plurality of clients can receive the interaction start instruction at the same time, thereby avoiding a time difference problem when each client receives the interaction start instruction and improving the efficiency of online interaction; on the other hand, whether the client scanning the two-dimensional code picture is the client participating in the online interaction is determined by verifying whether the second identity authentication token is valid, and when the second identity authentication token is valid, the client is determined to be the client participating in the online interaction, so that the data security of the client participating in the online interaction is improved; and finally, receiving a plurality of interactive data reported by the plurality of clients through the long TCP connection corresponding to the second communication connection, and displaying the plurality of interactive data on a screen of the screen display device.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. In the preferred embodiment of the present invention, the electronic device 3 comprises a memory 31, at least one processor 32, at least one communication bus 33 and a transceiver 34.
It will be appreciated by those skilled in the art that the configuration of the electronic device shown in fig. 3 does not constitute a limitation of the embodiment of the present invention, and may be a bus-type configuration or a star-type configuration, and the electronic device 3 may include more or less other hardware or software than those shown, or a different arrangement of components.
In some embodiments, the electronic device 3 is an electronic device capable of automatically performing numerical calculation and/or information processing according to instructions set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The electronic device 3 may also include a client device, which includes, but is not limited to, any electronic product that can interact with a client through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a digital camera, and the like.
It should be noted that the electronic device 3 is only an example, and other existing or future electronic products, such as those that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
In some embodiments, the memory 31 is used for storing program codes and various data, such as the online interaction device 20 installed in the electronic device 3, and realizes high-speed and automatic access to programs or data during the operation of the electronic device 3. The Memory 31 includes a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an electronically Erasable rewritable Read-Only Memory (Electrically-Erasable Programmable Read-Only Memory (EEPROM)), an optical Read-Only disk (CD-ROM) or other optical disk Memory, a magnetic disk Memory, a tape Memory, or any other medium readable by a computer capable of carrying or storing data.
In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The at least one processor 32 is a Control Unit (Control Unit) of the electronic device 3, connects various components of the whole electronic device 3 by using various interfaces and lines, and executes various functions of the electronic device 3 and processes data by running or executing programs or modules stored in the memory 31 and calling data stored in the memory 31.
In some embodiments, the at least one communication bus 33 is arranged to enable connectivity communication between the memory 31 and the at least one processor 32, and/or the like.
Although not shown, the electronic device 3 may further include a power supply (such as a battery) for supplying power to each component, and optionally, the power supply may be logically connected to the at least one processor 32 through a power management device, so as to implement functions of managing charging, discharging, and power consumption through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 3 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, an electronic device, or a network device) or a processor (processor) to execute parts of the methods according to the embodiments of the present invention.
In a further embodiment, in conjunction with fig. 2, the at least one processor 32 may execute an operating device of the electronic device 3 and various installed application programs (such as the online interaction device 20), program codes, and the like, for example, the above modules.
The memory 31 has program code stored therein, and the at least one processor 32 can call the program code stored in the memory 31 to perform related functions. For example, the modules illustrated in fig. 2 are program codes stored in the memory 31 and executed by the at least one processor 32, so as to implement the functions of the modules for the purpose of online interaction.
In one embodiment of the invention, the memory 31 stores a plurality of instructions that are executed by the at least one processor 32 to implement the functionality of the online interaction.
Specifically, the at least one processor 32 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, and details are not repeated here.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules 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, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or that the singular does not exclude the plural. A plurality of units or means recited in the present invention may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the same, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An online interaction method, the method comprising:
responding to a first communication connection establishment request received from a screen display device, establishing a TCP long connection of a first communication connection with the screen display device, and generating a two-dimensional code picture carrying a first identity authentication token;
responding to a plurality of second communication connection establishing requests received from a plurality of clients, and verifying whether a second identity authentication token in the second communication connection establishing request of each client is valid, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display device by each client;
when the second identity authentication token in the second communication connection request of each client is determined to be valid, establishing a TCP long connection of the second communication connection with each client;
receiving an interaction starting instruction sent by the screen display equipment through a TCP long connection of the first communication connection, and sending the interaction starting instruction to the plurality of clients;
and receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
2. The online interaction method of claim 1, wherein the presenting the plurality of interaction data on the screen of the screen display device comprises:
identifying interaction types corresponding to the plurality of interaction data;
when the interaction type corresponding to the plurality of interaction data is a first interaction type, identifying the client equipment identifier of each interaction data;
determining a display identifier of each interactive data according to the client equipment identifier of each interactive data;
and displaying the plurality of interactive data on a screen of the screen display equipment according to a preset display rule and the display identification of each interactive data.
3. The online interaction method of claim 2, wherein the method further comprises:
when the interaction type corresponding to the plurality of interaction data is a second interaction type, classifying a plurality of clients corresponding to the plurality of interaction data to obtain a plurality of interaction groups;
calculating target interaction data of each interaction group according to a preset calculation rule, and determining a display identifier of the target interaction data of each interaction group according to the target interaction data of each interaction group;
and displaying the target interaction data of the interaction groups on a screen of the screen display equipment according to a preset display rule and a display identifier of each target interaction data of each interaction group.
4. The online interaction method of claim 1, wherein after the presenting the plurality of interactive data on the screen of the screen display device, the method further comprises:
receiving a lottery drawing request sent by the screen display equipment, and analyzing the lottery drawing request to determine lottery drawing rules;
and determining winning clients according to the lottery rule, and displaying the winning clients on a screen of the screen display equipment according to a preset display rule.
5. The online interaction method of claim 4, wherein the client determining a prize according to the lottery rule comprises:
analyzing the lottery drawing rule to obtain the weight of each client;
determining a winning probability interval of each client according to the weight of each client;
judging whether the interaction data of each client exists in the winning probability interval range of the same client;
when the interactive data of each client is determined to be in the winning probability interval range of the same client, determining each client as a winning client; or alternatively
And when the interaction data of each client does not exist in the range of the winning probability interval of the same client, determining that each client is not the winning client.
6. The online interactive method according to claim 1, wherein after the establishing of the TCP long connection for the second communication connection with each client, the method further comprises:
receiving a barrage sending request sent by a client;
analyzing the bullet screen sending request to obtain a message header and a message body of the bullet screen;
converting the message header into a message header in msg format, and dividing the message body by using/n line-change separators to obtain a divided message body;
and generating target bullet screen information according to the message header in the msg format and the segmented message body, and displaying the target bullet screen information on a screen of the screen display equipment.
7. The online interaction method of claim 1, wherein the verifying whether the second authentication token in the second communication connection request of each client is valid comprises:
acquiring a device identifier of each client;
searching whether an identity authentication token matched with the second identity authentication token exists in a first identity authentication token database according to the equipment identification of each client;
when the identity authentication token matched with the second identity authentication token is found in the first identity authentication token database, determining that the second identity authentication token is valid; or
And when the identity authentication token matched with the second identity authentication token does not exist in the first identity authentication token database, determining that the second identity authentication token is invalid.
8. An online interaction device, comprising:
the first establishing module is used for responding to a first communication connection establishing request received from a screen display device, establishing a TCP long connection of a first communication connection between the screen display device and the TCP long connection, and generating a two-dimensional code picture carrying a first identity authentication token;
the verification module is used for responding to a plurality of second communication connection establishing requests received from a plurality of clients and verifying whether a second identity authentication token in the second communication connection establishing requests of each client is valid or not, wherein the second identity authentication token is obtained by scanning a two-dimensional code picture displayed on a screen of the screen display equipment by each client;
a second establishing module, configured to establish a TCP long connection for the second communication connection with each client when it is determined that the second identity authentication token in the second communication connection request of each client is valid;
the sending module is used for receiving an interaction starting instruction sent by the screen display equipment through a TCP long connection of the first communication connection and sending the interaction starting instruction to the plurality of clients;
and the display module is used for receiving the interactive data reported by each client through the corresponding TCP long connection of the second communication connection to obtain a plurality of interactive data, and displaying the plurality of interactive data on the screen of the screen display equipment.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory, the processor being configured to implement the online interaction method according to any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the online interaction method according to any one of claims 1 to 7.
CN202110087920.1A 2021-01-22 2021-01-22 Online interaction method and device, electronic equipment and storage medium Active CN112887299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110087920.1A CN112887299B (en) 2021-01-22 2021-01-22 Online interaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110087920.1A CN112887299B (en) 2021-01-22 2021-01-22 Online interaction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112887299A CN112887299A (en) 2021-06-01
CN112887299B true CN112887299B (en) 2022-07-08

Family

ID=76050190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110087920.1A Active CN112887299B (en) 2021-01-22 2021-01-22 Online interaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112887299B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338196A (en) * 2021-12-30 2022-04-12 湖南快乐阳光互动娱乐传媒有限公司 User identity authentication method and device
CN114285841A (en) * 2021-12-30 2022-04-05 北京国基科技股份有限公司 Method, device and system for establishing connection between terminals

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767775B (en) * 2014-01-06 2019-09-17 腾讯科技(深圳)有限公司 Web application information push method and system
CN105335112B (en) * 2014-05-30 2020-08-18 阿里巴巴集团控股有限公司 Multi-screen display information processing and main control end content sending method and device
CN105825120B (en) * 2016-03-11 2019-09-10 北京天创征腾信息科技有限公司 The method and system of interactive authentication between a kind of computer and mobile terminal
CN108228120A (en) * 2016-12-13 2018-06-29 腾讯科技(深圳)有限公司 A kind of multi-screen ganged method and system under AR scenes
CN111263214A (en) * 2020-02-21 2020-06-09 广州欢网科技有限责任公司 Multi-screen interaction realization method and system
CN111818350B (en) * 2020-06-12 2021-11-02 北京达佳互联信息技术有限公司 Method, system, device, electronic equipment and storage medium for displaying information

Also Published As

Publication number Publication date
CN112887299A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN113058270B (en) Live interaction method and device, storage medium and electronic equipment
CN112887299B (en) Online interaction method and device, electronic equipment and storage medium
CN111405304A (en) Anchor interaction method and device, computer equipment and storage medium
CN108762907B (en) Task processing method and system based on multiple clients
CN111385664B (en) Interactive data processing method and device for live broadcast room, storage medium and server
CN108650667B (en) Terminal scheduling method and device
US20170279748A1 (en) Information processing method and terminal, and computer storage medium
US20160250551A1 (en) Electronic game-providing device, electronic game device, electronic game-providing program, and electronic game program
CN107493326B (en) Network voting processing method, device, server and computer readable storage medium
US12064696B2 (en) Method, apparatus, device and storage medium for data processing based on location information
CN104917631A (en) Prediction initiation, participation and information processing methods, device and system
CN113824983A (en) Data matching method, device, equipment and computer readable storage medium
CN110415031A (en) Interact lottery drawing method, device, electronic equipment and computer readable storage medium
CN113204599A (en) Equipment monitoring method and device based on Internet of things, monitoring equipment and storage medium
CN114518918A (en) Data processing method, device, equipment and storage medium
CN110490590B (en) Activity record query method, device, equipment and storage medium based on block chain
CN111223227B (en) Target user screening method and device
CN114895830B (en) Task information display method and device, electronic equipment and storage medium
CN112783790A (en) Application program testing method and device
KR101569645B1 (en) Game executing method, game server and game system
CN116570928A (en) Information processing method, device and server based on NFT
CN112131028B (en) Process interaction method and device, computer equipment and storage medium
CN113869954A (en) Information processing method and device
CN113521751B (en) Operation test method and device, storage medium and electronic equipment
CN113058263A (en) Distributed operation management system and method for online chess game

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