CN109640102B - Method and device for realizing stealth anonymity function in live broadcast room - Google Patents

Method and device for realizing stealth anonymity function in live broadcast room Download PDF

Info

Publication number
CN109640102B
CN109640102B CN201710930299.4A CN201710930299A CN109640102B CN 109640102 B CN109640102 B CN 109640102B CN 201710930299 A CN201710930299 A CN 201710930299A CN 109640102 B CN109640102 B CN 109640102B
Authority
CN
China
Prior art keywords
switch control
function
stealth
state
event
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
CN201710930299.4A
Other languages
Chinese (zh)
Other versions
CN109640102A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710930299.4A priority Critical patent/CN109640102B/en
Publication of CN109640102A publication Critical patent/CN109640102A/en
Application granted granted Critical
Publication of CN109640102B publication Critical patent/CN109640102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • 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
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4433Implementing client middleware, e.g. Multimedia Home Platform [MHP]
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • 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/8166Monomedia components thereof involving executable data, e.g. software

Abstract

The invention provides a method and a device for realizing a stealth anonymous function in a live broadcast room, wherein the method comprises the following steps: s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions; s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server through the proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request. The invention provides a mechanism for enabling the noble users enjoying special marks to autonomously select whether to be invisible, which can meet the personalized requirements of the users and improve the user experience.

Description

Method and device for realizing stealth anonymity function in live broadcast room
Technical Field
The invention relates to the technical field of application development of internet mobile terminals, in particular to a method and a device for realizing a stealth anonymous function in a live broadcast room.
Background
With the rapid development of mobile terminals of mobile phones, as more and more users enjoy watching live broadcasts, the users usually give gifts to favorite anchor broadcasts, and there are some users with high payment will give gifts with higher value to anchor broadcasts, and even wish to purchase identity marks with certain value. In practical situations, users who give gifts with high value or purchase identities with high value (that is, the partial users who pay are called as noble users on a live broadcasting platform) usually obtain some special indications, for example, nicknames of the noble users are displayed at positions near the leaderboard, or when the users enter the live broadcasting room, the noble users are given some special prompts to enter the live broadcasting room, for example, effects of a special entrance welcome effect or an entrance broadcast are given, so that the experience of the users who pay is improved.
However, as the user demands are more and more diversified, the paid noble users sometimes do not want the special marks representing their identities, so that a method is needed to be provided, which can realize that some noble users enter a room or are in an anonymous stealth state after gifting gifts, and the prior art does not provide a mechanism for enabling the noble users enjoying the special marks to autonomously select whether to be stealthed, so that the personalized demands of the users cannot be met.
Disclosure of Invention
The present invention provides a method and apparatus for implementing a hidden anonymous function in a live broadcast room, which overcomes or at least partially solves the above problems.
According to one aspect of the invention, a method for realizing a stealth anonymity function in a live broadcast room is provided, which comprises the following steps:
s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions;
s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server through the proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request.
Wherein the step S1 further includes:
s11, creating and initializing a UISwitch type switch control, and setting the default state of the switch control;
s12, adding event monitoring for the switch control by using the method of addTarget: action: for controlevents of UISwitch, wherein the event monitoring is used for monitoring the event that the state of the switch control is changed;
and S13, adding the switch control with the event monitoring set to a setting interface of a target user meeting a preset condition by using a child control adding function addSubview.
Wherein the step S12 further includes:
and setting three parameters contained in the addTarget, action, for controlevents, wherein the first parameter is an object for processing the event with the changed state of the switch control, the second parameter is a method executed after monitoring the event with the changed state of the switch control, and the third parameter is the event with the changed state of the switch control.
Wherein the step S2 further includes:
s21, when an event that the state of the switch control is changed is monitored, executing the method represented by the second parameter of the addTarget: action: for controlevents: method in response to the event;
s22, calling a respondToSelector function to judge whether the controller of the setting interface sets an agent and whether the agent realizes a switch switching function;
and S23, if the proxy realizes the switch switching function, the proxy executes the switch switching function to acquire the state of the switch control and sends a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to the server.
Wherein the step S23 further includes:
when the agent executes the switch switching function, if the state of the switch control is on, sending a network request for opening the stealth anonymous function to a server, and storing the network request operation for opening the stealth anonymous function by using a variable; alternatively, the first and second electrodes may be,
and if the acquired state of the switch control is closed, sending a network request for closing the stealth anonymous function to a server, and storing the network request operation for closing the stealth anonymous function by using a variable.
Wherein, after the step S23, the method further comprises:
judging whether a network request for opening or closing the stealth anonymous function is executed or not according to the value of the variable;
if the fact that no network request for opening or closing the stealth anonymous function is executed currently is known, executing a function for opening or closing the stealth anonymous function of a network request management class;
and judging whether the opening or closing of the stealth anonymous function is successfully executed according to the return value of the function for opening or closing the stealth anonymous function, if the execution is successful, sending a prompt message to a user, or if the execution is failed, correspondingly setting the state of the switch control.
Wherein before the step S1, the method further includes:
and setting a controller agent for the setting interface of the target user meeting the preset condition.
According to another aspect of the invention, an apparatus for implementing a stealth anonymity function in a live broadcast room is provided, which includes:
the switch adding module is used for adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions;
and the function realization module is used for sending a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to the server through the proxy execution switch switching function when monitoring the event that the state of the switch control is changed, so that the server can execute the opening or closing of the stealth anonymous function according to the network request.
According to another aspect of the invention, an implementation device for stealth anonymity in a live broadcast room is provided, which includes: a memory, a processor, and a bus,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, which invokes the program instructions in the memory to perform a method as described in any of the preceding.
According to yet another aspect of the invention, there is provided a non-transitory computer readable storage medium storing computer instructions which cause the computer to perform the method as described above.
The method and the device for realizing the function of hiding and anonymity in the live broadcast room provided by the invention provide a mechanism for enabling the noble user enjoying special marks to autonomously select whether to hide or not, so that the personalized requirements of the user can be met, and the user experience is improved.
Drawings
Fig. 1 is a schematic flowchart of a method for implementing a hidden anonymous function in a live broadcast room according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for implementing a hidden anonymous function in a live broadcast room according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for implementing a hidden anonymity function in a live broadcast room according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a schematic flow diagram of a method for implementing a hidden anonymous function in a live broadcast room according to an embodiment of the present invention includes:
s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions;
s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server through the proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request.
The embodiment of the invention provides a method for realizing a stealth anonymity function in a live broadcast room, wherein the stealth anonymity function is specially designed for high-grade users on a live broadcast platform. At present, users with higher first-class levels on a live broadcast platform all enjoy some privileges, for example, when the users enter a live broadcast room, the system broadcasts and gives special effects for entering the scene, or after the users give gifts to a main broadcast which is live broadcast in the live broadcast room, the system gives certain special effect prompts to show the user identity. However, with the continuous development of the personalized demands of users, sometimes these users with higher levels do not want the privilege labels related to their identities to be displayed, so that the stealth anonymity function appears, and when a user who has opened the stealth anonymity function enters a live broadcasting room, the privilege labels related to their identities are all cancelled.
Specifically, the target user meeting the preset condition in step S1 refers to a level user defined by the live platform, for example, a noble user, and the preset condition may be determined according to the setting of the live platform. Adding a switch control in a setting interface of a target user meeting preset conditions, wherein the switch control is used for enabling the target user meeting the preset conditions to select whether to start the stealth anonymous function. When the user meets the preset condition, the user becomes a target user, and a stealth anonymous function switch appears in a setting interface of the user.
The specific steps of adding the switch control in the setting interface of the target user meeting the preset conditions are as follows: and establishing a switch control and initializing, wherein the initialization comprises the steps of allocating memory for the switch control, setting the position of the switch control and the like, adding event monitoring for the established switch control, enabling the on or off of the switch control to be responded, and then adding the switch control with the set event monitoring into the setting interface.
Step S2, when an event that the state of the switch control is changed is monitored, that is, when the user operates the anonymous function switch, for example, turns on or off the switch control, the event monitoring of the switch control is triggered, and then, an object (generally, a parent view or a controller of the setting interface) that handles the event that the state of the switch control is changed calls a corresponding event processing method, so as to respond to the operation of the user. In the embodiment of the invention, the proxy of the controller of the setting interface executes the switch switching function to respond to the event that the state of the switch control is changed, wherein the switch switching function is used for sending a corresponding network request for opening or closing the stealth anonymous function to the server according to the state of the switch control. The method comprises the steps that an agent is used for transmitting an event that a user changes the switch state, for example, when a server receives a network request that the stealth anonymous function is started, the server closes the privilege mark of a target user, wherein the privilege mark comprises the steps of closing the entrance special effect of the target user, canceling the gift broadcast or modifying the identity of the user into an anonymous person or a mystery person, and displaying the anonymous person or the anonymous user on a leader board, so that the stealth anonymous function is started. And when the server receives a network request for closing the stealth anonymous function, recovering the privilege mark of the target user.
According to the method for realizing the stealth anonymity function in the live broadcast room, the switch control is added, the agent is used for transmitting and responding to the event, the realization is simple, the coupling is low, a mechanism for enabling the noble user enjoying the special mark to autonomously select whether to be stealth is provided, the personalized requirements of the user can be met, and the user experience is effectively improved.
Based on the above embodiment, the step S1 further includes:
s11, creating and initializing a UISwitch type switch control, and setting the default state of the switch control;
s12, adding event monitoring for the switch control by using the method of addTarget: action: for controlevents of UISwitch, wherein the event monitoring is used for monitoring the event that the state of the switch control is changed;
and S13, adding the switch control with the event monitoring set to a setting interface of a target user meeting a preset condition by using a child control adding function addSubview.
Specifically, S11, using the switch control to create a UISwitch, creating a switch control _ nobleImivibleSettingView by initializing a function init, calling a memory allocation function alloc to allocate a memory for the created switch control, and using a point grammar, a frame sets coordinate values for the created switch control, wherein the coordinate values are the position of the switch control in a page; and setting the default state of the switch control to be on or off.
S12, adding event monitoring to the switch control by using the addTarget: action: for controlEvents of UISwitch provided by the ios system, wherein the addTarget method comprises three parameters as follows:
_nobleInvisibleSettingView addTarget:self action:@selector(rankInvisibleSwitchChangedHandler:)forControlEvents:UIControlEventValueChanged;
wherein _ noblelnvisibleStrettingView represents the created switch control, a parameter after addTarget is self, represents an object for processing an event that the state of the switch control is changed, a parameter after action is rankInvisibleSwitchChangedHandler, represents a method for executing the state of the switch control after being triggered by the event that is changed, and a parameter after controlEvents is UIControlEventValueChangedEngested, represents an event that the state of the switch control is changed and triggers event monitoring of the switch control.
And the event monitoring is used for monitoring whether an event with the changed state of the switch control occurs or not and indicating an object for processing the event and an event processing method.
Wherein the step S12 further includes:
the addTarget: action: for controlevents: three parameters contained in the method are set, wherein the first parameter is used for representing an object for processing an event of which the state of the switch control is changed, the first parameter is generally set as a parent view or a parent controller of the switch control, the second parameter is used for representing a method executed after monitoring the event of which the state of the switch control is changed, a pointer of a rand InvisibleSwitchChangedHandler method is set here, namely, a user-defined rand InvisibleSwitchChangedHandler method is executed after the event of which the state of the switch control is changed is triggered, and the third parameter is used for representing the event of which the state of the switch control is changed and triggering event monitoring, and a change UIControlEventValueChanged of the value of the switch control is set here.
S13, adding the switch control with the event monitoring set into a setting interface by using a sub-control adding function addSubview, wherein the addSubview adds the switch control to the top layer of the setting interface, and the position of the switch control in the setting interface is determined by the coordinate value of the light-emitting control.
Based on the above embodiment, the step S2 further includes:
s21, when an event that the state of the switch control is changed is monitored, executing the method represented by the second parameter of the addTarget: action: for controlevents: method in response to the event;
s22, calling a respondToSelector function to judge whether the controller of the setting interface sets an agent and whether the agent realizes a switch switching function;
and S23, if the proxy realizes the switch switching function, the proxy executes the switch switching function to acquire the state of the switch control and sends a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to the server.
When the event that the state of the switch control is changed is monitored, executing a switch switching function by an agent to respond to the event that the state of the switch control is changed, and specifically comprising the following steps:
s21, the first parameter of the addTarget method indicates that the object executing the event response method after the event is triggered is the controller of the current setting interface, the second parameter of the addTarget method indicates that the event response method executing after the state of the switch control is changed is the rankinvibrebutchchangehandler method, and when the event that the state of the switch control is changed is monitored, the controller of the current page executes the rankinvibrebutchchangehandler method to respond to the event, and the rankinvibrebutchchangehandler method needs a parameter, which is a UISwitch type and has a parameter name of sender.
At S22, the controller of the present setting interface of the invention does not directly execute a specific switch switching function, but is executed by its agent. In order to increase the robustness of the program, after the rankinvisibleswitchchangedlandhandler method is called, a respondToSelector function is called in the rankinvisibleSwitchchangedlhandler method to judge whether the controller of the setting interface sets an agent and whether the agent implements a switching function rankListViewClickDivisibleWitchIsOn, which can avoid program crash.
S23, according to the result returned by the respondtoselect function, if it is known that the proxy of the controller of the setup page exists and the switch switching function ranklistviewclicdlvisibleswwitchwitchwitchwishsison is realized, the proxy executes the switch switching function ranklistviewclicdlvisibleswwitchwitchwishsison, that is, the switch switching function ranklistviewclicdlvisibleswwitchwishsison realized by the proxy is called back in the rankinvisiswitchchangehandler method.
The proxy realizes that the network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server by executing the switch switching function, so that the server can execute the corresponding opening or closing operation of the stealth anonymous function according to the received network request.
The embodiment of the invention uses the agent to transmit and respond to the event, so that the program is simple to realize, low in coupling and easy to expand the function.
Based on the above embodiment, the step S23 further includes:
when the agent executes the switch switching function, if the state of the switch control is on, sending a network request for opening the stealth anonymous function to a server, and storing the network request operation for opening the stealth anonymous function by using a variable; alternatively, the first and second electrodes may be,
and if the acquired state of the switch control is closed, sending a network request for closing the stealth anonymous function to a server, and storing the network request operation for closing the stealth anonymous function by using a variable.
Specifically, when a proxy needs to execute a switching function rankListViewClickDindinavigability eSwitchWithIson, firstly, a parameter sender is obtained, whether the current state of the switch control is on or off is judged according to the value of the sender, if the current state of the switch control is on, the server needs to be informed to execute the noble stealth anonymity, and a network request for starting the stealth anonymity function is sent to the server; if the function is closed, the server needs to be informed of closing the stealth anonymity function, and a network request for closing the stealth anonymity function is sent to the server. And a variable invisiblesetttingtask is used to save the network request operation with the stealth anonymity function opened. The variable invisiblesetttingtask is used to avoid data disturbances caused by repeated requests.
Based on the above embodiments, after the step S23, the method further includes:
judging whether a network request for opening or closing the stealth anonymous function is executed or not according to the value of the variable;
if the fact that no network request for opening or closing the stealth anonymous function is executed currently is known, executing a function for opening or closing the stealth anonymous function of a network request management class;
and judging whether the opening or closing of the stealth anonymous function is successfully executed according to the return value of the function for opening or closing the stealth anonymous function, if the execution is successful, sending a prompt message to a user, or if the execution is failed, correspondingly setting the state of the switch control.
Specifically, after the server receives a network request for opening or closing the stealth anonymous function sent by the proxy, it needs to first determine whether a network request for opening or closing the stealth anonymous function is being executed according to the value of the variable invisiblesetttingtask, and if it is known that a network request for opening or closing the stealth anonymous function is being executed, cancel the network request for opening or closing the current stealth anonymous function, so as to avoid data disorder caused by repeated requests.
And if the server knows that no network request for opening or closing the stealth anonymous function is executed currently, executing a function for opening or closing the stealth anonymous function of the network request management class. The function has a return value, namely the result of the network request, the execution success or failure of the current hidden anonymous function is obtained, if the execution success or failure is successful, a prompt is used for informing the user that the hidden anonymous function is opened or closed, if the execution failure is failed, the reason of the opening or closing failure of the hidden anonymous function is informed to the user, meanwhile, the state of the switch control is correspondingly set by using a function setInvisibleSwitchWithIson, if the execution failure is the opening failure of the hidden anonymous function, the state of the switch control is set to be closed, and if the execution failure is the closing failure of the hidden anonymous function, the state of the switch control is set to be opened.
When the stealth anonymity function is successfully started, the server side closes the entrance special effect of the target user, cancels or modifies the gift broadcast into anonymity or mystery, displays the anonymity or the mystery as the mystery or the anonymous user on the leaderboard, and realizes the opening of the stealth anonymity. When the stealth anonymity function is successfully closed, the server side starts the entrance special effect of the target user, the gift broadcasting resumes to display the nickname of the target user, and the nickname of the target user is displayed on the leaderboard, so that the stealth anonymity is closed.
Based on the above embodiments, before the step S1, the method further includes:
and setting a controller agent for the setting interface of the target user meeting the preset condition.
In order to pass through the proxy and respond to the event that the state of the switch control is changed, a controller proxy needs to be set for the setting interface where the switch control is located before step S1. Therefore, when the event that the state of the switch control is changed is monitored, the proxy responds to the event after the existence of the proxy is known and the switch switching function is realized.
As shown in fig. 2, a schematic structural diagram of an apparatus for implementing a hidden anonymous function in a live broadcast room according to another embodiment of the present invention includes: a switch adding module 21 and a function realizing module 22, wherein,
the switch adding module 21 is configured to add a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting a preset condition;
the function implementation module 22 is configured to, when an event that the state of the switch control is changed is monitored, send, to the server, a network request for turning on or off the stealth anonymous function corresponding to the state of the switch control through the proxy execution switch switching function, so that the server performs turning on or off the stealth anonymous function according to the network request.
Specifically, the target user meeting the preset condition refers to a level user defined by the live broadcast platform, for example, a noble user, and the preset condition may be determined according to the setting of the live broadcast platform. Adding a switch control in a setting interface of a target user meeting preset conditions, wherein the switch control is used for enabling the target user meeting the preset conditions to select whether to start the stealth anonymous function. When the user meets the preset condition, the user becomes a target user, and a stealth anonymous function switch appears in a setting interface of the user.
The specific steps of adding the switch control to the setting interface of the target user meeting the preset condition by the switch adding module 21 are as follows: and establishing a switch control and initializing, wherein the initialization comprises the steps of allocating memory for the switch control, setting the position of the switch control and the like, adding event monitoring for the established switch control, enabling the on or off of the switch control to be responded, and then adding the switch control with the set event monitoring into the setting interface.
The function implementation module 22 is configured to trigger event monitoring of the switch control when an event that the state of the switch control is changed is monitored, that is, when a user operates the stealth anonymous function switch, for example, turns on or off the switch control, and then an object (generally, a parent view or a controller of the setting interface) that handles the event that the state of the switch control is changed calls a corresponding event processing method, so as to respond to the operation of the user. In the embodiment of the invention, the proxy of the controller of the setting interface executes the switch switching function to respond to the event that the state of the switch control is changed, wherein the switch switching function is used for sending a corresponding network request for opening or closing the stealth anonymous function to the server according to the state of the switch control. The method comprises the steps that an agent is used for transmitting an event that a user changes the switch state, for example, when a server receives a network request that the stealth anonymous function is started, the server closes the privilege mark of a target user, wherein the privilege mark comprises the steps of closing the entrance special effect of the target user, canceling the gift broadcast or modifying the identity of the user into an anonymous person or a mystery person, and displaying the anonymous person or the anonymous user on a leader board, so that the stealth anonymous function is started. And when the server receives a network request for closing the stealth anonymous function, recovering the privilege mark of the target user.
According to the device for realizing the function of hiding anonymity in the live broadcast room, the switch control is added, the agent is used for transmitting and responding to the event, the implementation is simple, the coupling is low, a mechanism for enabling a noble user enjoying a special mark to autonomously select whether to hide or not is provided, the personalized requirements of the user can be met, and the user experience is effectively improved.
Based on the above embodiment, the switch adding module 21 is specifically configured to:
creating and initializing a UISwitch type switch control, and setting the default state of the switch control;
adding event monitoring for the switch control by using an addTarget of UISwitch, action, for controlEvents, and the event monitoring is used for monitoring the event of which the state of the switch control is changed;
and adding the switch control with the set event monitoring to a setting interface of a target user meeting a preset condition by using a sub control adding function addSubview.
Based on the above embodiment, the function implementation module 22 is specifically configured to:
when an event that the state of the switch control is changed is monitored, executing a method represented by a second parameter of the addTarget: action: for controlevents: method in response to the event;
calling a respondToSelector function to judge whether an agent is set in a controller of the setting interface and whether the agent realizes a switch switching function;
and if the proxy realizes the switch switching function, the proxy executes the switch switching function to acquire the state of the switch control and send a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to a server.
As shown in fig. 3, a schematic structural diagram of a device for implementing a hidden anonymous function in a live broadcast room according to another embodiment of the present invention includes: a memory 31, a processor 32, and a bus 33,
the processor 32 and the memory 31 complete mutual communication through the bus 33;
the memory 31 stores program instructions executable by the processor 32, and the processor 32 calls the program instructions in the memory 31 to perform the method according to the foregoing embodiments, for example, the method includes: s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a method setting interface of the target user meeting preset conditions; s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server through the proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request.
According to yet another aspect of the present invention, there is provided a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform a method as described in the above method embodiments, for example comprising: s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a method setting interface of the target user meeting preset conditions; s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to the server through the proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request.
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 embodiment of the device for implementing the hidden anonymity function in the live broadcast room is only illustrative, wherein the units illustrated as separate components may or may not be physically separate, and the components displayed as the units may or may not be physical units, may be located in one place, or may also 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. 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.
The method and the device for realizing the function of hiding and anonymity in the live broadcast room provided by the invention provide a mechanism for enabling the noble user enjoying special marks to autonomously select whether to hide or not, so that the personalized requirements of the user can be met, and the user experience is improved.
Finally, the method of the present invention 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 (7)

1. A method for realizing a stealth anonymous function in a live broadcast room is characterized by comprising the following steps:
s1, adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions;
s2, when an event that the state of the switch control is changed is monitored, a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control is sent to a server through a proxy execution switch switching function, so that the server can open or close the stealth anonymous function according to the network request;
the step S1 further includes:
s11, creating and initializing a UISwitch type switch control, and setting the default state of the switch control;
s12, adding event monitoring for the switch control by using the method of addTarget: action: for controlevents of UISwitch, wherein the event monitoring is used for monitoring the event that the state of the switch control is changed;
s13, adding the switch control with the event monitoring set to a setting interface of a target user meeting preset conditions by using a sub-control adding function addSubview;
the step S12 further includes:
setting addTarget, action, for controlevents, three parameters contained in a method, wherein the first parameter is an object for processing the event of which the state of the switch control is changed, the second parameter is a method executed after monitoring the event of which the state of the switch control is changed, and the third parameter is the event of which the state of the switch control is changed;
the second parameter is a random InvisibleSwitchChangedHandler method which is self-defined after the event that the state of the switch control is changed is triggered, the random InvisibleSwitchChangedHandler method comprises a parameter with a parameter name of sender, and the parameter type is UISwitch type;
the step S2 further includes:
s21, when an event that the state of the switch control is changed is monitored, executing the method represented by the second parameter of the addTarget: action: for controlevents: method in response to the event;
s22, calling a respondToSelector function to judge whether the controller of the setting interface sets an agent and whether the agent realizes a switch switching function;
and S23, if the proxy realizes the switch switching function, the proxy executes the switch switching function to acquire the state of the switch control and sends a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to the server.
2. The method according to claim 1, wherein the step S23 further comprises:
when the agent executes the switch switching function, if the state of the switch control is on, sending a network request for opening the stealth anonymous function to a server, and storing the network request operation for opening the stealth anonymous function by using a variable; alternatively, the first and second electrodes may be,
and if the acquired state of the switch control is closed, sending a network request for closing the stealth anonymous function to a server, and storing the network request operation for closing the stealth anonymous function by using a variable.
3. The method according to claim 2, wherein after the step S23, the method further comprises:
judging whether a network request for opening or closing the stealth anonymous function is executed or not according to the value of the variable;
if the fact that no network request for opening or closing the stealth anonymous function is executed currently is known, executing a function for opening or closing the stealth anonymous function of a network request management class;
and judging whether the opening or closing of the stealth anonymous function is successfully executed according to the return value of the function for opening or closing the stealth anonymous function, if the execution is successful, sending a prompt message to a user, or if the execution is failed, correspondingly setting the state of the switch control.
4. The method according to claim 1, further comprising, before the step S1:
and setting a controller agent for the setting interface of the target user meeting the preset condition.
5. The utility model provides a stealthy anonymous function's realization device in live broadcast, its characterized in that includes:
the switch adding module is used for adding a switch control for the target user to select whether to start the stealth anonymous function in a setting interface of the target user meeting preset conditions;
the adding of the switch control for the target user to select whether to start the stealth anonymous function in the setting interface of the target user meeting the preset condition further comprises:
creating and initializing a UISwitch type switch control, and setting the default state of the switch control;
adding event monitoring for the switch control by using an addTarget of UISwitch, action, for controlEvents, and the event monitoring is used for monitoring the event of which the state of the switch control is changed;
adding the switch control with the event monitoring set to a setting interface of a target user meeting a preset condition by using a sub-control adding function addSubview;
adding event monitoring for the switch control by using an addTarget, action, for controlevents of UISwitch, wherein the event monitoring is used for monitoring an event of which the state of the switch control is changed further comprises the following steps:
setting addTarget, action, for controlevents, three parameters contained in a method, wherein the first parameter is an object for processing the event of which the state of the switch control is changed, the second parameter is a method executed after monitoring the event of which the state of the switch control is changed, and the third parameter is the event of which the state of the switch control is changed;
the second parameter is a random InvisibleSwitchChangedHandler method which is self-defined after the event that the state of the switch control is changed is triggered, the random InvisibleSwitchChangedHandler method comprises a parameter with a parameter name of sender, and the parameter type is UISwitch type;
the function realization module is used for sending a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to the server through the proxy execution switch switching function when monitoring the event that the state of the switch control is changed, so that the server can execute the opening or closing of the stealth anonymous function according to the network request;
when an event that the state of the switch control is changed is monitored, sending a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to a server through a proxy execution switch switching function, so that the server can execute the opening or closing of the stealth anonymous function according to the network request further comprises:
when an event that the state of the switch control is changed is monitored, executing a method represented by a second parameter of the addTarget: action: for controlevents: method in response to the event;
calling a respondToSelector function to judge whether an agent is set in a controller of the setting interface and whether the agent realizes a switch switching function;
and if the proxy realizes the switch switching function, the proxy executes the switch switching function to acquire the state of the switch control and send a network request for opening or closing the stealth anonymous function corresponding to the state of the switch control to a server.
6. The utility model provides a stealthy anonymous function's realization equipment in live broadcast, which comprises: a memory, a processor, and a bus,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, which invokes the program instructions in the memory to perform the method of any of claims 1 to 4.
7. 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 4.
CN201710930299.4A 2017-10-09 2017-10-09 Method and device for realizing stealth anonymity function in live broadcast room Active CN109640102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710930299.4A CN109640102B (en) 2017-10-09 2017-10-09 Method and device for realizing stealth anonymity function in live broadcast room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710930299.4A CN109640102B (en) 2017-10-09 2017-10-09 Method and device for realizing stealth anonymity function in live broadcast room

Publications (2)

Publication Number Publication Date
CN109640102A CN109640102A (en) 2019-04-16
CN109640102B true CN109640102B (en) 2021-05-28

Family

ID=66051210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710930299.4A Active CN109640102B (en) 2017-10-09 2017-10-09 Method and device for realizing stealth anonymity function in live broadcast room

Country Status (1)

Country Link
CN (1) CN109640102B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134480B (en) * 2019-05-20 2023-06-13 抖音视界有限公司 User trigger operation processing method and device, electronic equipment and storage medium
CN111327914B (en) * 2020-02-20 2022-09-20 深圳市腾讯信息技术有限公司 Interaction method and related device
CN112312153B (en) * 2020-10-29 2021-07-16 腾讯科技(深圳)有限公司 Live broadcast interaction realization method and computer readable storage medium
CN112788359B (en) * 2020-12-30 2023-05-09 北京达佳互联信息技术有限公司 Live broadcast processing method and device, electronic equipment and storage medium
CN113382274B (en) * 2021-05-31 2023-01-20 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113382271B (en) * 2021-05-31 2022-11-04 北京达佳互联信息技术有限公司 Processing method and device for creating live broadcast room and server
CN114095748A (en) * 2021-12-01 2022-02-25 北京快来文化传播集团有限公司 Live broadcast interaction method, equipment and storage medium
JP7161715B1 (en) * 2022-02-25 2022-10-27 17Live株式会社 Method and server for handling streaming data

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571630A (en) * 2011-12-26 2012-07-11 腾讯科技(深圳)有限公司 Method and device for evaluating user liveness in anonymous social system
CN104468583A (en) * 2014-12-11 2015-03-25 北京奇虎科技有限公司 Method for single side to send private letter in anonymity mode and server
CN104469693A (en) * 2014-12-11 2015-03-25 北京奇虎科技有限公司 Group message publishing method and device
CN104735030A (en) * 2013-12-23 2015-06-24 广州华多网络科技有限公司 Application opening method, device and system
CN105262601A (en) * 2014-07-18 2016-01-20 腾讯科技(深圳)有限公司 Group member information processing method and system
CN105828145A (en) * 2016-03-18 2016-08-03 广州酷狗计算机科技有限公司 Interaction method and interaction device
CN106384293A (en) * 2016-11-22 2017-02-08 中青冠岳科技(北京)有限公司 Method for realizing announcement comment based on instant messaging software and announcement publishing system
CN106648300A (en) * 2016-10-14 2017-05-10 广州华多网络科技有限公司 Icon message differentiation display control method and device, and mobile terminal
CN106954083A (en) * 2017-02-16 2017-07-14 武汉斗鱼网络科技有限公司 Approaches to IM and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571630A (en) * 2011-12-26 2012-07-11 腾讯科技(深圳)有限公司 Method and device for evaluating user liveness in anonymous social system
CN104735030A (en) * 2013-12-23 2015-06-24 广州华多网络科技有限公司 Application opening method, device and system
CN105262601A (en) * 2014-07-18 2016-01-20 腾讯科技(深圳)有限公司 Group member information processing method and system
CN104468583A (en) * 2014-12-11 2015-03-25 北京奇虎科技有限公司 Method for single side to send private letter in anonymity mode and server
CN104469693A (en) * 2014-12-11 2015-03-25 北京奇虎科技有限公司 Group message publishing method and device
CN105828145A (en) * 2016-03-18 2016-08-03 广州酷狗计算机科技有限公司 Interaction method and interaction device
CN106648300A (en) * 2016-10-14 2017-05-10 广州华多网络科技有限公司 Icon message differentiation display control method and device, and mobile terminal
CN106384293A (en) * 2016-11-22 2017-02-08 中青冠岳科技(北京)有限公司 Method for realizing announcement comment based on instant messaging software and announcement publishing system
CN106954083A (en) * 2017-02-16 2017-07-14 武汉斗鱼网络科技有限公司 Approaches to IM and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"IOS开发UISwitch控件";奔跑的小小鱼;《https://www.jianshu.com/p/23ac4346d381》;20170427;第1-2页 *
"iOS开发之UitableViewCell中UISwitch的使用、代理实现";MG512;《https://csdn.net/mengwuqiang177/article/details/50440157》;20151231;第1-2页 *

Also Published As

Publication number Publication date
CN109640102A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109640102B (en) Method and device for realizing stealth anonymity function in live broadcast room
US10265623B2 (en) Video game processing program, video game processing system and video game processing method
KR102108882B1 (en) Information update method and device, and server
JP2017511992A (en) Method and system for video communication in instant communication
US11020663B2 (en) Video game with automated screen shots
WO2021203573A1 (en) Control method for game accounts, apparatus, medium, and electronic device
CN105404800B (en) Account information authorization method, terminal and server
CN107832127A (en) Application control method and related product
US20240001236A1 (en) Method and apparatus for displaying prompt information, storage medium and electronic device
CN114143563A (en) Control method for live broadcast room and group session, electronic equipment and storage medium
CN110995706B (en) Authentication system, method, device and storage medium for communication application
CN110493120A (en) A kind of method and apparatus for sending device operational order
CN109076008B (en) Suppressing indication of incoming communications in a user interface
CN115061609A (en) Processing method and processing device for group chat operation, electronic equipment and storage medium
CN105160232B (en) A kind of system remapping method and device
CN107124649A (en) The control method and device of Intelligent set top box
CN103984730B (en) information processing method and electronic equipment
CN113300940B (en) Message display method, device, terminal equipment and storage medium
CN113318446B (en) Interaction method, interaction device, electronic equipment and computer readable storage medium
CN110324277A (en) Connection method, device, storage medium and the electronic device of real time communication
CN115484346B (en) Cloud mobile phone management method and system and electronic equipment
WO2024001512A1 (en) Message processing method and apparatus, and electronic device, storage medium and program product
CN113713384A (en) Control method and device of virtual role, storage medium and electronic equipment
CN116506242A (en) Method, device, computer equipment and storage medium for controlling data transmission
CN117590974A (en) Interaction method, device, electronic equipment and readable storage medium for digital people

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