CN106888384B - A kind of receiving handling method and device of offline message - Google Patents
A kind of receiving handling method and device of offline message Download PDFInfo
- Publication number
- CN106888384B CN106888384B CN201710178636.9A CN201710178636A CN106888384B CN 106888384 B CN106888384 B CN 106888384B CN 201710178636 A CN201710178636 A CN 201710178636A CN 106888384 B CN106888384 B CN 106888384B
- Authority
- CN
- China
- Prior art keywords
- message
- reference counter
- offline
- count value
- line
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management 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/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
- H04N21/26208—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2407—Monitoring of transmitted content, e.g. distribution time, number of downloads
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The receiving handling method and device of a kind of offline message provided by the invention, it introduces reference counter and records the number that some user opens the window in some net cast room, such as, user U1 is recorded in the window number that net cast room room_1 is opened by reference counter C1, then the count value of the every Window reference count device C1 for opening a net cast room room_1 of user U1 adds 1, and the count value of the every Window reference count device C1 for closing a net cast room room_1 of user U1 subtracts 1.When the count value of reference counter C1≤0, then sends offline message informing business end and carry out offline processing, business end can reject the user U1 in the online list of the corresponding user of net cast room room_1.Therefore, the presence for reducing corpse user improves the accuracy of the online list of user.
Description
Technical field
The present invention relates to net cast field, a kind of receiving handling method more specifically to offline message and
Device.
Background technique
In recent years, net cast industry has welcome landmark great outburst.The realization process of net cast: user passes through
Video playing terminal issues live streaming request to server, and server is by the broadcasting of the direct broadcast band according to live streaming solicited message
Address is sent to video playing terminal, and corresponding live streaming room is added according to the address in video playing terminal, and ready to receive arrive should
The code stream of live video.One very obvious scene is that number is likely to be breached hundreds of thousands people between popular net cast, depending on
The abnormal conditions such as huge user's amount of access can cause Caton, delay machine in frequency live streaming, website collapses, user can not access.It is abnormal
The occurrence of easily cause the generation of corpse user, i.e., there is also in the online list of the user at business end by offline user.
Summary of the invention
In view of this, the present invention proposes the receiving handling method and device of a kind of offline message, to reduce corpse user
Presence, improve the online list of user accuracy.
To achieve the goals above, it is proposed that scheme it is as follows:
A kind of receiving handling method of offline message, comprising:
Receive on-line message and offline message that access server is sent;
Parsing obtains the first identifier that each on-line message includes, and first identifier includes user identifier and net cast
Between identify, the count value of the corresponding reference counter of first identifier is added 1, and each on-line message is stored in unordered collection
In conjunction;
Parsing obtains the second identifier that each offline message includes, and second identifier includes user identifier and net cast
Between identify, corresponding with offline message on-line message is matched from the unordered set, and obtain matching after successful match
On-line message deleted from the unordered set, and the first identifier for including by the on-line message with deletion corresponding reference meter
The count value of the reference counter of number device subtracts 1;
Judge whether the count value of reference counter is greater than zero, is carried out down if it is not, then sending offline message informing business end
Line processing, the initial value of each reference counter is zero.
Preferably, after the on-line message and offline message that the reception access server is sent, further include;
The on-line message and the offline message are stored to local cache queue;
It is asynchronous to obtain the on-line message and the offline message from the local cache queue.
Preferably, the reference meter of the corresponding reference counter of the first identifier for including in the on-line message by with deletion
After the count value of number device subtracts 1, further includes:
If the count value of reference counter is greater than zero, judge corresponding with the reference counter in the unordered set
All on-line messages whether there is non-genuine online on-line message, if so, the count value that the reference counter is arranged is true
The quantity of the on-line message of tangible line.
Preferably, the method, further includes:
For each reference counter, monitor whether time of its count value greater than zero is greater than preset time, if so, hair
Offline message informing business end is sent to carry out offline processing.
Preferably, the method, further includes:
The online list at the business end is corrected according to the on-line message stored in the unordered set.
A kind of receiving and processing device of offline message, comprising:
Receiving unit, for receiving the on-line message and offline message of access server transmission;
First processing units, for parsing the first identifier for obtaining each on-line message and including, first identifier includes
Identified between user identifier and net cast, the count value of the corresponding reference counter of first identifier added 1, and by it is each it is described on
Line message is stored in unordered set;
The second processing unit, for parsing the second identifier for obtaining each offline message and including, second identifier includes
Identified between user identifier and net cast, match corresponding with offline message on-line message from the unordered set, and
With the obtained on-line message of matching is deleted from the unordered set after success, and include by the on-line message with deletion the
The count value of the reference counter of the corresponding reference counter of one mark subtracts 1;
The first adjustment unit, for judging whether the count value of reference counter is greater than zero, if it is not, then sending offline message
Notice business end carries out offline processing, and the initial value of each reference counter is zero.
Preferably, described device, further includes:
Cache unit, for storing the on-line message and the offline message to local cache queue;
Asynchronous acquiring unit obtains the on-line message from the local cache queue and described offline disappears for asynchronous
Breath.
Preferably, described device, further includes:
Second adjustment unit, the corresponding reference count of first identifier for including in the on-line message by with deletion
After the count value of the reference counter of device subtracts 1, if the count value of reference counter is greater than zero, judge in the unordered set
All on-line messages corresponding with the reference counter whether there is non-genuine online on-line message, draw if so, this is arranged
It is the quantity of true online on-line message with the count value of counter.
Preferably, described device, further includes:
Third adjust unit, for according to the on-line message stored in the unordered set to the business end in alignment
Table is corrected.
Preferably, described device, further includes:
4th adjusts unit, for being directed to each reference counter, monitors whether time of its count value greater than zero is greater than
Preset time, if so, sending offline message informing business end carries out offline processing.
Compared with prior art, technical solution of the present invention has the advantage that
The receiving handling method and device for a kind of offline message that above-mentioned technical proposal provides introduce reference counter note
The number that some user opens the window in some net cast room is recorded, for example, user U1 is beaten in net cast room room_1
The window number opened is recorded by reference counter C1, then the every window reference for opening a net cast room room_1 of user U1
The count value of counter C1 adds 1, the meter of the every Window reference count device C1 for closing a net cast room room_1 of user U1
Numerical value subtracts 1.When the count value of reference counter C1≤0, then sends offline message informing business end and carry out offline processing, business end
User U1 in the online list of the corresponding user of net cast room room_1 can be rejected.Therefore, reduce corpse user
Presence, improve the accuracy of the online list of user.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the receiving handling method of offline message provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the receiving handling method of another offline message provided in an embodiment of the present invention;
Fig. 3 is the flow chart of the receiving handling method of another offline message provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of the receiving and processing device of offline message provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of the receiving and processing device of another offline message provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of the receiving and processing device of another offline message provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of receiving handling method of offline message, shown in Figure 1, this method comprises:
Step S11: on-line message and offline message that access server is sent are received;
User is by video playing terminal (such as mobile phone, computer), into after net cast room, i.e. video playing terminal
After access server successful connection, access server generates on-line message and on-line message is sent to processing server, should
On-line message includes user identifier and net cast room identification.User identifier is intended to indicate that the information of user identity, user
After net cast platform succeeds in registration, a corresponding user identifier can be assigned.Net cast room identification indicates user
The information in the net cast room of opening, specifically, each net cast room of net cast platform corresponds to a room number,
It can be using the corresponding room number in net cast room as net cast room identification.After user exits net cast room, connect
Enter server to generate offline message and the offline message is sent to processing server, the offline message also include user identifier and
Net cast room identification.
Step S12: parsing obtains the first identifier that each on-line message includes, first identifier include user identifier and
It is identified between net cast, the count value of the corresponding reference counter of first identifier is added 1, and each on-line message is stored
In unordered set;
Using the atomicity of database Redis third party's component, reference counter is introduced.Reference counter and user are at certain
One net cast room corresponds, and in other words, reference counter records some user and opens some net cast room
The number of window.For example, user U1 and net cast room room_1 correspond to reference counter C1, user U1 and video video are straight
It broadcasts room room_2 and corresponds to reference counter C2, then the every window for opening a net cast room room_1 of user U1 quotes meter
The count value of number device C1 adds 1, the counting of the every Window reference count device C1 for closing a net cast room room_1 of user U1
Value subtracts 1, and the count value of the every Window reference count device C2 for opening a net cast room room_2 of user U1 adds 1, user U2
The count value of every Window reference count device C2 for closing a net cast room room_2 subtracts 1.User U1 room_1 simultaneously
Two windows are opened, then the count value C1 of corresponding reference counter is 2.When processing server receives on-line message
Afterwards, by with it includes user identifier and the count value of the corresponding reference counter of net cast room identification add 1.And unordered
The on-line message is stored in set.
Step S13: parsing obtains the second identifier that each offline message includes, second identifier include user identifier and
It is identified between net cast, on-line message corresponding with offline message is matched from the unordered set, and will after successful match
It matches obtained on-line message to delete from the unordered set, and the first identifier for including by the on-line message with deletion is corresponding
The count value of reference counter of reference counter subtract 1;
User's specific message online in net cast room is stored in unordered set, a record indicates the user herein
Room it is primary online.After processing server receives offline message, the user identifier and video that include using offline message
Room identification is broadcast live, it includes same subscriber mark and net cast room that matching, which obtains one with the offline message, in unordered set
Between the on-line message that identifies, and this on-line message that matching obtains is deleted from unordered set.And it will after deleting successfully
The count value of corresponding reference counter subtracts 1.For example, being directed to the offline message of a certain item, the second identifier being resolved to includes user
U1 and net cast room room_1 is then matched to one in unordered set and includes user U1 and net cast room room_1
On-line message, and the on-line message is deleted in unordered set.The corresponding reference of user U1 and net cast room room_1
The count value of reference counter C1 is subtracted 1 after deleting successfully by counter C1.
Step S14: judging whether the count value of reference counter is greater than zero, if it is not, then sending offline message informing business
End carries out offline processing, and the initial value of each reference counter is zero.
When the count value of some reference counter is not more than zero, illustrate that user closes all net cast windows,
At this moment processing server sends offline message to business end, user identifier that the server at business end includes according to offline message and
Net cast room identification rejects the relative users of online list corresponding with the net cast room identification, and will be current
Online number subtracts 1.For example, user U1 and net cast room room_1 correspond to reference counter C1, reference counter C1's
When count value is not more than zero, illustrate that user U1 closes the window of all net cast room room_1.The server at business end
User U1 in the corresponding online list of net cast room room_1 is rejected, net cast room room_1 is corresponding current
Online number subtracts 1.
The embodiment of the present invention provides a kind of receiving handling method of offline message, and reference counter records some user and beats
The number of the window in some net cast room is opened, for example, the window number that user U1 is opened in net cast room room_1
It is recorded by reference counter C1, then the meter of the every Window reference count device C1 for opening a net cast room room_1 of user U1
Numerical value adds 1, and the count value of the every Window reference count device C1 for closing a net cast room room_1 of user U1 subtracts 1.Reference
When the count value of counter C1≤0, then sends offline message informing business end and carry out offline processing, business end can be by net cast
User U1 in the online list of the corresponding user of room room_1 is rejected.Therefore, the presence for reducing corpse user, improves
The accuracy of the online list of user.
Further, when executing step S13, if matched in unordered set corresponding less than with offline message online
The offline message is then stored in independent redis queue by message, and recycles this offline to disappear afterwards in preset interval time (such as 10s)
Breath matches corresponding on-line message in unordered set, terminates if still it fails to match, will matching if successful match
Obtained this on-line message is deleted from unordered set.And corresponding reference counter count value is subtracted 1 after deleting successfully.
And then solve on-line message and occur delay in network transmission process, it is received again after causing processing server first to receive offline message
To on-line message, and then caused counting is inaccurate.
Further, lead to offline information drop-out to solve the abnormal conditions such as server resets, network jitter, and then cause industry
The problem of the online list inaccuracy at business end, it is shown in Figure 2, it can also be in the first mark for including by the on-line message with deletion
Know the reference counter of corresponding reference counter count value subtract 1 after, increase:
Step S23: if the count value of reference counter be greater than zero, judge in unordered set with the reference counter pair
All on-line messages answered whether there is non-genuine online on-line message, if so, the count value of the reference counter is arranged
For the quantity of true online on-line message.
Step 21,22,24,25 are identical as step S11, S12, S13 and S14 respectively.By the on-line message packet with deletion
After the count value of the reference counter of the corresponding reference counter of the first identifier contained subtracts 1, step S23 is executed, if reference meter
The count value of number device is greater than zero, then utilizes the corresponding relationship between reference counter and user identifier and net cast room identification
Breath matches all on-line messages corresponding with the reference counter in unordered set, and removes inquiry access server one by one, connects
Enter server and often receive an inquiry message, then judges whether socket connection corresponding with the inquiry message also exists, if
It is already off, then it replys and does not exist, if also existed, reply.Judge whether deposit in corresponding on-line message by the mechanism
In non-genuine online on-line message, if there are non-genuine online (i.e. phases for all on-line messages corresponding with the reference counter
The socket connection answered is already off) on-line message, then the count value of the reference counter is adjusted accordingly, specifically,
Set the count value of the counter to the quantity of the on-line message of true online (i.e. corresponding socket connection also exists), if
There are N number of on-line message is really online, then the count value of the reference counter is set as N, and will be online in unordered set
Message is changed to N item, and N is positive integer.
As an example it is assumed that user U1 enters room_1 by the end PC, room_ then is entered further through mobile phone A pp
1, then the count value of corresponding counter is equal to 2.If the user U1 closes the viewing at the end PC, only in mobile phone, that
An offline message should be able to be sent to come out, but the reasons such as network jitter occur leads to the offline information drop-out of this, that
Final reference counter is also equal to 2, does not subtract 1.After end user U1 is also switched off the window that the end mobile phone App is opened, then
An offline message is sent, this message is not lost, and the count value that reference counter is carried out after receiving subtracts 1, at this moment reference meter
Counter count value is 2-1=1.Count value is greater than zero, inquires that whether true on-line message corresponding with the reference counter is online.
It, can be with for the behavior for rejecting the on-hook of certain user's long-time: being directed to each reference counter, monitor its count value
Whether the time greater than zero is greater than preset time, if so, sending offline message informing business end carries out offline processing.For example,
To the user not offline more than 24 hours, carry out forcing offline processing.
For further increase business end online list accuracy, can be with: online according to what is stored in unordered set
Message is corrected the online list at the business end.
The online list at the business end is corrected according to the on-line message stored in unordered set, specifically are as follows:
According to the on-line message polling access server stored in unordered set, message verification is carried out.I.e. using in unordered set
The on-line message of storage, a rule send inquiry message to access server, and access server judges to correspond to each message
Socket connection whether there is, if it is present reply exist, without modification, if it does not exist, then reply be not present, locate
Server being not present according to reply is managed, corresponding reference counter is subtracted 1, and corresponding one will be deleted in unordered set
On-line message.The count value of reference counter is not more than zero, then sends offline message informing business end and carry out offline processing.In this way
Reference counter and unordered set have been corrected in time, and has further increased the accuracy of the online list at business end.
The online list at the business end is corrected according to the on-line message stored in unordered set, it can be with are as follows:
Business end by the online list in oneself current video live streaming room user and unordered set in the on-line message that stores carry out
Compare correction.For example, in the online list of net cast room room_1, there are user U1, if what is stored in unordered set is upper
Do not include on-line message corresponding with the net cast room room_1 and user U1 in line message, then will exist in online list
User U1 delete.Further increase the accuracy of the online list at business end.
The embodiment of the present invention provides the receiving handling method of another offline message, shown in Figure 3, step 31,34,
35,36 is identical as step S11, S12, S13 and S14 respectively, this method comprises:
Step S31: on-line message and offline message that access server is sent are received;
Step S32: the on-line message and the offline message are stored to local cache queue;
Step S33: asynchronous to obtain the on-line message and the offline message from the local cache queue;
While entire service starting, opens the message that a thread specially obtains local cache queue and (use
Queue.poll () takes out message).And subsequent message processing is concurrently carried out using thread pool, it refers specifically to when service starts
It waits, opens up a thread pool (code: the class that mono- java of new is provided, class are named as ThreadPoolExecutor), and specified line
The number of threads of Cheng Chizhong, and wait pending maximum queue length etc..Such as take out 5 message, so that it may take from thread pool
Five threads go to execute logical operation respectively out, execute without sequence one by one, improve the processing capacity of message.
Step S34: parsing obtains the first identifier that each on-line message includes, first identifier include user identifier and
It is identified between net cast, the count value of the corresponding reference counter of first identifier is added 1, and each on-line message is stored
In unordered set;
Step S35: parsing obtains the second identifier that each offline message includes, second identifier include user identifier and
It is identified between net cast, on-line message corresponding with offline message is matched from the unordered set, and will after successful match
It matches obtained on-line message to delete from the unordered set, and the first identifier for including by the on-line message with deletion is corresponding
The count value of reference counter of reference counter subtract 1;
Step S36: judging whether the count value of reference counter is greater than zero, if it is not, then sending offline message informing business
End carries out offline processing, and the initial value of each reference counter is zero.
For the message flood peak under high concurrent, receiving and place of the processing server during receiving message, message
Reason progress is asynchronous to exercise by stage, and substitutes third party's message components (such as AMQ) using local cache mechanism, message receipt capability mentions significantly
It is high, hence it is evident that be better than third party's component (such as AMQ), in the case of avoiding third party's component from being made, influence message and normally receive.It is asynchronous
Sorting, which refers to, separates message sink and the subsequent logical process for message.It receives and processing is divided into two and moves
Make, dismantles execution.In this way when message transmission comes, only simple reception message does not do other logics, improves and connects
Receive the ability and speed of message.
For the various method embodiments described above, for simple description, therefore, it is stated as a series of action combinations, but
Be those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because according to the present invention, certain
A little steps can be performed in other orders or simultaneously.
Following is apparatus of the present invention embodiment, can be used for executing embodiment of the present invention method.For apparatus of the present invention reality
Undisclosed details in example is applied, embodiment of the present invention method is please referred to.
Shown in Figure 4 the present embodiment provides a kind of receiving and processing device of offline message, which includes:
Receiving unit 11, for receiving the on-line message and offline message of access server transmission;
First processing units 12, for parsing the first identifier for obtaining each on-line message and including, first identifier packet
It includes and is identified between user identifier and net cast, the count value of the corresponding reference counter of first identifier is added 1, and will be each described
On-line message is stored in unordered set;
The second processing unit 13, for parsing the second identifier for obtaining each offline message and including, second identifier packet
It includes and is identified between user identifier and net cast, the matching on-line message corresponding with offline message from the unordered set, and
The on-line message that matching obtains is deleted from the unordered set after successful match, and includes by the on-line message with deletion
The count value of the reference counter of the corresponding reference counter of first identifier subtracts 1;
The first adjustment unit 14, for judging whether the count value of reference counter is greater than zero, if it is not, then sending offline disappear
It ceases notice business end and carries out offline processing, the initial value of each reference counter is zero.
The embodiment of the present invention provides a kind of receiving and processing device of offline message, the judgement reference meter of the first adjustment unit 14
Whether the count value of number device is greater than zero, if it is not, then sending offline message informing business end carries out offline processing.It business end can be by phase
The relative users in the online list of the corresponding user in net cast room are answered to reject.Therefore, reduce the presence of corpse user,
Improve the accuracy of the online list of user.
It is shown in Figure 5 the present embodiment provides the receiving and processing device of message offline on another kind, it is provided relative to Fig. 4
Upper offline message receiving and processing device, the device further include:
Second adjustment unit 15, based on the corresponding reference of first identifier by including in the on-line message by with deletion
After the count value of the reference counter of number device subtracts 1, if the count value of reference counter is greater than zero, the unordered set is judged
In all on-line messages corresponding with the reference counter whether there is non-genuine online on-line message, if so, setting should
The count value of reference counter is the quantity of true online on-line message.
Preferably, the receiving and processing device of above-mentioned offline message can also include: that third adjusts unit, for according to institute
The on-line message stored in unordered set is stated to be corrected the online list at the business end.
Preferably, the receiving and processing device for stating offline message can also include: the 4th adjusting unit, for for each
Reference counter, monitors whether time of its count value greater than zero is greater than preset time, if so, sending offline message informing industry
Business end carries out offline processing
It is shown in Figure 6 the present embodiment provides the receiving and processing device of message offline on another kind, it is provided relative to Fig. 4
Upper offline message receiving and processing device, which can also include:
Cache unit 16, for storing the on-line message and the offline message to local cache queue;
Asynchronous acquiring unit 17 obtains the on-line message from the local cache queue and described offline disappears for asynchronous
Breath.
For device embodiment, since it essentially corresponds to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
Herein, relational terms such as first and second and the like be used merely to by an entity or operation with it is another
One entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this reality
Relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability
Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including
Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, article or equipment in there is also other identical elements.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
To the above description of disclosed embodiment of this invention, it can be realized professional and technical personnel in the field or use this
Invention.Various modifications to these embodiments will be readily apparent to those skilled in the art, institute herein
The General Principle of definition can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore,
The present invention will not be limited to the embodiments shown herein, and is to fit to special with principles disclosed herein and novelty
The consistent widest scope of point.
Claims (10)
1. a kind of receiving handling method of offline message characterized by comprising
Receive on-line message and offline message that access server is sent;
Parsing obtains the first identifier that each on-line message includes, and first identifier includes marking between user identifier and net cast
Know, the count value of the corresponding reference counter of first identifier is added 1, and each on-line message is stored in unordered set
In;
Parsing obtains the second identifier that each offline message includes, and second identifier includes marking between user identifier and net cast
Know, corresponding with offline message on-line message matched from the unordered set, and will match after successful match obtain it is upper
Line message is deleted from the unordered set, and the corresponding reference counter of the first identifier for including by the on-line message with deletion
The count value of reference counter subtract 1;
Judge whether the count value of reference counter is greater than zero, if it is not, then sending offline message informing business end carries out offline place
Reason, the initial value of each reference counter is zero.
2. the method according to claim 1, wherein it is described reception access server send on-line message and
After offline message, further include;
The on-line message and the offline message are stored to local cache queue;
It is asynchronous to obtain the on-line message and the offline message from the local cache queue.
3. the method according to claim 1, wherein the first mark for including in the on-line message by with deletion
Know the reference counter of corresponding reference counter count value subtract 1 after, further includes:
If the count value of reference counter is greater than zero, judge corresponding with the reference counter all in the unordered set
On-line message whether there is non-genuine online on-line message, if so, the count value that the reference counter is arranged is really to exist
The quantity of the on-line message of line.
4. the method according to claim 1, wherein the method, further includes:
For each reference counter, monitor whether time of its count value greater than zero is greater than preset time, if so, under sending
Line message informing business end carries out offline processing.
5. method described in any one according to claim 1~4, which is characterized in that the method, further includes:
The online list at the business end is corrected according to the on-line message stored in the unordered set.
6. a kind of receiving and processing device of offline message characterized by comprising
Receiving unit, for receiving the on-line message and offline message of access server transmission;
First processing units, for parsing the first identifier for obtaining each on-line message and including, first identifier includes user
Mark net cast between identify, the count value of the corresponding reference counter of first identifier is added 1, and described online disappear each
Breath is stored in unordered set;
The second processing unit, parsing obtain the second identifier that each offline message includes, and second identifier includes user identifier
It is identified between net cast, on-line message corresponding with offline message is matched from the unordered set, and after successful match
The first identifier pair that the on-line message that matching obtains is deleted from the unordered set, and includes by the on-line message with deletion
The count value of the reference counter for the reference counter answered subtracts 1;
The first adjustment unit sends offline message informing business end if the count value for reference counter is not more than zero
Offline processing is carried out, the initial value of each reference counter is zero.
7. device according to claim 6, which is characterized in that described device, further includes:
Cache unit, for storing the on-line message and the offline message to local cache queue;
Asynchronous acquiring unit obtains the on-line message and the offline message from the local cache queue for asynchronous.
8. device according to claim 6, which is characterized in that described device, further includes:
Second adjustment unit, the corresponding reference counter of first identifier for including in the on-line message by with deletion
After the count value of reference counter subtracts 1, if the count value of reference counter is greater than zero, judges in the unordered set and be somebody's turn to do
The corresponding all on-line messages of reference counter whether there is non-genuine online on-line message, if so, the reference meter is arranged
The count value of number device is the quantity of true online on-line message.
9. device according to claim 6, which is characterized in that described device, further includes:
4th adjust unit, for be directed to each reference counter, monitor its count value greater than zero time whether be greater than it is default
Time, if so, sending offline message informing business end carries out offline processing.
10. according to device described in claim 6~9 any one, which is characterized in that described device, further includes:
Third adjusts unit, for according to the on-line message stored in the unordered set to the online list at the business end into
Row correction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178636.9A CN106888384B (en) | 2017-03-23 | 2017-03-23 | A kind of receiving handling method and device of offline message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178636.9A CN106888384B (en) | 2017-03-23 | 2017-03-23 | A kind of receiving handling method and device of offline message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106888384A CN106888384A (en) | 2017-06-23 |
CN106888384B true CN106888384B (en) | 2019-08-30 |
Family
ID=59181332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710178636.9A Active CN106888384B (en) | 2017-03-23 | 2017-03-23 | A kind of receiving handling method and device of offline message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106888384B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114710685B (en) * | 2022-03-14 | 2023-12-05 | 秦皇岛泰和安科技有限公司 | Video stream processing method and device, terminal equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3967617B2 (en) * | 2002-04-08 | 2007-08-29 | 日本電信電話株式会社 | Presence method, presence program, and recording medium for the program |
CN103259770A (en) * | 2012-02-17 | 2013-08-21 | 腾讯科技(深圳)有限公司 | Login method and login server |
CN104753825A (en) * | 2013-12-31 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Instant messaging multi-terminal login status issuing method and system |
CN105872058A (en) * | 2016-04-01 | 2016-08-17 | 太仓日森信息技术有限公司 | Mobile terminal live-broadcasting information pushing method and pushing device thereof |
CN106411713A (en) * | 2016-10-24 | 2017-02-15 | 腾讯音乐娱乐(深圳)有限公司 | Status notification method and server |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7921368B2 (en) * | 2004-01-22 | 2011-04-05 | International Business Machines Corporation | Method and system for sensing and communicating updated status information for remote users accessible through an instant messaging system |
US8108474B2 (en) * | 2008-12-30 | 2012-01-31 | International Business Machines Corporation | System and method for indication of IM tracking |
-
2017
- 2017-03-23 CN CN201710178636.9A patent/CN106888384B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3967617B2 (en) * | 2002-04-08 | 2007-08-29 | 日本電信電話株式会社 | Presence method, presence program, and recording medium for the program |
CN103259770A (en) * | 2012-02-17 | 2013-08-21 | 腾讯科技(深圳)有限公司 | Login method and login server |
CN104753825A (en) * | 2013-12-31 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Instant messaging multi-terminal login status issuing method and system |
CN105872058A (en) * | 2016-04-01 | 2016-08-17 | 太仓日森信息技术有限公司 | Mobile terminal live-broadcasting information pushing method and pushing device thereof |
CN106411713A (en) * | 2016-10-24 | 2017-02-15 | 腾讯音乐娱乐(深圳)有限公司 | Status notification method and server |
Also Published As
Publication number | Publication date |
---|---|
CN106888384A (en) | 2017-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105933375B (en) | Method and device for monitoring microphone connection session and server | |
US10306490B2 (en) | Multi KPI correlation in wireless protocols | |
US9686329B2 (en) | Method and apparatus for displaying webcast rooms | |
US20160295269A1 (en) | Information pushing method, device and system | |
US9426046B2 (en) | Web page download time analysis | |
CN104410516B (en) | A kind of customer service perceptibility appraisal procedure and device | |
WO2014183427A1 (en) | Method and apparatus for displaying webcast rooms | |
US8103245B2 (en) | Systems and methods for session records correlation | |
EP3860121A1 (en) | Video service quality assessment method, apparatus and device, and readable storage medium | |
CN107786992B (en) | Method and device for detecting quality of mobile communication network | |
WO2017219527A1 (en) | Data statistical analysis method and system for an intelligent terminal | |
US20190245945A1 (en) | Rapid optimization of media stream bitrate | |
CN105338564B (en) | A kind of client adaptation method, client, server and system | |
CN108900855A (en) | live content recording method and device | |
JP2019030012A (en) | Mobile video image communication quality measurement method and system | |
CN106888384B (en) | A kind of receiving handling method and device of offline message | |
US20200045169A1 (en) | Communications network | |
Riadi et al. | Examination of digital evidence on android-based line messenger | |
WO2017059778A1 (en) | Method, device and system for detecting shell website | |
EP3860129A1 (en) | Quick start method and device for live video | |
WO2024066938A1 (en) | Livestreaming screenshotting method, apparatus and device, and storage medium | |
CN103826158B (en) | A kind of network direct broadcasting apparatus and method | |
WO2016037489A1 (en) | Method, device and system for monitoring rcs spam messages | |
US7769035B1 (en) | Facilitating a channel change between multiple multimedia data streams | |
CN113315736B (en) | Data synchronization method and device between business processes |
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 |