CN109413507A - Processing method, device, terminal and the medium in barrage library and direct broadcasting room adduction relationship - Google Patents

Processing method, device, terminal and the medium in barrage library and direct broadcasting room adduction relationship Download PDF

Info

Publication number
CN109413507A
CN109413507A CN201811161670.6A CN201811161670A CN109413507A CN 109413507 A CN109413507 A CN 109413507A CN 201811161670 A CN201811161670 A CN 201811161670A CN 109413507 A CN109413507 A CN 109413507A
Authority
CN
China
Prior art keywords
current
cryptographic hash
direct broadcasting
broadcasting room
adduction relationship
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.)
Granted
Application number
CN201811161670.6A
Other languages
Chinese (zh)
Other versions
CN109413507B (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 CN201811161670.6A priority Critical patent/CN109413507B/en
Publication of CN109413507A publication Critical patent/CN109413507A/en
Application granted granted Critical
Publication of CN109413507B publication Critical patent/CN109413507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • 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/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses processing method, device, terminal and the media in a kind of barrage library and direct broadcasting room adduction relationship.This method comprises: receiving the target cryptographic Hash for the context object that target direct broadcasting room is sent when the page is destroyed;If it is judged that the target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that be direct broadcasting room to be recycled between current live corresponding to the current cryptographic Hash;Current adduction relationship between the current live is deleted, to be recycled between the current live;Wherein, the current adduction relationship and the current cryptographic Hash are to be registered in the barrage distribution object when starting between the current live, and cover the history cryptographic Hash in the barrage distribution object and corresponding history adduction relationship.RAM leakage is also solved the problems, such as while improving barrage message distribution efficiency by using above-mentioned technical proposal.

Description

Processing method, device, terminal and the medium in barrage library and direct broadcasting room adduction relationship
Technical field
The present embodiments relate to barrage technical field more particularly to a kind of processing in barrage library and direct broadcasting room adduction relationship Method, apparatus, terminal and medium.
Background technique
With the development of network interaction platform, more and more users are exchanged by logging in network interaction platform.Its In, network direct broadcasting is the application being popular in users very much.User, can be by sending barrage during watching live streaming To express oneself emotion.Wherein, barrage service includes the critical functions such as the reception of user's barrage, processing and push.Work as client After the barrage message for receiving the transmission of barrage server, in the direct broadcasting room that need to be currently running to barrage message distribution to client.
In order to guarantee the distribution efficiency of barrage message and the maintainability of code, need to establish between barrage library and direct broadcasting room Adduction relationship, as barrage distribution channel.But after the adduction relationship is established, as long as in the corresponding APP of direct broadcasting room In the case that (Application, application program) does not exit, at least one adduction relationship is always held in barrage library, to lead The problem of causing at least one direct broadcasting room not to be released, cause RAM leakage.
In order to solve the problems, such as RAM leakage, the removing function of adduction relationship can be added in the destruction function of direct broadcasting room, Its adduction relationship is deleted when direct broadcasting room is destroyed.But since the life cycle of direct broadcasting room is controlled by system, process It is uncertain, if different direct broadcasting rooms, in switching, after the direct broadcasting room after switching is first registered, the direct broadcasting room before switching is It executes and destroys function, the direct broadcasting room after switching can be cut off by being easy to cause the adduction relationship of direct broadcasting room before switching to remove function in this way Adduction relationship, thus in the direct broadcasting room that barrage message can not be sent to after switching.
Summary of the invention
The embodiment of the present invention provides processing method, device, terminal and the medium in a kind of barrage library and direct broadcasting room adduction relationship, While improving barrage message distribution efficiency, RAM leakage is solved the problems, such as.
In a first aspect, the embodiment of the invention provides the processing method in a kind of barrage library and direct broadcasting room adduction relationship, the party Method includes:
Receive the target cryptographic Hash for the context object that target direct broadcasting room is sent when the page is destroyed;
If it is judged that the target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that the current cryptographic Hash It is direct broadcasting room to be recycled between corresponding current live;
Current adduction relationship between the current live is deleted, to be carried out at recycling between the current live Reason;
Wherein, the current adduction relationship and the current cryptographic Hash be by being sent on startup between the current live and It obtains, for covering history cryptographic Hash and corresponding history adduction relationship.
Further, the method also includes:
If it is judged that the target cryptographic Hash and registered current cryptographic Hash be not identical, it is determined that the target live streaming Between adduction relationship be deleted;
Based on the current adduction relationship between the current live, by barrage message distribution between the current live.
Further, the current cryptographic Hash and the current adduction relationship are stored in default key assignments in the form of key-value pair To in object.
Further, the current adduction relationship between the current live is deleted, comprising:
Using the current cryptographic Hash as parameter, the element acquisition methods of the default key-value pair object are called, are obtained current The current adduction relationship of direct broadcasting room;
Empty object setting method is called, gives the empty object value to the current adduction relationship, it is described current to delete Adduction relationship.
Further, receive the target cryptographic Hash of context object that target direct broadcasting room is sent when the page is destroyed it Afterwards, the method also includes:
Using the target cryptographic Hash and registered current cryptographic Hash as parameter, the equal judgment method of character string is called, is sentenced Whether the target cryptographic Hash of breaking and the current cryptographic Hash are equal.
Further, the current adduction relationship and the history adduction relationship pass through the default monitor interface association of calling The constructed fuction of the realization class of view completes initialization, and the realization class is inherited from the default prison by keyword implements Listen device interface protocol.
Second aspect, the embodiment of the invention also provides the processing units in a kind of barrage library and direct broadcasting room adduction relationship, should Device includes:
Target cryptographic Hash receiving module, for receiving the mesh for the context object that target direct broadcasting room is sent when the page is destroyed Mark cryptographic Hash;
Direct broadcasting room determining module to be recycled is used for if it is judged that the target cryptographic Hash and registered current cryptographic Hash It is identical, it is determined that be direct broadcasting room to be recycled between current live corresponding to the current cryptographic Hash;
Direct broadcasting room is recycled module, for deleting the current adduction relationship between the current live, to institute It states and is recycled between current live;
Wherein, the current adduction relationship and the current cryptographic Hash be by being sent on startup between the current live and It obtains, for covering history cryptographic Hash and corresponding history adduction relationship.
Further, described device further include:
Adduction relationship judgment module is used for if it is judged that the target cryptographic Hash and registered current cryptographic Hash not phase Together, it is determined that the adduction relationship of the target direct broadcasting room has been deleted;
Barrage distribution module, for based on the current adduction relationship between the current live, by barrage message distribution to institute It states between current live.
Further, the current cryptographic Hash and the current adduction relationship are stored in default key assignments in the form of key-value pair To in object.
Further, direct broadcasting room recovery processing module is specifically used for:
Using the current cryptographic Hash as parameter, the element acquisition methods of the default key-value pair object are called, are obtained current The current adduction relationship of direct broadcasting room;
Empty object setting method is called, gives the empty object value to the current adduction relationship, it is described current to delete Adduction relationship, to be recycled between the current live;
Further, the method also includes:
Cryptographic Hash judgment module, in the target for receiving the context object that target direct broadcasting room is sent when the page is destroyed After cryptographic Hash, using the target cryptographic Hash and registered current cryptographic Hash as parameter, the equal judgment method of character string is called, Judge whether the target cryptographic Hash and the current cryptographic Hash are equal.
Further, the current adduction relationship and the history adduction relationship pass through the default monitor interface association of calling The constructed fuction of the realization class of view completes initialization, and the realization class is inherited from the default prison by keyword implements Listen device interface protocol.
The third aspect, the embodiment of the invention also provides a kind of terminal, the terminal includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the processing method in barrage library and direct broadcasting room adduction relationship provided by any embodiment of the invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, the program realize barrage library provided by any embodiment of the invention and direct broadcasting room adduction relationship when being executed by processor Processing method.
The technical solution of the embodiment of the present invention, when direct broadcasting room on startup, by the cryptographic Hash of the direct broadcasting room context object Adduction relationship corresponding with cryptographic Hash is registered in barrage distribution object, and covers the history cryptographic Hash pair in barrage distribution object The corresponding adduction relationship of history cryptographic Hash, so that barrage distribution object only safeguards the reference between the current live that one is currently running Relationship ensure that barrage distribution object all points to the direct broadcasting room being currently running forever.There is execution page pin when subsequent When the target direct broadcasting room ruined, target direct broadcasting room can send the target cryptographic Hash of its context object into barrage distribution object.Bullet Curtain distribution object is if it is determined that target cryptographic Hash is identical as current cryptographic Hash, it is determined that executing the target direct broadcasting room that the page is destroyed is It between current live, i.e., is direct broadcasting room to be recycled between current live, setting in this way solves in direct broadcasting room handoff procedure, due to straight Broadcast direct broadcasting room before switching caused by the uncertainty of a life cycle adduction relationship remove function can cut off it is straight after switching The problem of adduction relationship between broadcasting, to can guarantee barrage message distribution into the direct broadcasting room being currently running.In addition, in determination It, can be to current live by deleting the current adduction relationship between current live after between current live being direct broadcasting room to be recycled Between be recycled, to solve the problems, such as RAM leakage.
Detailed description of the invention
Fig. 1 is the process of the processing method of a kind of barrage library that the embodiment of the present invention one provides and direct broadcasting room adduction relationship Figure;
Fig. 2 is the process of the processing method of a kind of barrage library provided by Embodiment 2 of the present invention and direct broadcasting room adduction relationship Figure;
Fig. 3 is the structural frames of the processing unit of a kind of barrage library that the embodiment of the present invention three provides and direct broadcasting room adduction relationship Figure;
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the process of the processing method of a kind of barrage library that the embodiment of the present invention one provides and direct broadcasting room adduction relationship Figure, this method can be executed by the processing unit of barrage library and direct broadcasting room adduction relationship, the device can by software and/or The mode of hardware realizes that the device can integrate in the terminals such as such as mobile phone or tablet computer.Referring to Fig. 1, the side of the present embodiment Method specifically includes:
S110, the target cryptographic Hash for receiving the context object that target direct broadcasting room is sent when the page is destroyed.
It is main first to be noted that the creation function for needing to call life cycle in creation due to direct broadcasting room OnCreate, direct broadcasting room need to call the destruction function onDestory of life cycle when destroying, and create function and destroy letter Number is system function, execute it is uncontrollable when process, therefore after the direct broadcasting room for depositing after handover is first registered, before switching Direct broadcasting room just execute destroy function a possibility that.Therefore, the target direct broadcasting room that the page is destroyed being executed in the present embodiment can be A upper direct broadcasting room before being switched between current live, or may be between the current live that is currently running.If For between the current live that is currently running, then the page between current live destroy can be receive user's triggering closing or It is destroyed when exit instruction.
In the present embodiment, each direct broadcasting room can have a unique mark, the mark can for direct broadcasting room up and down Literary object context.But since context object committed memory space is larger, the technical solution of the present embodiment is upper and lower Literary object is provided with unique cryptographic Hash hashId, and constructs reflecting between the cryptographic Hash and the adduction relationship of direct broadcasting room in advance Penetrate relationship.
In the present embodiment, the direct broadcasting room that the execution page is destroyed is as target direct broadcasting room, and each target direct broadcasting room is in the page It can all be called when destruction and destroy function onDestory, when executing the destruction function, target direct broadcasting room can be by its context object Cryptographic Hash send barrage distribution object.
Illustratively, target direct broadcasting room can be by calling the cryptographic Hash of context object to obtain function when the page is destroyed Context.hashId () obtains the target Hash value information of context object, and sends barrage for the target cryptographic Hash In distribution object.
S120, if it is judged that target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that current cryptographic Hash institute It is direct broadcasting room to be recycled between corresponding current live.
In the present embodiment, current cryptographic Hash is the cryptographic Hash for the direct broadcasting room being currently running.Each direct broadcasting room is starting Its cryptographic Hash and corresponding adduction relationship are registered in barrage distribution object by Shi Douhui, and cover going through in barrage distribution object History cryptographic Hash and corresponding history adduction relationship.The advantages of this arrangement are as follows different direct broadcasting rooms are in handoff procedure, after switching The adduction relationship of direct broadcasting room can cover switch before direct broadcasting room adduction relationship so that in barrage distribution object only maintenance one Cryptographic Hash and its adduction relationship between the current live of operation, i.e. guarantee barrage distribution object all point to be currently running forever Direct broadcasting room.When the subsequent target direct broadcasting room for having and executing page destruction, if the target Hash being sent in barrage distributor It is worth identical as current Hash, then illustrates between current live to be direct broadcasting room to be recycled.
Illustratively, if it is judged that target cryptographic Hash and registered current cryptographic Hash be not identical, then explanation is current straight Between broadcasting on startup, current adduction relationship replaces the adduction relationship of target direct broadcasting room, that is, can determine drawing for target direct broadcasting room It has been deleted with relationship, the direct broadcasting room being currently running between current live.At this point, if user do not receive between current live The cryptographic Hash for the context object that the page is sent when destroying then without deleting the adduction relationship between current live, and can will receive To barrage message be based on before deserving during adduction relationship is sent between current live.
Specifically, judge target cryptographic Hash and whether current cryptographic Hash identical can be by calling the equal judgment method of character string TextUtils.equals (hashId, targetHashId) Lai Zhihang returns to true if identical, if it is not the same, then Return to false.
S130, the current adduction relationship between current live is deleted, to be recycled between current live.
In the present embodiment, the adduction relationship of direct broadcasting room is the channel between barrage distribution object and direct broadcasting room, barrage distribution Object can be distributed processing to barrage message using the barrage method of reseptance in adduction relationship.
Wherein, adduction relationship may be defined as monitor interface type, be monitored by presetting the corresponding Similar integral of direct broadcasting room Device interface protocol can make the corresponding adduction relationship of direct broadcasting room have the barrage method of reseptance.
Specifically, the definition method of default monitor interface protocol is as follows:
Public interface DanmuRouterListener{
Public void onReceiveGiftBean(GiftBean giftBean);
Public void onReceiveTipsBean(TipsBean tipsBean)
}
As shown in above-mentioned program segment, presets in monitor interface protocol DanmuRouterListener and contain one at this The method of reseptance of the barrage message arranged a bit, each corresponding method is a type of barrage information.That is a bullet Curtain message becomes a unique Bean object after being resolved, subsequently through these method of reseptances of definition by this Bean pairs As being sent in direct broadcasting room.
Illustratively, the adduction relationship in class corresponding current live is initialized, it can be by by direct broadcasting room institute The corresponding above-mentioned default monitor interface protocol predetermined of current Similar integral, so that current monitor interface object tool There is the method for reseptance of each barrage message in default monitor interface protocol, completes the initialization of adduction relationship.
Preferably, current monitor interface object can also preset the construction of the realization class of monitor interface protocol by calling Function completes initialization, and the realization class is inherited from default monitor interface protocol by keyword implements.
Specifically, the definition method of the realization class DanmuRouterListenerImp of default monitor interface protocol is such as Under:
Public class DanmuRouterListenerImp implements DanmuRouterListener{
@override
Public void onReceiveGiftBean(GiftBean giftBean){}
@override
Public void onReceiveTipsBean(TipsBean tipsBean){}
}
The realization class DanmuRouterListenerImp inherits default monitor interface by keyword implements , it can be achieved that all barrages in agreement DanmuRouterListener receive after agreement DanmuRouterListener OnReceiver method.Upper override label can be added in the function that each is realized for indicating to be to pre- If the manifolding of the method in monitor interface protocol.
In the present embodiment, current adduction relationship, which delete, to be passed through by emptying adduction relationship and call sky right As assignment function mDanmuRouterListener=null, the current adduction relationship between current live is deleted, with right It is recycled between current live, so as to solve the problems, such as RAM leakage.
The technical solution of the present embodiment, when direct broadcasting room on startup, by the cryptographic Hash of the direct broadcasting room context object and Kazakhstan The uncommon corresponding adduction relationship of value is registered in barrage distribution object, and covers the history cryptographic Hash in barrage distribution object to history The corresponding adduction relationship of cryptographic Hash, so that barrage distribution object only safeguards that the reference between the current live that one is currently running is closed System, that is, ensure that barrage distribution object all points to the direct broadcasting room being currently running forever.There is execution page destruction when subsequent Target direct broadcasting room when, target direct broadcasting room can send the target cryptographic Hash of its context object into barrage distribution object.Barrage Distribution object is if it is determined that target cryptographic Hash is identical as current cryptographic Hash, it is determined that executing the target direct broadcasting room that the page is destroyed is to work as Preceding direct broadcasting room is direct broadcasting room to be recycled between current live, setting in this way solves in direct broadcasting room handoff procedure, due to live streaming Between life cycle uncertainty caused by switch before direct broadcasting room adduction relationship remove function can cut off switching after live streaming Between adduction relationship the problem of, thus can guarantee by barrage message distribution into the direct broadcasting room being currently running.In addition, working as in determination Preceding direct broadcasting room be direct broadcasting room to be recycled after, by by between current live current adduction relationship delete, can be between current live It is recycled, to solve the problems, such as RAM leakage.
Embodiment two
Fig. 2 is the process of the processing method of a kind of barrage library provided by Embodiment 2 of the present invention and direct broadcasting room adduction relationship Figure, the present embodiment are optimized on the basis of the above embodiments, wherein same as the previously described embodiments or corresponding term Explain that details are not described herein.Referring to fig. 2, method provided in this embodiment includes:
When starting between S200, current live, the current cryptographic Hash of context object and current reference are closed between current live System is registered in barrage distribution object, and covers the history cryptographic Hash in barrage distribution object and corresponding adduction relationship.
It should be noted that each direct broadcasting room is on startup, the creation function onCreate of life cycle can be all called, it should Function mainly carries out some necessary initial works in direct broadcasting room starting.
Any type of direct broadcasting room of display can be supported between current live in the present embodiment by application program, such as Half screen direct broadcasting room, face value direct broadcasting room and game direct broadcasting room etc..It, can be by calling default bullet when starting between detecting current live Method of Get Remote Object DanmuClient.getInstance () method in curtain distribution class DanmuClient, obtains default bullet The barrage distribution object of curtain distribution class.
Wherein, the Method of Get Remote Object DanmuClient.getInstance () in barrage distribution class is singleton pattern, i.e., This method is called every time, and return is the same object.It, should by calling for any type of direct broadcasting room in the present embodiment Method, that obtain is all the barrage distribution object mDanmuClient in default barrage distribution class.
The present embodiment can call barrage to divide the function in object after getting barrage distribution object, distribute to barrage Object Transfer Parameters, with the adduction relationship established between direct broadcasting room and barrage distribution object.
In the present embodiment, definition has monitor registration function in barrage distribution object, for storing the current Kazakhstan of direct broadcasting room Uncommon value and adduction relationship.Cryptographic Hash and adduction relationship can be passed to barrage point by calling the monitor registration function by direct broadcasting room It sends out in object.
Specifically, monitor registration function is as follows:
public void setListener(String hashId,MyInterface myInterface)
It, can be by calling key-value pair store method mMap.put (hashId, myInterface) inside the function, it will One group of cryptographic Hash and adduction relationship storage are into default key-value pair object.
In the present embodiment, first parameter of monitor registration function is current cryptographic Hash hashId, and second parameter is Current adduction relationship myInterface.By two variables of setting in the present embodiment, can will be cut by way of for variable assignments Change the cryptographic Hash that rear direct broadcasting room is passed to and cryptographic Hash and adduction relationship that the preceding direct broadcasting room of adduction relationship covering switching is passed to.
S210, the target cryptographic Hash for receiving the context object that target direct broadcasting room is sent when the page is destroyed.
S220, using target cryptographic Hash and registered current cryptographic Hash as parameter, call the equal judgment method of character string, sentence Whether disconnected target cryptographic Hash and current cryptographic Hash are equal, if so, thening follow the steps S230;Otherwise, step S260 is executed.
S230, determine between current live corresponding to current cryptographic Hash to be direct broadcasting room to be recycled, continue to execute step S240.
S240, using current cryptographic Hash as parameter, call the element acquisition methods of default key-value pair object, obtain current live Between current adduction relationship, continue to execute step S250.
Wherein, presetting key-value pair object has its element acquisition methods mMap.get (), since cryptographic Hash and its reference are closed System is stored in the form of key-value pair, therefore the element by using current cryptographic Hash as parameter, calling default key-value pair object Acquisition methods can obtain the current adduction relationship between current live.
S250, empty object setting method is called, gives empty object value to the current adduction relationship, to delete current reference Relationship.
S260, determine that the adduction relationship of target direct broadcasting room has been deleted, the direct broadcasting room being currently running between current live, and Based on the current adduction relationship between current live, by barrage message distribution between current live.
Content based on step S130 it is found that include the method for reseptance of barrage message in default monitor interface protocol, Therefore, after being initialized using default monitor interface protocol to the adduction relationship of direct broadcasting room, the monitor of direct broadcasting room is connect Mouth object also has the method for reseptance of the barrage message.Therefore, when to barrage message is sent between the current live being currently running, It can be based on current adduction relationship, call barrage message receival method, between barrage message is sent the current live being currently running, mentioned The high distribution efficiency of barrage.
The present embodiment includes that barrage connects by designing in barrage distribution object in advance on the basis of the above embodiments The default monitor interface protocol of receiving method, and initialized using adduction relationship of the agreement to direct broadcasting room, it may make just Adduction relationship after beginningization has barrage method of reseptance.After the current adduction relationship for determining the direct broadcasting room being currently running, By utilizing the adduction relationship, and after determining the direct broadcasting room being currently running, using the barrage recipient in the adduction relationship Method sends barrage message in the target direct broadcasting room being currently running, and improves the distribution efficiency of barrage.
Embodiment three
Fig. 3 is the structural frames of the processing unit of a kind of barrage library that the embodiment of the present invention three provides and direct broadcasting room adduction relationship Figure, as shown in figure 3, the device includes: target cryptographic Hash receiving module 310, direct broadcasting room determining module 320 to be recycled and direct broadcasting room It is recycled module 330.Wherein,
Target cryptographic Hash receiving module 310, the context object sent for receiving target direct broadcasting room when the page is destroyed Target cryptographic Hash;
Direct broadcasting room determining module 320 to be recycled is used for if it is judged that the target cryptographic Hash and registered current Kazakhstan Uncommon value is identical, it is determined that is direct broadcasting room to be recycled between current live corresponding to the current cryptographic Hash;
Direct broadcasting room is recycled module 330, for deleting the current adduction relationship between the current live, with right It is recycled between the current live;
Wherein, the current adduction relationship and the current cryptographic Hash be by being sent on startup between the current live and It obtains, for covering history cryptographic Hash and corresponding history adduction relationship.
The technical solution of the present embodiment, when direct broadcasting room on startup, by the cryptographic Hash of the direct broadcasting room context object and Kazakhstan The uncommon corresponding adduction relationship of value is registered in barrage distribution object, and covers the history cryptographic Hash in barrage distribution object to history The corresponding adduction relationship of cryptographic Hash, so that barrage distribution object only safeguards that the reference between the current live that one is currently running is closed System, that is, ensure that barrage distribution object all points to the direct broadcasting room being currently running forever.There is execution page destruction when subsequent Target direct broadcasting room when, target direct broadcasting room can send the target cryptographic Hash of its context object into barrage distribution object.Barrage Distribution object is if it is determined that target cryptographic Hash is identical as current cryptographic Hash, it is determined that executing the target direct broadcasting room that the page is destroyed is to work as Preceding direct broadcasting room is direct broadcasting room to be recycled between current live, setting in this way solves in direct broadcasting room handoff procedure, due to live streaming Between life cycle uncertainty caused by switch before direct broadcasting room adduction relationship remove function can cut off switching after live streaming Between adduction relationship the problem of, thus can guarantee by barrage message distribution into the direct broadcasting room being currently running.In addition, working as in determination Preceding direct broadcasting room be direct broadcasting room to be recycled after, by by between current live current adduction relationship delete, can be between current live It is recycled, to solve the problems, such as RAM leakage.
On the basis of the above embodiments, described device further include:
Adduction relationship judgment module is used for if it is judged that the target cryptographic Hash and registered current cryptographic Hash not phase Together, it is determined that the adduction relationship of the target direct broadcasting room has been deleted;
Barrage distribution module, for based on the current adduction relationship between the current live, by barrage message distribution to institute It states between current live.
On the basis of the above embodiments, the current cryptographic Hash and the current adduction relationship are deposited in the form of key-value pair It is stored in default key-value pair object.
On the basis of the above embodiments, direct broadcasting room recovery processing module is specifically used for:
Using the current cryptographic Hash as parameter, the element acquisition methods of the default key-value pair object are called, are obtained current The current adduction relationship of direct broadcasting room;
Empty object setting method is called, gives the empty object value to the current adduction relationship, it is described current to delete Adduction relationship, to be recycled between the current live;
On the basis of the above embodiments, the method also includes:
Cryptographic Hash judgment module, in the target for receiving the context object that target direct broadcasting room is sent when the page is destroyed After cryptographic Hash, using the target cryptographic Hash and registered current cryptographic Hash as parameter, the equal judgment method of character string is called, Judge whether the target cryptographic Hash and the current cryptographic Hash are equal.
On the basis of the above embodiments, it is default to pass through calling for the current adduction relationship and the history adduction relationship The constructed fuction of the realization class of monitor interface protocol completes initialization, and the realization class is inherited by keyword implements From the default monitor interface protocol.
The executable present invention of the processing unit of barrage library provided by the embodiment of the present invention and direct broadcasting room adduction relationship is any The processing method in barrage library and direct broadcasting room adduction relationship provided by embodiment has the corresponding functional module of execution method and has Beneficial effect.The not technical detail of detailed description in the above-described embodiments, reference can be made to barrage provided by any embodiment of the invention The processing method in library and direct broadcasting room adduction relationship.
Example IV
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.Fig. 4, which is shown, to be suitable for being used to realizing this The block diagram of the exemplary terminal 12 of invention embodiment.The terminal 12 that Fig. 4 is shown is only an example, should not be to of the invention real The function and use scope for applying example bring any restrictions.
As shown in figure 4, terminal 12 is showed in the form of universal computing device.The component of terminal 12 may include but unlimited In one or more processor or processing unit 16, system storage 28, connecting different system components, (including system is deposited Reservoir 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Terminal 12 typically comprises a variety of computer system readable media.These media can be it is any can be by terminal 12 The usable medium of access, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (RAM) 30 and/or cache memory 32.Terminal 12 may further include it is other it is removable/nonremovable, Volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing irremovable , non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").Although not shown in fig 4, use can be provided In the disc driver read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to removable anonvolatile optical disk The CD drive of (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver can To be connected by one or more data media interfaces with bus 18.Memory 28 may include at least one program product, The program product has one group of (for example, at least one) program module, these program modules are configured to perform each implementation of the invention The function of example.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28 In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual Execute the function and/or method in embodiment described in the invention.
Terminal 12 can also be communicated with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.), Can also be enabled a user to one or more equipment interacted with the terminal 12 communication, and/or with enable the terminal 12 with One or more of the other any equipment (such as network interface card, modem etc.) communication for calculating equipment and being communicated.It is this logical Letter can be carried out by input/output (I/O) interface 22.Also, terminal 12 can also by network adapter 20 and one or The multiple networks of person (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.As shown, Network adapter 20 is communicated by bus 18 with other modules of terminal 12.It should be understood that although not shown in the drawings, can combine Terminal 12 use other hardware and/or software module, including but not limited to: microcode, device driver, redundant processing unit, External disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize the processing method in barrage library and direct broadcasting room adduction relationship provided by the embodiment of the present invention, this method Include:
Receive the target cryptographic Hash for the context object that target direct broadcasting room is sent when the page is destroyed;
If it is judged that the target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that the current cryptographic Hash It is direct broadcasting room to be recycled between corresponding current live;
Current adduction relationship between the current live is deleted, to be carried out at recycling between the current live Reason;
Wherein, the current adduction relationship and the current cryptographic Hash be by being sent on startup between the current live and It obtains, for covering history cryptographic Hash and corresponding history adduction relationship.
Embodiment five
The embodiment of the present invention five additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should The processing side in barrage library and direct broadcasting room adduction relationship provided by any embodiment of the invention is realized when program is executed by processor Method, this method comprises:
Receive the target cryptographic Hash for the context object that target direct broadcasting room is sent when the page is destroyed;
If it is judged that the target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that the current cryptographic Hash It is direct broadcasting room to be recycled between corresponding current live;
Current adduction relationship between the current live is deleted, to be carried out at recycling between the current live Reason;
Wherein, the current adduction relationship and the current cryptographic Hash be by being sent on startup between the current live and It obtains, for covering history cryptographic Hash and corresponding history adduction relationship.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of processing method in barrage library and direct broadcasting room adduction relationship characterized by comprising
Receive the target cryptographic Hash for the context object that target direct broadcasting room is sent when the page is destroyed;
If it is judged that the target cryptographic Hash is identical as registered current cryptographic Hash, it is determined that the current cryptographic Hash institute is right It is direct broadcasting room to be recycled between the current live answered;
Current adduction relationship between the current live is deleted, to be recycled between the current live;
Wherein, the current adduction relationship and the current cryptographic Hash are obtained by sending on startup between the current live , for covering history cryptographic Hash and corresponding history adduction relationship.
2. the method according to claim 1, wherein the method also includes:
If it is judged that the target cryptographic Hash and registered current cryptographic Hash be not identical, it is determined that the target direct broadcasting room Adduction relationship has been deleted;
Based on the current adduction relationship between the current live, by barrage message distribution between the current live.
3. method according to claim 1 or 2, which is characterized in that the current cryptographic Hash and the current adduction relationship It is stored in the form of key-value pair in default key-value pair object.
4. according to the method described in claim 3, it is characterized in that, the current adduction relationship between the current live is deleted It removes, comprising:
Using the current cryptographic Hash as parameter, the element acquisition methods of the default key-value pair object are called, obtain current live Between current adduction relationship;
Empty object setting method is called, the empty object value is given to the current adduction relationship, to delete the current reference Relationship.
5. the method according to claim 1, wherein being sent when receiving target direct broadcasting room in page destruction upper Hereafter after the target cryptographic Hash of object, the method also includes:
Using the target cryptographic Hash and registered current cryptographic Hash as parameter, the equal judgment method of character string is called, judges institute It states target cryptographic Hash and whether the current cryptographic Hash is equal.
6. the method according to claim 1, wherein the current adduction relationship and the history adduction relationship are equal By calling the constructed fuction of the realization class of default monitor interface protocol to complete initialization, the realization class passes through keyword Implements is inherited from the default monitor interface protocol.
7. a kind of processing unit in barrage library and direct broadcasting room adduction relationship characterized by comprising
Target cryptographic Hash receiving module, the target for receiving the context object that target direct broadcasting room is sent when the page is destroyed are breathed out Uncommon value;
Direct broadcasting room determining module to be recycled, for if it is judged that the target cryptographic Hash and registered current cryptographic Hash phase Together, it is determined that be direct broadcasting room to be recycled between current live corresponding to the current cryptographic Hash;
Direct broadcasting room is recycled module, for deleting the current adduction relationship between the current live, to work as to described Preceding direct broadcasting room is recycled;
Wherein, the current adduction relationship and the current cryptographic Hash are obtained by sending on startup between the current live , for covering history cryptographic Hash and corresponding history adduction relationship.
8. device according to claim 7, which is characterized in that described device further include:
Adduction relationship judgment module is used for if it is judged that the target cryptographic Hash and registered current cryptographic Hash be not identical, Then determine that the adduction relationship of the target direct broadcasting room has been deleted;
Barrage distribution module, for based on the current adduction relationship between the current live, barrage message distribution to be worked as described in Preceding direct broadcasting room.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as the processing method in barrage library and direct broadcasting room adduction relationship as claimed in any one of claims 1 to 6.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The processing method such as barrage library and direct broadcasting room adduction relationship as claimed in any one of claims 1 to 6 is realized when execution.
CN201811161670.6A 2018-09-30 2018-09-30 Method, device, terminal and medium for processing reference relationship between barrage library and live broadcast room Active CN109413507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811161670.6A CN109413507B (en) 2018-09-30 2018-09-30 Method, device, terminal and medium for processing reference relationship between barrage library and live broadcast room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161670.6A CN109413507B (en) 2018-09-30 2018-09-30 Method, device, terminal and medium for processing reference relationship between barrage library and live broadcast room

Publications (2)

Publication Number Publication Date
CN109413507A true CN109413507A (en) 2019-03-01
CN109413507B CN109413507B (en) 2021-05-25

Family

ID=65465939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161670.6A Active CN109413507B (en) 2018-09-30 2018-09-30 Method, device, terminal and medium for processing reference relationship between barrage library and live broadcast room

Country Status (1)

Country Link
CN (1) CN109413507B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442404A (en) * 2019-08-13 2019-11-12 武汉斗鱼鱼乐网络科技有限公司 A kind of object method for releasing, device, equipment and storage medium
CN110597737A (en) * 2019-08-22 2019-12-20 腾讯音乐娱乐科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661096A (en) * 2013-11-21 2015-05-27 深圳市快播科技有限公司 Video barrage adding method and device, video playing method and video player
CN106028166A (en) * 2016-06-24 2016-10-12 北京小米移动软件有限公司 Method and device for switching live broadcasting rooms in live broadcasting process
US20170359619A1 (en) * 2015-07-31 2017-12-14 Tencent Technology (Shenzhen) Company Limited Barrage video live broadcast method and apparatus, video source device, and network access device
CN108270667A (en) * 2018-01-22 2018-07-10 赵宇航 A kind of Internet education platform and its multiuser interactive method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661096A (en) * 2013-11-21 2015-05-27 深圳市快播科技有限公司 Video barrage adding method and device, video playing method and video player
US20170359619A1 (en) * 2015-07-31 2017-12-14 Tencent Technology (Shenzhen) Company Limited Barrage video live broadcast method and apparatus, video source device, and network access device
CN106028166A (en) * 2016-06-24 2016-10-12 北京小米移动软件有限公司 Method and device for switching live broadcasting rooms in live broadcasting process
CN108270667A (en) * 2018-01-22 2018-07-10 赵宇航 A kind of Internet education platform and its multiuser interactive method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442404A (en) * 2019-08-13 2019-11-12 武汉斗鱼鱼乐网络科技有限公司 A kind of object method for releasing, device, equipment and storage medium
CN110442404B (en) * 2019-08-13 2022-07-05 武汉斗鱼鱼乐网络科技有限公司 Object release method, device, equipment and storage medium
CN110597737A (en) * 2019-08-22 2019-12-20 腾讯音乐娱乐科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109413507B (en) 2021-05-25

Similar Documents

Publication Publication Date Title
CN104869043B (en) A kind of method and terminal for establishing VPN connection
CN105391622A (en) Method and system for sharing resources in instant messaging or social networking application
CN112217890B (en) Remote assistance method, device, computer equipment and storage medium
CN112291364A (en) Message pushing processing method and device
JP2020526991A (en) Techniques for multi-agent messaging
CN109302639A (en) A kind of distribution method, device, terminal and the storage medium of barrage message
EP2974159B1 (en) Method, device and system for voice communication
CN109413507A (en) Processing method, device, terminal and the medium in barrage library and direct broadcasting room adduction relationship
CN110072268A (en) Method, equipment and the computer storage medium that wifi hotspot is shared
CN108280020A (en) Monitoring method, device, terminal and the computer storage media of computer equipment
CN108540552A (en) Apparatus interconnection method, apparatus, system, equipment and storage medium
RU2670096C2 (en) Method and device for ending video communication
CN113993092A (en) Emergency call method, device, mobile terminal and network side equipment
CN107819729B (en) Data request method and system, access device, storage device and storage medium
CN105490913A (en) Instant message processing method and device
CN104320766A (en) Spam short message identification method, device and equipment
CN110995706A (en) Authentication system, method, device and storage medium for communication application
CN109327726A (en) A kind of processing method, device, terminal and the storage medium of barrage message
CN109413498A (en) A kind of distribution method, device, terminal and the storage medium of barrage message
CN108989902A (en) A kind of processing method, device, terminal and the storage medium of barrage message
CN110880974B (en) Data communication method and device based on block chain network
CN108449428A (en) A kind of method for connecting network, device, server and storage medium
CN114449022A (en) Method and system for synchronously checking electronic documents
CN113783768A (en) Group control method, group control device and communication system
CN105677408A (en) Application deletion method and device

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