CN106888384A - 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 PDF

Info

Publication number
CN106888384A
CN106888384A CN201710178636.9A CN201710178636A CN106888384A CN 106888384 A CN106888384 A CN 106888384A CN 201710178636 A CN201710178636 A CN 201710178636A CN 106888384 A CN106888384 A CN 106888384A
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.)
Granted
Application number
CN201710178636.9A
Other languages
Chinese (zh)
Other versions
CN106888384B (en
Inventor
温雷
李顺龙
冷晓林
赵文博
王辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710178636.9A priority Critical patent/CN106888384B/en
Publication of CN106888384A publication Critical patent/CN106888384A/en
Application granted granted Critical
Publication of CN106888384B publication Critical patent/CN106888384B/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/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/262Content 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/26208Content 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring 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 that the present invention is provided, introduce reference counter and record the number that certain user opens the window in certain net cast room, for example, user U1 is recorded in the window number that net cast room room_1 is opened by reference counter C1, then user U1 often opens the count value of a Window reference count device C1 of net cast room room_1 and plus 1, and the count value that user U1 often closes a Window reference count device C1 of net cast room room_1 subtracts 1.During count value≤0 of reference counter C1, then sending offline message informing business end carries out offline treatment, and business end can reject the user U1 in the online list of the corresponding users of net cast room room_1.Therefore, the presence of corpse user is reduced, the accuracy of the online list of user is improve.

Description

A kind of receiving handling method and device of offline message
Technical field
The present invention relates to net cast field, more specifically to a kind of receiving handling method of offline message and Device.
Background technology
In recent years, net cast industry has welcome landmark great outburst.The implementation process of net cast:User passes through Video playing terminal sends live request to server, and server, according to live solicited message, is by the broadcasting of the direct broadcast band Address is sent to video playing terminal, and video playing terminal adds corresponding live room according to the address, you can receive this The code stream of live video.It is that number is likely to be breached hundreds of thousands people between popular net cast to have a very obvious scene, depending on Frequently user's visit capacity huge in live can trigger interim card, machine of delaying, website collapse, the user abnormal conditions such as cannot to access.It is abnormal The occurrence of easily cause the generation of corpse user, i.e., offline user is also present in the online list of user at business end.
The content of the invention
In view of this, the present invention proposes a kind of receiving handling method and device of offline message, to reduce corpse user Presence, improve the online list of user accuracy.
To achieve these goals, it is proposed that scheme it is as follows:
A kind of receiving handling method of offline message, including:
Receive on-line message and offline message that access server sends;
Parsing obtains the first mark that each described on-line message is included, and the first mark includes ID and net cast Between identify, the count value of the first corresponding reference counter of mark is added 1, and by each described on-line message storage in unordered collection In conjunction;
Parsing obtains the second mark that each described offline message package contains, and the second mark includes ID and net cast Between identify, on-line message corresponding with offline message is matched from the unordered set, and obtain matching after the match is successful On-line message deleted from the unordered set, and quote corresponding with the first mark that includes of on-line message deleted is counted The count value of the reference counter of number device subtracts 1;
Whether the count value of reference counter is judged more than zero, if it is not, then send offline message informing business end carrying out down Line treatment, the initial value of each reference counter is zero.
Preferably, after the on-line message and offline message that the reception access server sends, also 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, in the reference meter by the first corresponding reference counter of mark included with the on-line message deleted After the count value of number device subtracts 1, also include:
If the count value of reference counter is more than zero, judge corresponding with the reference counter in the unordered set All on-line messages whether there is the online on-line message of non-genuine, if so, the count value for then setting the reference counter is true The quantity of the on-line message of tangible line.
Preferably, methods described, also includes:
For each reference counter, whether time of its count value more than zero is monitored more than Preset Time, if so, then sending out Sending offline message informing business end carries out offline treatment.
Preferably, methods described, also includes:
Online list according to the on-line message stored in the unordered set to the business end is corrected.
A kind of receiving and processing device of offline message, including:
Receiving unit, on-line message and offline message for receiving access server transmission;
First processing units, the first mark that each described on-line message is included is obtained for parsing, and the first mark includes Identified between ID and net cast, the count value of the first corresponding reference counter of mark added 1, and by each it is described on Line message is stored in unordered set;
Second processing unit, the second mark that each described offline message package contains is obtained for parsing, and the second mark includes Identified between ID and net cast, match on-line message corresponding with offline message from the unordered set, and Is deleted from the unordered set with the on-line message that obtains will be matched after success, and that the on-line message with deletion is included The count value of the reference counter of the corresponding reference counter of one mark subtracts 1;
First adjustment unit, for whether judging the count value of reference counter more than zero, if it is not, then sending offline message Notice business end carries out offline treatment, and the initial value of each reference counter is zero.
Preferably, described device, also includes:
Buffer unit, for the on-line message and the offline message to be stored to local cache queue;
Asynchronous acquiring unit, obtains the on-line message and described offline disappears for asynchronous from the local cache queue Breath.
Preferably, described device, also includes:
Second adjustment unit, in the first corresponding reference count of mark that will be included with the on-line message deleted After the count value of the reference counter of device subtracts 1, if the count value of reference counter is more than zero, in judging the unordered set All on-line messages corresponding with the reference counter whether there is the online on-line message of non-genuine, if so, then set this drawing With the quantity that the count value of counter is true online on-line message.
Preferably, described device, also includes:
3rd adjustment unit, for according in the unordered set store on-line message to the business end in alignment Table is corrected.
Preferably, described device, also includes:
4th adjustment unit, for for each reference counter, monitoring whether time of its count value more than zero is more than Preset Time, if so, then sending offline message informing business end carries out offline treatment.
Compared with prior art, technical scheme has advantages below:
The receiving handling method and device of a kind of offline message that above-mentioned technical proposal is provided, introduce reference counter note The number that certain user opens the window in certain net cast room is recorded, for example, user U1 beats in net cast room room_1 The window number opened is recorded by reference counter C1, then user U1 often opens a window of net cast room room_1 and quotes The count value of counter C1 adds 1, and user U1 often closes a meter of the Window reference count device C1 of net cast room room_1 Numerical value subtracts 1.During count value≤0 of reference counter C1, then sending offline message informing business end carries out offline treatment, business end User U1 in the online list of the corresponding users of net cast room room_1 can be rejected.Therefore, corpse user is reduced Presence, improve the accuracy of the online list of user.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying 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
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of receiving handling method of offline message, and shown in Figure 1, the method includes:
Step S11:Receive on-line message and offline message that access server sends;
User 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 generation on-line message is simultaneously sent to processing server on-line message, should On-line message includes ID and net cast room identification.ID is intended to indicate that the information of user identity, user After net cast platform succeeds in registration, a corresponding ID can be allocated.Net cast room identification represents user The information in the net cast room of opening, specifically, each net cast room of net cast platform corresponds to a room number, 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 send to processing server the offline message, the offline message also comprising ID and Net cast room identification.
Step S12:Parsing obtains the first mark that each described on-line message includes, the first mark include ID with Identified between net cast, the count value of the corresponding reference counter of the first mark is added 1, and each described on-line message is stored In unordered set;
Using the atomicity of database Redis third party's component, reference counter is introduced.Reference counter is with user at certain One net cast room is corresponded, and in other words, reference counter records certain user and opens certain net cast room The number of window.For example, user U1 reference counter C1s corresponding with net cast room room_1, user U1 and video video are straight Room room_2 correspondence reference counter C2 are broadcast, then user U1 often opens a window of net cast room room_1 and quotes meter The count value of number device C1 adds 1, and user U1 often closes a counting of the Window reference count device C1 of net cast room room_1 Value subtracts 1, and the count value that user U1 often opens a Window reference count device C2 of net cast room room_2 plus 1, user U2 The count value for often closing a Window reference count device C2 of net cast room room_2 subtracts 1.User U1 in 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, the count value of reference counter corresponding with ID and net cast room identification that it is included plus 1.And unordered The on-line message is stored in set.
Step S13:Parsing obtains the second mark that each described offline message package contains, the second mark include ID with Identified between net cast, on-line message corresponding with offline message is matched from the unordered set, and will after the match is successful The on-line message that matching is obtained is deleted from the unordered set, and will be corresponding with the first mark that the on-line message deleted is included The count value of reference counter of reference counter subtract 1;
The specific message that user reaches the standard grade in net cast room is deposited in unordered set, a record represents the user herein Room is once reached the standard grade.After processing server receives offline message, the ID and video contained using offline message package Live room identification, matching obtains one with the offline message package containing same subscriber mark and net cast room in unordered set Between the on-line message that identifies, and this on-line message that obtains will be matched deleted from unordered set.And will after deleting successfully The count value of corresponding reference counter subtracts 1.For example, being directed to the offline message of a certain bar, the second mark being resolved to includes user U1 and net cast room room_1, then match one in unordered set and include user U1 and net cast room room_1 On-line message, and the on-line message is deleted in unordered set.User U1 is corresponding with net cast room room_1 to be quoted Counter C1, after deleting successfully, subtracts 1 by the count value of reference counter C1.
Step S14:Whether the count value of reference counter is judged more than zero, if it is not, then sending offline message informing business End carries out offline treatment, and the initial value of each reference counter is zero.
When the count value of certain reference counter is not more than zero, illustrate that user closes all of net cast window, At this moment processing server sends offline message to business end, ID that the server at business end contains according to offline message package and Net cast room identification, the relative users of online list corresponding with the net cast room identification are rejected, and will be current Online number subtracts 1.For example, user U1 reference counter C1s corresponding with net cast room room_1, 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 lists 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 certain user and beats The number of the window in certain net cast room is opened, for example, the window number that user U1 is opened in net cast room room_1 Recorded by reference counter C1, then user U1 often opens a meter of the Window reference count device C1 of net cast room room_1 Numerical value adds 1, and the count value that user U1 often closes a Window reference count device C1 of net cast room room_1 subtracts 1.Quote During count value≤0 of counter C1, then sending offline message informing business end carries out offline treatment, and business end can be by net cast User U1 in the online list of the corresponding users of room room_1 is rejected.Therefore, the presence of corpse user is reduced, is improve The accuracy of the online list of user.
Further, when step S13 is performed, if matching reach the standard grade corresponding less than with offline message in unordered set Message, then be stored in independent redis queues by the offline 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 the match is successful This on-line message for obtaining is deleted from unordered set.And corresponding reference counter count value is subtracted 1 after deleting successfully. And then solution on-line message occurs in that delay in network transmission process, causes processing server to be received again after first receiving offline message To on-line message, count inaccurate caused by entering.
Further, cause offline information drop-out to solve the abnormal conditions such as server resets, network jitter, and then cause industry It is engaged in the inaccurate problem of online list at end, it is shown in Figure 2, can also be in the first mark that will be included with the on-line message deleted Know the reference counter of corresponding reference counter count value subtract 1 after, increase:
Step S23:If the count value of reference counter is more than zero, judge in unordered set with the reference counter pair The all on-line messages answered whether there is the online on-line message of non-genuine, if so, then setting the count value of the reference counter It is the quantity of true online on-line message.
Step 21,22,24,25 are identical with step S11, S12, S13 and S14 respectively.By with delete on-line message bag After the count value of the reference counter of the corresponding reference counter of the first mark for containing subtracts 1, step S23 is performed, if quoting meter The count value of number device is more than zero, then using the corresponding relation between reference counter and ID and net cast room identification Breath matches all on-line messages corresponding with the reference counter in unordered set, and goes to inquire access server one by one, connects Enter server and often receive an inquiry message, then judge whether socket connections corresponding with the inquiry message also exist, if It is already off, then reply and do not exist, if also existed, reply.Judge whether deposited in corresponding on-line message by the mechanism In the online on-line message of non-genuine, if there is online (the i.e. phase of non-genuine in all on-line messages corresponding with the reference counter Answer socket connection it is already off) on-line message, then the count value to the reference counter adjust accordingly, specifically, The count value of the counter is set to the quantity of the on-line message of true online (i.e. corresponding socket connections also exist), if There is N number of on-line message truly online, then the count value of the reference counter is set as N, and by reaching the standard grade in unordered set Message is changed to N bars, and N is positive integer.
As an example it is assumed that user U1 enters room_1 by PC ends, then room_ 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 PC ends, only in mobile phone, that An offline message should be able to be sent out, but the reasons such as network jitter occur causes 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 mobile phone App ends are 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 quote meter Counter count value is 2-1=1.Count value is more than zero, inquires that whether true on-line message corresponding with the reference counter is online.
It is the behavior for rejecting certain user's long-time on-hook, can be with:For each reference counter, its count value is monitored Whether the time more than zero is more than Preset Time, if so, then sending offline message informing business end carries out offline treatment.For example, To, without offline user, carrying out forcing offline treatment more than 24 hours.
It is the accuracy of the online list for further improving business end, can be with:According to reaching the standard grade for being stored in unordered set Online list of the message to the business end is corrected.
Online list according to the on-line message stored in unordered set to the business end is corrected, and is specifically: 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 sends inquiry message to access server, and access server judges correspondence to every a piece of news Socket connection whether there is, if it is present reply exist, without modification, if it does not exist, then reply do not exist, locate Corresponding reference counter is subtracted 1, and corresponding one will be deleted in unordered set by reason server according to not existing for replying On-line message.The count value of reference counter is not more than zero, then sending offline message informing business end carries out offline treatment.So Reference counter and unordered set have been corrected in time, and have further improved the accuracy of the online list at business end.
Online list according to the on-line message stored in unordered set to the business end is corrected, and can also be: Business end carries out the user in the online list in the live room of oneself current video with the on-line message of storage in unordered set Compare correction.For example, there is user U1 in the online list of net cast room room_1, 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 improve 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, 35th, 36 is identical with step S11, S12, S13 and S14 respectively, and the method includes:
Step S31:Receive on-line message and offline message that access server sends;
Step S32:The on-line message and the offline message are stored to local cache queue;
Step S33:It is asynchronous to obtain the on-line message and the offline message from the local cache queue;
While whole service starts, the message that one thread of unlatching specially obtains local cache queue (is used Queue.poll () takes out message).And subsequent message treatment is concurrently carried out using thread pool, refer specifically to when service starts Wait, open up a thread pool (code:The class that mono- java of new is provided, class is named as ThreadPoolExecutor), and specify line Number of threads in Cheng Chi, and wait pending maximum queue length etc..Such as take out 5 message, it is possible to take from thread pool Going out five threads goes execution logic respectively to operate, and is performed without order one by one, improves the disposal ability of message.
Step S34:Parsing obtains the first mark that each described on-line message includes, the first mark include ID with Identified between net cast, the count value of the corresponding reference counter of the first mark is added 1, and each described on-line message is stored In unordered set;
Step S35:Parsing obtains the second mark that each described offline message package contains, the second mark include ID with Identified between net cast, on-line message corresponding with offline message is matched from the unordered set, and will after the match is successful The on-line message that matching is obtained is deleted from the unordered set, and will be corresponding with the first mark that the on-line message deleted is included The count value of reference counter of reference counter subtract 1;
Step S36:Whether the count value of reference counter is judged more than zero, if it is not, then sending offline message informing business End carries out offline treatment, and the initial value of each reference counter is zero.
For the message flood peak under high concurrent, processing server during message is received, receiving and place message Manage and exercised by stage into line asynchronous, third party's message components (such as AMQ) is substituted using local cache mechanism, message receipt capability is carried significantly High, hence it is evident that better than third party's component (such as AMQ), it is to avoid in the case of third party's component is made, influence message normally receives.It is asynchronous Sorting refers to separate message sink and the follow-up logical process for message.Receive and treatment is divided into two and moves Make, take execution apart.So when message transmission comes, simply simple reception message does not do other logics, improves and connects Receive the ability and speed of message.
For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but It is that those skilled in the art should know, the present invention is not limited by described sequence of movement, because according to the present invention, certain A little steps can sequentially or simultaneously be carried out using other.
Following is apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.For apparatus of the present invention reality The details not disclosed in example is applied, the inventive method embodiment is refer to.
The present embodiment provides a kind of receiving and processing device of offline message, and shown in Figure 4, the device includes:
Receiving unit 11, on-line message and offline message for receiving access server transmission;
First processing units 12, the first mark that each described on-line message is included is obtained for parsing, the first mark bag Include and identified between ID and net cast, the count value of the corresponding reference counter of the first mark is added 1, and by described in each On-line message is stored in unordered set;
Second processing unit 13, the second mark that each described offline message package contains is obtained for parsing, the second mark bag Include and identified between ID and net cast, match on-line message corresponding with offline message from the unordered set, and The on-line message for obtaining will be matched after the match is successful to be deleted from the unordered set, and the on-line message with deletion is included The count value of the reference counter of the corresponding reference counter of the first mark subtracts 1;
First adjustment unit 14, for whether judging the count value of reference counter more than zero, if it is not, then sending offline disappearing Breath notice business end carries out offline treatment, and 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, and the first adjustment unit 14 judges to quote meter Whether the count value of number device is more than zero, if it is not, then sending offline message informing business end carries out offline treatment.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, the presence of corpse user is reduced, Improve the accuracy of the online list of user.
The present embodiment provides the receiving and processing device of another offline message, shown in Figure 5, is provided relative to Fig. 4 Upper offline message receiving and processing device, the device also includes:
Second adjustment unit 15, by described by based on reference corresponding with the first mark that includes of on-line message deleted After the count value of the reference counter of number device subtracts 1, if the count value of reference counter is more than zero, the unordered set is judged In all on-line messages corresponding with the reference counter with the presence or absence of the online on-line message of non-genuine, if so, then set 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:3rd adjustment unit, for according to institute Online list of the on-line message stored in unordered set to the business end is stated to be corrected.
Preferably, the receiving and processing device for stating offline message can also include:4th adjustment unit, for for each Whether reference counter, monitor time of its count value more than zero more than Preset Time, if so, then sending offline message informing industry Business end carries out offline treatment
The present embodiment provides the receiving and processing device of another offline message, shown in Figure 6, is provided relative to Fig. 4 Upper offline message receiving and processing device, the device can also include:
Buffer unit 16, for the on-line message and the offline message to be stored to local cache queue;
Asynchronous acquiring unit 17, obtains the on-line message and described offline disappears for asynchronous from the local cache queue Breath.
For device embodiment, because it essentially corresponds to embodiment of the method, so related part is referring to method reality Apply the part explanation of example.Device embodiment described above is only schematical, wherein described as separating component The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Selection some or all of module therein is needed to realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not In the case of paying creative work, you can to understand and implement.
Herein, such as first and second or the like relational terms be used merely to by an entity or operation with it is another One entity or operation make a distinction, and not necessarily require or imply these entities or there is any this reality between operating Relation or order.And, term " including ", "comprising" or its any other variant be intended to the bag of nonexcludability Contain, so that process, method, article or equipment including a series of key elements are not only including those key elements, but also including Other key elements being not expressly set out, or it is this process, method, article or the intrinsic key element of equipment also to include. In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including the key element Process, method, article or equipment in also there is other identical element.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.
To the described above of disclosed embodiment of this invention, professional and technical personnel in the field is realized or use this Invention.Various modifications to these embodiments will be apparent for 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 is not intended to be limited to the embodiments shown herein, and is to fit to special with principles disclosed herein and novelty The consistent scope most wide of point.

Claims (10)

1. a kind of receiving handling method of offline message, it is characterised in that including:
Receive on-line message and offline message that access server sends;
Parsing obtains the first mark that each described on-line message is included, and the first mark includes being marked between ID and net cast Know, the count value of the corresponding reference counter of the first mark is added 1, and by each described on-line message storage in unordered set In;
Parsing obtains the second mark that each described offline message package contains, and the second mark includes being marked between ID and net cast Know, match on-line message corresponding with offline message from the unordered set, and obtain upper will be matched after the match is successful Line message is deleted from the unordered set, and the first corresponding reference counter of mark that will be included with the on-line message deleted The count value of reference counter subtract 1;
Whether the count value of reference counter is judged more 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. method according to claim 1, it is characterised in that the on-line message that is sent in the reception access server and After offline message, also 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. method according to claim 1, it is characterised in that described by the included with the on-line message deleted first mark Know the reference counter of corresponding reference counter count value subtract 1 after, also include:
If the count value of reference counter is more than zero, judge corresponding with the reference counter all in the unordered set On-line message is with the presence or absence of the online on-line message of non-genuine, if so, then setting the count value of the reference counter truly to exist The quantity of the on-line message of line.
4. method according to claim 1, it is characterised in that methods described, also includes:
For each reference counter, whether time of its count value more than zero is monitored more than Preset Time, if so, under then sending Line message informing business end carries out offline treatment.
5. the method according to Claims 1 to 4 any one, it is characterised in that methods described, also includes:
Online list according to the on-line message stored in the unordered set to the business end is corrected.
6. a kind of receiving and processing device of offline message, it is characterised in that including:
Receiving unit, on-line message and offline message for receiving access server transmission;
First processing units, the first mark that each described on-line message is included is obtained for parsing, and the first mark includes user Identified between mark and net cast, the count value of the corresponding reference counter of the first mark is added 1, and disappear being reached the standard grade described in each Breath storage is in unordered set;
Second processing unit, parsing obtains the second mark that each described offline message package contains, and the second mark includes ID Identified and between net cast, on-line message corresponding with offline message is matched from the unordered set, and after the match is successful The on-line message for obtaining will be matched to be deleted from the unordered set, and will be right with the first mark that the on-line message deleted is included The count value of the reference counter of the reference counter answered subtracts 1;
First adjustment unit, if being not more than zero for the count value of reference counter, sends offline message informing business end Offline treatment is carried out, the initial value of each reference counter is zero.
7. device according to claim 6, it is characterised in that described device, also includes:
Buffer unit, for the on-line message and the offline message to be stored to local cache queue;
Asynchronous acquiring unit, the on-line message and the offline message are obtained for asynchronous from the local cache queue.
8. device according to claim 6, it is characterised in that described device, also includes:
Second adjustment unit, for it is described by with the first corresponding reference counter of mark that includes of on-line message deleted After the count value of reference counter subtracts 1, if the count value of reference counter is more than zero, judge in the unordered set with should The corresponding all on-line messages of reference counter whether there is the online on-line message of non-genuine, if so, then setting the reference meter The count value of number device is the quantity of true online on-line message.
9. device according to claim 6, it is characterised in that described device, also includes:
4th adjustment unit, for whether for each reference counter, monitoring time of its count value more than zero more than default Time, if so, then sending offline message informing business end carries out offline treatment.
10. the device according to claim 6~9 any one, it is characterised in that described device, also includes:
3rd adjustment unit, enters for the online list according to the on-line message stored in the unordered set to the business end Row correction.
CN201710178636.9A 2017-03-23 2017-03-23 A kind of receiving handling method and device of offline message Active CN106888384B (en)

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 true CN106888384A (en) 2017-06-23
CN106888384B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710685A (en) * 2022-03-14 2022-07-05 秦皇岛泰和安科技有限公司 Video stream processing method and device, terminal equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050165880A1 (en) * 2004-01-22 2005-07-28 Moody Paul B. Method and system for sensing and communicating updated status information for remote users accessible through an instant messaging system
JP3967617B2 (en) * 2002-04-08 2007-08-29 日本電信電話株式会社 Presence method, presence program, and recording medium for the program
US20100169421A1 (en) * 2008-12-30 2010-07-01 Gary Denner System and method for indication of im tracking
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
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
US20050165880A1 (en) * 2004-01-22 2005-07-28 Moody Paul B. Method and system for sensing and communicating updated status information for remote users accessible through an instant messaging system
US20100169421A1 (en) * 2008-12-30 2010-07-01 Gary Denner System and method for indication of im tracking
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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710685A (en) * 2022-03-14 2022-07-05 秦皇岛泰和安科技有限公司 Video stream processing method and device, terminal equipment and storage medium
CN114710685B (en) * 2022-03-14 2023-12-05 秦皇岛泰和安科技有限公司 Video stream processing method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN106888384B (en) 2019-08-30

Similar Documents

Publication Publication Date Title
DE602005003409T2 (en) Filtering unwanted messages (spam) for mobile devices
CN104348809B (en) network security monitoring method and system
US9628412B2 (en) System and method for generic loop detection
US9426046B2 (en) Web page download time analysis
CN108347374B (en) Message pushing method and device for preventing illegal messages
CN103618733B (en) A kind of data filtering system and method for being applied to mobile Internet
US20110125748A1 (en) Method and Apparatus for Real Time Identification and Recording of Artifacts
CN107483976A (en) Live management-control method, device and electronic equipment
EP3860121B1 (en) Video service quality assessment method and apparatus
EP3048539A1 (en) Method and apparatus for recognizing junk messages
US7152103B1 (en) Lawful communication interception—intercepting communication associated information
CN106341310A (en) Session message display method
US10327134B2 (en) Method and apparatus for recognizing service request to change mobile phone number
CN102291693B (en) A kind of converged message service implementation method and device based on terminal
CN106792579A (en) A kind of multimedia message hold-up interception method and device
US8713122B2 (en) Message value indicator
Riadi et al. Examination of digital evidence on android-based line messenger
CN106888384A (en) A kind of receiving handling method and device of offline message
WO2016037489A1 (en) Method, device and system for monitoring rcs spam messages
CN107360331B (en) Short message display method
CN111901199A (en) Mass data-based quick early warning matching implementation method
CN111163184B (en) Method and device for extracting message features
CN101510835B (en) Method and system for monitoring multicast business of network television system
CN104125105B (en) The method and apparatus classified to the Internet, applications place
CN108377211A (en) Dynamic rules chain type recurrence triggering method and its system based on message content perception

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